influxdata / influxdata/kapacitor

Cannot apply mode to string field, while influxdb states that mode supports all data types

Open
#1,714 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
2.4k
Forks
479
Avg merge
4d 16h
Merged PRs (30d)
4

Description

**Kapacitor**: 1.3.3

I can't apply the [mode function](https://docs.influxdata.com/kapacitor/v1.3/nodes/influx_q_l_node/#mode) to a string field while influxdb's [implementation](https://docs.influxdata.com/influxdb/v1.3/query_language/functions/#mode) works as expected.
The error message is:

`Error: mode3: invalid influxql func mode with field status: cannot apply mode to string field`

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the reported mode query against a string field in Kapacitor 1.3.3 and compare it with InfluxDB's mode behavior described in the linked documentation. Trace the path producing the `cannot apply mode to string field` error, then verify that string-field mode works as expected and that the existing behavior remains covered by a regression test.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
data
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.