jinxing64 commented on a change in pull request #1504: [CALCITE-3409] Add an 
interface in MaterializedViewSubstitutionVisito…
URL: https://github.com/apache/calcite/pull/1504#discussion_r334466903
 
 

 ##########
 File path: 
core/src/main/java/org/apache/calcite/plan/MaterializedViewSubstitutionVisitor.java
 ##########
 @@ -54,6 +55,15 @@ public MaterializedViewSubstitutionVisitor(RelNode target_, 
RelNode query_,
     super(target_, query_, EXTENDED_RULES, relBuilderFactory);
   }
 
+  /**
+   * A method used to add a user defined {@link SubstitutionVisitor.UnifyRule},
+   * thus to extend the ability of substitution based materialization
+   * matching in different scenarios.
+   */
+  public static void addMatchingRule(UnifyRule rule) {
+    EXTENDED_RULES.add(rule);
+  }
+
 
 Review comment:
   Thanks yanlin ~
   I think your concern is correct.
   I updated. In current change, the rules is registered from `RelOptPlanner` 
and passed through `RelOptMaterializations` to 
`MaterializedViewSubstitutionVisitor`.
   Thus user will set up the self defined materialization rules when preparing 
`VolcanoPlanner`

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to