feat(datafusion): Add opt-in eager file scan planning with output partitioning#2671
Open
toutane wants to merge 2 commits into
Open
feat(datafusion): Add opt-in eager file scan planning with output partitioning#2671toutane wants to merge 2 commits into
toutane wants to merge 2 commits 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.
Which issue does this PR close?
What changes are included in this PR?
This PR adds an opt-in eager scan planning path for the DataFusion integration.
When
iceberg.enable_eager_scan_planningis enabled,IcebergTableProvider::scan()plansFileScanTasks during physical planning, groups them across DataFusiontarget_partitions, and exposes the resulting output partition count asUnknownPartitioning(N). Eachexecute(partition)call then reads only the task group assigned to that output partition throughArrowReaderBuilder.The default behavior is unchanged: eager planning is disabled by default, so scans keep the existing lazy single-partition planning path unless explicitly enabled.
This is a narrower split from #2298, focused on file-level eager planning and output partition count reporting. Some of the broader design discussions and review feedback happened in #2298; this PR keeps only the first scoped step and intentionally does not include hash partitioning, size-aware bin-packing, or row-group/sub-file planning.
Trade-offs:
TableProvider::scan(), so it is kept opt-inFileScanTasklevel only. A table with one large file will not benefit from this changeUnknownPartitioning(N), not hash partitioning. This exposes the number of output partitions without claiming stronger partitioning semanticsFollow-up work:
file_size_in_bytes(Plan file scan task according scan file size. #128)Are these changes tested?
Yes. Integration tests cover:
iceberg.enable_eager_scan_planning