[Bug] count (distinct (xxx)) over is not support
Search before asking
- [X] I had searched in the issues and found no similar issues.
Version
dev-1.1.2-236f394
What's Wrong?
sql like this:
CREATE TABLE `test`
(
`id` bigint NOT NULL,
`date` date REPLACE_IF_NOT_NULL NOT NULL
) ENGINE = OLAP AGGREGATE KEY(`id` )
DISTRIBUTED BY HASH(`id`) BUCKETS 3
PROPERTIES (
"replication_num" = "3",
"compression"="zstd"
);
SELECT count(distinct (date)) over (partition by id) count_days FROM test;
ERROR:
[HY000][1105] errCode = 2, detailMessage = DISTINCT not allowed in analytic function: count(DISTINCT (`date`))
What You Expected?
sql execute succeed.
How to Reproduce?
No response
Anything Else?
No response
Are you willing to submit PR?
- [ ] Yes I am willing to submit a PR!
Code of Conduct
- [X] I agree to follow this project's Code of Conduct
sorry, Doris do not support use distinct aggregate function as analytic function now.
sorry, Doris do not support use distinct aggregate function as analytic function now.
documents says its support https://doris.apache.org/docs/sql-manual/sql-functions/window-functions/WINDOW-FUNCTION-COUNT/
i think document has a mistake on it. i has review the code. it is not support yet.
Thank you for your question,I find this is an error in the document. and I will modify the document.