Track missing values in the DependencyGraph

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: Major - P3
    • 9.0.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Optimization
    • Fully Compatible
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      In the graph, we represent unknown fields which do not come from the collection with the special <missing> field available in each scope. 

      But we do not store information in the scope to indicate whether any missing fields are actually missing or simply not reported.

      There's two cases:

       - Within the graph, we can apply reasoning to determine missing values already, but we do not: {$set: {a: 1}}, {$set:

      {a.b: 1}

      , {$set: {d: '$a.c'}} - here, since a was set to 1, and then to {b: 1}, we know a.c is a missing field. We do not deduce this at the moment.

       - Within DocumentTransformation/getModifiedPaths:

      kAllExcept {a} says that a is not modified, and that any number of other fields could exists and be modified. ReplaceRoot says that the entire document should be treated as modified.

      We can extend the DocumentTransformation interface ReplaceRoot to indicate the the new root is definitely the empty document, or, we special-case stages such as inclusion projection where we know the other fields are truly missing.

      This is important for path arrayness tracking, since if the field is definitely missing, it cannot be array (still need to check the path before it though).

            Assignee:
            Henri Nikku
            Reporter:
            Vesko Karaganev
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: