Skip to content

Commit 751e667

Browse files
committed
code comment instead
1 parent 9e41e3f commit 751e667

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/operators/stateful/join/SymmetricHashJoinStateManager.scala

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -692,6 +692,11 @@ class SymmetricHashJoinStateManagerV4(
692692

693693
new NextIterator[GetValuesResult] {
694694
private val iter = if (useRangeScan) {
695+
// startKey must be copied because the second createKeyRow call below reuses
696+
// the same projection buffer and would otherwise overwrite its contents.
697+
// endKey does not need a copy: rangeScanWithMultiValues encodes both bounds
698+
// to independent byte arrays eagerly at call time, and the scope of endKey
699+
// ends with the call of rangeScanWithMultiValues.
695700
val startKey = createKeyRow(key, minTs).copy()
696701
// rangeScanWithMultiValues endKey is exclusive, so use maxTs + 1
697702
val endKey = Some(createKeyRow(key, maxTs + 1))

0 commit comments

Comments
 (0)