summaryrefslogtreecommitdiff
path: root/jstests/cqf/object_elemMatch.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/cqf/object_elemMatch.js')
-rw-r--r--jstests/cqf/object_elemMatch.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/jstests/cqf/object_elemMatch.js b/jstests/cqf/object_elemMatch.js
index f152c8902b0..e1baf046e9b 100644
--- a/jstests/cqf/object_elemMatch.js
+++ b/jstests/cqf/object_elemMatch.js
@@ -14,6 +14,7 @@ assert.commandWorked(t.insert({a: [{a: 1, b: 1}, {a: 1, b: 2}]}));
assert.commandWorked(t.insert({a: [{a: 2, b: 1}, {a: 2, b: 2}]}));
assert.commandWorked(t.insert({a: {a: 2, b: 1}}));
assert.commandWorked(t.insert({a: [{b: [1, 2], c: [3, 4]}]}));
+assert.commandWorked(t.insert({a: [{"": [1, 2], c: [3, 4]}]}));
{
// Object elemMatch. Currently we do not support index here.
@@ -29,4 +30,9 @@ assert.commandWorked(t.insert({a: [{b: [1, 2], c: [3, 4]}]}));
]);
assert.eq(0, res.executionStats.nReturned);
}
+{
+ const res = t.explain("executionStats").aggregate([{$match: {a: {$elemMatch: {"": 1}}}}]);
+ assert.eq(1, res.executionStats.nReturned);
+ assertValueOnPlanPath("PhysicalScan", res, "child.child.child.nodeType");
+}
}());