You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Refactor PartitionedFile: add ordering field and new_from_meta constructor (#19596)
## Which issue does this PR close?
Part of #19433
## Rationale for this change
In preparation for ordering inference from Parquet metadata, we need to
be able to store per-file ordering information on `PartitionedFile`.
This PR adds the necessary infrastructure.
## What changes are included in this PR?
- Add `ordering: Option<LexOrdering>` field to `PartitionedFile` struct
- Add `new_from_meta(ObjectMeta)` constructor for creating files from
metadata (cleaner than manually constructing)
- Add `with_ordering()` builder method to set ordering information
- Add `with_partition_values()` builder method for consistency
- Update all `PartitionedFile` constructors to initialize `ordering:
None`
- Update callsites in test_util, proto, and substrait to use
`new_from_meta`
## Are these changes tested?
Yes, existing tests pass. The new field is currently always `None` so no
new tests are needed yet. Tests for ordering inference will come in a
follow-up PR.
## Are there any user-facing changes?
No user-facing API changes. The `ordering` field is public but users
typically construct `PartitionedFile` via the provided constructors
which handle this automatically.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Opus 4.5 <[email protected]>
Co-authored-by: Copilot <[email protected]>
0 commit comments