Address $addFields renamedPaths() behaviour

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: 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
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      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
            Reporter:
            Max Verbinnen (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: