influxdata / influxdata/kapacitor

InfluxDB query can't be parsed by kapacitor

Open
#1,978 7 comments 0 reactions 0 assignees View on GitHub
documentation pm/review
Dominant language
Go
Stars
2.4k
Forks
479
Avg merge
4d 16h
Merged PRs (30d)
4

Description

Surprisingly a query which works just fine in influxdb fails in kapacitor:
```
var test = batch
|query('''
SELECT non_negative_difference(mean("value")) AS "diff"
FROM "telegraf"."autogen"."test"
''')
.period(5m)
.every(1m)
.groupBy(time(5m), *)
```
Results in:
```
`failed to parse InfluxQL query: expected field argument in non_negative_difference()`
```

Contributor guide

Open the contributing guide

Research direction

Reproduce the reported Kapacitor batch query and compare its parsing of non_negative_difference(mean("value")) with the equivalent query accepted by InfluxDB. Locate the InfluxQL parsing path, then add coverage for the reported query and verify that it parses successfully without breaking existing function handling.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
databases
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.