wangyum commented on code in PR #42488:
URL: https://github.com/apache/spark/pull/42488#discussion_r1294681915


##########
sql/core/src/main/scala/org/apache/spark/sql/execution/joins/SortMergeJoinExec.scala:
##########
@@ -58,10 +65,10 @@ case class SortMergeJoinExec(
         // Also add expressions from right side sort order
         val sameOrderExpressions = ExpressionSet(lKey.sameOrderExpressions ++ 
rKey.children)
         SortOrder(lKey.child, Ascending, sameOrderExpressions.toSeq)
-      }
+      } ++ streamedOrdering()
     // For left and right outer joins, the output is ordered by the streamed 
input's join keys.
-    case LeftOuter => getKeyOrdering(leftKeys, left.outputOrdering)
-    case RightOuter => getKeyOrdering(rightKeys, right.outputOrdering)
+    case LeftOuter => getKeyOrdering(leftKeys, left.outputOrdering) ++ 
streamedOrdering()
+    case RightOuter => getKeyOrdering(rightKeys, right.outputOrdering) ++ 
streamedOrdering()

Review Comment:
   Could we fix the issue in the getKeyOrdering method?



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