diff options
author | Nick Zolnierz <nicholas.zolnierz@mongodb.com> | 2019-04-22 10:43:36 -0400 |
---|---|---|
committer | Nick Zolnierz <nicholas.zolnierz@mongodb.com> | 2019-04-25 10:56:27 -0400 |
commit | 0625cc5f24e5091b2d1908f32b48d3e97c5b9a49 (patch) | |
tree | 552c3bab1f54269593059adccfe379ed2ff38041 /src/mongo/db/pipeline/pipeline_metadata_tree_test.cpp | |
parent | 5e4dcfa4b2c4e0e8ec96b8e38dea10af68d64543 (diff) | |
download | mongo-0625cc5f24e5091b2d1908f32b48d3e97c5b9a49.tar.gz |
SERVER-40719 Include final metadata in call to pipeline_metadata_tree::makeTree
Diffstat (limited to 'src/mongo/db/pipeline/pipeline_metadata_tree_test.cpp')
-rw-r--r-- | src/mongo/db/pipeline/pipeline_metadata_tree_test.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/mongo/db/pipeline/pipeline_metadata_tree_test.cpp b/src/mongo/db/pipeline/pipeline_metadata_tree_test.cpp index 2e0bf607a71..4c405379c20 100644 --- a/src/mongo/db/pipeline/pipeline_metadata_tree_test.cpp +++ b/src/mongo/db/pipeline/pipeline_metadata_tree_test.cpp @@ -127,14 +127,14 @@ TEST_F(PipelineMetadataTreeTest, LinearPipelinesConstructProperTrees) { ASSERT([&]() { auto pipePtr = jsonToPipeline("[{$project: {name : 1}}]"); - return makeTree<TestThing>({initial}, *pipePtr, ignoreDocumentSourceAddOne); + return makeTree<TestThing>({initial}, *pipePtr, ignoreDocumentSourceAddOne).first; }() == Stage(TestThing{23}, {}, {})); ASSERT([&]() { auto pipePtr = jsonToPipeline( "[{$project: {name: 1, status: 1}}, " "{$match: {status: \"completed\"}}]"); - return makeTree<TestThing>({initial}, *pipePtr, ignoreDocumentSourceAddOne); + return makeTree<TestThing>({initial}, *pipePtr, ignoreDocumentSourceAddOne).first; }() == Stage(TestThing{24}, makeUniqueStage(TestThing{23}, {}, {}), {})); ASSERT([&]() { @@ -145,7 +145,7 @@ TEST_F(PipelineMetadataTreeTest, LinearPipelinesConstructProperTrees) { "{$match: {status: \"completed\"}}, " "{$match: {status: \"completed\"}}, " "{$match: {status: \"completed\"}}]"); - return makeTree<TestThing>({initial}, *pipePtr, ignoreDocumentSourceAddOne); + return makeTree<TestThing>({initial}, *pipePtr, ignoreDocumentSourceAddOne).first; }() == Stage(TestThing{28}, makeUniqueStage( TestThing{27}, @@ -237,7 +237,7 @@ TEST_F(PipelineMetadataTreeTest, BranchingPipelinesConstructProperTrees) { "{$unwind: \"$instr\"}, " "{$group: {_id: {PositionID: \"$trade.mvtident\", \"InstrumentReference\": " "\"$instr.libelle\"}, NumberOfSecurities: {$sum:\"$trade.quantite\"}}}]"); - return makeTree<TestThing>({{"1"}, {"2"}}, *pipePtr, buildRepresentativeString); + return makeTree<TestThing>({{"1"}, {"2"}}, *pipePtr, buildRepresentativeString).first; }() == Stage(TestThing{"1mpxul[2m]ulu"}, makeUniqueStage( TestThing{"1mpxul[2m]ul"}, @@ -271,7 +271,7 @@ TEST_F(PipelineMetadataTreeTest, BranchingPipelinesConstructProperTrees) { "{$bucket: {groupBy: \"$year\", boundaries: [ 2000, 2010, 2015, 2020]}}], " "\"categorizedByYears(Auto)\": [{$bucketAuto: {groupBy: \"$year\", buckets: 2}}]}}, " "{$limit: 12}]"); - return makeTree<TestThing>({{""}}, *pipePtr, buildRepresentativeString); + return makeTree<TestThing>({{""}}, *pipePtr, buildRepresentativeString).first; }() == Stage(TestThing{"f[tugs, tmgs, tb]"}, makeUniqueStage( TestThing{""}, @@ -343,7 +343,7 @@ TEST_F(PipelineMetadataTreeTest, ZipWalksAPipelineAndTreeInTandemAndInOrder) { "{$unwind: \"$instr\"}, " "{$group: {_id: {PositionID: \"$trade.mvtident\", \"InstrumentReference\": " "\"$instr.libelle\"}, NumberOfSecurities: {$sum:\"$trade.quantite\"}}}]"); - auto tree = makeTree<TestThing>({{}, {}}, *pipePtr, takeTypeInfo); + auto tree = makeTree<TestThing>({{}, {}}, *pipePtr, takeTypeInfo).first; zip<TestThing>(&tree, &*pipePtr, tookTypeInfoOrThrow); previousStack.pop(); }()); @@ -357,7 +357,7 @@ TEST_F(PipelineMetadataTreeTest, ZipWalksAPipelineAndTreeInTandemAndInOrder) { "{$bucket: {groupBy: \"$year\", boundaries: [ 2000, 2010, 2015, 2020]}}], " "\"categorizedByYears(Auto)\": [{$bucketAuto: {groupBy: \"$year\", buckets: 2}}]}}, " "{$limit: 12}]"); - auto tree = makeTree<TestThing>({{}, {}}, *pipePtr, takeTypeInfo); + auto tree = makeTree<TestThing>({{}, {}}, *pipePtr, takeTypeInfo).first; zip<TestThing>(&tree, &*pipePtr, tookTypeInfoOrThrow); previousStack.pop(); }()); |