iotdb
iotdb copied to clipboard
[Bug] 使用count(distinct(某列)) 进行分组统计时,统计出来数据为0
Search before asking
- [x] I searched in the issues and found nothing similar.
Version
从v0.13到v2都测试了一遍,都一样的问题
Describe the bug and provide the minimal reproduce step
如图,不加group by 查询正常,加了之后 查出来为0
What did you expect to see?
希望查询出来能够正常根据分组统计排除重复的的值有多少个
What did you see instead?
分组统计 全是0
Anything else?
No response
Are you willing to submit a PR?
- [x] I'm willing to submit a PR!
Hi, this is your first issue in IoTDB project. Thanks for your report. Welcome to join the community!
目前 distinct函数返回的结果是在 1 时间戳的位置,而 group by time 分窗又会按照时间进行,所以会出现这种情况。 如果需要 count(distinct) 需要实现一个自定义函数