linzch3 opened a new pull request, #3707:
URL: https://github.com/apache/iceberg-rust/pull/3707

   ## Which issue does this PR close?
   
   - Closes #3705.
   
   ## What changes are included in this PR?
   
   `parse_bytes_entry` now skips `lower_bounds` / `upper_bounds` entries whose 
field is a Variant, instead of failing with `field v is not a primitive type`. 
Before this, any manifest with Variant bounds failed to load, even for scans 
that never touch the Variant column.
   
   Variant bounds are Variant-encoded objects keyed by path, not single 
primitive values, and nothing in iceberg-rust reads them yet. Dropping them is 
the conservative option: with no bound for the column, nothing gets pruned on 
it, so a scan can't skip files it shouldn't. Reading them properly can come 
later with the rest of #3685.
   
   A few choices I made, happy to change any of them:
   - Only Variant is skipped. Other non-primitive types (struct/list/map) still 
return the error, since the spec doesn't allow bounds for them. I can widen it 
to any non-primitive type if you'd rather be lenient there too.
   - The bytes are dropped. If you'd prefer to keep the raw bytes around for 
later Variant work, I can do that instead.
   - Writing is unchanged; this only affects reading.
   
   ## Are these changes tested?
   
   Yes. `test_parse_bytes_entry_skips_variant_bounds` is the reproduction from 
the issue, plus a `long` bound on another column in the same map. It checks the 
Variant entry is dropped and the `long` bound still parses. It fails without 
the fix with the error from the issue.
   
   Ran locally: `cargo test -p iceberg --lib` (2245 passed), `cargo clippy -p 
iceberg --all-targets -- -D warnings`, `cargo fmt --all -- --check`.
   
   ## AI Disclosure
   
   This change was prepared with an AI coding assistant; the tests above were 
run locally. Area of uncertainty: whether to skip only Variant or every 
non-primitive type, and whether to keep the raw bytes, as noted above. I've 
also reviewed the changes myself.
   


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