marin-ma commented on code in PR #53040:
URL: https://github.com/apache/spark/pull/53040#discussion_r2555794369


##########
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/FilePartition.scala:
##########
@@ -75,7 +75,7 @@ object FilePartition extends SessionStateHelper with Logging {
     }
 
     // Assign files to partitions using "Next Fit Decreasing"
-    partitionedFiles.foreach { file =>
+    
partitionedFiles.sortBy(_.length)(implicitly[Ordering[Long]].reverse).foreach { 
file =>

Review Comment:
   I planned to remove the sort from the caller like the one you mentioned. 
Seems like this part of change is missing from this patch. Thanks for catching.



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