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


##########
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:
   if ordering matches with user-specified:
   ```
   Project (Empty2Null(p) #2)
     Sort (p#1)
   ```
   
   if ordering does not match and V1Write adds a sort:
   ```
   Sort(p #2)
     Project (Empty2Null(p) #2)
   ```
   



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