You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2021/10/10 13:38:52 UTC

[GitHub] [shardingsphere] strongduanmu commented on a change in pull request #12972: feat: change rules and add sub-query test.

strongduanmu commented on a change in pull request #12972:
URL: https://github.com/apache/shardingsphere/pull/12972#discussion_r725641082



##########
File path: shardingsphere-infra/shardingsphere-infra-optimize/src/main/java/org/apache/shardingsphere/infra/optimize/planner/QueryOptimizePlannerFactory.java
##########
@@ -49,27 +48,7 @@ private static RelOptPlanner createPlanner() {
     
     private static void setUpRules(final RelOptPlanner planner) {
         planner.addRelTraitDef(ConventionTraitDef.INSTANCE);
-        planner.addRule(EnumerableRules.TO_INTERPRETER);
-        planner.addRule(Bindables.FROM_NONE_RULE);
-        planner.addRule(Bindables.BINDABLE_TABLE_SCAN_RULE);
-        planner.addRule(Bindables.BINDABLE_FILTER_RULE);
-        planner.addRule(Bindables.BINDABLE_PROJECT_RULE);
-        planner.addRule(Bindables.BINDABLE_SORT_RULE);
-        planner.addRule(Bindables.BINDABLE_JOIN_RULE);
-        planner.addRule(Bindables.BINDABLE_SET_OP_RULE);
-        planner.addRule(Bindables.BINDABLE_VALUES_RULE);
-        planner.addRule(Bindables.BINDABLE_AGGREGATE_RULE);
-        planner.addRule(Bindables.BINDABLE_MATCH_RULE);
-        planner.addRule(CoreRules.PROJECT_FILTER_TRANSPOSE);
-        planner.addRule(CoreRules.PROJECT_JOIN_TRANSPOSE);
-        planner.addRule(CoreRules.PROJECT_MERGE);
-        planner.addRule(CoreRules.PROJECT_TABLE_SCAN);
-        planner.addRule(CoreRules.FILTER_INTO_JOIN);
-        planner.addRule(CoreRules.FILTER_PROJECT_TRANSPOSE);
-        planner.addRule(CoreRules.FILTER_SCAN);
-        planner.addRule(EnumerableRules.ENUMERABLE_CORRELATE_RULE);
-        planner.addRule(EnumerableRules.ENUMERABLE_PROJECT_RULE);
-        planner.addRule(EnumerableRules.ENUMERABLE_FILTER_RULE);
-        planner.addRule(EnumerableRules.ENUMERABLE_MATCH_RULE);
+        planner.addRelTraitDef(RelCollationTraitDef.INSTANCE);
+        RelOptUtil.registerDefaultRules(planner, false, true);

Review comment:
       @wgy8283335 Does the registerDefaultRules method include all the rules deleted above?




-- 
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: notifications-unsubscribe@shardingsphere.apache.org

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