[CQF] Make sure computed fields are not redundantly pulled from storage

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Won't Do
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Optimization
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      In the classic engine there is a bug in dependency tracking that can result in a suboptimal plan. If the query computes a field, and then depends on it later:

      {$addFields: {a: ...}} ... {$project: {a: 1}}
      

      then we redundantly pull 'a' from storage (the collection or an index).

      When we implement computed fields in Bonsai, we should make sure to test this case.

            Assignee:
            [DO NOT USE] Backlog - Query Optimization
            Reporter:
            David Percy (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: