ulysses-you commented on a change in pull request #35924:
URL: https://github.com/apache/spark/pull/35924#discussion_r832226988



##########
File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/exchange/ValidateRequirements.scala
##########
@@ -30,6 +30,14 @@ import org.apache.spark.sql.execution._
  */
 object ValidateRequirements extends Logging {
 
+  def validate(
+      plan: SparkPlan,
+      requiredDistribution: Distribution,
+      requiredOrdering: Seq[SortOrder]): Boolean = {
+    validate(plan, requiredDistribution) &&
+      SortOrder.orderingSatisfies(plan.outputOrdering, requiredOrdering)
+  }
+
   def validate(plan: SparkPlan, requiredDistribution: Distribution): Boolean = 
{

Review comment:
       `OptimizeSkewedJoin` still use this. I considered unify them, but seems 
`OptimizeSkewedJoin` does not affect the required output ordering.




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