You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Partition-state filtering does not apply composite-key prefix open ranges #25595
Composite-primary-key predicate rewriting can produce prefix open-range filters such as (prefix, value), (prefix, +∞), (-∞, prefix), and closed/open variants. The partition-state in-memory filter and primary-key iterator do not represent all of these forms. They therefore fall back to scanning workspace/partition rows instead of filtering and terminating the iterator by primary-key bounds.
Results remain correct after residual filtering, but selective workspace queries lose expected early pruning and can become unnecessarily expensive.
Expected Behavior
Partition-state filtering and the primary-key iterator should support all composite-key prefix range forms, apply them to workspace rows, and stop iteration as soon as an upper bound proves that no later key can match.
Steps to Reproduce
Create a table with a composite primary key (c1, c2) and workspace/partition-state rows.
Query a selective predicate such as c1 = 5 AND c2 > 3, or the corresponding left/right/open/closed range variants.
Inspect the partition-state path: the predicate is not represented as an in-memory PK filter and rows are scanned rather than pruned by range bounds.
Additional information
The fix adds prefix open-range support to the in-memory filter and iterator, includes workspace filtering and upper-bound early termination, and covers all boundary inclusivity combinations.
Activity
fix: strengthen filter pushdown and PK pruning (#25596)
XuPeng-SH commentedon Jul 12, 2026
@Ariznawlll
Ariznawlll commentedon Jul 13, 2026
已在最新
main@2865ed6cc8a39727b8b274bb52b88fe441d0b30c验证通过。de6438665/ fix: strengthen filter pushdown and PK pruning #25596。TestPrefixBetweenOpenBounds覆盖左右 open/closed 和 prefix 边界;TestPrefixBetweenStopsAtDeletedEntryPastUpperBound覆盖越过 upper bound 且中间存在 deleted entry 的提前终止。-race -count=5通过。复合键 prefix open range 已能正确下推和提前停止,修复有效。
fix: strengthen filter pushdown and PK pruning (matrixorigin#25596)
fix: strengthen filter pushdown and PK pruning (matrixorigin#25596)
fix: strengthen filter pushdown and PK pruning (matrixorigin#25596)