Class SortBatch
java.lang.Object
org.apache.drill.exec.record.AbstractRecordBatch<Sort>
org.apache.drill.exec.physical.impl.sort.SortBatch
- All Implemented Interfaces:
AutoCloseable
,Iterable<VectorWrapper<?>>
,CloseableRecordBatch
,RecordBatch
,VectorAccessible
-
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.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
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
void
close()
static Sorter
createNewSorter
(FragmentContext context, List<Order.Ordering> orderings, VectorAccessible batch) static Sorter
createNewSorter
(FragmentContext context, List<Order.Ordering> orderings, VectorAccessible batch, MappingSet mainMapping, MappingSet leftMapping, MappingSet rightMapping) void
dump()
Perform dump of this batch's state to logs.int
Get the number of records.Gets a writable version of this batch.Methods inherited from class org.apache.drill.exec.record.AbstractRecordBatch
buildSchema, cancel, checkContinue, getContainer, getContext, getOutgoingContainer, getPopConfig, getRecordBatchStatsContext, getSchema, getValueAccessorById, getValueVectorId, 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
-
SortBatch
public SortBatch(Sort popConfig, FragmentContext context, RecordBatch incoming) throws OutOfMemoryException - Throws:
OutOfMemoryException
-
-
Method Details
-
getRecordCount
public int getRecordCount()Description copied from interface:VectorAccessible
Get the number of records.- Returns:
- number of records
-
getSelectionVector2
- Specified by:
getSelectionVector2
in interfaceVectorAccessible
- Overrides:
getSelectionVector2
in classAbstractRecordBatch<Sort>
-
getSelectionVector4
- Specified by:
getSelectionVector4
in interfaceVectorAccessible
- Overrides:
getSelectionVector4
in classAbstractRecordBatch<Sort>
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Overrides:
close
in classAbstractRecordBatch<Sort>
-
innerNext
- Specified by:
innerNext
in classAbstractRecordBatch<Sort>
-
createNewSorter
public static Sorter createNewSorter(FragmentContext context, List<Order.Ordering> orderings, VectorAccessible batch) -
createNewSorter
public static Sorter createNewSorter(FragmentContext context, List<Order.Ordering> orderings, VectorAccessible batch, MappingSet mainMapping, MappingSet leftMapping, MappingSet rightMapping) -
getWritableBatch
Description copied from interface:RecordBatch
Gets a writable version of this batch. Takes over ownership of existing buffers.- Specified by:
getWritableBatch
in interfaceRecordBatch
- Overrides:
getWritableBatch
in classAbstractRecordBatch<Sort>
-
cancelIncoming
protected void cancelIncoming()- Specified by:
cancelIncoming
in classAbstractRecordBatch<Sort>
-
dump
public void dump()Description copied from interface:RecordBatch
Perform dump of this batch's state to logs.
-