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


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/mv/MaterializedViewUtils.java:
##########
@@ -109,7 +111,13 @@ public class MaterializedViewUtils {
      */
     public static RelatedTableInfo getRelatedTableInfo(String column, String 
timeUnit,
             Plan materializedViewPlan, CascadesContext cascadesContext) {
-
+        // remove sink
+        materializedViewPlan = materializedViewPlan.accept(new 
DefaultPlanRewriter<Void>() {
+            @Override
+            public Plan visitLogicalSink(LogicalSink<? extends Plan> 
logicalSink, Void context) {

Review Comment:
   if mv is partitioned and partition roll up, would add date_trunc(col, unit) 
expr above mv def sql plan, if def sql plan is sink, would add project above 
sink, this would not cause err now but unreasonable



-- 
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