Class RangePartitionRecordBatch
java.lang.Object
org.apache.drill.exec.record.AbstractRecordBatch<RangePartitionSender>
org.apache.drill.exec.record.AbstractUnaryRecordBatch<RangePartitionSender>
org.apache.drill.exec.record.AbstractSingleRecordBatch<RangePartitionSender>
org.apache.drill.exec.physical.impl.rangepartitioner.RangePartitionRecordBatch
- All Implemented Interfaces:
AutoCloseable,Iterable<VectorWrapper<?>>,CloseableRecordBatch,RecordBatch,VectorAccessible
Provides the ability to divide up the input rows into a fixed number of
separate ranges or 'buckets' based on the values of a set of columns (the
range partitioning columns).
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.drill.exec.record.AbstractRecordBatch
AbstractRecordBatch.BatchStateNested classes/interfaces inherited from interface org.apache.drill.exec.record.RecordBatch
RecordBatch.IterOutcome -
Field Summary
Fields inherited from class org.apache.drill.exec.record.AbstractSingleRecordBatch
incomingFields inherited from class org.apache.drill.exec.record.AbstractUnaryRecordBatch
callBackFields inherited from class org.apache.drill.exec.record.AbstractRecordBatch
batchStatsContext, container, context, oContext, popConfig, state, stats, unionTypeEnabledFields inherited from interface org.apache.drill.exec.record.RecordBatch
MAX_BATCH_ROW_COUNT -
Constructor Summary
ConstructorsConstructorDescriptionRangePartitionRecordBatch(RangePartitionSender popConfig, RecordBatch incoming, FragmentContext context) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()protected RecordBatch.IterOutcomedoWork()voiddump()Perform dump of this batch's state to logs.intGet the number of records.protected booleanSets up projection that will transfer all of the columns in batch, and also setup the partition column based on which partition a record falls intoMethods inherited from class org.apache.drill.exec.record.AbstractSingleRecordBatch
getFinalOutcome, getIncomingMethods inherited from class org.apache.drill.exec.record.AbstractUnaryRecordBatch
cancelIncoming, getLastKnownOutcome, handleNullInput, innerNext, setLastKnownOutcomeMethods inherited from class org.apache.drill.exec.record.AbstractRecordBatch
buildSchema, cancel, checkContinue, getContainer, getContext, getOutgoingContainer, getPopConfig, getRecordBatchStatsContext, getSchema, getSelectionVector2, getSelectionVector4, getValueAccessorById, getValueVectorId, getWritableBatch, isRecordBatchStatsLoggingEnabled, iterator, next, next, next, schemaChangeException, schemaChangeExceptionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
RangePartitionRecordBatch
public RangePartitionRecordBatch(RangePartitionSender popConfig, RecordBatch incoming, FragmentContext context) throws OutOfMemoryException - Throws:
OutOfMemoryException
-
-
Method Details
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Overrides:
closein classAbstractRecordBatch<RangePartitionSender>
-
getRecordCount
public int getRecordCount()Description copied from interface:VectorAccessibleGet the number of records.- Returns:
- number of records
-
doWork
- Specified by:
doWorkin classAbstractUnaryRecordBatch<RangePartitionSender>
-
setupNewSchema
protected boolean setupNewSchema()Sets up projection that will transfer all of the columns in batch, and also setup the partition column based on which partition a record falls into- Specified by:
setupNewSchemain classAbstractUnaryRecordBatch<RangePartitionSender>- Returns:
- True if the new schema differs from old schema, False otherwise
- Throws:
SchemaChangeException
-
dump
public void dump()Description copied from interface:RecordBatchPerform dump of this batch's state to logs.
-