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
Remove redundant collect_stat and target_partitions on ListingOptions (#22969)
## Which issue does this PR close?
- Closes #.
## Rationale for this change
Something that was spotted during the review of:
- #22657
`ListingOptions::target_partitions` and `ListingOptions::collect_stat`
duplicate `SessionConfig`'s `execution.target_partitions` and
`execution.collect_statistics`.
After some investigation, I think they only live on `ListingOptions` for
historical reasons: when the struct was added (#1010 5 years ago),
`TableProvider::scan` had no access to the session, so the values had to
be copied onto the table at build time. Once #2660 passed `SessionState`
into `scan`, the fields became redundant (and had already drifted —
`scan` read them from the session config while `list_files_for_scan`
read the stale copy). This PR makes `SessionConfig` the single source of
truth.
## What changes are included in this PR?
- Remove `target_partitions`/`collect_stat` fields, their builders, and
`with_session_config_options` from `ListingOptions`.
- `ListingTable` now reads both values from the session config at scan
time.
- Reserve proto tags 8/9 in `ListingTableScanNode` and drop the related
(de)serialization.
- Update benchmarks, factory, and test call sites.
## Are these changes tested?
Yes, by existing tests
## Are there any user-facing changes?
Yes, breaking: the removed fields/builders require configuring
`SessionConfig` instead, and the two proto fields no longer round-trip.
---------
Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
0 commit comments