DataChannel channel = masterPlan.getOutgoingChannels(getId()).get(0);
// get default or store type
CatalogProtos.StoreType storeType = CatalogProtos.StoreType.CSV; // default setting
// if store plan (i.e., CREATE or INSERT OVERWRITE)
StoreTableNode storeTableNode = PlannerUtil.findTopNode(getBlock().getPlan(), NodeType.STORE);
if (storeTableNode != null) {
storeType = storeTableNode.getStorageType();
}
schema = channel.getSchema();
meta = CatalogUtil.newTableMeta(storeType, new Options());
inputStatistics = statsArray[0];
resultStatistics = statsArray[1];