rdblue commented on a change in pull request #2062: URL: https://github.com/apache/iceberg/pull/2062#discussion_r567175054
########## File path: api/src/test/java/org/apache/iceberg/expressions/TestInclusiveManifestEvaluator.java ########## @@ -389,6 +396,39 @@ public void testStringStartsWith() { Assert.assertFalse("Should skip: range doesn't match", shouldRead); } + @Test + public void testStringNotStartsWith() { + boolean shouldRead = ManifestEvaluator.forRowFilter(notStartsWith("some_nulls", "a"), SPEC, false).eval(FILE); + Assert.assertTrue("Should read: range matches", shouldRead); + + shouldRead = ManifestEvaluator.forRowFilter(notStartsWith("some_nulls", "aa"), SPEC, false).eval(FILE); + Assert.assertTrue("Should read: range matches", shouldRead); + + shouldRead = ManifestEvaluator.forRowFilter(notStartsWith("some_nulls", "dddd"), SPEC, false).eval(FILE); + Assert.assertTrue("Should read: range matches", shouldRead); + + shouldRead = ManifestEvaluator.forRowFilter(notStartsWith("some_nulls", "z"), SPEC, false).eval(FILE); + Assert.assertTrue("Should read: range matches", shouldRead); + + shouldRead = ManifestEvaluator.forRowFilter(notStartsWith("no_nulls", "a"), SPEC, false).eval(FILE); + Assert.assertTrue("Should read: range matches", shouldRead); + + shouldRead = ManifestEvaluator.forRowFilter(notStartsWith("some_nulls", "zzzz"), SPEC, false).eval(FILE); + Assert.assertTrue("Should read: range matches", shouldRead); + + shouldRead = ManifestEvaluator.forRowFilter(notStartsWith("some_nulls", "1"), SPEC, false).eval(FILE); + Assert.assertTrue("Should read: range matches", shouldRead); Review comment: Can you add a test case for `all_nulls`? I think that should always match a `notStartsWith` filter because there are no values. You should be able to detect that because the lower and upper bounds are `null`. ---------------------------------------------------------------- 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. 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