Skip to content

fix(scan): preserve partition group order - #692

Merged
JingsongLi merged 2 commits into
apache:mainfrom
XiaoHongbo-Hope:codex/stabilize-split-group-order
Aug 8, 2026
Merged

fix(scan): preserve partition group order#692
JingsongLi merged 2 commits into
apache:mainfrom
XiaoHongbo-Hope:codex/stabilize-split-group-order

Conversation

@XiaoHongbo-Hope

@XiaoHongbo-Hope XiaoHongbo-Hope commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Purpose

PaimonTableScan grouped manifest entries by partition and bucket in a HashMap. Iterating that map produced a process-dependent split order, so LIMIT pushdown could retain different split groups for the same manifest entries.

Use nested IndexMaps to preserve first-seen partition order and first-seen bucket order within each partition, mirroring Java's nested LinkedHashMaps. This makes split planning deterministic without promising query result order when no ordering is requested.

Tests

  • Added interleaved partition/bucket grouping order coverage
  • table_scan::tests: 82 passed
  • cargo fmt --all -- --check
  • cargo clippy -p paimon --lib --tests -- -D warnings

@XiaoHongbo-Hope
XiaoHongbo-Hope marked this pull request as ready for review August 7, 2026 15:53

@QuakeWang QuakeWang left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@JingsongLi
JingsongLi merged commit b27c300 into apache:main Aug 8, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants