[SERVER-67624] [CQF] Fix ABT translations for match expressions against MinKey and MaxKey Created: 28/Jun/22 Updated: 29/Oct/23 Resolved: 02/Aug/22 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 6.1.0-rc0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Emily Wang (Inactive) | Assignee: | Ben Shteinfeld |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||||||
| Operating System: | ALL | ||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||
| Description |
|
Current ABTs fail to match {a: []} when doing db.find({a: {$lte: MaxKey()}). The desired behavior of db.find({a: {$lte: MaxKey()}) should return any and all document, with the field 'a'. The suspect issue arises when we choose to traverse the array and make a compare between each element and MaxKey() . Instead, the array itself should be compared to MaxKey(), as an empty array satisfies the $lte: MaxKey() requirement. Similar behavior should also be implemented when comparing to MinKey(). |
| Comments |
| Comment by Hana Pearlman [ 18/Jul/22 ] |
|
Reopening to do a bit of investigation. Let's see if it makes sense to make changes to translation (mirroring SBE stage builders) and, if so, how these changes interact with the changes in |
| Comment by Ben Shteinfeld [ 15/Jul/22 ] |
|
|
| Comment by Hana Pearlman [ 30/Jun/22 ] |
|
emily.wang@mongodb.com Looks like there's something wrong with the link on "we choose to traverse...". Can you update that link? |