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
Consider PreSelection short-circuit strategy for OR #22342
Is your feature request related to a problem or challenge?
BinaryExpr already implements row-level short-circuit for AND via ShortCircuitStrategy::PreSelection (#15462): when the LHS of an AND is mostly false (≤20% true), the RHS evaluates only on the rows that survived LHS, not on the full batch.
The dual case for OR is not implemented. Today, OR only short-circuits when LHS is entirely true (ReturnLeft) or entirely false (ReturnRight — #15636). For partially-true LHS, the RHS still evaluates on the full batch, even though the rows where LHS is already true can never have their OR result change.
This leaves a symmetric optimization on the table: when LHS of an OR is mostly true on a batch, RHS only needs to evaluate on the rows where LHS was false.
Activity
perf: Reorder predicates in conjuncts via simple heuristic (apache#22343
feat: add OR pre-selection short-circuit (apache#22979)
feat: add OR pre-selection short-circuit (apache#22979)