ulysses-you commented on code in PR #39475:
URL: https://github.com/apache/spark/pull/39475#discussion_r1065461697


##########
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/FileFormatWriter.scala:
##########
@@ -159,7 +159,6 @@ object FileFormatWriter extends Logging {
     val actualOrdering = writeFilesOpt.map(_.child)
       .getOrElse(materializeAdaptiveSparkPlan(plan))
       .outputOrdering.map(_.child)
-    val orderingMatched = V1WritesUtils.isOrderingMatched(requiredOrdering, 
actualOrdering)

Review Comment:
   We do not add the sort in rule `V1Writes` since the ordering matches. So the 
actual ordering is the user-specified which does not rewrite the attribute 
using the new query that wrapped with `Empty2Null`. But the required ordering 
has rewritten in rule `V1Writes`.



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