riverandeye opened a new pull request, #2768:
URL: https://github.com/apache/iceberg-go/pull/2768

   Fixes #2767
   
   The strict metrics evaluator returned "might not match" for every 
`startsWith` and `notStartsWith`, so a copy-on-write delete with one of these 
filters read files that could be dropped from their stats. This ports Java's 
rules from apache/iceberg#15902.
   
   ### Change
   
   - `VisitStartsWith` returns `rowsMustMatch` when the column has no nulls and 
both bounds start with the prefix.
   - `VisitNotStartsWith` returns `rowsMustMatch` when the column holds only 
nulls, or the lower bound cut to the prefix length is greater than the prefix, 
or the upper bound cut the same way is less than it.
   
   Nested, transformed and variant extract terms still return 
`rowsMightNotMatch` from `VisitBound`, as before.
   
   ### Tests
   
   - `TestStartsWithAndNotStartsWith` in `StrictMetricsTestSuite` ports the 
`startsWith` and `notStartsWith` cases from Java's `TestStrictMetricsEvaluator`.
   - `TestCopyOnWriteDeleteDropsFileByPrefixBounds` appends a file with names 
`"abc"` and `"abd"`, removes it from disk, and checks that deleting `name 
STARTS WITH 'ab'` or `name NOT STARTS WITH 'b'` succeeds and keeps the right 
rows. On main the delete fails because it tries to read the file.
   


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