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

Address $addFields renamedPaths() behaviour

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Query Optimization
    • Fully Compatible
    • QO 2024-09-02, QO 2024-09-16, QO 2024-09-30

      The $addFields aggregation stage exhibits unexpected behaviour for semantic_analysis::renamedPaths.

      The renamedPaths function is supposed to return boost::none if any of the paths of interest are modified. For example, we expect boost::none for a {$project: {myPath: “$otherField”}} where myPath is the path of interest. Similarly, you would expect boost::none for {$addFields: {myPath: "$otherField”}} because the myPath field is overwritten. However, we actually get a {myPath -> myPath} map back for this case, which does not seem correct.

      The purpose of this ticket is to investigate whether this is actually incorrect behaviour. If yes, all uses of renamedPaths (like for $exchange) should be checked for bugs.

            Assignee:
            james.harrison@mongodb.com James Harrison
            Reporter:
            max.verbinnen@mongodb.com Max Verbinnen (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: