JingsongLi opened a new pull request, #8603: URL: https://github.com/apache/paimon/pull/8603
## Summary Enable source-backed primary-key BTree and Bitmap indexes to prune ordinary batch reads. The scan now evaluates snapshot-scoped scalar index payloads against the pushed predicate and converts file-local row positions into indexed data splits, while preserving the ordinary scan as a safe fallback. ## Changes - Plan active BTree and Bitmap payload groups for each data file in the captured snapshot, building payload state once per bucket and index definition. - Evaluate supported predicates during `DataTableBatchScan` and translate matched row positions into `IndexedSplit` ranges. - Preserve non-raw-convertible merge boundaries and fall back per file for missing, corrupt, overly fragmented, or out-of-range index results. - Expose the snapshot reader's index file handler and harden primary-key index source metadata deserialization against malformed counts. - Add unit and end-to-end coverage for BTree/Bitmap planning, boolean fallback semantics, deletion-vector alignment, fragmented results, corrupt payloads, and ordinary batch reads. ## Testing - [x] `mvn -pl paimon-core -am -Pfast-build -DfailIfNoTests=false -DwildcardSuites=none -Dtest=PrimaryKeyIndexSourceMetaTest,PrimaryKeySortedIndexScanTest,PrimaryKeySortedIndexResultTest,PrimaryKeySortedIndexBatchScanTest,PrimaryKeySortedIndexReadTest test` - [x] `mvn -pl paimon-core -am -DskipTests package` ## Notes Follow-up to #8602. This PR does not introduce new table options or change existing index configuration. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
