[SERVER-49819] [SBE] find() should apply most operators to both array field's elements and array itself Created: 23/Jul/20  Updated: 29/Oct/23  Resolved: 27/Jul/20

Status: Closed
Project: Core Server
Component/s: Querying
Affects Version/s: None
Fix Version/s: 4.7.0

Type: Bug Priority: Major - P3
Reporter: Drew Paroski Assignee: Drew Paroski
Resolution: Fixed Votes: 0
Labels: qexec-team
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Participants:

 Description   

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.



 Comments   
Comment by Githook User [ 27/Jul/20 ]

Author:

{'name': 'Drew Paroski', 'email': 'drew.paroski@mongodb.com', 'username': 'paroski'}

Message: SERVER-49819 [SBE] find() should apply most operators to both array field's elements and array itself
Branch: master
https://github.com/mongodb/mongo/commit/70f36d65531a4a5d8bffc70ef368b8440ec0606b

Generated at Thu Feb 08 05:20:56 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.