Investigate match_expression::addDependencies() creating empty fields when not needed

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Optimization
    • ALL
    • None
    • 3
    • TBD
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      During work for SERVER-101795, the dependency set that match_expression::addDependencies() outputs for 

      {$match: {a: {$elemMatch: {$elemMatch: {$eq: 0}, $eq: 0}}}}

        is [a, ""]. It was brought up in code review that the empty string outputted here seems to be incorrect/unnecessary as a is the only relevant path. There may be other queries that also generate empty string dependencies when not needed and it could potentially inhibit query optimization.

       

              Assignee:
              Unassigned
              Reporter:
              Erin Zhu
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated: