[core][python] Add global index search modes#8255
Draft
JingsongLi wants to merge 10 commits into
Draft
Conversation
658ab46 to
baefa9d
Compare
867c483 to
8b1c6b2
Compare
23cc0fb to
a49d70c
Compare
4 tasks
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.
Summary
Add
global-index.search-modeas the freshness/performance switch for global-index queries. It defaults tofastfor index-only reads, supportsfullto use snapshotnextRowIdplus index coverage before scanning raw data, and supportsdetailto scan data file metadata for exact unindexed ranges caused by updates or rewrites.Changes
global-index.fast-searchoption withglobal-index.search-mode = fast | full | detailin Java, Python, and generated docs.fullmode, use snapshotnextRowIdand global-index row-id coverage to avoid planning all data files unless an uncovered range exists.detailmode, scan data file metadata to detect exact unindexed row ranges, including invalidation caused by file rewrites or updates.nextRowIdthrough Java and Python vector scan plans so vector raw-data search can use the lightweightfullpath.Testing
git diff --checkrg -n "fast-search|global-index\\.fast-search|GLOBAL_INDEX_FAST_SEARCH|globalIndexFastSearch|global_index_fast_search|slowSearch|slow search|FastSearch" paimon-api paimon-core paimon-python docs/docs docs/generatedpython -m compileall paimon-python/pypaimon/common/options/core_options.py paimon-python/pypaimon/read/scanner/file_scanner.py paimon-python/pypaimon/table/source/vector_search_read.py paimon-python/pypaimon/table/source/vector_search_scan.pypython -m pytest paimon-python/pypaimon/tests/global_index_test.py::PlanSnapshotFetchRegressionTest::test_search_mode_detail_filters_unindexed_rows_exactly paimon-python/pypaimon/tests/vector_search_filter_test.py::VectorSearchManySplitsTest::test_search_mode_controls_unindexed_range_scanmvn -pl paimon-api,paimon-core -DskipTests spotless:checkmvn -pl paimon-core -am -Pfast-build -DskipTests -DfailIfNoTests=false compile test-compilemvn -pl paimon-core -am -Pfast-build -DfailIfNoTests=false -Dtest=VectorSearchBuilderTest#testVectorSearchFullModeScansUnindexedData+testVectorSearchFastModeSkipsUnindexedDataByDefault+testVectorSearchFullModeScansFilteredUnindexedData,BtreeGlobalIndexTableTest#testBTreeGlobalIndexSearchModeControlsUnindexedData testNotes
global-index.fast-searchis intentionally not kept as a compatibility alias because it has not been released.