cloud-fan commented on a change in pull request #30430:
URL: https://github.com/apache/spark/pull/30430#discussion_r530478275
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/joins/SortMergeJoinExec.scala
##########
@@ -68,9 +68,9 @@ case class SortMergeJoinExec(
val leftKeyOrdering = getKeyOrdering(leftKeys, left.outputOrdering)
val rightKeyOrdering = getKeyOrdering(rightKeys, right.outputOrdering)
leftKeyOrdering.zip(rightKeyOrdering).map { case (lKey, rKey) =>
- // Also add the right key and its `sameOrderExpressions`
- SortOrder(lKey.child, Ascending, lKey.sameOrderExpressions +
rKey.child ++ rKey
- .sameOrderExpressions)
+ // Also add expressions from right side sort order
+ val sameOrderExpressions = ExpressionSet(lKey.children ++
rKey.children) - lKey.child
Review comment:
why not `ExpressionSet(lKey.sameOrderExpressions ++ rKey.children)`?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]