ConeyLiu commented on code in PR #7714:
URL: https://github.com/apache/iceberg/pull/7714#discussion_r1284032956


##########
spark/v3.4/spark/src/main/java/org/apache/iceberg/spark/source/SparkPartitioningAwareScan.java:
##########
@@ -232,6 +232,16 @@ protected synchronized List<ScanTaskGroup<T>> taskGroups() 
{
     return taskGroups;
   }
 
+  private long targetSplitSize() {
+    if (readConf().adaptiveSplitSizeEnabled()) {
+      long scanSize = tasks().stream().mapToLong(ScanTask::sizeBytes).sum();
+      int parallelism = sparkContext().defaultParallelism();

Review Comment:
   > I feel we should use the current core count if dynamic allocation is 
disabled (which we can check). 
   
   I agree with this. This should be easy to check and get the parallelism.
   
   > When dynamic allocation is enabled, we can rely on the number of shuffle 
partitions or check the dynamic allocation config (e.g. we know the core count 
per each executor and the max number of executors). It seems the dynamic 
allocation config would give us a more precise estimate.
   
   From my option. I would be more likely to calculate the parallelism from the 
max number of executors. Because the number of shuffle partitions seems more 
like a parameter for the shuffle stage or reduce stage parallelism.
   
   



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