diff options
author | Ruoxin Xu <ruoxin.xu@mongodb.com> | 2021-05-04 11:43:44 +0100 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-05-04 20:38:27 +0000 |
commit | e6981fb1f4eade2e07a971af7663f6cbc436be15 (patch) | |
tree | 13cc22b7edc8ecddda5b9b62d0ce4e5ab061400e /src/mongo | |
parent | 30e8a51186bc02cd4b4003ddaaa9d2764d5d797a (diff) | |
download | mongo-e6981fb1f4eade2e07a971af7663f6cbc436be15.tar.gz |
SERVER-54246 $integral over time-based window
Diffstat (limited to 'src/mongo')
-rw-r--r-- | src/mongo/db/pipeline/window_function/window_function_exec.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mongo/db/pipeline/window_function/window_function_exec.cpp b/src/mongo/db/pipeline/window_function/window_function_exec.cpp index 0f144f930da..2bbb520dfa7 100644 --- a/src/mongo/db/pipeline/window_function/window_function_exec.cpp +++ b/src/mongo/db/pipeline/window_function/window_function_exec.cpp @@ -145,17 +145,19 @@ std::unique_ptr<WindowFunctionExec> WindowFunctionExec::create( part.fieldPath != boost::none && !part.expression); auto sortByExpr = ExpressionFieldPath::createPathFromString( expCtx, part.fieldPath->fullPath(), expCtx->variablesParseState); + + auto inputExpr = translateInputExpression(functionStmt.expr, sortBy); if (stdx::holds_alternative<WindowBounds::Unbounded>(rangeBounds.lower)) { return std::make_unique<WindowFunctionExecNonRemovableRange>( iter, - functionStmt.expr->input(), + inputExpr, std::move(sortByExpr), functionStmt.expr->buildAccumulatorOnly(), bounds); } else { return std::make_unique<WindowFunctionExecRemovableRange>( iter, - functionStmt.expr->input(), + inputExpr, std::move(sortByExpr), functionStmt.expr->buildRemovable(), bounds); |