if (!lastSecondStageGroupbyNode.isDistinct() && lastSecondStageGroupbyNode.isEmptyGrouping()) { GroupbyNode otherGroupbyNode = lastSecondStageGroupbyNode; lastSecondStageGroupbyNode = secondStageGroupbyNodes.get(secondStageGroupbyNodes.size() - 2);
if (!lastSecondStageGroupbyNode.isDistinct() && lastSecondStageGroupbyNode.isEmptyGrouping()) { GroupbyNode otherGroupbyNode = lastSecondStageGroupbyNode; lastSecondStageGroupbyNode = secondStageGroupbyNodes.get(secondStageGroupbyNodes.size() - 2);
if (groupbyNode.isEmptyGrouping()) { secondChannel = new DataChannel(secondStageBlock, thirdStageBlock, HASH_SHUFFLE, 1); secondChannel.setShuffleKeys(firstStageDistinctNode.getGroupingColumns());
GroupbyNode groupbyNode = (GroupbyNode) projectable; if (!groupbyNode.isEmptyGrouping()) { // it should be targets instead of int groupingKeyNum = groupbyNode.getGroupingColumns().length;
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; }
if (firstPhaseGroupBy.isEmptyGrouping()) { dataChannel.setShuffle(HASH_SHUFFLE, firstPhaseGroupBy.getGroupingColumns(), 1); } else {
if (firstPhaseGroupBy.isEmptyGrouping()) { dataChannel.setShuffle(HASH_SHUFFLE, firstPhaseGroupBy.getGroupingColumns(), 1); } else {
if (groupbyNode.isEmptyGrouping()) { channel = new DataChannel(latestExecBlock, secondStageBlock, HASH_SHUFFLE, 1); channel.setShuffleKeys(firstStageDistinctNode.getGroupingColumns());
if (groupbyNode.isEmptyGrouping()) { secondChannel = new DataChannel(secondStageBlock, thirdStageBlock, HASH_SHUFFLE, 1); secondChannel.setShuffleKeys(firstStageDistinctNode.getGroupingColumns());
if (groupbyNode.isEmptyGrouping()) { channel = new DataChannel(latestExecBlock, secondStageBlock, HASH_SHUFFLE, 1); channel.setShuffleKeys(firstStageDistinctNode.getGroupingColumns());
GroupbyNode groupbyNode = (GroupbyNode) projectable; if (!groupbyNode.isEmptyGrouping()) { // it should be targets instead of int groupingKeyNum = groupbyNode.getGroupingColumns().length;