xy2953396112 commented on a change in pull request #2094:
URL: https://github.com/apache/calcite/pull/2094#discussion_r516391375



##########
File path: core/src/main/java/org/apache/calcite/plan/AbstractRelOptPlanner.java
##########
@@ -197,6 +198,10 @@ public boolean isRuleExcluded(RelOptRule rule) {
     return this;
   }
 
+  @Override public void addExtraMaterializationRules(List<UnifyRule> rules) {

Review comment:
       The materialized recognition rules currently implemented are quite 
general (based on pure relational algebra). I think adding some additional 
rules for the materialized recognition of specific scenes will help us to solve 
the materialized recognition of specific scenes, rather than adding them all 
together. Even if no additional rules are added, the current physical and 
chemical recognition rules, such as `CalcToCalcUnifyRule` and 
`JoinOnCalcsToJoinUnifyRule`, are still the most basic materialized recognition 
rules, and we should keep them unchanged.I think it's better to retain the most 
basic materialized recognition rules and add custom materialized recognition 
rules at the same time.

##########
File path: 
core/src/main/java/org/apache/calcite/plan/RelOptMaterializations.java
##########
@@ -50,6 +50,12 @@
  */
 public abstract class RelOptMaterializations {
 
+  @Deprecated // to be removed before 2.0
+  public static List<Pair<RelNode, List<RelOptMaterialization>>> 
useMaterializedViews(
+      final RelNode rel, List<RelOptMaterialization> materializations) {
+    return useMaterializedViews(rel, materializations, null);

Review comment:
       Thanks, update the code.




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to