From 2f1106f030dc537a8bb9d7853dee53977bb0a200 Mon Sep 17 00:00:00 2001 From: englefly Date: Wed, 13 Sep 2023 21:43:49 +0800 Subject: [PATCH] pick from #24159 --- .../processor/post/RecomputeLogicalPropertiesProcessor.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/processor/post/RecomputeLogicalPropertiesProcessor.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/processor/post/RecomputeLogicalPropertiesProcessor.java index 835d1425b7803a..62e5df55f4ed7d 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/processor/post/RecomputeLogicalPropertiesProcessor.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/processor/post/RecomputeLogicalPropertiesProcessor.java @@ -18,6 +18,7 @@ package org.apache.doris.nereids.processor.post; import org.apache.doris.nereids.CascadesContext; +import org.apache.doris.nereids.trees.plans.AbstractPlan; import org.apache.doris.nereids.trees.plans.Plan; import org.apache.doris.nereids.trees.plans.physical.PhysicalPlan; @@ -28,6 +29,9 @@ public class RecomputeLogicalPropertiesProcessor extends PlanPostProcessor { @Override public Plan visit(Plan plan, CascadesContext ctx) { PhysicalPlan physicalPlan = (PhysicalPlan) visitChildren(this, plan, ctx); + physicalPlan = physicalPlan.resetLogicalProperties(); + physicalPlan = physicalPlan.withPhysicalPropertiesAndStats(physicalPlan.getPhysicalProperties(), + ((AbstractPlan) plan).getStats()); return physicalPlan.resetLogicalProperties(); } }