Dependency graph should check path prefix arrayness for kMissing

XMLWordPrintableJSON

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

      See e.g. this small repro where the graph incorrectly claims that 'a.unknown' is not an array, even though it's the empty array.

       

      TEST_F(PipelineDependencyGraphTest, MissingPathChecksPrefixArrayness) {
          setPipeline(
              "[{$project: {a: 1}},"
              " {$set: {a: [1, 2, 3]}},"
              " {$set: {'a.b': 1}}]");
      
          runTest([&] { ASSERT_TRUE(graph->canPathBeArray(nullptr, "a.unknown")); });
      }
      

       

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

              Created:
              Updated:
              Resolved: