[opt](Nereids) forbid distribute under project and filter (#39812) (#41622)

pick from master #39812
This commit is contained in:
morrySnow
2024-10-09 23:02:06 +08:00
committed by GitHub
parent 1d2e2adb74
commit 649cefd70f
15 changed files with 34 additions and 28 deletions

View File

@ -200,6 +200,9 @@ public class ChildrenPropertiesRegulator extends PlanVisitor<Boolean, Void> {
@Override
public Boolean visitPhysicalFilter(PhysicalFilter<? extends Plan> filter, Void context) {
// do not process must shuffle
if (children.get(0).getPlan() instanceof PhysicalDistribute) {
return false;
}
return true;
}
@ -452,6 +455,9 @@ public class ChildrenPropertiesRegulator extends PlanVisitor<Boolean, Void> {
@Override
public Boolean visitPhysicalProject(PhysicalProject<? extends Plan> project, Void context) {
// do not process must shuffle
if (children.get(0).getPlan() instanceof PhysicalDistribute) {
return false;
}
return true;
}