hantangwangd commented on code in PR #12201: URL: https://github.com/apache/iceberg/pull/12201#discussion_r1947556326
########## core/src/main/java/org/apache/iceberg/util/TableScanUtil.java: ########## @@ -236,8 +236,12 @@ public static long adjustSplitSize(long scanSize, int parallelism, long splitSiz // use the configured split size if it produces at least one split per slot // otherwise, adjust the split size to target parallelism with a reasonable minimum // increasing the split size may cause expensive spills and is not done automatically + long adjustedSplitSize = scanSize / parallelism; + if (splitSize <= 0) { + return adjustedSplitSize; + } long splitCount = LongMath.divide(scanSize, splitSize, RoundingMode.CEILING); - long adjustedSplitSize = Math.max(scanSize / parallelism, Math.min(MIN_SPLIT_SIZE, splitSize)); + adjustedSplitSize = Math.max(adjustedSplitSize, Math.min(MIN_SPLIT_SIZE, splitSize)); Review Comment: Thanks for your review. I have refactored to make it more clear, please take a look when available, thanks. -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org