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

Support arbitrary expressions for 'field' parameter for $getField

    • Type: Icon: New Feature New Feature
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.2.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Optimization
    • Fully Compatible
    • QO 2023-09-04, QO 2023-09-18, QO 2023-10-02, QO 2023-10-16

      The $getField operator only supports expressions that resolve to string literals. This ticket is requesting an expansion to $getField that would support any expressions that resolve to string values. For example,

      { $getField: { field: { $toString: "$num" }, input: "$doc" } }

            Assignee:
            henri.nikku@mongodb.com Henri Nikku
            Reporter:
            matthew.chiaravalloti@mongodb.com Matthew Chiaravalloti
            Votes:
            1 Vote for this issue
            Watchers:
            14 Start watching this issue

              Created:
              Updated:
              Resolved: