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

   ## Description
   
   Addressing #1192.
   
   This fixes unsafe inclusive projection for `NOT STARTS WITH` predicates over 
truncated string/binary partition fields.
   
   Previously, `truncate[N]` projection could truncate the filter prefix and 
produce a `NOT STARTS WITH` predicate on the partition value even when the 
original prefix was longer than `N`. That is unsafe because the truncated 
partition value does not contain enough information to prove that all rows fail 
the original predicate, and can incorrectly prune files that contain matching 
rows.
   
   The projection now follows the safe behavior used by other Iceberg 
implementations:
   
   - prefix shorter than truncate width: keep `NOT STARTS WITH`
   - prefix exactly equal to truncate width: project to `!=`
   - prefix longer than truncate width: return no projection
   
   Regression coverage was added for all three cases.
   
   ## Testing
   
   ```sh
   go test ./table -run TestProjection/TestStringTruncateProjection -count=1
   go test ./...
   ```


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