}
}
private void setShuffleKeysFromPartitionedTableStore(StoreTableNode node, DataChannel channel) {
Preconditions.checkState(node.hasTargetTable(), "A target table must be a partitioned table.");
PartitionMethodDesc partitionMethod = node.getPartitionMethod();
if (node.getType() == NodeType.INSERT) {
InsertNode insertNode = (InsertNode) node;
channel.setSchema(((InsertNode)node).getProjectedSchema());
Column [] shuffleKeys = new Column[partitionMethod.getExpressionSchema().size()];
int i = 0;
for (Column column : partitionMethod.getExpressionSchema().getColumns()) {
int id = insertNode.getTableSchema().getColumnId(column.getQualifiedName());
shuffleKeys[i++] = insertNode.getProjectedSchema().getColumn(id);
}
channel.setShuffleKeys(shuffleKeys);
} else {
channel.setShuffleKeys(partitionMethod.getExpressionSchema().toArray());
}
channel.setShuffleType(HASH_SHUFFLE);
channel.setShuffleOutputNum(32);
}