Repository navigation
feat: Add file_schema, cache, and expr_adapter_factory accessors to ListingTable and ListingTableConfig - #27363
Merged
Conversation
Contributor
Author
|
CC @alamb |
alamb
approved these changes
Nov 12, 2026
| } | ||
|
|
||
| #[cfg(test)] | ||
| mod tests { |
Contributor
There was a problem hiding this comment.
I am not sure we need to add a regression test for an accessor
Contributor
Author
There was a problem hiding this comment.
yes, testing a wrapper function is unneccessary; scraping it
…istingTable and ListingTableConfig
Sruhvx-jpg
force-pushed
the
feat/listing-table-accessors
branch
from
November 12, 2026 16:27
059ce30 to
e90e57c
Compare
Contributor
Author
|
Thanks for review @alamb Your concern for the regression test was right, hence i scrapped the regression test |
alamb
enabled auto-merge
November 12, 2026 16:32
Contributor
|
Thanks again |
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.
Which issue does this PR close?
Follow-up to #27317. Closes #27314.
Rationale for this change
In
ListingTableandListingTableConfig, several fields lacked accessors:ListingTable::file_schema: Currentlytable.schema()returns the combined table schema (file schema + Hive partition columns). Callers had no way to inspect or retrieve the raw physical file schema directly, requiring manual partition-column filtering workarounds as seen in API to more easily update schema adapter factory on a ListingTable #27314.ListingTable::cache:with_cachesetter existed, but there was no getter to inspect or forward the attachedFileStatisticsCache.ListingTableConfig::expr_adapter_factory:with_expr_adapter_factorysetter existed, but the field waspub(crate)without a public getter.What changes are included in this PR?
pub fn file_schema(&self) -> &SchemaReftoListingTable.pub fn cache(&self) -> Option<&Arc<FileStatisticsCache>>toListingTable.pub fn expr_adapter_factory(&self) -> Option<&Arc<dyn PhysicalExprAdapterFactory>>toListingTableConfig.table.rsandconfig.rs.Are these changes tested?
Yes, tested via unit tests in
datafusion-catalog-listing:test_file_schematest_cachetest_config_expr_adapter_factoryVerified with
cargo fmtandcargo clippy.