Class RangePartitionRecordBatch
java.lang.Object
org.apache.drill.exec.record.AbstractRecordBatch<T>
org.apache.drill.exec.record.AbstractUnaryRecordBatch<T>
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.BatchState
Nested 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
incoming
Fields inherited from class org.apache.drill.exec.record.AbstractUnaryRecordBatch
callBack
Fields inherited from class org.apache.drill.exec.record.AbstractRecordBatch
batchStatsContext, container, context, oContext, popConfig, state, stats, unionTypeEnabled
Fields inherited from interface org.apache.drill.exec.record.RecordBatch
MAX_BATCH_ROW_COUNT
-
Constructor Summary
ConstructorDescriptionRangePartitionRecordBatch
(RangePartitionSender popConfig, RecordBatch incoming, FragmentContext context) -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
protected RecordBatch.IterOutcome
doWork()
void
dump()
Perform dump of this batch's state to logs.int
Get the number of records.protected boolean
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 intoMethods inherited from class org.apache.drill.exec.record.AbstractSingleRecordBatch
getFinalOutcome, getIncoming
Methods inherited from class org.apache.drill.exec.record.AbstractUnaryRecordBatch
cancelIncoming, getLastKnownOutcome, handleNullInput, innerNext, setLastKnownOutcome
Methods 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, schemaChangeException
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:
close
in interfaceAutoCloseable
- Overrides:
close
in classAbstractRecordBatch<RangePartitionSender>
-
getRecordCount
public int getRecordCount()Description copied from interface:VectorAccessible
Get the number of records.- Returns:
- number of records
-
doWork
- Specified by:
doWork
in 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:
setupNewSchema
in classAbstractUnaryRecordBatch<RangePartitionSender>
- Returns:
- True if the new schema differs from old schema, False otherwise
- Throws:
SchemaChangeException
-
dump
public void dump()Description copied from interface:RecordBatch
Perform dump of this batch's state to logs.
-