Class NestedLoopJoinBatch
java.lang.Object
org.apache.drill.exec.record.AbstractRecordBatch<T>
org.apache.drill.exec.record.AbstractBinaryRecordBatch<NestedLoopJoinPOP>
org.apache.drill.exec.physical.impl.join.NestedLoopJoinBatch
- All Implemented Interfaces:
AutoCloseable
,Iterable<VectorWrapper<?>>
,CloseableRecordBatch
,RecordBatch
,VectorAccessible
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.drill.exec.record.AbstractBinaryRecordBatch
AbstractBinaryRecordBatch.Metric
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
Modifier and TypeFieldDescriptionprotected static final int
protected static final int
Fields inherited from class org.apache.drill.exec.record.AbstractBinaryRecordBatch
batchMemoryManager, left, LEFT_INDEX, leftUpstream, numInputs, right, RIGHT_INDEX, rightUpstream
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
ModifierConstructorDescriptionprotected
NestedLoopJoinBatch
(NestedLoopJoinPOP popConfig, FragmentContext context, RecordBatch left, RecordBatch right) -
Method Summary
Methods inherited from class org.apache.drill.exec.record.AbstractBinaryRecordBatch
checkForEarlyFinish, getBatchMemoryManager, prefetchFirstBatchFromBothSides, updateBatchMemoryManagerStats, verifyOutcomeToSetBatchState
Methods inherited from class org.apache.drill.exec.record.AbstractRecordBatch
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
-
Field Details
-
LEFT_INPUT
protected static final int LEFT_INPUT- See Also:
-
RIGHT_INPUT
protected static final int RIGHT_INPUT- See Also:
-
-
Constructor Details
-
NestedLoopJoinBatch
protected NestedLoopJoinBatch(NestedLoopJoinPOP popConfig, FragmentContext context, RecordBatch left, RecordBatch right) throws OutOfMemoryException - Throws:
OutOfMemoryException
-
-
Method Details
-
innerNext
Method drains the right side input of the NLJ and accumulates the data in a hyper container. Once we have all the data from the right side we process the left side one batch at a time and produce the output batch- Specified by:
innerNext
in classAbstractRecordBatch<NestedLoopJoinPOP>
- Returns:
- IterOutcome state of the nested loop join batch
-
buildSchema
protected void buildSchema()Builds the output container's schema. Goes over the left and the right batch and adds the corresponding vectors to the output container.- Overrides:
buildSchema
in classAbstractRecordBatch<NestedLoopJoinPOP>
- Throws:
SchemaChangeException
- if batch schema was changed during execution
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Overrides:
close
in classAbstractRecordBatch<NestedLoopJoinPOP>
-
cancelIncoming
protected void cancelIncoming()- Overrides:
cancelIncoming
in classAbstractBinaryRecordBatch<NestedLoopJoinPOP>
-
getRecordCount
public int getRecordCount()Description copied from interface:VectorAccessible
Get the number of records.- Returns:
- number of records
-
dump
public void dump()Description copied from interface:RecordBatch
Perform dump of this batch's state to logs.
-