summaryrefslogtreecommitdiff
path: root/jstests/aggregation/sources/densify/libs/parse_util.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/aggregation/sources/densify/libs/parse_util.js')
-rw-r--r--jstests/aggregation/sources/densify/libs/parse_util.js23
1 files changed, 8 insertions, 15 deletions
diff --git a/jstests/aggregation/sources/densify/libs/parse_util.js b/jstests/aggregation/sources/densify/libs/parse_util.js
index 355e3aef436..7ccedefd81d 100644
--- a/jstests/aggregation/sources/densify/libs/parse_util.js
+++ b/jstests/aggregation/sources/densify/libs/parse_util.js
@@ -9,14 +9,6 @@ let parseUtil = (function(db, coll, stageName, options = {}) {
}
function runTest(stageName) {
- const featureEnabled =
- assert.commandWorked(db.adminCommand({getParameter: 1, featureFlagDensify: 1}))
- .featureFlagDensify.value;
- if (!featureEnabled) {
- jsTestLog("Skipping test because the densify feature flag is disabled");
- return;
- }
-
// Required fields.
const kIDLRequiredFieldErrorCode = 40414;
assert.commandFailedWithCode(
@@ -53,7 +45,7 @@ let parseUtil = (function(db, coll, stageName, options = {}) {
field: "a",
range: {
step: 1.0,
- bounds: [new Date("2020-01-01"), new Date("2020-01-02")],
+ bounds: [new ISODate("2020-01-01"), new ISODate("2020-01-02")],
unit: 1000
}
}
@@ -67,7 +59,7 @@ let parseUtil = (function(db, coll, stageName, options = {}) {
run({
[stageName]: {
field: "a",
- range: {step: 1.0, bounds: [new Date("2020-01-01")], unit: "second"}
+ range: {step: 1.0, bounds: [new ISODate("2020-01-01")], unit: "second"}
}
}),
5733403,
@@ -118,7 +110,7 @@ let parseUtil = (function(db, coll, stageName, options = {}) {
field: "a",
range: {
step: 1.0,
- bounds: [new Date("2020-01-01"), new Date("2019-01-01")],
+ bounds: [new ISODate("2020-01-01"), new ISODate("2019-01-01")],
unit: "second"
}
}
@@ -133,7 +125,8 @@ let parseUtil = (function(db, coll, stageName, options = {}) {
// Mixed numeric and date bounds
assert.commandFailedWithCode(
run({
- [stageName]: {field: "a", range: {step: 1.0, bounds: [1, new Date("2020-01-01")]}}
+ [stageName]:
+ {field: "a", range: {step: 1.0, bounds: [1, new ISODate("2020-01-01")]}}
}),
5733406,
"a bounding array must contain either both dates or both numeric types");
@@ -141,7 +134,7 @@ let parseUtil = (function(db, coll, stageName, options = {}) {
run({
[stageName]: {
field: "a",
- range: {step: 1.0, bounds: [new Date("2020-01-01"), 1], unit: "second"}
+ range: {step: 1.0, bounds: [new ISODate("2020-01-01"), 1], unit: "second"}
}
}),
5733402,
@@ -154,7 +147,7 @@ let parseUtil = (function(db, coll, stageName, options = {}) {
field: "a",
range: {
step: 1.0,
- bounds: [new Date("2020-01-01"), new Date("2021-01-01")],
+ bounds: [new ISODate("2020-01-01"), new ISODate("2021-01-01")],
unit: "day"
}
}
@@ -165,7 +158,7 @@ let parseUtil = (function(db, coll, stageName, options = {}) {
partitionByFields: ["b", "c"],
range: {
step: 1.0,
- bounds: [new Date("2020-01-01"), new Date("2021-01-01")],
+ bounds: [new ISODate("2020-01-01"), new ISODate("2021-01-01")],
unit: "week"
}
}