[core] Centralize negative predicate complements in sorted index readers - #9060
Merged
JingsongLi merged 2 commits intoAug 6, 2026
Merged
Conversation
JingsongLi
marked this pull request as ready for review
August 6, 2026 07:56
leaves12138
approved these changes
Aug 6, 2026
leaves12138
left a comment
Contributor
There was a problem hiding this comment.
Reviewed the complete two-commit change. The shard-local row-count propagation is consistent across data-evolution ranges, primary-key merged source groups, full-text archives, and vector segments. The centralized complement logic preserves SQL null semantics, handles empty row domains, and keeps offset translation correctly separated. Focused BTree, Bitmap, primary-key sorted-index, and primary-key full-text tests pass locally.
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.
Purpose
Follow up on #8945 by moving negative-predicate complement handling into sorted index readers.
GlobalIndexer#createReadermethod and pass the shard-local total row countOffsetGlobalIndexReaderfocused on row-id coordinate translationIS NOT NULL,!=, andNOT INinSortedFileGlobalIndexReaderThis removes the implicit
supportsRangeComplement()protocol and makes the component that owns exact predicate evaluation responsible for complement semantics.Tests
mvn -pl paimon-common,paimon-core -Pfast-build -DfailIfNoTests=false -DwildcardSuites=none -Dtest=LazyFilteredBitmapIndexReaderTest,LazyFilteredBTreeIndexReaderTest,PrimaryKeySortedIndexScanTest,PrimaryKeyFullTextBucketSearchTest testmvn -pl paimon-common,paimon-core -Pfast-build -DskipTests clean test-compilemvn -pl paimon-full-text,paimon-lumina,paimon-vector -am -Pfast-build -DskipTests test-compileJAVA_HOME=<JDK11> mvn -Ppaimon-eslib -pl paimon-eslib -am -Pfast-build -DskipTests test-compileJAVA_HOME=<JDK11> mvn -pl paimon-flink/paimon-flink-common -am -Pfast-build -Pflink2 -DskipTests test-compilemvn -pl paimon-spark/paimon-spark-common -am -Pfast-build -Pspark3 -DskipTests test-compilemvn -pl paimon-common,paimon-core,paimon-full-text,paimon-lumina,paimon-vector -am -DskipTests compileJAVA_HOME=<JDK11> mvn -q -Ppaimon-eslib -pl paimon-eslib -am -DskipTests compile