[SERVER-66792] Index bounds for empty arrays Created: 26/May/22  Updated: 29/Oct/23  Resolved: 11/Jan/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 6.3.0-rc0

Type: Improvement Priority: Major - P3
Reporter: Svilen Mihaylov (Inactive) Assignee: Will Buerger
Resolution: Fixed Votes: 0
Labels: cascades-starter
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Query Optimization
Backwards Compatibility: Fully Compatible
Sprint: QO 2022-12-26, QO 2023-01-09, QO 2023-01-23
Participants:

 Description   

Follow up to SERVER-62961. Fix TODO related to empty arrays in utils/utils.cpp

// For now we do not support empty arrays. Need to translate into null bounds.

 

Consider what classic does for empty array bounds:

t.createIndex({a: 1})
[{$match: {a: {$eq: []}}}]

 

[js_test:array_match]         "indexBounds" : {
[js_test:array_match]             "a" : [
[js_test:array_match]                 "[undefined, undefined]",
[js_test:array_match]                 "[[], []]"
[js_test:array_match]             ]
[js_test:array_match]         }
 



 Comments   
Comment by Githook User [ 10/Jan/23 ]

Author:

{'name': 'Will Buerger', 'email': 'will.buerger@mongodb.com', 'username': 'wbuerger46'}

Message: SERVER-66792: Index bounds for empty arrays
Branch: master
https://github.com/mongodb/mongo/commit/d169436600ae87f6bd486d2dea4c17bbaf886307

Generated at Thu Feb 08 06:06:26 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.