seawinde commented on code in PR #50895:
URL: https://github.com/apache/doris/pull/50895#discussion_r2218413842


##########
fe/fe-core/src/main/java/org/apache/doris/mtmv/MTMVCache.java:
##########
@@ -29,61 +30,63 @@
 import org.apache.doris.nereids.rules.exploration.mv.MaterializedViewUtils;
 import org.apache.doris.nereids.rules.exploration.mv.StructInfo;
 import org.apache.doris.nereids.rules.rewrite.EliminateSort;
+import org.apache.doris.nereids.rules.rewrite.MergeProjects;
 import org.apache.doris.nereids.trees.plans.Plan;
 import 
org.apache.doris.nereids.trees.plans.commands.ExplainCommand.ExplainLevel;
 import org.apache.doris.nereids.trees.plans.logical.LogicalPlan;
+import org.apache.doris.nereids.trees.plans.logical.LogicalProject;
 import org.apache.doris.nereids.trees.plans.logical.LogicalResultSink;
+import org.apache.doris.nereids.trees.plans.visitor.DefaultPlanRewriter;
 import org.apache.doris.qe.ConnectContext;
 import org.apache.doris.qe.OriginStatement;
 import org.apache.doris.statistics.Statistics;
 
 import com.google.common.collect.ImmutableList;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 
+import java.util.ArrayList;
 import java.util.BitSet;
+import java.util.List;
 import java.util.Optional;
 
 /**
  * The cache for materialized view cache
  */
 public class MTMVCache {
 
+    public static final Logger LOG = LogManager.getLogger(MTMVCache.class);
+
     // The materialized view plan which should be optimized by the same rules 
to query
     // and will remove top sink and unused sort
-    private final Plan logicalPlan;
+    private final Pair<Plan, StructInfo> finalPlanAndStructInfo;
     // The original rewritten plan of mv def sql
-    private final Plan originalPlan;
-    // The analyzed plan of mv def sql, which is used by tableCollector,should 
not be optimized by rbo
-    private final Plan analyzedPlan;
+    private final Plan originalFinalPlan;
     private final Statistics statistics;
-    private final StructInfo structInfo;
+    private final List<Pair<Plan, StructInfo>> tmpPlanAndStructInfos;

Review Comment:
   rename better, part rbo rule 



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to