Description
Make the following changes:
--- a/core/src/main/java/org/apache/calcite/rel/rules/AggregateRemoveRule.java +++ b/core/src/main/java/org/apache/calcite/rel/rules/AggregateRemoveRule.java @@ -123,6 +123,7 @@ public void onMatch(RelOptRuleCall call) { // aggregate functions, add a project for the same effect. relBuilder.project(relBuilder.fields(aggregate.getGroupSet().asList())); } + call.getPlanner().setImportance(aggregate, 0.0); call.transformTo(relBuilder.build()); } }
The query in JdbcTest.testGroupBy1Max1 will run endless.
Attachments
Issue Links
- Blocked
-
CALCITE-2223 ProjectMergeRule is infinitely matched when is applied after ProjectReduceExpressionsRule
- Closed
-
CALCITE-2589 VolcanoPlanner#fireRules and VolcanoRuleCall#matchRecurse should ignore known-to-be-unimportant relations
- Open
- is related to
-
CALCITE-3505 Infinite matching of FilterProjectTransposeRule causes stackoverflow
- Closed