public abstract class AbstractRecordBatch<T extends PhysicalOperator> extends Object implements CloseableRecordBatch
Modifier and Type | Class and Description |
---|---|
static class |
AbstractRecordBatch.BatchState |
RecordBatch.IterOutcome
Modifier and Type | Field and Description |
---|---|
protected RecordBatchStats.RecordBatchStatsContext |
batchStatsContext |
protected VectorContainer |
container |
protected FragmentContext |
context |
protected OperatorContext |
oContext |
protected T |
popConfig |
protected AbstractRecordBatch.BatchState |
state |
protected OperatorStats |
stats |
protected boolean |
unionTypeEnabled |
MAX_BATCH_ROW_COUNT
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) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
dump
getRecordCount
forEach, spliterator
protected final VectorContainer container
protected final T extends PhysicalOperator popConfig
protected final FragmentContext context
protected final OperatorContext oContext
protected final RecordBatchStats.RecordBatchStatsContext batchStatsContext
protected final OperatorStats stats
protected final boolean unionTypeEnabled
protected AbstractRecordBatch.BatchState state
protected AbstractRecordBatch(T popConfig, FragmentContext context) throws OutOfMemoryException
OutOfMemoryException
protected AbstractRecordBatch(T popConfig, FragmentContext context, boolean buildSchema) throws OutOfMemoryException
OutOfMemoryException
protected AbstractRecordBatch(T popConfig, FragmentContext context, boolean buildSchema, OperatorContext oContext)
public Iterator<VectorWrapper<?>> iterator()
iterator
in interface Iterable<VectorWrapper<?>>
public FragmentContext getContext()
RecordBatch
getContext
in interface RecordBatch
public T 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 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 RecordBatch
public abstract RecordBatch.IterOutcome innerNext()
public BatchSchema getSchema()
RecordBatch
May be called only when the most recent call to RecordBatch.next()
, if any,
returned RecordBatch.IterOutcome.OK_NEW_SCHEMA
or RecordBatch.IterOutcome.OK
.
The schema changes when and only when RecordBatch.next()
returns
RecordBatch.IterOutcome.OK_NEW_SCHEMA
.
getSchema
in interface RecordBatch
getSchema
in interface VectorAccessible
protected void buildSchema()
public void cancel()
RecordBatch
The operator which triggers the cancel MUST send a NONE
status downstream, or throw an exception. It is not legal to
call next()
on an operator after calling its
cancel()
method.
cancel
in interface RecordBatch
protected abstract void cancelIncoming()
public void close()
close
in interface AutoCloseable
public SelectionVector2 getSelectionVector2()
getSelectionVector2
in interface VectorAccessible
public SelectionVector4 getSelectionVector4()
getSelectionVector4
in interface VectorAccessible
public TypedFieldId getValueVectorId(SchemaPath path)
RecordBatch
Iterable<ValueVector>
.getValueVectorId
in interface RecordBatch
getValueVectorId
in interface VectorAccessible
path
- The path where the vector should be located.public VectorWrapper<?> getValueAccessorById(Class<?> clazz, int... ids)
getValueAccessorById
in interface RecordBatch
getValueAccessorById
in interface VectorAccessible
public WritableBatch getWritableBatch()
RecordBatch
getWritableBatch
in interface RecordBatch
public VectorContainer getOutgoingContainer()
getOutgoingContainer
in interface RecordBatch
public VectorContainer getContainer()
RecordBatch
getContainer
in interface RecordBatch
public RecordBatchStats.RecordBatchStatsContext getRecordBatchStatsContext()
public boolean isRecordBatchStatsLoggingEnabled()
public void checkContinue()
protected UserException schemaChangeException(SchemaChangeException e, org.slf4j.Logger logger)
public static UserException schemaChangeException(SchemaChangeException e, String operator, org.slf4j.Logger logger)
Copyright © 1970 The Apache Software Foundation. All rights reserved.