You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2019/07/09 00:23:51 UTC
[GitHub] [incubator-druid] pdeva opened a new issue #8040: incorrect first
value when using SELECT with certain TIME_FLOOR periods
pdeva opened a new issue #8040: incorrect first value when using SELECT with certain TIME_FLOOR periods
URL: https://github.com/apache/incubator-druid/issues/8040
Video of bug:
https://www.screencast.com/t/hFmmSppkv
Query
```
SELECT TIME_FLOOR("__time", 'PT50S') as ts, (((SUM(cpu) *1000)/10000)/5) as cpuMetric, (SUM(mem_used)/5) as mem_used1, ((SUM(lim_cpu) *1000)/5) as lim_cpu1, ((SUM(req_cpu) *1000)/5) as req_cpu1,
(SUM(lim_mem)/5) as lim_mem1,
(SUM(req_mem)/5) as req_mem1, (SUM(mem_limit)/5) as mem_limit1
FROM "xx" WHERE "__time" >= TIMESTAMP '2019-07-08 23:45:50' AND "__time" < TIMESTAMP '2019-07-09 00:15:50'
GROUP BY TIME_FLOOR("__time", 'PT50S')
```
when using PT50S or PT100S, the first value returned seems to be lower than expected.
This changes upon repeated querying.
The video shows the chart at different time ranges with different granularities:
- 5 min gran: TIME_FLOOR(PT10S)
- 15 min gran: TIME_FLOOR(PT30S)
- 30 min gran: TIME_FLOOR(PT50S)
- 60 min gran: TIME_FLOOR(PT100S)
ingestion queryGranularity: second
Expected:
The values should remain a flat line throughout the time range.
This is even shown by zooming out from 30 minute to 60 minute and showing that the 30 minute mark is flat in the zoomed out chart.
Actual:
At 00:18 in the video you can see that the initial value gets even lower even though the timestamps havent changed at all.
In fact, if left to refresh, the query eventually does return a flat value even for the initial value.
So it goes from low to lower to flat and back again. almost in a loop.
Changing the TIME_FLOOR to PT60S seems to make the initial value go back to the normal flat line.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org