[Bug] 使用count(distinct(某列)) 进行分组统计时,统计出来数据为0
- Dominant language
- Java
- Stars
- 6.4k
- Forks
- 1.2k
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 115
Description
### Search before asking
- [x] I searched in the [issues](https://github.com/apache/iotdb/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!
Contributor guide
Research direction
The report provides only an attached image, so first extract the minimal SQL, schema, and expected results from that reproduction. Compare the grouped and ungrouped count(distinct(...)) queries across the reported versions, then verify that grouped results contain the expected distinct counts and are no longer all zero.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- sql
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100