Repository navigation
Conversation
This branch is being deployed
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.
What type of PR is this?
Which issue(s) this PR fixes:
Related to matrixorigin/matrixflow#21333.
What this PR does / why we need it:
Stable non-primary-column
INpredicates can remain row filters without becoming block filters when statistics are unavailable or estimate no pruning benefit. The two incident CTAS queries use such a period predicate.Admit direct-column
INwith a runtime-constant List/Vec RHS through the existing simple ZoneMap filter path on4.2-dev. Preserve this branch's argument validation, constant-expression and zonemappability checks, residual row filtering, disable hint, and existing-filter preservation/deduplication. CTAS transaction visibility and execution topology are unchanged. This is the4.2-devcounterpart of #32786, adapted and validated independently.Also fix sorted-column IN seek skipping blocks with uninitialized summaries. A binary search cannot safely treat unknown summaries as nonmatches (or assume a monotone predicate with holes). Seek now skips only a contiguous prefix proven below the IN lower bound and stops at the first unknown or potentially matching block. Unsorted/float/empty/nullable-list seek eligibility is unchanged; other operators and storage formats are untouched.
Close the review-reported binary-value regression exposed by the new admission: a value longer than 30 bytes with an all-FF 30-byte prefix has a persisted
MaxTruncatedupper bound. Byte/stringAnyInmust not reject a candidate using that incomplete bound, andSubVecInmust not shorten the BloomFilter candidate window with it. Both now retain the existing lower-bound pruning while treating that upper bound conservatively. No persisted-format change or IN-admission rollback is involved.Validation with Go 1.26.4 on darwin/arm64:
pkg/sql/plan,pkg/vm/engine/readutilandpkg/vm/engine/tae/indextests pass. Build, focused vet and golangci-lint 2.6.2 pass. Added seek and truncated-bound statements are 100% covered; the admission helper has 93.8% statement coverage.Cost/limits: sorted IN seek changes from O(log B) to O(B) metadata checks in the worst case, with no additional data I/O or allocations. A local microbenchmark (three 100ms runs) measured late/no-match seek at approximately 1.7 us for 128 blocks and 51–52 us for 4096 blocks, versus approximately 0.1/0.16 us previously; early matches take approximately 14 ns. This is an explicit correctness-first CPU tradeoff, not a claim of unchanged seek performance. Small SQL fixtures establish correctness and effective pruning, not production-scale latency improvement; production acceptance remains pending.