summaryrefslogtreecommitdiff
path: root/src/mongo/db/pipeline
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/pipeline')
-rw-r--r--src/mongo/db/pipeline/accumulator_locf.cpp2
-rw-r--r--src/mongo/db/pipeline/accumulator_multi.cpp25
-rw-r--r--src/mongo/db/pipeline/document_source_densify.cpp2
-rw-r--r--src/mongo/db/pipeline/expression.cpp3
-rw-r--r--src/mongo/db/pipeline/window_function/window_function_expression.cpp16
5 files changed, 23 insertions, 25 deletions
diff --git a/src/mongo/db/pipeline/accumulator_locf.cpp b/src/mongo/db/pipeline/accumulator_locf.cpp
index bca58eff3a2..acd97927975 100644
--- a/src/mongo/db/pipeline/accumulator_locf.cpp
+++ b/src/mongo/db/pipeline/accumulator_locf.cpp
@@ -42,7 +42,7 @@ REGISTER_WINDOW_FUNCTION_CONDITIONALLY(
locf,
mongo::window_function::ExpressionFromLeftUnboundedWindowFunction<AccumulatorLocf>::parse,
feature_flags::gFeatureFlagLocf.getVersion(),
- AllowedWithApiStrict::kNeverInVersion1,
+ AllowedWithApiStrict::kAlways,
feature_flags::gFeatureFlagLocf.isEnabledAndIgnoreFCV());
AccumulatorLocf::AccumulatorLocf(ExpressionContext* const expCtx)
diff --git a/src/mongo/db/pipeline/accumulator_multi.cpp b/src/mongo/db/pipeline/accumulator_multi.cpp
index 8affcdefb2c..db945bff6ec 100644
--- a/src/mongo/db/pipeline/accumulator_multi.cpp
+++ b/src/mongo/db/pipeline/accumulator_multi.cpp
@@ -38,88 +38,87 @@ using MinMaxSense = AccumulatorMinMax::Sense;
// Register macros for the various accumulators/expressions in this file. Note that we check
// 'isEnabledAndIgnoreFCV()' because the feature flag is a property set at startup, while FCV can
// change while the server is running.
-// TODO SERVER-61855 Add these accumulators/expressions to the stable API.
REGISTER_ACCUMULATOR_CONDITIONALLY(
maxN,
AccumulatorMinMaxN::parseMinMaxN<MinMaxSense::kMax>,
- AllowedWithApiStrict::kNeverInVersion1,
+ AllowedWithApiStrict::kAlways,
AllowedWithClientType::kAny,
feature_flags::gFeatureFlagExactTopNAccumulator.getVersion(),
feature_flags::gFeatureFlagExactTopNAccumulator.isEnabledAndIgnoreFCV());
REGISTER_ACCUMULATOR_CONDITIONALLY(
minN,
AccumulatorMinMaxN::parseMinMaxN<MinMaxSense::kMin>,
- AllowedWithApiStrict::kNeverInVersion1,
+ AllowedWithApiStrict::kAlways,
AllowedWithClientType::kAny,
feature_flags::gFeatureFlagExactTopNAccumulator.getVersion(),
feature_flags::gFeatureFlagExactTopNAccumulator.isEnabledAndIgnoreFCV());
REGISTER_EXPRESSION_CONDITIONALLY(
maxN,
AccumulatorMinMaxN::parseExpression<MinMaxSense::kMax>,
- AllowedWithApiStrict::kNeverInVersion1,
+ AllowedWithApiStrict::kAlways,
AllowedWithClientType::kAny,
feature_flags::gFeatureFlagExactTopNAccumulator.getVersion(),
feature_flags::gFeatureFlagExactTopNAccumulator.isEnabledAndIgnoreFCV());
REGISTER_EXPRESSION_CONDITIONALLY(
minN,
AccumulatorMinMaxN::parseExpression<MinMaxSense::kMin>,
- AllowedWithApiStrict::kNeverInVersion1,
+ AllowedWithApiStrict::kAlways,
AllowedWithClientType::kAny,
feature_flags::gFeatureFlagExactTopNAccumulator.getVersion(),
feature_flags::gFeatureFlagExactTopNAccumulator.isEnabledAndIgnoreFCV());
REGISTER_ACCUMULATOR_CONDITIONALLY(
firstN,
AccumulatorFirstLastN::parseFirstLastN<FirstLastSense::kFirst>,
- AllowedWithApiStrict::kNeverInVersion1,
+ AllowedWithApiStrict::kAlways,
AllowedWithClientType::kAny,
feature_flags::gFeatureFlagExactTopNAccumulator.getVersion(),
feature_flags::gFeatureFlagExactTopNAccumulator.isEnabledAndIgnoreFCV());
REGISTER_ACCUMULATOR_CONDITIONALLY(
lastN,
AccumulatorFirstLastN::parseFirstLastN<FirstLastSense::kLast>,
- AllowedWithApiStrict::kNeverInVersion1,
+ AllowedWithApiStrict::kAlways,
AllowedWithClientType::kAny,
feature_flags::gFeatureFlagExactTopNAccumulator.getVersion(),
feature_flags::gFeatureFlagExactTopNAccumulator.isEnabledAndIgnoreFCV());
REGISTER_EXPRESSION_CONDITIONALLY(
firstN,
AccumulatorFirstLastN::parseExpression<FirstLastSense::kFirst>,
- AllowedWithApiStrict::kNeverInVersion1,
+ AllowedWithApiStrict::kAlways,
AllowedWithClientType::kAny,
feature_flags::gFeatureFlagExactTopNAccumulator.getVersion(),
feature_flags::gFeatureFlagExactTopNAccumulator.isEnabledAndIgnoreFCV());
REGISTER_EXPRESSION_CONDITIONALLY(
lastN,
AccumulatorFirstLastN::parseExpression<FirstLastSense::kLast>,
- AllowedWithApiStrict::kNeverInVersion1,
+ AllowedWithApiStrict::kAlways,
AllowedWithClientType::kAny,
feature_flags::gFeatureFlagExactTopNAccumulator.getVersion(),
feature_flags::gFeatureFlagExactTopNAccumulator.isEnabledAndIgnoreFCV());
REGISTER_ACCUMULATOR_CONDITIONALLY(
topN,
(AccumulatorTopBottomN<TopBottomSense::kTop, false>::parseTopBottomN),
- AllowedWithApiStrict::kNeverInVersion1,
+ AllowedWithApiStrict::kAlways,
AllowedWithClientType::kAny,
feature_flags::gFeatureFlagExactTopNAccumulator.getVersion(),
feature_flags::gFeatureFlagExactTopNAccumulator.isEnabledAndIgnoreFCV());
REGISTER_ACCUMULATOR_CONDITIONALLY(
bottomN,
(AccumulatorTopBottomN<TopBottomSense::kBottom, false>::parseTopBottomN),
- AllowedWithApiStrict::kNeverInVersion1,
+ AllowedWithApiStrict::kAlways,
AllowedWithClientType::kAny,
feature_flags::gFeatureFlagExactTopNAccumulator.getVersion(),
feature_flags::gFeatureFlagExactTopNAccumulator.isEnabledAndIgnoreFCV());
REGISTER_ACCUMULATOR_CONDITIONALLY(
top,
(AccumulatorTopBottomN<TopBottomSense::kTop, true>::parseTopBottomN),
- AllowedWithApiStrict::kNeverInVersion1,
+ AllowedWithApiStrict::kAlways,
AllowedWithClientType::kAny,
feature_flags::gFeatureFlagExactTopNAccumulator.getVersion(),
feature_flags::gFeatureFlagExactTopNAccumulator.isEnabledAndIgnoreFCV());
REGISTER_ACCUMULATOR_CONDITIONALLY(
bottom,
(AccumulatorTopBottomN<TopBottomSense::kBottom, true>::parseTopBottomN),
- AllowedWithApiStrict::kNeverInVersion1,
+ AllowedWithApiStrict::kAlways,
AllowedWithClientType::kAny,
feature_flags::gFeatureFlagExactTopNAccumulator.getVersion(),
feature_flags::gFeatureFlagExactTopNAccumulator.isEnabledAndIgnoreFCV());
diff --git a/src/mongo/db/pipeline/document_source_densify.cpp b/src/mongo/db/pipeline/document_source_densify.cpp
index b9dd817aaff..0325dbaa775 100644
--- a/src/mongo/db/pipeline/document_source_densify.cpp
+++ b/src/mongo/db/pipeline/document_source_densify.cpp
@@ -123,7 +123,7 @@ RangeStatement RangeStatement::parse(RangeSpec spec) {
REGISTER_DOCUMENT_SOURCE_WITH_MIN_VERSION(densify,
LiteParsedDocumentSourceDefault::parse,
document_source_densify::createFromBson,
- AllowedWithApiStrict::kNeverInVersion1,
+ AllowedWithApiStrict::kAlways,
multiversion::FeatureCompatibilityVersion::kVersion_5_1)
REGISTER_DOCUMENT_SOURCE_CONDITIONALLY(_internalDensify,
diff --git a/src/mongo/db/pipeline/expression.cpp b/src/mongo/db/pipeline/expression.cpp
index 312897296ea..76ec9a5debb 100644
--- a/src/mongo/db/pipeline/expression.cpp
+++ b/src/mongo/db/pipeline/expression.cpp
@@ -4617,10 +4617,9 @@ Value ExpressionSortArray::evaluate(const Document& root, Variables* variables)
return Value(array);
}
-// TODO: SERVER-61855 Add the expression to the stable API with others that have been introduced.
REGISTER_EXPRESSION_CONDITIONALLY(sortArray,
ExpressionSortArray::parse,
- AllowedWithApiStrict::kNeverInVersion1,
+ AllowedWithApiStrict::kAlways,
AllowedWithClientType::kAny,
feature_flags::gFeatureFlagSortArray.getVersion(),
feature_flags::gFeatureFlagSortArray.isEnabledAndIgnoreFCV());
diff --git a/src/mongo/db/pipeline/window_function/window_function_expression.cpp b/src/mongo/db/pipeline/window_function/window_function_expression.cpp
index 69841e7abe1..54f0552b59b 100644
--- a/src/mongo/db/pipeline/window_function/window_function_expression.cpp
+++ b/src/mongo/db/pipeline/window_function/window_function_expression.cpp
@@ -66,51 +66,51 @@ REGISTER_WINDOW_FUNCTION_CONDITIONALLY(
minN,
(ExpressionN<WindowFunctionMinN, AccumulatorMinN>::parse),
feature_flags::gFeatureFlagExactTopNAccumulator.getVersion(),
- AllowedWithApiStrict::kNeverInVersion1,
+ AllowedWithApiStrict::kAlways,
feature_flags::gFeatureFlagExactTopNAccumulator.isEnabledAndIgnoreFCV());
REGISTER_WINDOW_FUNCTION_CONDITIONALLY(
maxN,
(ExpressionN<WindowFunctionMaxN, AccumulatorMaxN>::parse),
feature_flags::gFeatureFlagExactTopNAccumulator.getVersion(),
- AllowedWithApiStrict::kNeverInVersion1,
+ AllowedWithApiStrict::kAlways,
feature_flags::gFeatureFlagExactTopNAccumulator.isEnabledAndIgnoreFCV());
REGISTER_WINDOW_FUNCTION_CONDITIONALLY(
firstN,
(ExpressionN<WindowFunctionFirstN, AccumulatorFirstN>::parse),
feature_flags::gFeatureFlagExactTopNAccumulator.getVersion(),
- AllowedWithApiStrict::kNeverInVersion1,
+ AllowedWithApiStrict::kAlways,
feature_flags::gFeatureFlagExactTopNAccumulator.isEnabledAndIgnoreFCV());
REGISTER_WINDOW_FUNCTION_CONDITIONALLY(
lastN,
(ExpressionN<WindowFunctionLastN, AccumulatorLastN>::parse),
feature_flags::gFeatureFlagExactTopNAccumulator.getVersion(),
- AllowedWithApiStrict::kNeverInVersion1,
+ AllowedWithApiStrict::kAlways,
feature_flags::gFeatureFlagExactTopNAccumulator.isEnabledAndIgnoreFCV());
REGISTER_WINDOW_FUNCTION_CONDITIONALLY(
topN,
(ExpressionN<WindowFunctionTopN, AccumulatorTopBottomN<TopBottomSense::kTop, false>>::parse),
feature_flags::gFeatureFlagExactTopNAccumulator.getVersion(),
- AllowedWithApiStrict::kNeverInVersion1,
+ AllowedWithApiStrict::kAlways,
feature_flags::gFeatureFlagExactTopNAccumulator.isEnabledAndIgnoreFCV());
REGISTER_WINDOW_FUNCTION_CONDITIONALLY(
bottomN,
(ExpressionN<WindowFunctionBottomN,
AccumulatorTopBottomN<TopBottomSense::kBottom, false>>::parse),
feature_flags::gFeatureFlagExactTopNAccumulator.getVersion(),
- AllowedWithApiStrict::kNeverInVersion1,
+ AllowedWithApiStrict::kAlways,
feature_flags::gFeatureFlagExactTopNAccumulator.isEnabledAndIgnoreFCV());
REGISTER_WINDOW_FUNCTION_CONDITIONALLY(
top,
(ExpressionN<WindowFunctionTop, AccumulatorTopBottomN<TopBottomSense::kTop, true>>::parse),
feature_flags::gFeatureFlagExactTopNAccumulator.getVersion(),
- AllowedWithApiStrict::kNeverInVersion1,
+ AllowedWithApiStrict::kAlways,
feature_flags::gFeatureFlagExactTopNAccumulator.isEnabledAndIgnoreFCV());
REGISTER_WINDOW_FUNCTION_CONDITIONALLY(
bottom,
(ExpressionN<WindowFunctionBottom,
AccumulatorTopBottomN<TopBottomSense::kBottom, true>>::parse),
feature_flags::gFeatureFlagExactTopNAccumulator.getVersion(),
- AllowedWithApiStrict::kNeverInVersion1,
+ AllowedWithApiStrict::kAlways,
feature_flags::gFeatureFlagExactTopNAccumulator.isEnabledAndIgnoreFCV());
StringMap<Expression::ExpressionParserRegistration> Expression::parserMap;