admin管理员组文章数量:1394770
I reviewed the GridDB development documentation, which states that the COUNT aggregation function returns 0 when no rows are available for calculation, while other aggregate functions return NULL check here However, when executing Query 1 for time window aggregation, the COUNT function does not return the expected value of 0. This could indicate a potential logical issue.
DROP TABLE t0;
CREATE TABLE IF NOT EXISTS t0(time TIMESTAMP PRIMARY KEY, c0 INTEGER);
INSERT INTO t0 VALUES(TIMESTAMP('2023-01-01T00:00:00Z'), 1);
# query 1
SELECT COUNT(c0), time FROM tsqsdb3_t0 WHERE (time) >= (TIMESTAMP('2022-01-01T16:00:10Z')) AND (time) <= (TIMESTAMP('2022-01-01T16:00:20Z')) GROUP BY RANGE(time) EVERY (10, SECOND) FILL(NONE);
# query 2
SELECT COUNT(c0), time FROM tsqsdb3_t0 WHERE (time) >= (TIMESTAMP('2022-01-01T16:00:10Z')) AND (time) <= (TIMESTAMP('2022-01-01T16:00:20Z'));
I expected Query 1 and Query 2 to return a result set of 0, but instead, Query 1 returned an empty set while Query 2 returned 0.
本文标签: griddbCOUNT in Time Window Aggregation Does Not Return 0 as ExpectedStack Overflow
版权声明:本文标题:griddb - COUNT in Time Window Aggregation Does Not Return 0 as Expected - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744102797a2590942.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论