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]: Function-scan filter pushdown can silently drop non-pushable predicates #25593
Others: SQL optimizer filter pushdown through FUNCTION_SCAN.
Actual Behavior
pushdownFilters forwarded filters that did not belong to a FUNCTION_SCAN node to its child, but discarded the child’s returned cantPushdown filters. A mixed-tag predicate could therefore disappear from the plan rather than being kept above the function scan.
This is a correctness issue: a query can return rows that should have been filtered out.
Expected Behavior
Every filter rejected by a FUNCTION_SCAN child must be returned to the parent pushdown caller and materialized as a normal filter at the correct plan level. A function scan with no child must also return, rather than discard, incoming non-self filters.
Steps to Reproduce
Build a plan with a FUNCTION_SCAN above a table scan.
Use a predicate that references both the function-scan binding tag and the child binding tag.
Run filter pushdown before the fix.
Observe that the predicate is neither attached to the child nor returned as cantPushdown.
Additional Information
The regression test constructs a mixed-tag equality predicate and verifies that it is returned intact, with neither scan receiving an invalid partial pushdown.
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。FUNCTION_SCAN现在收集 child 返回的cantPushdown;无 child 时也会将非 self filters 返回给 parent,不再静默丢弃。TestFunctionScanDoesNotDropMixedTagFilter使用-race -count=5通过,mixed-tag predicate 被完整保留,未错误附着到任一扫描节点。正确性问题未再复现,修复有效。
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)