walterddr commented on code in PR #10122: URL: https://github.com/apache/pinot/pull/10122#discussion_r1073971528
########## pinot-query-planner/src/main/java/org/apache/calcite/rel/rules/PinotQueryRuleSets.java: ########## @@ -43,6 +43,8 @@ private PinotQueryRuleSets() { CoreRules.FILTER_AGGREGATE_TRANSPOSE, // push filter through set operation CoreRules.FILTER_SET_OP_TRANSPOSE, + // create a project on top of an aggregate when the aggregate is on top of a join + PinotRuleUtils.PINOT_AGGREGATE_EXTRACT_PROJECT_RULE, Review Comment: this approach doesn't work on count(*) or count(1) as 1. pinot datatypes are non-nullable for now (which I think we should fix) 2. COUNT(*) and COUNT(1) doesn't have operand so it cannot be extracted into a project, we might need a special rule unfortunately. -- 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