-
Type:
Bug
-
Resolution: Won't Fix
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Query Execution
-
ALL
-
QE 2025-05-12
-
200
-
None
-
3
-
TBD
-
None
-
None
-
None
-
None
-
None
-
None
An operation like ($field + 1 + 1 + .... 1) where the number of constants were enough to trigger the building of a binary tree used to be optimized into a reduced set of operations because the binary nodes involving constants were precomputed into a new constant. The final expression contained just log(n) operations, e.g. (((($field + 1) + 2) + 4) ...)
When an n-ary operation is created, we precompute only the leading operations, and stop as soon as we find the non-constant operand, generating a much higher number of operations, with degraded performance.
- is related to
-
SERVER-63099 Constant folding should not assume arithmetic is associative or commutative in the general case
-
- Closed
-