Fix potentially incorrect symbol reference
If partitioningScheme.getOutputLayout() doesn't agree with
the order of symbols in the source, the current code will
create an invalid plan.
This change ensures that symbols are mapped correctly.
@@ -127,7 +127,7 @@ public class ExchangeNode
scope,
partitioningScheme,
ImmutableList.of(child),
- ImmutableList.of(child.getOutputSymbols()));
+ ImmutableList.of(partitioningScheme.getOutputLayout()));
}
public static ExchangeNode replicatedExchange(PlanNodeId id, Scope scope, PlanNode child)
