Repository navigation
refactor: delegate catalog scans to static table provider - #69
Draft
alexanderbianchi wants to merge 1 commit into
Draft
alexanderbianchi wants to merge 1 commit into
alexanderbianchi wants to merge 1 commit into
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.
What changes
Have
IcebergCatalogTableProvider::scan()load the latest table and construct a per-scanIcebergStaticTableProvider, then delegate to itsscan(). The catalog provider keeps ownership of catalog refresh and writes; the static provider owns the read-plan construction. This PR is based onmainand does not add eager file planning or depend on #67.The generated static provider uses the catalog provider's cached Arrow schema instead of re-deriving a schema from the freshly loaded table. This preserves the existing contract: after the table evolves, a provider created before the schema change still exposes and scans its original columns. No public constructor or wire format changes.
The existing schema-evolution test now also scans a projected column after the table changes, checking that projection indices still refer to the provider's original schema. Existing catalog insert and lazy-read tests continue to run.
This is a separate refactor from #67; because both change the catalog scan method, whichever merges second may need a rebase.
Validation
cargo test -p iceberg-datafusion --locked --test integration_datafusion_test test_scan_after_schema_evolution_reads_provider_columns: pass.cargo fmt --all -- --check: pass.cargo clippy --workspace --locked --all-targets -- -D warnings: pass.cargo test --workspace --locked: pass.git diff --check: pass.AI disclosure
Developed with AI assistance and validated locally before opening as a draft.