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

Enable push down of $match with $expr

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Query Optimization

      Similar to MatchExpression splitting in an aggregation pipeline, we want to be able to split an $expr so that we can support use cases including pushdown in front of an unpack bucket stage if it has both meta fields and control fields as arguments. For example, an $expr that looks likeĀ 

      {$expr: {$and: [{$eq: ["$meta.host", "host_0"]}, {$eq: ["$a", 0]}]}}

      should be split into something likeĀ 

      {$and: [{$expr: {$eq: ["$meta.host", "host_0"]}, {$expr: {$eq: ["$a", 0]}}]}

            Assignee:
            backlog-query-optimization Backlog - Query Optimization
            Reporter:
            militsa.sotirova@mongodb.com Militsa Sotirova
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: