Pipeline dependency graph should be able to traverse constant arrays

XMLWordPrintableJSON

    • Query Optimization
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      While the dependency graph normally makes no attempt to do anything intelligent when it encounters an array, for getConstant(), we could do the same thing that FieldPathExpression does, i.e. project into [[]] if we traverse constant arrays.

       

      Example: 

      $set: {a: [

      {b: 1}

      , {b: 2}]}

      If we query what is $a.b we could say it is [1, 2].

      So if you had a $match after that said

      {$match: {'a.b': 3}}

      We could actually look at the constant value and then the match and determine it is always false.

            Assignee:
            Unassigned
            Reporter:
            Henri Nikku
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: