From 6f121e9df0a72b26719b5f9409fea947b83a80eb Mon Sep 17 00:00:00 2001 From: Ganlin Zhao Date: Tue, 8 Mar 2022 14:22:21 +0800 Subject: [PATCH] [TD-11216]: Time window related keywords --- src/query/src/qAggMain.c | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/src/query/src/qAggMain.c b/src/query/src/qAggMain.c index a3dbb32868..7c227a65a0 100644 --- a/src/query/src/qAggMain.c +++ b/src/query/src/qAggMain.c @@ -5662,14 +5662,6 @@ static void wduration_function(SQLFunctionCtx *pCtx) { *(int64_t *)(pCtx->pOutput) = duration; } -static void tswin_function_finalizer(SQLFunctionCtx *pCtx) { - SET_VAL(pCtx, pCtx->size, 1); - if (pCtx->stableQuery) { - *(int64_t *)(pCtx->pOutput) = *(int64_t *)pCtx->pInput; - } - doFinalizer(pCtx); -} - ///////////////////////////////////////////////////////////////////////////////////////////// /* * function compatible list. @@ -6209,8 +6201,8 @@ SAggFunctionInfo aAggs[TSDB_FUNC_MAX_NUM] = {{ TSDB_BASE_FUNC_SO | TSDB_FUNCSTATE_SELECTIVITY, function_setup, wstart_function, - tswin_function_finalizer, - noop1, + doFinalizer, + copy_function, dataBlockRequired, }, { @@ -6221,8 +6213,8 @@ SAggFunctionInfo aAggs[TSDB_FUNC_MAX_NUM] = {{ TSDB_BASE_FUNC_SO | TSDB_FUNCSTATE_SELECTIVITY, function_setup, wstop_function, - tswin_function_finalizer, - noop1, + doFinalizer, + copy_function, dataBlockRequired, }, { @@ -6233,8 +6225,8 @@ SAggFunctionInfo aAggs[TSDB_FUNC_MAX_NUM] = {{ TSDB_BASE_FUNC_SO | TSDB_FUNCSTATE_SELECTIVITY, function_setup, wduration_function, - tswin_function_finalizer, - noop1, + doFinalizer, + copy_function, dataBlockRequired, } }; -- GitLab