@Override public Schema getLogicalSchema() { return scanNode.getOutSchema(); } }
@Override public Schema getLogicalSchema() { return scanNode.getOutSchema(); } }
public PartitionMergeScanExec(TaskAttemptContext context, ScanNode plan, CatalogProtos.FragmentProto[] fragments) throws IOException { super(context, plan.getInSchema(), plan.getOutSchema()); this.plan = plan; this.fragments = fragments; inputStats = new TableStats(); }
public NonForwardQueryResultFileScanner(TajoConf tajoConf, String sessionId, QueryId queryId, ScanNode scanNode, int maxRow, CodecType codecType) throws IOException { this.tajoConf = tajoConf; this.sessionId = sessionId; this.queryId = queryId; this.scanNode = scanNode; this.tableDesc = scanNode.getTableDesc(); this.maxRow = maxRow; this.rowEncoder = RowStoreUtil.createEncoder(scanNode.getOutSchema()); this.codecType = codecType; }
public PartitionMergeScanExec(TaskAttemptContext context, ScanNode plan, CatalogProtos.FragmentProto[] fragments) throws IOException { super(context, plan.getInSchema(), plan.getOutSchema()); this.plan = plan; this.fragments = fragments; inputStats = new TableStats(); }
public NonForwardQueryResultFileScanner(AsyncTaskService asyncTaskService, TajoConf tajoConf, String sessionId, QueryId queryId, ScanNode scanNode, int maxRow, Optional<CodecType> codecType) throws IOException { this.asyncTaskService = asyncTaskService; this.tajoConf = tajoConf; this.sessionId = sessionId; this.queryId = queryId; this.scanNode = scanNode; this.tableDesc = scanNode.getTableDesc(); this.maxRow = maxRow; this.rowEncoder = RowStoreUtil.createEncoder(scanNode.getOutSchema()); this.codecType = codecType; }
public void init(ScanNode scanNode, Path[] inputPaths) { tableDesc = scanNode.tableDesc; setInSchema(scanNode.getInSchema()); setOutSchema(scanNode.getOutSchema()); this.qual = scanNode.qual; this.targets = scanNode.targets; this.inputPaths = inputPaths; if (scanNode.hasAlias()) { alias = scanNode.alias; } }
public SystemPhysicalExec(TaskAttemptContext context, ScanNode scanNode) { super(context, scanNode.getInSchema(), scanNode.getOutSchema()); this.scanNode = scanNode; if (this.scanNode.hasQual()) { this.qual = this.scanNode.getQual(); this.qual.bind(null, inSchema); } cachedData = new ArrayList<>(); currentRow = 0; isClosed = false; projector = new Projector(context, inSchema, outSchema, scanNode.getTargets()); }
public void init(ScanNode scanNode, Path[] inputPaths) { tableDesc = scanNode.tableDesc; setInSchema(scanNode.getInSchema()); setOutSchema(scanNode.getOutSchema()); this.qual = scanNode.qual; this.targets = scanNode.targets; setInputPaths(inputPaths); if (scanNode.hasAlias()) { alias = scanNode.alias; } }
public SystemPhysicalExec(TaskAttemptContext context, ScanNode scanNode) { super(context, scanNode.getInSchema(), scanNode.getOutSchema()); this.scanNode = scanNode; if (this.scanNode.hasQual()) { this.qual = this.scanNode.getQual(); this.qual.bind(null, inSchema); } cachedData = TUtil.newList(); currentRow = 0; isClosed = false; projector = new Projector(context, inSchema, outSchema, scanNode.getTargets()); }
public SeqScanExec(TaskAttemptContext context, ScanNode plan, CatalogProtos.FragmentProto [] fragments) throws IOException { super(context, plan.getInSchema(), plan.getOutSchema()); this.plan = plan; this.qual = plan.getQual(); this.fragments = fragments; if (plan.getTableDesc().hasPartition() && plan.getTableDesc().getPartitionMethod().getPartitionType() == CatalogProtos.PartitionType.COLUMN) { rewriteColumnPartitionedTableSchema(); } }
public SeqScanExec(TaskAttemptContext context, ScanNode plan, CatalogProtos.FragmentProto [] fragments) throws IOException { super(context, plan.getInSchema(), plan.getOutSchema()); this.plan = plan; this.qual = plan.getQual(); this.fragments = fragments; if (plan.getTableDesc().hasPartition() && plan.getTableDesc().getPartitionMethod().getPartitionType() == CatalogProtos.PartitionType.COLUMN) { rewriteColumnPartitionedTableSchema(); } }
@Override public PlanString getPlanString() { PlanString planStr = new PlanString(this).appendTitle(" on ").appendTitle(getTableName()); if (hasAlias()) { planStr.appendTitle(" as ").appendTitle(alias); } if (hasQual()) { planStr.addExplan("filter: ").appendExplain(this.qual.toString()); } if (hasTargets()) { planStr.addExplan("target list: ").appendExplain(StringUtils.join(targets, ", ")); } planStr.addDetail("out schema: ").appendDetail(getOutSchema().toString()); planStr.addDetail("in schema: ").appendDetail(getInSchema().toString()); return planStr; } }
/** * It inserts shuffle and adds store plan on a partitioned table. */ private ExecutionBlock buildShuffleAndStorePlanToPartitionedTable(GlobalPlanContext context, StoreTableNode currentNode, ExecutionBlock lastBlock) throws TajoException { MasterPlan masterPlan = context.plan; ExecutionBlock nextBlock = masterPlan.newExecutionBlock(); DataChannel channel = new DataChannel(lastBlock, nextBlock, HASH_SHUFFLE, 32); setShuffleKeysFromPartitionedTableStore(currentNode, channel); channel.setSchema(lastBlock.getPlan().getOutSchema()); channel.setDataFormat(dataFormat); ScanNode scanNode = buildInputExecutor(masterPlan.getLogicalPlan(), channel); currentNode.setChild(scanNode); currentNode.setInSchema(scanNode.getOutSchema()); nextBlock.setPlan(currentNode); masterPlan.addConnect(channel); return nextBlock; }
/** * It inserts shuffle and adds store plan on a partitioned table. */ private ExecutionBlock buildShuffleAndStorePlanToPartitionedTable(GlobalPlanContext context, StoreTableNode currentNode, ExecutionBlock lastBlock) throws TajoException { MasterPlan masterPlan = context.plan; ExecutionBlock nextBlock = masterPlan.newExecutionBlock(); DataChannel channel = new DataChannel(lastBlock, nextBlock, HASH_SHUFFLE, 32); setShuffleKeysFromPartitionedTableStore(currentNode, channel); channel.setSchema(lastBlock.getPlan().getOutSchema()); channel.setDataFormat(dataFormat); ScanNode scanNode = buildInputExecutor(masterPlan.getLogicalPlan(), channel); currentNode.setChild(scanNode); currentNode.setInSchema(scanNode.getOutSchema()); nextBlock.setPlan(currentNode); masterPlan.addConnect(channel); return nextBlock; }
/** * It inserts shuffle and adds store plan on a partitioned table, * and it push downs those plans into child unions. */ private ExecutionBlock buildShuffleAndStorePlanToPartitionedTableWithUnion(GlobalPlanContext context, StoreTableNode currentNode, ExecutionBlock lastBlock) throws TajoException { MasterPlan masterPlan = context.plan; DataChannel lastChannel = null; for (DataChannel channel : masterPlan.getIncomingChannels(lastBlock.getId())) { ExecutionBlock childBlock = masterPlan.getExecBlock(channel.getSrcId()); setShuffleKeysFromPartitionedTableStore(currentNode, channel); channel.setSchema(childBlock.getPlan().getOutSchema()); channel.setDataFormat(dataFormat); lastChannel = channel; } ScanNode scanNode = buildInputExecutor(masterPlan.getLogicalPlan(), lastChannel); currentNode.setChild(scanNode); currentNode.setInSchema(scanNode.getOutSchema()); lastBlock.setPlan(currentNode); return lastBlock; }
/** * It inserts shuffle and adds store plan on a partitioned table, * and it push downs those plans into child unions. */ private ExecutionBlock buildShuffleAndStorePlanToPartitionedTableWithUnion(GlobalPlanContext context, StoreTableNode currentNode, ExecutionBlock lastBlock) throws TajoException { MasterPlan masterPlan = context.plan; DataChannel lastChannel = null; for (DataChannel channel : masterPlan.getIncomingChannels(lastBlock.getId())) { ExecutionBlock childBlock = masterPlan.getExecBlock(channel.getSrcId()); setShuffleKeysFromPartitionedTableStore(currentNode, channel); channel.setSchema(childBlock.getPlan().getOutSchema()); channel.setDataFormat(dataFormat); lastChannel = channel; } ScanNode scanNode = buildInputExecutor(masterPlan.getLogicalPlan(), lastChannel); currentNode.setChild(scanNode); currentNode.setInSchema(scanNode.getOutSchema()); lastBlock.setPlan(currentNode); return lastBlock; }
@Override public PlanString getPlanString() { PlanString planStr = new PlanString(this).appendTitle(" on ").appendTitle(getTableName()); if (hasAlias()) { planStr.appendTitle(" as ").appendTitle(alias); } if (hasQual()) { planStr.addExplan("filter: ").appendExplain(this.qual.toString()); } if (hasTargets()) { planStr.addExplan("target list: "); boolean first = true; for (Target target : targets) { if (!first) { planStr.appendExplain(", "); } planStr.appendExplain(target.toString()); first = false; } } planStr.addDetail("out schema: ").appendDetail(getOutSchema().toString()); planStr.addDetail("in schema: ").appendDetail(getInSchema().toString()); return planStr; } }
private ExecutionBlock buildTwoPhaseGroupby(MasterPlan masterPlan, ExecutionBlock latestBlock, GroupbyNode firstPhaseGroupby, GroupbyNode secondPhaseGroupby) throws TajoException { ExecutionBlock childBlock = latestBlock; childBlock.setPlan(firstPhaseGroupby); ExecutionBlock currentBlock = masterPlan.newExecutionBlock(); DataChannel channel; if (firstPhaseGroupby.isEmptyGrouping()) { channel = new DataChannel(childBlock, currentBlock, HASH_SHUFFLE, 1); channel.setShuffleKeys(firstPhaseGroupby.getGroupingColumns()); } else { channel = new DataChannel(childBlock, currentBlock, HASH_SHUFFLE, 32); channel.setShuffleKeys(firstPhaseGroupby.getGroupingColumns()); } channel.setSchema(firstPhaseGroupby.getOutSchema()); channel.setDataFormat(dataFormat); ScanNode scanNode = buildInputExecutor(masterPlan.getLogicalPlan(), channel); secondPhaseGroupby.setChild(scanNode); secondPhaseGroupby.setInSchema(scanNode.getOutSchema()); currentBlock.setPlan(secondPhaseGroupby); masterPlan.addConnect(channel); return currentBlock; }
private ExecutionBlock buildTwoPhaseGroupby(MasterPlan masterPlan, ExecutionBlock latestBlock, GroupbyNode firstPhaseGroupby, GroupbyNode secondPhaseGroupby) throws TajoException { ExecutionBlock childBlock = latestBlock; childBlock.setPlan(firstPhaseGroupby); ExecutionBlock currentBlock = masterPlan.newExecutionBlock(); DataChannel channel; if (firstPhaseGroupby.isEmptyGrouping()) { channel = new DataChannel(childBlock, currentBlock, HASH_SHUFFLE, 1); channel.setShuffleKeys(firstPhaseGroupby.getGroupingColumns()); } else { channel = new DataChannel(childBlock, currentBlock, HASH_SHUFFLE, 32); channel.setShuffleKeys(firstPhaseGroupby.getGroupingColumns()); } channel.setSchema(firstPhaseGroupby.getOutSchema()); channel.setDataFormat(dataFormat); ScanNode scanNode = buildInputExecutor(masterPlan.getLogicalPlan(), channel); secondPhaseGroupby.setChild(scanNode); secondPhaseGroupby.setInSchema(scanNode.getOutSchema()); currentBlock.setPlan(secondPhaseGroupby); masterPlan.addConnect(channel); return currentBlock; }