refactor(scan): extract reusable scan functions - #3093
Open
xanderbailey wants to merge 3 commits into
Open
Conversation
Contributor
Author
|
Hopefully not controversial @blackmwk but means I can reuse this for append scans |
Contributor
|
I don't think this is the right direction to go. For incremental scan, what's required should be extracting out utilies like unifying partition specs, rather than reusing such a config. |
xanderbailey
force-pushed
the
codex/extract-scan-config
branch
from
August 28, 2026 10:59
82c266b to
f8bc7ec
Compare
Contributor
Author
|
Perhaps this is closer to what you're looking for @blackmwk |
blackmwk
reviewed
Aug 28, 2026
| } | ||
| } | ||
|
|
||
| fn projected_field_ids( |
Contributor
There was a problem hiding this comment.
Suggested change
| fn projected_field_ids( | |
| fn collect_scan_field_ids( |
| .map(|predicate| predicate.map(Arc::new)) | ||
| } | ||
|
|
||
| fn table_name_mapping(table: &Table) -> Result<Option<Arc<NameMapping>>> { |
Contributor
There was a problem hiding this comment.
This is no longer necessary, you should use the new TableProperties api
Comment on lines
+153
to
+161
| compute_unified_partition_type( | ||
| table | ||
| .metadata() | ||
| .partition_specs_iter() | ||
| .map(|spec| spec.as_ref()), | ||
| schema, | ||
| ) | ||
| .map(Arc::new) | ||
| .map(Some) |
Contributor
There was a problem hiding this comment.
I perfer to make this part of Table.
Contributor
Author
There was a problem hiding this comment.
Since it's a metadata only operation, I moved it to TableMetadata rather than Table, hope that works?
…nfig # Conflicts: # crates/iceberg/public-api.txt # crates/iceberg/src/spec/table_metadata.rs # crates/iceberg/src/spec/table_properties.rs
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?
What changes are included in this PR?
Extract the reusable calculations from
TableScanBuilder::buildinto focused internal helpers for:This is a behavior-preserving refactor.
TableScanBuilderstill resolves its snapshot and schema and explicitly constructs itsPlanContextandTableScan. Snapshot semantics, manifest planning, and the public API are unchanged.This change was extracted from #2997 so stable scan calculations can be reused without hiding the differences between standard and incremental scan planning.
Are these changes tested?
Refactor
AI Disclosure
Codex assisted with refactoring