huaxingao commented on code in PR #41398:
URL: https://github.com/apache/spark/pull/41398#discussion_r1213344488


##########
sql/core/src/main/scala/org/apache/spark/sql/execution/joins/ShuffledHashJoinExec.scala:
##########
@@ -98,16 +105,21 @@ case class ShuffledHashJoinExec(
     streamedPlan.execute().zipPartitions(buildPlan.execute()) { (streamIter, 
buildIter) =>
       val hashed = buildHashedRelation(buildIter)
       joinType match {
-        case FullOuter => fullOuterJoin(streamIter, hashed, numOutputRows)
+        case FullOuter => buildSideOuterJoin(streamIter, hashed, 
numOutputRows, full = true)
+        case LeftOuter if buildSide.equals(BuildLeft) =>
+          buildSideOuterJoin(streamIter, hashed, numOutputRows, full = false)
+        case RightOuter if buildSide.equals(BuildRight) =>
+          buildSideOuterJoin(streamIter, hashed, numOutputRows, full = false)
         case _ => join(streamIter, hashed, numOutputRows)
       }
     }
   }
 
-  private def fullOuterJoin(
+  private def buildSideOuterJoin(
       streamIter: Iterator[InternalRow],
       hashedRelation: HashedRelation,
-      numOutputRows: SQLMetric): Iterator[InternalRow] = {
+      numOutputRows: SQLMetric,
+      full: Boolean): Iterator[InternalRow] = {

Review Comment:
   Shall we also change this to `isFullOuterJoin`?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to