Skip to content

Complete native global-index lifecycle and search planning - #1136

Merged
JingsongLi merged 2 commits into
apache:mainfrom
JingsongLi:codex/native-index-build-deletion-vectors
Oct 16, 2026
Merged

JingsongLi merged 2 commits into
apache:mainfrom
JingsongLi:codex/native-index-build-deletion-vectors

Conversation

@JingsongLi

@JingsongLi JingsongLi commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Purpose

Complete the Rust core and binding support needed by PyPaimon’s existing index lifecycle and explicit search APIs. Java/Paimon semantics remain the reference; no new Python index families are introduced.

Changes

  • Build BTree/Bitmap and all five Vindex families on deletion-vector tables. Build indexes over physical row IDs, omitting deletion metadata from build splits; query readers apply deletion vectors from their captured snapshot.
  • Allow global index builds on row-tracked append tables even when data evolution or query-time global-index optimization is disabled. Validate structural options against the actual table and resolve source data paths from its configuration, not procedure overrides.
  • Expose read-only index-drop preparation and its Python binding. build() returns unpublished metadata deletions; execute() retains snapshot conflict validation and dry-run behavior. Commit failures never remove index files.
  • Expose captured vector/full-text search source metadata for explicit Scan → Plan → Read, including primary-key payloads, uncovered files and physical ranges. Reuse the existing snapshot, DataSplit v1 and IndexFileMeta encodings; no new persistent wire format.
  • Add a thin Python positional-I/O bridge around the reusable Rust Vindex reader. Rust owns query validation, filtering, actual hit counts, batching and score conversion, including filtered IVF-PQ searches with fewer valid hits than K.
  • Honor per-query Vindex reader options without leakage and align search widths with Java’s conflict checks and strict integer parsing. Align raw Vindex/Lumina metric defaults and reject mixed persisted vector formats consistently in single/batch execute and scan APIs.

The binding references the existing locked paimon-vindex-core and roaring packages; no third-party version changes are introduced.

Validation

  • cargo test -p paimon --locked --features fulltext --lib index_: 583 passed, four existing ignored.
  • cargo test -p paimon --locked --features fulltext --lib search_: 174 passed.
  • Final --lib vector_: 357 passed; --lib vindex::reader::tests: 23 passed.
  • cargo +1.98.0 clippy --locked --all-targets --workspace --features fulltext,vortex -- -D warnings: passed.
  • cargo fmt --all --check and diff checks: passed.
  • Rebuilt the final Python binding locally: explicit search/append regressions 107 passed; low-level reader/metric/live-NULL regressions 59 passed plus 55 subtests; direct vector/Blob binding tests 48 passed.
  • Broader companion REST Native index suite: 816 passed.
  • Independent core/Java, reader-I/O and Python plan-transport review: no remaining actionable P1/P2 findings.

Companion PyPaimon PR: apache/paimon#10598. Python CI continues building apache/paimon-rust main.

@JingsongLi JingsongLi changed the title Support global index builds on deletion-vector tables Complete native global-index lifecycle and search planning Oct 15, 2026

@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.

Reviewed against Java Paimon semantics, including global-index identity/range coverage, deletion-vector handling, snapshot pinning, vector/full-text scan metadata, and Vindex reader option/score behavior.

No blocking issues found. The targeted Rust tests passed:

  • 19 global-index drop-builder tests
  • 50 de-vector-read tests
  • 23 Vindex reader tests

All PR checks are green. Approving.

@JingsongLi
JingsongLi merged commit 33a14cc into apache:main Oct 16, 2026
16 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