PrachiPrakash commented on a change in pull request #7972:
URL: https://github.com/apache/pinot/pull/7972#discussion_r785328306



##########
File path: 
pinot-common/src/main/java/org/apache/pinot/sql/parsers/CalciteSqlParser.java
##########
@@ -167,6 +170,18 @@ private static void validateGroupByClause(PinotQuery 
pinotQuery)
     }
   }
 
+  private static boolean containsAggregateAndColsInSelectClause(PinotQuery 
pinotQuery) {
+    int aggregateExprCount = 0;
+    int identifierExprCount = 0;
+    for (Expression expr : pinotQuery.getSelectList()) {
+      if (isAggregateExpression(expr)) {
+        aggregateExprCount++;
+      } else if (expressionContainsColumn(expr)) {

Review comment:
       Makes sense to avoid the heavy function call, will make the change.




-- 
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: commits-unsubscr...@pinot.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to