influxdata / influxdata/kapacitor
Batch query, bit math operation
- Dominant language
- Go
- Stars
- 2.4k
- Forks
- 479
- Avg merge
- 4d 16h
- Merged PRs (30d)
- 4
Description
Attempting to use bitwise math operation in a TICKSript fails with,
**Error:**
failed to parse InfluxQL query: found &, expected FROM at line 1, char 30
**TICKScript:**
var data = batch
|query(''' SELECT last("StatusWrd") & 8 FROM "monitoring"."autogen"."modbus" WHERE ("host" = 'host-002') ''')
.period(10s)
.every(10s)
**Same query works when run in influxdb:**
SELECT last("StatusWrd") & 8 FROM "monitoring"."autogen"."modbus" WHERE ("host" = 'host-002')
Contributor guide
Research direction
Start with Kapacitor's batch query handling and the TICKScript path that passes the embedded InfluxQL to the parser. Reproduce the query containing the bitwise '&' operator and compare it with the working InfluxDB query; done means the TICKScript batch query parses and executes successfully.
Written by the indexing model from the issue text.
Assessment
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100