peter-toth commented on code in PR #54330:
URL: https://github.com/apache/spark/pull/54330#discussion_r2886380674
##########
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:
I need to revisit this part as converting a `KeyedPartitioning` to grouped
(build the distinct set of keys) just to check if it can satisfiy a
distribution doesn't make sense...
--
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]