influxdata / influxdata/kapacitor

Bitwise operator in InfluxQL don't work in QueryNode

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

Description

The bitwise operators (&, |, ^) are not accepted when you write a InfluxQL query in a Kapacitor script.

**Kapacitor version used:** 1.5.0
**Influx version:** 1.6.0

Example script:
```
var my_var = batch
|query('''
SELECT "boolean_value" | TRUE as my_value
FROM "my_db"."autogen".my_measurement
''')
.period(1h)
.every(1m)
.align()
.groupBy('my_tag')
```

Error:
```
failed to parse InfluxQL query: found |, expected FROM at line 2, char 41
```
The same query works perfectly on the influx CLI.

Contributor guide

Open the contributing guide

Research direction

Start at the QueryNode InfluxQL parsing path and compare how the example query is handled there with the working Influx CLI behavior. Reproduce the reported bitwise-operator error using the supplied script; done means &, |, and ^ queries are accepted by QueryNode without the shown parse failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.