public void initializeBatch() {
isLast = false;
recordCapacity = incoming.getRecordCount();
vectorContainer = new VectorContainer();
SchemaBuilder bldr = BatchSchema.newBuilder().setSelectionVectorMode(BatchSchema.SelectionVectorMode.NONE);
for (VectorWrapper<?> v : incoming) {
// add field to the output schema
bldr.addField(v.getField());
// allocate a new value vector
ValueVector outgoingVector = TypeHelper.getNewVector(v.getField(), context.getAllocator());
VectorAllocator.getAllocator(v.getValueVector(), outgoingVector).alloc(recordCapacity);
vectorContainer.add(outgoingVector);
logger.debug("Reallocating to cap " + recordCapacity + " because of newly init'd vector : " + v.getValueVector());
}
outSchema = bldr.build();
logger.debug("Initialized OutgoingRecordBatch. RecordCount: " + recordCount + ", cap: " + recordCapacity + " Schema: " + outSchema);
}