}
}
private PhysicalExec buildOutputOperator(TaskAttemptContext context, LogicalNode plan,
PhysicalExec execPlan) throws IOException {
DataChannel channel = context.getDataChannel();
StoreTableNode storeTableNode = new StoreTableNode(UNGENERATED_PID, channel.getTargetId().toString());
storeTableNode.setStorageType(CatalogProtos.StoreType.CSV);
storeTableNode.setInSchema(plan.getOutSchema());
storeTableNode.setOutSchema(plan.getOutSchema());
if (channel.getPartitionType() != PartitionType.NONE_PARTITION) {
storeTableNode.setPartitions(channel.getPartitionType(), channel.getPartitionKey(), channel.getPartitionNum());
} else {
storeTableNode.setDefaultParition();
}
storeTableNode.setChild(plan);