[fix](nereids) column prune should use slots from children (#19112)
the slots' nullable property may different between parent and children. So column prune should always use slots of children
This commit is contained in:
@ -250,7 +250,8 @@ public class ColumnPruning extends DefaultPlanRewriter<PruneContext> implements
|
||||
boolean hasNewChildren = false;
|
||||
for (Plan child : plan.children()) {
|
||||
Set<Slot> childOutputSet = child.getOutputSet();
|
||||
Set<Slot> childRequiredSlots = Sets.intersection(childrenRequiredSlots, childOutputSet);
|
||||
Set<Slot> childRequiredSlots = childOutputSet.stream()
|
||||
.filter(childrenRequiredSlots::contains).collect(Collectors.toSet());
|
||||
Plan prunedChild = doPruneChild(plan, child, childRequiredSlots);
|
||||
if (prunedChild != child) {
|
||||
hasNewChildren = true;
|
||||
|
||||
Reference in New Issue
Block a user