Repository navigation
[core] Support batch scans by physical bucket ID - #1452
Open
naivedogger wants to merge 1 commit into
Open
naivedogger wants to merge 1 commit into
naivedogger wants to merge 1 commit into
Conversation
Co-Authored-By: Codex <noreply@openai.com> AI-Model: gpt-6 AI-Contributed/Feature: 105/105 AI-Contributed/UT: 0/0
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
Closes #1450.
A worker assigned a physical Paimon bucket currently has to plan a broader scan and discard splits for other buckets. A worker shard does not identify a physical bucket: its contents depend on the table and scan mode.
Brief change log
Add
TableScan::with_bucket(id). Snapshot scans prune manifests by bucket bounds and filter entries in the remaining manifests. Incremental scans apply the selection after validating entries, so it cannot hide an unsupported delete.Tests
The scan test selects bucket 2 from manifests covering [0, 1] and [2, 3]. It checks the returned file and verifies that only the second manifest's entries were read. The shard test covers both orders of the conflicting builder calls.
API and Format
The new method applies to Paimon tables. Combining it with
with_shardreturns an error because a shard describes work distribution and need not correspond to one physical bucket. Existing scans and the storage format are unchanged.Documentation
The scan API documents the scope of bucket selection and its interaction with sharding.