Class RowKeyJoinBatch
java.lang.Object
org.apache.drill.exec.record.AbstractRecordBatch<RowKeyJoinPOP>
org.apache.drill.exec.physical.impl.join.RowKeyJoinBatch
- All Implemented Interfaces:
AutoCloseable
,Iterable<VectorWrapper<?>>
,RowKeyJoin
,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
Nested classes/interfaces inherited from interface org.apache.drill.exec.physical.impl.join.RowKeyJoin
RowKeyJoin.RowKeyJoinState
-
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
ConstructorDescriptionRowKeyJoinBatch
(RowKeyJoinPOP config, FragmentContext context, RecordBatch left, RecordBatch right) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
protected void
void
close()
void
dump()
Perform dump of this batch's state to logs.Get the current BatchState (this is useful when performing row key join)int
Get the number of records.Get the current RowKeyJoinState.boolean
Is the next batch of row keys ready to be returnedorg.apache.commons.lang3.tuple.Pair<ValueVector,
Integer> Get the next batch of row keysvoid
setBatchState
(AbstractRecordBatch.BatchState newState) Set the BatchState (this is useful when performing row key join)void
setRowKeyJoinState
(RowKeyJoin.RowKeyJoinState newState) Set the RowKeyJoinState (this is useful for maintaining state for row key join algorithm)Methods inherited from class org.apache.drill.exec.record.AbstractRecordBatch
cancel, checkContinue, getContainer, getContext, getOutgoingContainer, getPopConfig, getRecordBatchStatsContext, getSchema, 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
-
RowKeyJoinBatch
public RowKeyJoinBatch(RowKeyJoinPOP config, FragmentContext context, RecordBatch left, RecordBatch right) throws OutOfMemoryException - Throws:
OutOfMemoryException
-
-
Method Details
-
getRecordCount
public int getRecordCount()Description copied from interface:VectorAccessible
Get the number of records.- Specified by:
getRecordCount
in interfaceVectorAccessible
- Returns:
- number of records
-
getSelectionVector2
- Specified by:
getSelectionVector2
in interfaceVectorAccessible
- Overrides:
getSelectionVector2
in classAbstractRecordBatch<RowKeyJoinPOP>
-
getSelectionVector4
- Specified by:
getSelectionVector4
in interfaceVectorAccessible
- Overrides:
getSelectionVector4
in classAbstractRecordBatch<RowKeyJoinPOP>
-
buildSchema
protected void buildSchema()- Overrides:
buildSchema
in classAbstractRecordBatch<RowKeyJoinPOP>
-
innerNext
- Specified by:
innerNext
in classAbstractRecordBatch<RowKeyJoinPOP>
-
hasRowKeyBatch
public boolean hasRowKeyBatch()Description copied from interface:RowKeyJoin
Is the next batch of row keys ready to be returned- Specified by:
hasRowKeyBatch
in interfaceRowKeyJoin
- Returns:
- True if ready, false if not
-
nextRowKeyBatch
Description copied from interface:RowKeyJoin
Get the next batch of row keys- Specified by:
nextRowKeyBatch
in interfaceRowKeyJoin
- Returns:
- a Pair whose left element is the ValueVector containing the row keys, right element is the number of row keys in this batch
-
getBatchState
Description copied from interface:RowKeyJoin
Get the current BatchState (this is useful when performing row key join)- Specified by:
getBatchState
in interfaceRowKeyJoin
-
setBatchState
Description copied from interface:RowKeyJoin
Set the BatchState (this is useful when performing row key join)- Specified by:
setBatchState
in interfaceRowKeyJoin
-
setRowKeyJoinState
Description copied from interface:RowKeyJoin
Set the RowKeyJoinState (this is useful for maintaining state for row key join algorithm)- Specified by:
setRowKeyJoinState
in interfaceRowKeyJoin
-
getRowKeyJoinState
Description copied from interface:RowKeyJoin
Get the current RowKeyJoinState.- Specified by:
getRowKeyJoinState
in interfaceRowKeyJoin
-
cancelIncoming
protected void cancelIncoming()- Specified by:
cancelIncoming
in classAbstractRecordBatch<RowKeyJoinPOP>
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Overrides:
close
in classAbstractRecordBatch<RowKeyJoinPOP>
-
dump
public void dump()Description copied from interface:RecordBatch
Perform dump of this batch's state to logs.- Specified by:
dump
in interfaceRecordBatch
-