XiaoHongbo-Hope opened a new pull request, #578:
URL: https://github.com/apache/paimon-rust/pull/578
### Purpose
Linked issue: close #577
Missing or unparseable sorted global-index metadata was converted to an
empty BTreeIndexMeta. That value is interpreted as an only-null index, so
file-level pruning could return no matching ranges without opening an index
file that actually contains matching rows.
This was reproduced on main at a9a8f6b: the regression test returned an
indexed result instead of falling back to the normal table scan. Malformed key
lengths could also panic during metadata deserialization before fallback was
possible.
### Brief change log
- Preserve unavailable sorted-index metadata instead of substituting
only-null metadata.
- Fall back for a field when any of its index shards has unavailable
metadata.
- Validate serialized first-key and last-key lengths before slicing.
- Cover mixed valid/invalid shards and malformed metadata lengths.
### Tests
- cargo fmt --all -- --check
- cargo clippy -p paimon --all-targets -- -D warnings
- cargo test -p paimon --all-targets
- 1724 passed, 1 ignored
### API and Format
No API or storage-format changes. Malformed BTree metadata now returns
InvalidData instead of panicking.
### Documentation
No documentation changes are required for this correctness fix.
--
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]