public abstract class AbstractRecordBatch<T extends PhysicalOperator> extends Object implements CloseableRecordBatch
| Modifier and Type | Class and Description |
|---|---|
protected static class |
AbstractRecordBatch.BatchState |
RecordBatch.IterOutcome| Modifier and Type | Field and Description |
|---|---|
protected VectorContainer |
container |
protected FragmentContext |
context |
protected OperatorContext |
oContext |
protected T |
popConfig |
protected AbstractRecordBatch.BatchState |
state |
protected OperatorStats |
stats |
protected boolean |
unionTypeEnabled |
MAX_BATCH_SIZE| Modifier | Constructor and Description |
|---|---|
protected |
AbstractRecordBatch(T popConfig,
FragmentContext context) |
protected |
AbstractRecordBatch(T popConfig,
FragmentContext context,
boolean buildSchema) |
protected |
AbstractRecordBatch(T popConfig,
FragmentContext context,
boolean buildSchema,
OperatorContext oContext) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
buildSchema() |
void |
close() |
FragmentContext |
getContext()
Gets the FragmentContext of the current query fragment.
|
VectorContainer |
getOutgoingContainer() |
PhysicalOperator |
getPopConfig() |
BatchSchema |
getSchema()
Gets the current schema of this record batch.
|
SelectionVector2 |
getSelectionVector2() |
SelectionVector4 |
getSelectionVector4() |
VectorWrapper<?> |
getValueAccessorById(Class<?> clazz,
int... ids) |
TypedFieldId |
getValueVectorId(SchemaPath path)
Gets the value vector type and ID for the given schema path.
|
WritableBatch |
getWritableBatch()
Gets a writable version of this batch.
|
abstract RecordBatch.IterOutcome |
innerNext() |
Iterator<VectorWrapper<?>> |
iterator() |
void |
kill(boolean sendUpstream)
Informs child nodes that this query should be terminated.
|
protected abstract void |
killIncoming(boolean sendUpstream) |
RecordBatch.IterOutcome |
next()
Updates the data in each Field reading interface for the next range of
records.
|
RecordBatch.IterOutcome |
next(int inputIndex,
RecordBatch b) |
RecordBatch.IterOutcome |
next(RecordBatch b) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetRecordCountprotected final VectorContainer container
protected final T extends PhysicalOperator popConfig
protected final FragmentContext context
protected final OperatorContext oContext
protected final OperatorStats stats
protected final boolean unionTypeEnabled
protected AbstractRecordBatch.BatchState state
protected AbstractRecordBatch(T popConfig, FragmentContext context) throws OutOfMemoryException
OutOfMemoryExceptionprotected AbstractRecordBatch(T popConfig, FragmentContext context, boolean buildSchema) throws OutOfMemoryException
OutOfMemoryExceptionprotected AbstractRecordBatch(T popConfig, FragmentContext context, boolean buildSchema, OperatorContext oContext)
public Iterator<VectorWrapper<?>> iterator()
iterator in interface Iterable<VectorWrapper<?>>public FragmentContext getContext()
RecordBatchgetContext in interface RecordBatchpublic PhysicalOperator getPopConfig()
public final RecordBatch.IterOutcome next(RecordBatch b)
public final RecordBatch.IterOutcome next(int inputIndex, RecordBatch b)
public final RecordBatch.IterOutcome next()
RecordBatch
Once a RecordBatch's next() has returned RecordBatch.IterOutcome.NONE
or RecordBatch.IterOutcome.STOP, the consumer should no longer call
next(). Behavior at this point is undefined and likely to
throw an exception.
See RecordBatch.IterOutcome for the protocol (possible sequences of return
values).
next in interface RecordBatchpublic abstract RecordBatch.IterOutcome innerNext()
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 VectorAccessibleprotected void buildSchema()
throws SchemaChangeException
SchemaChangeExceptionpublic void kill(boolean sendUpstream)
RecordBatchkill in interface RecordBatchprotected abstract void killIncoming(boolean sendUpstream)
public void close()
close in interface AutoCloseablepublic SelectionVector2 getSelectionVector2()
getSelectionVector2 in interface VectorAccessiblepublic SelectionVector4 getSelectionVector4()
getSelectionVector4 in interface VectorAccessiblepublic TypedFieldId getValueVectorId(SchemaPath path)
RecordBatchgetValueVectorId in interface RecordBatchgetValueVectorId in interface VectorAccessiblepath - The path where the vector should be located.public VectorWrapper<?> getValueAccessorById(Class<?> clazz, int... ids)
getValueAccessorById in interface RecordBatchgetValueAccessorById in interface VectorAccessiblepublic WritableBatch getWritableBatch()
RecordBatchgetWritableBatch in interface RecordBatchpublic VectorContainer getOutgoingContainer()
getOutgoingContainer in interface RecordBatchCopyright © 2017 The Apache Software Foundation. All rights reserved.