MatchExpression trees should hold children by unique_ptr

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Duplicate
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Querying
    • Query Optimization
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      ListOfMatchExpression holds its children by owned raw pointer:

      https://github.com/mongodb/mongo/blob/c60ee7dd4244f58659f436ca54c68987637911e8/src/mongo/db/matcher/expression_tree.h#L104

      Instead, the children should be a std::vector<std::unique_ptr<MatchExpression>>. We should also audit the other MatchExpression subclasses to see if there are remaining uses of owned raw pointers.

              Assignee:
              [DO NOT USE] Backlog - Query Optimization
              Reporter:
              David Storch
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: