hantangwangd commented on code in PR #12201: URL: https://github.com/apache/iceberg/pull/12201#discussion_r1950073181
########## core/src/main/java/org/apache/iceberg/util/TableScanUtil.java: ########## @@ -233,6 +233,8 @@ public static <T extends ScanTask> List<T> mergeTasks(List<T> tasks) { } public static long adjustSplitSize(long scanSize, int parallelism, long splitSize) { + Preconditions.checkArgument(splitSize > 0, "Split size must be > 0: %s", splitSize); + Review Comment: It has been checked in Spark, if we set `parallelism <= 0` through `spark.conf().set("spark.sql.shuffle.partitions", "-1")`, we would fail with the following error message: ``` '0' in spark.sql.shuffle.partitions is invalid. The value of spark.sql.shuffle.partitions must be positive '-1' in spark.sql.shuffle.partitions is invalid. The value of spark.sql.shuffle.partitions must be positive ``` So in Spark, `parallelism` would be a positive number here. -- 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