Package org.apache.drill.exec.record
Class AbstractUnaryRecordBatch<T extends PhysicalOperator>
java.lang.Object
org.apache.drill.exec.record.AbstractRecordBatch<T>
org.apache.drill.exec.record.AbstractUnaryRecordBatch<T>
- Type Parameters:
T-
- All Implemented Interfaces:
AutoCloseable,Iterable<VectorWrapper<?>>,CloseableRecordBatch,RecordBatch,VectorAccessible
- Direct Known Subclasses:
AbstractSingleRecordBatch,AbstractTableFunctionRecordBatch
public abstract class AbstractUnaryRecordBatch<T extends PhysicalOperator>
extends AbstractRecordBatch<T>
Base class for operators that have a single input. The concrete implementations provide the
input by implementing the getIncoming() method
Known implementations: AbstractSingleRecordBatch and AbstractTableFunctionRecordBatch.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.drill.exec.record.AbstractRecordBatch
AbstractRecordBatch.BatchStateNested classes/interfaces inherited from interface org.apache.drill.exec.record.RecordBatch
RecordBatch.IterOutcome -
Field Summary
FieldsFields inherited from class org.apache.drill.exec.record.AbstractRecordBatch
batchStatsContext, container, context, oContext, popConfig, state, stats, unionTypeEnabledFields inherited from interface org.apache.drill.exec.record.RecordBatch
MAX_BATCH_ROW_COUNT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected abstract RecordBatch.IterOutcomedoWork()protected abstract RecordBatchprotected RecordBatch.IterOutcomeprotected RecordBatch.IterOutcomeDefault 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.protected voidSet's the outcome received with current input batch in processingprotected abstract booleanMethods inherited from class org.apache.drill.exec.record.AbstractRecordBatch
buildSchema, cancel, checkContinue, close, getContainer, getContext, getOutgoingContainer, getPopConfig, getRecordBatchStatsContext, getSchema, getSelectionVector2, getSelectionVector4, getValueAccessorById, getValueVectorId, getWritableBatch, isRecordBatchStatsLoggingEnabled, iterator, next, next, next, schemaChangeException, schemaChangeExceptionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods inherited from interface org.apache.drill.exec.record.RecordBatch
dumpMethods inherited from interface org.apache.drill.exec.record.VectorAccessible
getRecordCount
-
Field Details
-
callBack
-
-
Constructor Details
-
AbstractUnaryRecordBatch
- Throws:
OutOfMemoryException
-
-
Method Details
-
getIncoming
-
cancelIncoming
protected void cancelIncoming()- Specified by:
cancelIncomingin classAbstractRecordBatch<T extends PhysicalOperator>
-
innerNext
- Specified by:
innerNextin classAbstractRecordBatch<T extends PhysicalOperator>
-
setupNewSchema
protected abstract boolean setupNewSchema() -
doWork
-
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.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.
- Returns:
- IterOutcome.NONE.
-
getLastKnownOutcome
-
setLastKnownOutcome
Set's the outcome received with current input batch in processing- Parameters:
outcome-
-