public class ScanBatch extends Object implements CloseableRecordBatch
| Modifier and Type | Class and Description |
|---|---|
static class |
ScanBatch.Mutator
Row set mutator implementation provided to record readers created by
this scan batch.
|
RecordBatch.IterOutcomeMAX_BATCH_SIZE| Constructor and Description |
|---|
ScanBatch(PhysicalOperator subScanConfig,
FragmentContext context,
List<RecordReader> readers) |
ScanBatch(PhysicalOperator subScanConfig,
FragmentContext context,
OperatorContext oContext,
List<RecordReader> readerList,
List<Map<String,String>> implicitColumnList) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
FragmentContext |
getContext()
Gets the FragmentContext of the current query fragment.
|
VectorContainer |
getOutgoingContainer() |
int |
getRecordCount()
Gets the number of records that are within this record.
|
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.
|
Iterator<VectorWrapper<?>> |
iterator() |
void |
kill(boolean sendUpstream)
Informs child nodes that this query should be terminated.
|
RecordBatch.IterOutcome |
next()
Updates the data in each Field reading interface for the next range of
records.
|
public ScanBatch(PhysicalOperator subScanConfig, FragmentContext context, OperatorContext oContext, List<RecordReader> readerList, List<Map<String,String>> implicitColumnList)
subScanConfig - context - oContext - readerList - implicitColumnList - : either an emptylist when all the readers do not have implicit
columns, or there is a one-to-one mapping between reader and implicitColumns.public ScanBatch(PhysicalOperator subScanConfig, FragmentContext context, List<RecordReader> readers) throws ExecutionSetupException
ExecutionSetupExceptionpublic FragmentContext getContext()
RecordBatchgetContext in interface RecordBatchpublic 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 VectorAccessiblepublic int getRecordCount()
RecordBatchgetRecordCount in interface RecordBatchgetRecordCount in interface VectorAccessiblepublic void kill(boolean sendUpstream)
RecordBatchkill in interface RecordBatchpublic 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 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 Iterator<VectorWrapper<?>> iterator()
iterator in interface Iterable<VectorWrapper<?>>public WritableBatch getWritableBatch()
RecordBatchgetWritableBatch in interface RecordBatchpublic void close()
throws Exception
close in interface AutoCloseableExceptionpublic VectorContainer getOutgoingContainer()
getOutgoingContainer in interface RecordBatchCopyright © 2017 The Apache Software Foundation. All rights reserved.