summaryrefslogtreecommitdiff
path: root/jstests
diff options
context:
space:
mode:
authorDrew Paroski <drew.paroski@mongodb.com>2021-05-02 00:49:54 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-05-06 04:08:47 +0000
commitd40617768200007f5d1c0ea96f0a7dc460dfe651 (patch)
tree4855aa0299d373112b9ad7256b82b69cf741e495 /jstests
parent02d43e6da447aa1e4b723a9842a02afbe1d70f1e (diff)
downloadmongo-d40617768200007f5d1c0ea96f0a7dc460dfe651.tar.gz
SERVER-54471 [SBE] Remove $_internalInhibitOptimization from "regex.js" test (+Default SBE)
Diffstat (limited to 'jstests')
-rw-r--r--jstests/aggregation/expressions/regex.js14
1 files changed, 4 insertions, 10 deletions
diff --git a/jstests/aggregation/expressions/regex.js b/jstests/aggregation/expressions/regex.js
index 479a9b3a81b..59a22fd7b87 100644
--- a/jstests/aggregation/expressions/regex.js
+++ b/jstests/aggregation/expressions/regex.js
@@ -19,16 +19,10 @@ function testRegex(expression, inputObj, expectedOutput) {
assert.eq(result, expectedOutput);
}
function testRegexForKey(expression, key, inputObj, expectedMatchObj) {
- // TODO SERVER-54189: $_internalInhibitOptimization stage is added to prevent $match from being
- // pushed into the query layer. $match with a single _id filter results in IDHack stage in the
- // resulting plan, which is not supported by SBE. It should be removed once IDHack stage is
- // supported in SBE.
- const result = coll.aggregate([
- {"$_internalInhibitOptimization": {}},
- {"$match": {"_id": key}},
- {"$project": {"matches": {[expression]: inputObj}}}
- ])
- .toArray();
+ const result =
+ coll.aggregate(
+ [{"$match": {"_id": key}}, {"$project": {"matches": {[expression]: inputObj}}}])
+ .toArray();
const expectedOutput = [{"_id": key, "matches": expectedMatchObj}];
assert.eq(result, expectedOutput);
}