public abstract class AbstractSingleRecordBatch<T extends PhysicalOperator> extends AbstractRecordBatch<T>
AbstractRecordBatch.BatchStateRecordBatch.IterOutcome| Modifier and Type | Field and Description |
|---|---|
protected SchemaChangeCallBack |
callBack |
protected RecordBatch |
incoming |
protected boolean |
outOfMemory |
container, context, oContext, popConfig, state, stats, unionTypeEnabledMAX_BATCH_SIZE| Constructor and Description |
|---|
AbstractSingleRecordBatch(T popConfig,
FragmentContext context,
RecordBatch incoming) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract RecordBatch.IterOutcome |
doWork() |
BatchSchema |
getSchema()
Gets the current schema of this record batch.
|
protected RecordBatch.IterOutcome |
handleNullInput()
Default behavior to handle NULL input (aka FAST NONE): incoming return NONE before return a OK_NEW_SCHEMA:
This could happen when the underneath Scan operators do not produce any batch with schema.
|
RecordBatch.IterOutcome |
innerNext() |
protected void |
killIncoming(boolean sendUpstream) |
protected abstract boolean |
setupNewSchema() |
buildSchema, close, getContext, getOutgoingContainer, getPopConfig, getSelectionVector2, getSelectionVector4, getValueAccessorById, getValueVectorId, getWritableBatch, iterator, kill, next, next, nextclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetRecordCountprotected final RecordBatch incoming
protected boolean outOfMemory
protected SchemaChangeCallBack callBack
public AbstractSingleRecordBatch(T popConfig, FragmentContext context, RecordBatch incoming) throws OutOfMemoryException
OutOfMemoryExceptionprotected void killIncoming(boolean sendUpstream)
killIncoming in class AbstractRecordBatch<T extends PhysicalOperator>public RecordBatch.IterOutcome innerNext()
innerNext in class AbstractRecordBatch<T extends PhysicalOperator>public BatchSchema getSchema()
RecordBatch
May be called only when the most recent call to RecordBatch.next(), if any,
returned #OK_NEW_SCHEMA or #OK.
The schema changes when and only when RecordBatch.next() returns
#OK_NEW_SCHEMA.
getSchema in interface RecordBatchgetSchema in interface VectorAccessiblegetSchema in class AbstractRecordBatch<T extends PhysicalOperator>protected abstract boolean setupNewSchema()
throws SchemaChangeException
SchemaChangeExceptionprotected abstract RecordBatch.IterOutcome doWork()
protected RecordBatch.IterOutcome handleNullInput()
Notice that NULL input is different from input with an empty batch. In the later case, input provides at least a batch, thought it's empty.
This behavior could be override in each individual operator, if the operator's semantics is to inject a batch with schema.
Copyright © 2017 The Apache Software Foundation. All rights reserved.