summaryrefslogtreecommitdiff
path: root/src/mongo/db/pipeline/pipeline_test.cpp
diff options
context:
space:
mode:
authorDavid Storch <david.storch@10gen.com>2017-08-24 16:12:52 -0400
committerDavid Storch <david.storch@10gen.com>2017-08-29 18:20:53 -0400
commit67f72740b1b93fb797d49397b207a03ec15afd5e (patch)
tree77419ad19fa595b834fbc196e464a72aa417fcd8 /src/mongo/db/pipeline/pipeline_test.cpp
parentb47d1bd254d543a8880ac226ea7daa2d4e2b0967 (diff)
downloadmongo-67f72740b1b93fb797d49397b207a03ec15afd5e.tar.gz
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.
Diffstat (limited to 'src/mongo/db/pipeline/pipeline_test.cpp')
-rw-r--r--src/mongo/db/pipeline/pipeline_test.cpp2
1 files changed, 1 insertions, 1 deletions
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);
}