fix: use i64 for index file size#586
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Linked issue: close #585
Rust declared IndexFileMeta.file_size as i32 even though the index-manifest Avro schema and Java Paimon both use a 64-bit long. Rust builders therefore rejected individual index files larger than 2 GiB, while the fast decoder silently narrowed Java-written values.
This change preserves the full signed 64-bit file size across Rust read and write paths.
Brief change log
Tests
API and Format
This changes the public Rust type of IndexFileMeta.file_size from i32 to i64, so downstream source code with explicit i32 construction must be updated.
The storage format does not change: _FILE_SIZE remains an Avro long. Existing manifests remain compatible, and Java can read values written by this change. Older Rust readers still cannot correctly read values above i32::MAX and should be upgraded.
_ROW_COUNT remains unchanged in this focused PR because widening it affects a broader set of row-count and vector-index APIs.
Documentation
No documentation update is required.