Open andrasg opened 5 years ago
Updated InfluxDB to v1.7.9 and the issue still persists.
Have changed my Grafana query slightly (now using variables) and was able to reproduce the issue again without grouping by tags:
Query:
SELECT integral("power",1h) FROM "sonoff" WHERE ("name" =~ /^(Dish_Washer|Oil_Radiator)$/) AND time >= now() - 2d GROUP BY "name", time(1d) TZ(
'Europe/Budapest')
Response:
name: sonoff
tags: name=Dish_Washer
time integral
---- --------
1578006000000000000 0
1578092400000000000 868.1156730438449
name: sonoff
tags: name=Oil_Radiator
time integral
---- --------
1578178800000000000 642.5318936261791
name: sonoff
tags: name=Dish_Washer
time integral
---- --------
1578178800000000000 1514.527041086381
Notice the first and third group of data should actually be returned in the same series.
I have the same issue, seems to be a problem with integral. If I try the same query with sum instead it works as expected and does not return multiple tables per tag.
The issue still persists.
When grouping by tag and time, some tags are duplicated and get their own table in the returned data. The tags are seemingly the same.
Impact of the issue is that when displaying the measurement in Grafana, multiple series with the same name are displayed.
Hunch on the cause: if there's a dash in the name of the tag, the duplication occurs.
Steps to reproduce:
Imagine a measurement where I have power measurements, each datapoint has a name tag on it. The name tags are one of:
Steps to repro:
SELECT integral("power", 1h) FROM "sonoff" GROUP BY "name",time(1h)
Expected behavior: Expecting four tables, each with data for the individual tag, grouped by day.
Actual behavior: Instead of receiving 4 tables, I am receiving 6 tables. Data for some tags are split into two separate tables. See
sonoff-test1
andsonoff-test2
.Environment info:
Windows Server 2019 x64
InfluxDB v1.7.6 (git: 1.7 01c8dd416270f424ab0c40f9291e269ac6921964)
Config: Copy any non-default config values here or attach the full config as a gist or file.
No relevant non-default config