SortMergeJoinScanner¶
Creating Instance¶
SortMergeJoinScanner
takes the following to be created:
-
streamedKeyGenerator
Projection -
bufferedKeyGenerator
Projection - Key
Ordering[InternalRow]
- Streamed
RowIterator
- Buffered
RowIterator
- inMemoryThreshold
- spillThreshold
- eagerCleanupResources (
() => Unit
) -
onlyBufferFirstMatch
flag (default:false
)
SortMergeJoinScanner
is created when:
SortMergeJoinExec
physical operator is requested to doExecute (forInnerLike
,LeftOuter
,RightOuter
,LeftSemi
,LeftAnti
,ExistenceJoin
joins)
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:
SortMergeJoinExec
physical operator is requested to doExecute (forInnerLike
,LeftSemi
,LeftAnti
,ExistenceJoin
joins), advanceStream and advanceBufferUntilBoundConditionSatisfied
bufferMatchingRows¶
bufferMatchingRows(): Unit
bufferMatchingRows
...FIXME
bufferMatchingRows
is used when:
SortMergeJoinScanner
is requested to findNextInnerJoinRows and findNextOuterJoinRows