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 {
7575
7676 /**
7777 * Returns key index and matched single row.
78+ * This is for unique key case.
7879 *
7980 * Returns null if there is no matched rows.
8081 */
Original file line number Diff line number Diff line change @@ -193,7 +193,7 @@ case class ShuffledHashJoinExec(
193193 }
194194
195195 /**
196- * Full outer shuffled hash join with unique join keys:
196+ * Full outer shuffled hash join with non- unique join keys:
197197 * 1. Process rows from stream side by looking up hash relation.
198198 * Mark the matched rows from build side be looked up.
199199 * A `HashSet[Long]` is used to track matched rows with
@@ -253,9 +253,11 @@ case class ShuffledHashJoinExec(
253253 }
254254 // When we reach here, it means no match is found for this key.
255255 // 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.
257257 if (! found) {
258258 joinRowWithBuild(buildNullRow)
259+ // Set `found` to be true as we only need to return one row
260+ // but no more.
259261 found = true
260262 return true
261263 }
You can’t perform that action at this time.
0 commit comments