-
Type: Bug
-
Resolution: Cannot Reproduce
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Query Execution
-
ALL
-
QE 2024-03-18, QE 2024-04-01
It is possible to get wrong results if we do not fold the arguments of a valueBlockLogicalAnd when the input data has arrays.
Consider for example the arrays A1 : [true, false] and A2 : [false, true] . The arrays are for the same document but another predicate has been evaluated for each one.
If we first run AND and then FOLD we get [false, false] -> false, i.e. the document does not qualify
If we first FOLD and then run AND we get true AND true -> true , i.e. the document does qualify
Additionally, all methods that take a bitmap as an argument should fold all other inputs to make them comparable.
Example: {$match:{ "a.x" : {$lt: 10} } }, {$match: {$expr: {$map: { "input": "$a", "as": "arr", "in": {$add: ["$$arr.x", 10]} } } } }
{$match:{ "a.x" : {$lt: 10} } } will return a a bitmap on the measures.
{$match: {$expr: {$map: { "input": "$a", "as": "arr", "in": {$add: ["$$arr.x", 10]} } } } } if we don't fold it will use a bitmap on the measures and a block on the elements.
- is depended on by
-
SERVER-87469 cellFoldValues_F receives input that is neither Boolean nor Nothing
- Closed