feat: add ScanBuilder::with_planner to restrict a scan's file set - #3295
Open
JohnEarle wants to merge 1 commit into
Open
feat: add ScanBuilder::with_planner to restrict a scan's file set#3295JohnEarle wants to merge 1 commit into
JohnEarle wants to merge 1 commit into
Conversation
nicklan
requested review from
OussamaSaoudi
and removed request for
OussamaSaoudi
September 10, 2026 18:49
Member
|
@JohnEarle thanks for the PR! Are you ready to have someone review this? If not could you move it to draft, otherwise we can find folks to take a look. |
Author
Hey @nicklan, I'm happy to proceed with a review, |
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 are proposed in this pull request?
Prototype for #3294 (for design review and discussion).
Adds an optional hook an engine can use to restrict the set of data files a scan reads,
the Kernel side of what delta-spark's
ServerSidePlanningClientdoes (delta-io/delta#5623).ScanPlanner::plan(table_root, version, predicate) -> HashSet<FileActionKey>ScanBuilder::with_planner(...); without a planner nothing changesAddRemoveDedupVisitor::is_valid_add: an Add the planner did not name isdropped, after the key is recorded for dedup
The planner's answer is compared against the log replay, so it can remove files but never add
one; DVs, partition values, stats and row filtering are unchanged.
Files are identified by the existing
FileActionKey((path, deletionVector.uniqueId)).The planner gets the predicate as the caller set it; how it serializes or evaluates it is its own concern.
A planner error fails the scan.
parallel_scan_metadataand the declarative plan reject a planner rather than ignore it.This PR affects the following public APIs
New:
scan::ScanPlanner,scan::ScanPlannerRef,scan::FileActionKey(re-export),ScanBuilder::with_planner.How was this change tested?
13 new unit test cases:
-D warnings