[core] Support composite BTree global indexes for data evolution tables - #10327
Closed
JingsongLi wants to merge 4 commits into
Closed
JingsongLi wants to merge 4 commits into
JingsongLi wants to merge 4 commits into
Conversation
JingsongLi
force-pushed
the
codex/composite-btree-index
branch
from
October 1, 2026 15:15
72c674e to
86af449
Compare
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.
Split plan
This PR remains the complete implementation reference. The contribution is being submitted in dependency order:
The first PR merged with the ordered
List<DataField>API and exact tuple-arity validation. The second PR is based on that merged master and passed 283 Java and 92 Python tests, including an isolated mutation proving longest-complete-key selection. The original source branch remains preserved; arity validation, API simplification and the added selection regression are recorded for the final-series equivalence check.Purpose
Support multi-column BTree global indexes for data evolution tables. Queries such as
category = ? AND item_number = ?currently read each single-column posting list before intersecting them, which is expensive when one condition matches many row IDs. A composite index reads the posting list for the complete tuple directly.index_column => 'category,item_number'. Carry all key columns through sorting, metadata, incremental builds and refresh after component updates.Composite queries support complete point lookups, leading prefixes, equality/IN/IS NULL prefixes followed by
>,>=,<,<=,BETWEEN, orIS NOT NULL, and supported filters on later key columns. IN expansion is bounded at 256 intervals per lookup. Prefix/range scans obey the selected-file scan budget; budget rejection preserves available scalar alternatives. Complete point queries may evaluate in readers; ranges and mixed/scalar fallback paths resolve runtime support during planning. No skip scan or composite LIKE interval construction is included. Vector and full-text pre-filters continue to use single-column indexes or ordinary data fallback. PyPaimon does not build or read composite indexes. No production-scale benchmark has been run.Tests
Previous equality-path verification passed without the
fast-buildprofile:git diff --checkpassed.Review follow-up
Five review/fix rounds and a final confirmation pass cover query planning, storage and metadata, Spark/Flink build lifecycle, Python interoperability, and advanced-search compatibility.
CI fixes
Reproduced the JDK 8/11 type-validation failure and the five shared Python failures from the failed CI run.
fast-build, 92 focused Python tests, Checkstyle, Spotless, RAT, Enforcer and flake8.mvn -pl paimon-core -am -DwildcardSuites=none -DfailIfNoTests=false \ -Dtest=MultiValueBitmapIndexReaderTest,LazyFilteredBitmapIndexReaderTest,BTreeIndexReaderTest,LazyFilteredBTreeIndexReaderTest,CompositeBTreeIndexTest,SortedFileMetaSelectorTest,CompositeBTreeTableTest,MultiValueGlobalIndexTableTest,BitmapGlobalIndexTableTest,SortedGlobalIndexScannerTest,SortedGlobalIndexWriterTest test PYTHONPATH=paimon-python python3 -m unittest pypaimon.tests.vector_search_filter_test pypaimon.tests.global_index_scalar_search_mode_test pypaimon.tests.index_manifest_write_testPrefix and range follow-up
fast-build.fast-build.