File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
sql/core/src/main/scala/org/apache/spark/sql/execution/joins Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -75,6 +75,7 @@ private[execution] sealed trait HashedRelation extends KnownSizeEstimation {
75
75
76
76
/**
77
77
* Returns key index and matched single row.
78
+ * This is for unique key case.
78
79
*
79
80
* Returns null if there is no matched rows.
80
81
*/
Original file line number Diff line number Diff line change @@ -193,7 +193,7 @@ case class ShuffledHashJoinExec(
193
193
}
194
194
195
195
/**
196
- * Full outer shuffled hash join with unique join keys:
196
+ * Full outer shuffled hash join with non- unique join keys:
197
197
* 1. Process rows from stream side by looking up hash relation.
198
198
* Mark the matched rows from build side be looked up.
199
199
* A `HashSet[Long]` is used to track matched rows with
@@ -253,9 +253,11 @@ case class ShuffledHashJoinExec(
253
253
}
254
254
// When we reach here, it means no match is found for this key.
255
255
// So we need to return one row with build side NULL row,
256
- // to match the full outer join semantic.
256
+ // to satisfy the full outer join semantic.
257
257
if (! found) {
258
258
joinRowWithBuild(buildNullRow)
259
+ // Set `found` to be true as we only need to return one row
260
+ // but no more.
259
261
found = true
260
262
return true
261
263
}
You can’t perform that action at this time.
0 commit comments