yashmayya commented on code in PR #18598:
URL: https://github.com/apache/pinot/pull/18598#discussion_r3314718091
##########
pinot-query-planner/src/main/java/org/apache/pinot/calcite/rel/rules/PinotAggregateExchangeNodeInsertRule.java:
##########
@@ -479,14 +479,25 @@ private static List<RexNode>
findImmediateProjects(RelNode relNode) {
return null;
}
- private static boolean isGroupTrimmingEnabled(RelOptRuleCall call,
Map<String, String> hintOptions) {
+ private static boolean isGroupTrimmingEnabled(RelOptRuleCall call,
Map<String, String> hintOptions,
+ Aggregate aggRel) {
if (hintOptions != null) {
String option =
hintOptions.get(PinotHintOptions.AggregateOptions.IS_ENABLE_GROUP_TRIM);
if (option != null) {
+ // Explicit hint always wins (true or false), for aggregates with AND
without aggregate functions.
return Boolean.parseBoolean(option);
}
}
+ // Group-by WITHOUT aggregate functions (DISTINCT or `GROUP BY col` with
no agg calls) can always push the
Review Comment:
In the current PR we're pushing down limit for distinct and group by without
aggregate (with or without order by). We're pushing down limit for the multiple
group keys case too - the condition here is to exclude queries with multiple
group sets (`ROLLUP` / `CUBE` / `GROUPING SETS` - probably not supported today,
but if they are in the future, this push down won't be logically valid for
those 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]