cloud-fan commented on code in PR #43938:
URL: https://github.com/apache/spark/pull/43938#discussion_r1402864765


##########
sql/core/src/main/scala/org/apache/spark/sql/execution/joins/HashJoin.scala:
##########
@@ -138,9 +138,8 @@ trait HashJoin extends JoinCodegenSupport {
     UnsafeProjection.create(streamedBoundKeys)
 
   @transient protected[this] lazy val boundCondition = if 
(condition.isDefined) {
-    if (joinType == FullOuter && buildSide == BuildLeft) {
-      // Put join left side before right side. This is to be consistent with
-      // `ShuffledHashJoinExec.fullOuterJoin`.
+    if ((joinType == FullOuter || joinType == LeftOuter) && buildSide == 
BuildLeft) {
+      // Put join left side before right side. This is to be consistent with 
ShuffledHashJoinExec.

Review Comment:
   I found this
   ```
     protected def createResultProjection(): (InternalRow) => InternalRow = 
joinType match {
       case LeftExistence(_) =>
         UnsafeProjection.create(output, output)
       case _ =>
         // Always put the stream side on left to simplify implementation
         // both of left and right side could be null
         UnsafeProjection.create(
           output, (streamedPlan.output ++ 
buildPlan.output).map(_.withNullability(true)))
     }
   ```
   
   I think stream side left and build side right is the common case, but we 
have some special cases for outer joins.



-- 
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