manuzhang commented on code in PR #14948:
URL: https://github.com/apache/iceberg/pull/14948#discussion_r3245880354


##########
spark/v4.1/spark/src/main/java/org/apache/iceberg/spark/source/SparkBatch.java:
##########
@@ -94,21 +97,40 @@ public InputPartition[] planInputPartitions() {
     InputPartition[] partitions = new InputPartition[taskGroups.size()];
 
     for (int index = 0; index < taskGroups.size(); index++) {
+      ScanTaskGroup<?> taskGroup = taskGroups.get(index);
+
       partitions[index] =
           new SparkInputPartition(
               groupingKeyType,
-              taskGroups.get(index),
+              taskGroup,
               tableBroadcast,
               fileIOBroadcast,
               projectionString,
               caseSensitive,
               locations != null ? locations[index] : 
SparkPlanningUtil.NO_LOCATION_PREFERENCE,
-              cacheDeleteFilesOnExecutors);
+              cacheDeleteFilesOnExecutors,
+              shouldUseMergingSortedReader(taskGroup));
     }
 
     return partitions;
   }
 
+  /** Returns whether sort ordering was reported for this batch's scan. */
+  private boolean isOrderingEnabled() {

Review Comment:
   why do we need this private method?



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