-
Type: Improvement
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Query Optimization
-
Fully Compatible
-
QO 2023-11-27, QO 2023-12-11, QO 2023-12-25, QO 2024-01-08
Currently our constant folding implementation will ignore AND(..., false) and OR(..., true) in order to respect SBE's short circuiting semantics. This is because the LHS will evaluate to either a boolean or Nothing. In the case that the LHS evaluates to Nothing, SBE will not evaluate the RHS. That is why our constant folding cannot fold these expressions.
Interval simplification generates expressions that look like this, but we can prove that LHS will never return nothing, since there are no field accesses on the LHS, there are only constants, getParam() invocations, or BinaryOps.
This ticket is to improve constant folding to keep track of the Nothingness of expressions and make use of it in the case of AND/OR with a constant RHS.
- depends on
-
SERVER-82148 [CQF] Use parameter type information in constant folding optimization
- Closed
- is depended on by
-
SERVER-79622 [CQF] Improve intersectDNFIntervals behavior for variable bounds
- Open