lyne7-sc opened a new issue, #3626:
URL: https://github.com/apache/iceberg-rust/issues/3626
### Apache Iceberg Rust version
main (46e51d80)
### Describe the bug
String truncate transforms measure width in Unicode code points, but prefix
predicate projection uses UTF-8 byte lengths.
For non-ASCII prefixes, this mismatch can incorrectly rewrite `STARTS WITH`
as an equality predicate, causing scans to silently exclude matching rows. The
same length mismatch also affects strict projection and `NOT STARTS WITH`
predicates.
### To Reproduce
1. Create a table partitioned by `truncate[3](city)`.
2. Write rows with city values `"Évora"`, `"Évreux"`, and `"Évry"`.
3. Scan with `Reference::new("city").starts_with(Datum::string("Év"))`.
The prefix contains two Unicode code points but occupies three UTF-8 bytes.
The projection incorrectly treats it as reaching the truncate width and
rewrites the prefix predicate to equality.
The scan returns no rows, although all three rows match.
### Expected behavior
The scan should return all matching rows. Both inclusive and strict
projections should compare Unicode code point counts against the truncate width.
### Willingness to contribute
I can contribute a fix for this bug independently
--
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]