From 37270f749c9ac3fcd652bb97162c84e0a3d38543 Mon Sep 17 00:00:00 2001 From: Rong Rong Date: Wed, 29 Nov 2023 07:28:46 -0800 Subject: [PATCH] [multistage][cleanup] remove some unused rules (#12052) * cleanup some unused rules --------- Co-authored-by: Rong Rong --- .../calcite/rel/rules/PinotQueryRuleSets.java | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/pinot-query-planner/src/main/java/org/apache/calcite/rel/rules/PinotQueryRuleSets.java b/pinot-query-planner/src/main/java/org/apache/calcite/rel/rules/PinotQueryRuleSets.java index b73a2b62b210..9dc29757f93d 100644 --- a/pinot-query-planner/src/main/java/org/apache/calcite/rel/rules/PinotQueryRuleSets.java +++ b/pinot-query-planner/src/main/java/org/apache/calcite/rel/rules/PinotQueryRuleSets.java @@ -49,12 +49,9 @@ private PinotQueryRuleSets() { // push project through set operation CoreRules.PROJECT_SET_OP_TRANSPOSE, - // aggregation and projection rules - CoreRules.AGGREGATE_PROJECT_PULL_UP_CONSTANTS, - // push a projection past a filter or vice versa - CoreRules.PROJECT_FILTER_TRANSPOSE, CoreRules.FILTER_PROJECT_TRANSPOSE, - // push a projection to the children of a join - // push all expressions to handle the time indicator correctly + // push a filter past a project + CoreRules.FILTER_PROJECT_TRANSPOSE, + // push parts of the join condition to its inputs CoreRules.JOIN_CONDITION_PUSH, // remove identity project CoreRules.PROJECT_REMOVE, @@ -64,14 +61,19 @@ private PinotQueryRuleSets() { // push project through WINDOW CoreRules.PROJECT_WINDOW_TRANSPOSE, - // TODO: Revisit and see if they can be replaced with CoreRules.PROJECT_REDUCE_EXPRESSIONS and - // CoreRules.FILTER_REDUCE_EXPRESSIONS + // literal rules + // TODO: Revisit and see if they can be replaced with + // CoreRules.PROJECT_REDUCE_EXPRESSIONS and + // CoreRules.FILTER_REDUCE_EXPRESSIONS PinotEvaluateLiteralRule.Project.INSTANCE, PinotEvaluateLiteralRule.Filter.INSTANCE, + // sort join rules // TODO: evaluate the SORT_JOIN_TRANSPOSE and SORT_JOIN_COPY rules // join rules CoreRules.JOIN_PUSH_EXPRESSIONS, + + // join and semi-join rules CoreRules.PROJECT_TO_SEMI_JOIN, PinotAggregateToSemiJoinRule.INSTANCE,