peter-toth commented on code in PR #54330:
URL: https://github.com/apache/spark/pull/54330#discussion_r2894808607


##########
sql/core/src/main/scala/org/apache/spark/sql/execution/exchange/EnsureRequirements.scala:
##########
@@ -64,7 +63,17 @@ case class EnsureRequirements(
     // Ensure that the operator's children satisfy their output distribution 
requirements.
     var children = originalChildren.zip(requiredChildDistributions).map {
       case (child, distribution) if 
child.outputPartitioning.satisfies(distribution) =>
-        ensureOrdering(child, distribution)
+        distribution match {
+          case o: OrderedDistribution =>
+            ensureOrdering(child, child.outputPartitioning, o)
+          case _ => child
+        }
+      case (c @ GroupedPartitions(p), distribution) if 
p.satisfies(distribution) =>

Review Comment:
   Should be fixed in 
https://github.com/apache/spark/pull/54330/commits/7951dc60a223fcbcb6f6e1a99330e08bde9b0d45.



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