[fix](planner) should not push down sink when last exchange do limit (#31622)
This commit is contained in:
@ -105,11 +105,8 @@ public class ExchangeNode extends PlanNode {
|
||||
computeTupleIds();
|
||||
}
|
||||
|
||||
public boolean isMergingExchange() {
|
||||
if (mergeInfo != null) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
public boolean isFunctionalExchange() {
|
||||
return mergeInfo != null || limit != -1 || offset != 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -373,7 +373,7 @@ public class OriginalPlanner extends Planner {
|
||||
PlanFragment topPlanFragment = fragments.get(0);
|
||||
ExchangeNode topPlanNode = (ExchangeNode) topPlanFragment.getPlanRoot();
|
||||
// try to push down result file sink
|
||||
if (topPlanNode.isMergingExchange()) {
|
||||
if (topPlanNode.isFunctionalExchange()) {
|
||||
return;
|
||||
}
|
||||
PlanFragment secondPlanFragment = fragments.get(1);
|
||||
|
||||
Reference in New Issue
Block a user