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:
  • Field Details

  • Constructor Details

  • Method Details

    • getIncoming

      protected abstract RecordBatch getIncoming()
    • cancelIncoming

      protected void cancelIncoming()
      Specified by:
      cancelIncoming in class AbstractRecordBatch<T extends PhysicalOperator>
    • innerNext

      public RecordBatch.IterOutcome innerNext()
      Specified by:
      innerNext in class AbstractRecordBatch<T extends PhysicalOperator>
    • setupNewSchema

      protected abstract boolean setupNewSchema()
    • doWork

      protected abstract RecordBatch.IterOutcome doWork()
    • handleNullInput

      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.

      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

      protected RecordBatch.IterOutcome getLastKnownOutcome()
    • setLastKnownOutcome

      protected void setLastKnownOutcome(RecordBatch.IterOutcome outcome)
      Set's the outcome received with current input batch in processing
      Parameters:
      outcome -