nastra commented on code in PR #17846:
URL: https://github.com/apache/iceberg/pull/17846#discussion_r3988147783


##########
core/src/main/java/org/apache/iceberg/rest/RESTTableScan.java:
##########
@@ -257,12 +256,22 @@ private CloseableIterable<FileScanTask> 
fetchPlanningResult() {
         "Invalid value for %s: %s (must be positive)",
         RESTCatalogProperties.REST_SCAN_PLANNING_POLL_TIMEOUT_MS,
         maxWaitTimeMs);
+    int maxRetries =
+        PropertyUtil.propertyAsInt(
+            catalogProperties,
+            RESTCatalogProperties.REST_SCAN_PLANNING_POLL_NUM_RETRIES,
+            RESTCatalogProperties.REST_SCAN_PLANNING_POLL_NUM_RETRIES_DEFAULT);
+    Preconditions.checkArgument(
+        maxRetries >= 0,
+        "Invalid value for %s: %s (must be non-negative)",

Review Comment:
   can we add a test where we set this to a negative value and assert this msg?



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