Use new appendColumn API in AssignUniqueIdOperator
@@ -90,7 +90,6 @@ public class AssignUniqueIdOperator
private final AtomicLong rowIdPool;
private final List<Type> types;
private final long uniqueValueMask;
- private final int inputPageChannelCount;
private Page inputPage;
private long rowIdCounter;
@@ -107,7 +106,6 @@ public class AssignUniqueIdOperator
TaskId fullTaskId = operatorContext.getDriverContext().getTaskId();
uniqueValueMask = (((long) fullTaskId.getStageId().getId()) << 54) | (((long) fullTaskId.getId()) << 40);
- inputPageChannelCount = types.size() - 1;
requestValues();
}
@@ -172,13 +170,7 @@ public class AssignUniqueIdOperator
private Page processPage()
{
- Block[] outputBlocks = new Block[inputPageChannelCount + 1]; // + 1 for the unique column
- for (int i = 0; i < inputPageChannelCount; i++) {
- outputBlocks[i] = inputPage.getBlock(i);
- }
- outputBlocks[inputPageChannelCount] = generateIdColumn();
-
- return new Page(inputPage.getPositionCount(), outputBlocks);
+ return inputPage.appendColumn(generateIdColumn());
}
private Block generateIdColumn()
