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


##########
core/src/test/java/org/apache/iceberg/TestMetricsTruncation.java:
##########
@@ -273,5 +282,23 @@ public void testTruncateStringMax() {
         .as(
             "Test input with multiple 4 byte UTF-8 character where the first 
unicode character should be incremented")
         .isEqualTo(0);
+
+    assertThat(cmp.compare(truncateStringMax(Literal.of(test8), 2).value(), 
test8))
+        .as("Truncated upper bound should be greater than or equal to the 
actual upper bound")
+        .isGreaterThanOrEqualTo(0);
+    assertThat(cmp.compare(truncateStringMax(Literal.of(test8), 2).value(), 
test8_2_expected))
+        .as(
+            "Test the last character is the 4-byte max UTF-8 character after 
truncated where the second-to-last "
+                + "character should be incremented")
+        .isEqualTo(0);
+
+    assertThat(cmp.compare(truncateStringMax(Literal.of(test9), 2).value(), 
test9))
+        .as("Truncated upper bound should be greater than or equal to the 
actual upper bound")
+        .isGreaterThanOrEqualTo(0);
+
+    assertThat(cmp.compare(truncateStringMax(Literal.of(test9), 2).value(), 
test9_2_expected))

Review Comment:
   this is missing an actuall assertion check



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