From 67f72740b1b93fb797d49397b207a03ec15afd5e Mon Sep 17 00:00:00 2001 From: David Storch Date: Thu, 24 Aug 2017 16:12:52 -0400 Subject: SERVER-30245 Add support for multiple types in JSON Schema 'type'/'bsonType' and in $type. This change implements the 'type' and 'bsonType' JSON Schema keywords accepting an array of type aliases. At the same time, it adds support for an array of type aliases in the $type match expression. --- src/mongo/db/pipeline/pipeline_test.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mongo/db/pipeline/pipeline_test.cpp') diff --git a/src/mongo/db/pipeline/pipeline_test.cpp b/src/mongo/db/pipeline/pipeline_test.cpp index 79e324d3901..fa5e6438929 100644 --- a/src/mongo/db/pipeline/pipeline_test.cpp +++ b/src/mongo/db/pipeline/pipeline_test.cpp @@ -908,7 +908,7 @@ TEST(PipelineOptimizationTest, MatchCannotMoveAcrossProjectRenameOfDottedPath) { TEST(PipelineOptimizationTest, MatchWithTypeShouldMoveAcrossRename) { string inputPipe = "[{$addFields: {a: '$b'}}, {$match: {a: {$type: 4}}}]"; - string outputPipe = "[{$match: {b: {$type: 4}}}, {$addFields: {a: '$b'}}]"; + string outputPipe = "[{$match: {b: {$type: [4]}}}, {$addFields: {a: '$b'}}]"; assertPipelineOptimizesTo(inputPipe, outputPipe); } -- cgit v1.2.1