Class OperatorDriver
java.lang.Object
org.apache.drill.exec.physical.impl.protocol.OperatorDriver
State machine that drives the operator executable. Converts
between the iterator protocol and the operator executable protocol.
Implemented as a separate class in anticipation of eventually
changing the record batch (iterator) protocol.
Schema-Only Batch
The scan operator is designed to provide an initial, empty, schema-only batch. At the time that this code was written, it was (mis-?) understood that Drill used a "fast schema" path that provided a schema-only batch as the first batch. However, it turns out that most operators fail when presented with an empty batch: many do not properly set the offset vector for variable-width vectors to an initial 0 position, causing all kinds of issues.To work around this issue, the code defaults to *not* providing the schema batch.
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionOperatorDriver
(OperatorContext opContext, OperatorExec opExec, boolean enableSchemaBatch) -
Method Summary
-
Constructor Details
-
OperatorDriver
-
-
Method Details
-
next
Get the next batch. Performs initialization on the first call.- Returns:
- the iteration outcome to send downstream
-
cancel
public void cancel()Cancels the operator before reaching EOF. -
close
public void close() -
batchAccessor
-
operatorContext
-