SortMergeJoinScanner¶
Creating Instance¶
SortMergeJoinScanner takes the following to be created:
-
streamedKeyGeneratorProjection -
bufferedKeyGeneratorProjection - Key
Ordering[InternalRow] - Streamed
RowIterator - Buffered
RowIterator - inMemoryThreshold
- spillThreshold
- eagerCleanupResources (
() => Unit) -
onlyBufferFirstMatchflag (default:false)
SortMergeJoinScanner is created when:
SortMergeJoinExecphysical operator is requested to doExecute (forInnerLike,LeftOuter,RightOuter,LeftSemi,LeftAnti,ExistenceJoinjoins)
ExternalAppendOnlyUnsafeRowArray¶
SortMergeJoinScanner creates an ExternalAppendOnlyUnsafeRowArray (with the given inMemoryThreshold and spillThreshold thresholds) when created.
The ExternalAppendOnlyUnsafeRowArray is requested to add an UnsafeRow in bufferMatchingRows.
The ExternalAppendOnlyUnsafeRowArray is cleared in findNextInnerJoinRows, findNextOuterJoinRows and bufferMatchingRows.
getBufferedMatches¶
getBufferedMatches: ExternalAppendOnlyUnsafeRowArray
getBufferedMatches returns the bufferedMatches.
getBufferedMatches is used when:
SortMergeJoinExecphysical operator is requested to doExecute (forInnerLike,LeftSemi,LeftAnti,ExistenceJoinjoins), advanceStream and advanceBufferUntilBoundConditionSatisfied
bufferMatchingRows¶
bufferMatchingRows(): Unit
bufferMatchingRows...FIXME
bufferMatchingRows is used when:
SortMergeJoinScanneris requested to findNextInnerJoinRows and findNextOuterJoinRows