Repository navigation
[core] Add single-pass split planning for append-only scans - #10388
Closed
JustinBinber wants to merge 1 commit into
Closed
JustinBinber wants to merge 1 commit into
JustinBinber 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.
Purpose
Large append-only tables can run out of Driver memory before Spark starts any task because the scan first materializes every manifest entry and then builds the complete split list.
This PR adds a Core-level, single-pass planning API for that boundary. It is intentionally narrower than #10041: it does not add Spark metadata staging, executor decoding, or commit-side changes.
What changed
StreamingPlanover effective manifest entries;SplitPlanAPI so snapshot metadata is fixed before split iteration starts;The existing
plan()API is unchanged. Other scan implementations use the old materialized path through default methods.Why fine-grained splits
The Core iterator deliberately does not reproduce the old task grouping. It yields independently readable append-only files and leaves bounded bin-packing to the connector. This avoids rebuilding a complete split list inside Core while keeping connector-specific task sizing out of the storage layer.
Validation
git diff --checkpassed.I also tested the complete follow-up stack on a frozen one-million-file table under a 1 GiB Driver and 512 MiB Executor. The default path failed while serializing the real Spark task; the integrated single-pass planning + bounded packing + external transport path completed twice and returned the expected 2,000,000 rows. That experiment demonstrates the end-to-end direction, not the isolated contribution of this Core-only PR. The Spark consumer and commit-side work will be proposed separately.
This is a pivot to the planning boundary requested in #10041 and is part of #10021.