Split SplitBy::Layout into Layout and LayoutSubSplitting variants - #9043
Open
robert3005 wants to merge 1 commit into
Open
Split SplitBy::Layout into Layout and LayoutSubSplitting variants#9043robert3005 wants to merge 1 commit into
robert3005 wants to merge 1 commit into
Conversation
Sub-division of chunk-boundary spans wider than the ideal split size (so a file with few, large chunks decodes across multiple cores) is now a scan config option rather than unconditional behaviour. `SplitBy::Layout` now splits only at the file's own chunk boundaries, and the new `SplitBy::LayoutSubSplitting` variant — the default — additionally sub-divides wide spans. `ScanBuilder::with_no_sub_splitting()` is a shorthand for selecting `SplitBy::Layout`. Callers that relied on the sub-dividing default (`VortexFile::splits`, the DataFusion repartitioner, Python datasets) now name `LayoutSubSplitting` explicitly, so their behaviour is unchanged. Signed-off-by: "Robert Kruszewski" <robert@spiraldb.com> Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01M9d52UfuZRn3cC9eixruzx
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.
Rationale for this change
This change separates the concerns of chunk-boundary-aware splitting from automatic sub-division of wide chunk spans. Previously,
SplitBy::Layoutcombined both behaviors: it would split at chunk boundaries and also sub-divide spans wider thanMAX_SPLIT_ROWSto enable intra-file decode parallelism.The new design introduces two distinct variants:
SplitBy::Layout: Splits only at chunk boundaries, yielding fewer, larger batches that follow the file's chunking exactlySplitBy::LayoutSubSplitting: The previous default behavior—splits at chunk boundaries and sub-divides wide spans for parallelismThis makes the splitting strategy more explicit and allows users to choose between fine-grained parallelism (default) or coarser-grained batching that respects the file's natural structure.
What changes are included in this PR?
Core changes:
SplitBy::Layoutinto two variants invortex-layout/src/scan/split_by.rsSplitBy::Layoutto only split at chunk boundaries without sub-divisionSplitBy::LayoutSubSplittingthe new default (with#[default])subdivide_large_spans()only forLayoutSubSplittingAPI additions:
ScanBuilder::with_no_sub_splitting()convenience method invortex-layout/src/scan/scan_builder.rsto explicitly opt intoSplitBy::LayoutTest improvements:
StubReaderstruct to replace the inlineDupReadertest_layout_keeps_large_chunk_whole()to verify thatSplitBy::Layoutkeeps wide chunks intact whileSplitBy::LayoutSubSplittingsub-divides themIntegration updates:
vortex-file/src/file.rsto useLayoutSubSplittingfor the defaultsplits()methodvortex-datafusion/src/persistent/opener.rsto useLayoutSubSplittingfor natural split rangesvortex-python/src/dataset.rsto default toLayoutSubSplittingWhat APIs are changed? Are there any user-facing changes?
Public API changes:
SplitByenum now has two layout-related variants instead of oneScanBuilder::with_no_sub_splitting()is a new convenience method for opting intoSplitBy::LayoutSplitBy::LayoutSubSplittingUser-facing impact:
.with_no_sub_splitting()on a scan builderVortexFile::splits()now reflect sub-divided boundaries (matching the new default)https://claude.ai/code/session_01M9d52UfuZRn3cC9eixruzx