-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Querying
-
Fully Compatible
-
ALL
When working on implementing SBE support for the $type operator, I noticed that I was getting wrong results in some cases because for array fields generateTraverseHelper() in "sbe_stage_builder_filter.cpp" was only applying predicates to the array's elements but not the array itself. After doing more research, I realized that this issue was also something that will come up for the comparison operators ($eq, $lt, $gt, etc.) once we update the genericCompare*() functions to support arrays.
The goal of this task is to update generateTraverseHelper() in "sbe_stage_builder_filter.cpp" so that for array fields the predicate is applied to both the array's elements and the array itself.