cyrilou242 opened a new issue, #11503: URL: https://github.com/apache/pinot/issues/11503
## Problem Observed Context: `DISTINCTCOUNT` can only apply on one column. This is an expected behaviour. `COUNT(DISTINCT(col))` is rewritten to `DISTINCTCOUNT(col)`. This is the expected behaviour. Problem: `COUNT(DISTINCT col1, col2)` should not be supported and throw a syntax error. Currently, it is accepted and rewritten to `DISTINCTCOUNT(col1)`. Notice `col2` is lost. ## How to reproduce ``` select COUNT(DISTINCT DestStateName), COUNT(DISTINCT DestStateName, OriginAirportID) from airlineStats limit 10 ``` Returns ``` |distinctcount(DestStateName)|distinctcount(DestStateName)| | 53 | 53 | ``` ## Expected behaviour: COUNT(DISTINCT col1, col2) should throw a SQL syntax error. -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
