Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-66792

Index bounds for empty arrays

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 6.3.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Query Optimization
    • Fully Compatible
    • QO 2022-12-26, QO 2023-01-09, QO 2023-01-23

      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]         }
       

            Assignee:
            will.buerger@mongodb.com Will Buerger
            Reporter:
            svilen.mihaylov@mongodb.com Svilen Mihaylov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: