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


##########
spark/v3.3/spark/src/test/java/org/apache/iceberg/spark/actions/TestSparkFileRewriter.java:
##########
@@ -302,6 +305,16 @@ public void testInvalidValuesForBinPackDataOptions() {
         ImmutableMap.of(SizeBasedDataRewriter.DELETE_FILE_THRESHOLD, "-1");
     assertThatThrownBy(() -> rewriter.init(invalidDeleteThresholdOptions))
         .hasMessageContaining("'delete-file-threshold' is set to -1 but must 
be >= 0");
+
+    Map<String, String> negativeDeleteRatioThresholdOptions =
+        ImmutableMap.of(SizeBasedDataRewriter.DELETE_RATIO_THRESHOLD, "-1");
+    assertThatThrownBy(() -> 
rewriter.init(negativeDeleteRatioThresholdOptions))
+        .hasMessageContaining("'delete-ratio-threshold' is set to negative but 
must be >= 0");

Review Comment:
   this (and other places) should also have a 
`.isInstanceOf(IllegalArgumentException.class)` right before this line. We 
generally want to make sure that the right type of exception is thrown



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

Reply via email to