mayankshriv commented on a change in pull request #4535: Implement DISTINCT 
clause
URL: https://github.com/apache/incubator-pinot/pull/4535#discussion_r315312401
 
 

 ##########
 File path: 
pinot-common/src/main/java/org/apache/pinot/pql/parsers/pql2/ast/FunctionCallAstNode.java
 ##########
 @@ -82,10 +85,30 @@ public AggregationInfo buildAggregationInfo() {
       expression = "*";
     } else {
       List<? extends AstNode> children = getChildren();
-      if (children == null || children.size() != 1) {
-        throw new Pql2CompilationException("Aggregation function expects exact 
1 argument");
+      if (children == null) {
+        throw new Pql2CompilationException("Aggregation function expects 
non-null argument");
+      }
+      if (!_name.equalsIgnoreCase("distinct")) {
 
 Review comment:
   Why do we need to special-case `distinct`? If this is due to an underlying 
problem/limitation, let's see if we can address that instead of working around 
it here.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to