private static PlanProto.StoreTableNodeSpec.Builder buildStoreTableNodeSpec(StoreTableNode node) { PlanProto.StoreTableNodeSpec.Builder storeTableBuilder = PlanProto.StoreTableNodeSpec.newBuilder(); if (node.hasTableName()) { // It will be false if node is for INSERT INTO LOCATION '...' storeTableBuilder.setTableName(node.getTableName()); } if (node.hasUri()) { storeTableBuilder.setUri(node.getUri().toString()); } if (node.hasTableSchema()) { storeTableBuilder.setTableSchema(node.getTableSchema().getProto()); } if (node.hasPartition()) { storeTableBuilder.setPartitionMethod(node.getPartitionMethod().getProto()); } return storeTableBuilder; }
private static PlanProto.StoreTableNodeSpec.Builder buildStoreTableNodeSpec(StoreTableNode node) { PlanProto.StoreTableNodeSpec.Builder storeTableBuilder = PlanProto.StoreTableNodeSpec.newBuilder(); if (node.hasTableName()) { // It will be false if node is for INSERT INTO LOCATION '...' storeTableBuilder.setTableName(node.getTableName()); } if (node.hasUri()) { storeTableBuilder.setUri(node.getUri().toString()); } if (node.hasTableSchema()) { storeTableBuilder.setTableSchema(node.getTableSchema().getProto()); } if (node.hasPartition()) { storeTableBuilder.setPartitionMethod(node.getPartitionMethod().getProto()); } return storeTableBuilder; }
public void init() throws IOException { super.init(); if (plan.hasOptions()) { meta = CatalogUtil.newTableMeta(plan.getStorageType(), plan.getOptions()); } else { meta = CatalogUtil.newTableMeta(plan.getStorageType(), context.getConf()); } PhysicalPlanUtil.setNullCharIfNecessary(context.getQueryContext(), plan, meta); sumStats = new TableStats(); StoreTableNode storeTableNode = (StoreTableNode) plan; appender = TablespaceManager.get(storeTableNode.getUri()).getAppenderForInsertRow( context.getQueryContext(), context.getTaskId(), meta, storeTableNode.getTableSchema(), context.getOutputPath()); appender.enableStats(); appender.init(); }
public void init() throws IOException { super.init(); if (plan.hasOptions()) { meta = CatalogUtil.newTableMeta(plan.getStorageType(), plan.getOptions()); } else { meta = CatalogUtil.newTableMeta(plan.getStorageType(), context.getConf()); } PhysicalPlanUtil.setNullCharIfNecessary(context.getQueryContext(), plan, meta); sumStats = new TableStats(); StoreTableNode storeTableNode = (StoreTableNode) plan; appender = TablespaceManager.get(storeTableNode.getUri()).getAppenderForInsertRow( context.getQueryContext(), context.getTaskId(), meta, storeTableNode.getTableSchema(), context.getOutputPath()); appender.enableStats(); appender.init(); }
Schema tableSchema = storeTable.getTableSchema();
Schema tableSchema = storeTable.getTableSchema();
this.plan = plan; this.outSchema = plan.getTableSchema();
this.plan = plan; this.outSchema = plan.getTableSchema();