Skip to content

Support BSI FileIndex and indexed primary-key and data-evolution writes - #947

Merged
JingsongLi merged 1 commit into
apache:mainfrom
JingsongLi:codex/native-pk-file-index
Sep 24, 2026
Merged

JingsongLi merged 1 commit into
apache:mainfrom
JingsongLi:codex/native-pk-file-index

Conversation

@JingsongLi

Copy link
Copy Markdown
Contributor

Summary

  • Add Java V1-compatible BSI FileIndex reading and writing for integral, date, time, decimal, and timestamp values. Verify Rust output byte-for-byte against a Java-generated fixture, including signed values and nulls.
  • Generate FileIndex metadata for primary-key KV files, postpone-bucket files, and data-evolution base and partial-column files. Index positions follow physical file order after sorting and merging; partial-column indexes remap field positions to their file schema. Changelog files remain unindexed.
  • Use primary-key-only indexes before sort-merge and indexes on independent data-evolution files before decoding. Preserve residual filtering, row ranges, and deletion-vector behavior. Use the normal commit path so indexed dynamic-bucket writes retain HASH index and input-changelog metadata.
  • Cover embedded and sidecar indexes, rolling files, abort cleanup, multiple snapshots, sorted chunk boundaries, dynamic and postpone buckets, malformed BSI payloads, and Java interoperability.

Verification

  • cargo test -p paimon --lib (3136 passed, 6 ignored)
  • cargo clippy -p paimon --lib -- -D warnings
  • cargo fmt --all -- --check
  • git diff --check

@leaves12138 leaves12138 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM. Reviewed a88663f; no blocking issues found.

Checked the BSI V1 encoding/value mapping against the Java implementation and the included Java fixture, signed/null and temporal handling, physical index row positions after sorting/merging, partial-file field remapping, and preservation of HASH/input-changelog metadata on the normal commit path. Read-side pruning remains limited to primary-key predicates before sort-merge and independent data-evolution files, preserving residual filtering and column-merge semantics.

Local validation (default features):

  • cargo test --locked -p paimon --lib: 3136 passed, 6 ignored, including the 10 BSI and 28 file-index writer tests.
  • incremental_batch_scan_test and incremental_diff_extended_test: 39 + 6 passed.
  • Two additional temporary regression tests passed: BSI selections combined with snapshot-specific DVs, small read batches, projection and Diff/audit reads in both DV modes; data-evolution nonzero row-id offsets, intersected row ranges and updated partial-column values. Both exercised embedded and sidecar indexes with index reads enabled and disabled.

CI has no reported failures at the time of review; three jobs are still running. Optional feature builds were not rerun locally.

@JingsongLi
JingsongLi merged commit 0923cbc into apache:main Sep 24, 2026
14 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.

2 participants