xiangfu0 commented on a change in pull request #8158:
URL: https://github.com/apache/pinot/pull/8158#discussion_r806372059



##########
File path: 
pinot-common/src/main/java/org/apache/pinot/sql/parsers/CalciteSqlParser.java
##########
@@ -710,14 +711,18 @@ private static Expression 
compileFunctionExpression(SqlBasicCall functionNode) {
           compilePathExpression(functionName, functionNode, path);
           return RequestUtils.getIdentifierExpression(path.toString());
         }
+        if ((functionNode.getFunctionQuantifier() != null) && 
("DISTINCT".equals(
+            functionNode.getFunctionQuantifier().toString()))) {
+          functionName = "DISTINCTCOUNT";

Review comment:
       I feel should just error out here during parser to avoid extra execution 
overhead for sum(distinct xxx) cases




-- 
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]

Reply via email to