-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Labels
Description
Problem
A user has reported the following error when performing the InfluxQL query:
Query
SELECT time, name, read_bytes, write_bytes FROM diskio GROUP BY name LIMIT 1Error
error in InfluxQL statement: parsing error: invalid InfluxQL statement at pos 0. Parsing Error: Nom("SELECT time, name, read_bytes, write_bytes FROM diskio GROUP BY name LIMIT 1", Tag)
This is probably appropriate, but worth verifying.
When quoting the name column, which in their case, is a tag, the response structure includes the tag as a field, instead of a tag for grouping:
Query
SELECT time, \"name\", read_bytes, write_bytes FROM diskio GROUP BY \"name\" LIMIT 1Response
{"results":[{"statement_id":0,"series":[{"name":"diskio","columns":["time","name","read_bytes","write_bytes"],"values":[[1743544020000000000,"nvme0n1",9269587968,180620936192],[1743544020000000000,"nvme0n1p1",7719936,1024],[1743544020000000000,"nvme0n1p2",5608448,139264],[1743544020000000000,"nvme0n1p3",9254359040,180620795904],[1743544020000000000,"zram0",1458176,4653056]]}]}]}Purpose of this issue
Initially we should reproduce the above behaviour with a test.
Following that, figure out where the problem may be. It is likely due to the fact that core uses some custom logic for GROUP BY. If there is an easy fix in there we should probably make it but if not, we may revisit the work that has been done recently on GROUP BY in IOx, and whether a sync could provide a solution.