You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2021/07/01 00:14:01 UTC

[GitHub] [iceberg] SreeramGarlapati commented on a change in pull request #2694: Core: Validate user provided split planning configs

SreeramGarlapati commented on a change in pull request #2694:
URL: https://github.com/apache/iceberg/pull/2694#discussion_r661888167



##########
File path: core/src/main/java/org/apache/iceberg/BaseTableScan.java
##########
@@ -223,20 +223,25 @@ public TableScan ignoreResiduals() {
     } else {
       splitSize = targetSplitSize();
     }
+    Preconditions.checkArgument(splitSize > 0, "Invalid split size (negative): %s", splitSize);
+
     int lookback;
     if (options.containsKey(TableProperties.SPLIT_LOOKBACK)) {
       lookback = Integer.parseInt(options.get(TableProperties.SPLIT_LOOKBACK));
     } else {
       lookback = ops.current().propertyAsInt(
           TableProperties.SPLIT_LOOKBACK, TableProperties.SPLIT_LOOKBACK_DEFAULT);
     }
+    Preconditions.checkArgument(lookback > 0, "Invalid split planning lookback (negative): %s", lookback);

Review comment:
       nit: `non-positive`




-- 
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-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org