-
Type:
Bug
-
Resolution: Won't Do
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
ALL
-
QO 2022-01-10, QO 2022-01-24, QO 2022-02-07
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Current ABTs for $eq, $exists, $in, and $type can fail when matching against arrays.
For example {$match: {a: {$eq: ["abc"]}}} should match both {a: ["abc"]} and {a: [["abc"]]}, though it currently only matches the latter. This is because in the first case PathTraverse will perform comparisons on the array elements (that is, "abc") but not the top-level array. In SBE the solution seems to be to detect when a comparison against a top-level array is necessary, and specifically compare against it in addition to the comparison done by the traverse.
I think it should be fixed during translation to ABT (as opposed to path lowering, or somewhere else), otherwise either 1) the ABTs produced by translation would be semantically incorrect until lowering or 2) the PathTraverse operator would have a different meaning within an ABT than "traverse" does in an SBE plan.