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 835d1425b7803a6..73ac8d51d1fac8c 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 @@ -28,6 +28,10 @@ public class RecomputeLogicalPropertiesProcessor extends PlanPostProcessor { @Override public Plan visit(Plan plan, CascadesContext ctx) { PhysicalPlan physicalPlan = (PhysicalPlan) visitChildren(this, plan, ctx); - return physicalPlan.resetLogicalProperties(); + physicalPlan = physicalPlan.resetLogicalProperties(); + physicalPlan = physicalPlan.withPhysicalPropertiesAndStats(physicalPlan.getPhysicalProperties(), + ((AbstractPlan) plan).getStats()); + physicalPlan.setMutableState(MutableState.KEY_GROUP, plan.getGroupIdAsString()); + return physicalPlan; } }