summaryrefslogtreecommitdiff
path: root/jstests/noPassthroughWithMongod/group_pushdown.js
diff options
context:
space:
mode:
authorDan Larkin-York <dan.larkin-york@mongodb.com>2023-02-03 23:42:29 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2023-02-04 01:32:37 +0000
commit94098eff431d7bb65da31516cc4df2a895d27dd8 (patch)
tree1aa862702400ebbf57026aa94e766b8d88b9e143 /jstests/noPassthroughWithMongod/group_pushdown.js
parent946646ef8d624116985f3acca5ec5ae359d59097 (diff)
downloadmongo-94098eff431d7bb65da31516cc4df2a895d27dd8.tar.gz
Revert "SERVER-71798 Expand the set of queries eligible for SBE in the 6.3 release"
Diffstat (limited to 'jstests/noPassthroughWithMongod/group_pushdown.js')
-rw-r--r--jstests/noPassthroughWithMongod/group_pushdown.js56
1 files changed, 23 insertions, 33 deletions
diff --git a/jstests/noPassthroughWithMongod/group_pushdown.js b/jstests/noPassthroughWithMongod/group_pushdown.js
index 0a2c0716de5..cb5743bfd1e 100644
--- a/jstests/noPassthroughWithMongod/group_pushdown.js
+++ b/jstests/noPassthroughWithMongod/group_pushdown.js
@@ -8,7 +8,7 @@ load("jstests/libs/analyze_plan.js");
load("jstests/libs/sbe_util.js"); // For checkSBEEnabled.
if (!checkSBEEnabled(db)) {
- jsTestLog("Skipping test because SBE is not enabled");
+ jsTestLog("Skipping test because the sbe group pushdown feature flag is disabled");
return;
}
@@ -185,38 +185,28 @@ assertResultsMatchWithAndWithoutPushdown(
],
1);
-// Computed projections are only eligible for pushdown into SBE when SBE is fully enabled.
-// Additionally, $group stages with dotted fields may only be eligible for pushdown when SBE is
-// fully enabled as dependancy analysis may produce a dotted projection, which are not currently
-// supported in mainline SBE.
-const sbeFull = checkSBEEnabled(db, ["featureFlagSbeFull"]);
-if (sbeFull) {
- // The $group stage refers to two existing sub-fields.
- assertResultsMatchWithAndWithoutPushdown(
- coll,
- [
- {
- $project:
- {item: 1, price: 1, quantity: 1, dateParts: {$dateToParts: {date: "$date"}}}
- },
- {
- $group: {
- _id: "$item",
- hs: {$sum:
- {$add: ["$dateParts.hour", "$dateParts.hour", "$dateParts.minute"]}}
- }
- },
- ],
- [{"_id": "a", "hs": 39}, {"_id": "b", "hs": 34}, {"_id": "c", "hs": 23}],
- 1);
-
- // The $group stage refers to a non-existing sub-field twice.
- assertResultsMatchWithAndWithoutPushdown(
- coll,
- [{$group: {_id: "$item", hs: {$sum: {$add: ["$date.hour", "$date.hour"]}}}}],
- [{"_id": "a", "hs": 0}, {"_id": "b", "hs": 0}, {"_id": "c", "hs": 0}],
- 1);
-}
+// The $group stage refers to two existing sub-fields.
+assertResultsMatchWithAndWithoutPushdown(
+ coll,
+ [
+ {$project: {item: 1, price: 1, quantity: 1, dateParts: {$dateToParts: {date: "$date"}}}},
+ {
+ $group: {
+ _id: "$item",
+ hs: {$sum: {$add: ["$dateParts.hour", "$dateParts.hour", "$dateParts.minute"]}}
+ }
+ },
+ ],
+ [{"_id": "a", "hs": 39}, {"_id": "b", "hs": 34}, {"_id": "c", "hs": 23}],
+ 1);
+
+// The $group stage refers to a non-existing sub-field twice.
+assertResultsMatchWithAndWithoutPushdown(
+ coll,
+ [{$group: {_id: "$item", hs: {$sum: {$add: ["$date.hour", "$date.hour"]}}}}],
+ [{"_id": "a", "hs": 0}, {"_id": "b", "hs": 0}, {"_id": "c", "hs": 0}],
+ 1);
+
// Two group stages both get pushed down and the second $group stage refers to only existing
// top-level fields of the first $group. The field name may be one of "result" / "recordId" /
// "returnKey" / "snapshotId" / "indexId" / "indexKey" / "indexKeyPattern" which are reserved names