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.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.drill.exec.record.AbstractRecordBatch
AbstractRecordBatch.BatchState
Nested classes/interfaces inherited from interface org.apache.drill.exec.record.RecordBatch
RecordBatch.IterOutcome
-
Field Summary
Fields inherited from class org.apache.drill.exec.record.AbstractRecordBatch
batchStatsContext, container, context, oContext, popConfig, state, stats, unionTypeEnabled
Fields inherited from interface org.apache.drill.exec.record.RecordBatch
MAX_BATCH_ROW_COUNT
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
protected abstract RecordBatch.IterOutcome
doWork()
protected abstract RecordBatch
protected RecordBatch.IterOutcome
protected RecordBatch.IterOutcome
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.protected void
Set's the outcome received with current input batch in processingprotected abstract boolean
Methods 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, schemaChangeException
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
Methods inherited from interface org.apache.drill.exec.record.RecordBatch
dump
Methods 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:
cancelIncoming
in classAbstractRecordBatch<T extends PhysicalOperator>
-
innerNext
- Specified by:
innerNext
in 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
-
-