diff --git a/include/libs/function/function.h b/include/libs/function/function.h index bad8e042a36fef6e24235ed582d7568d01a2f984..32db6773e07ce61ad1ef100713b3bb696a36f09d 100644 --- a/include/libs/function/function.h +++ b/include/libs/function/function.h @@ -153,11 +153,6 @@ typedef struct SqlFunctionCtx { SSerializeDataHandle saveHandle; int32_t exprIdx; char udfName[TSDB_FUNC_NAME_LEN]; - int64_t smaHits; - int64_t smaNoHits; - int64_t smaNoHitsRows; - int64_t sdHits; - int64_t sdHitsRows; } SqlFunctionCtx; typedef struct tExprNode { diff --git a/source/libs/executor/inc/executorimpl.h b/source/libs/executor/inc/executorimpl.h index b50a22ed6797e212e9fd7d834b9e5f0da0ee5b82..e63c00af1e2522eacc806d33f11dff30c397ebc4 100644 --- a/source/libs/executor/inc/executorimpl.h +++ b/source/libs/executor/inc/executorimpl.h @@ -231,14 +231,7 @@ typedef struct SOperatorInfo { int64_t downstreamTime; int64_t funcInitTime; int64_t funcExecTime; - int64_t funcExecCalled; - int64_t totalNumOfRows; int64_t funcFinTime; - int64_t smaHits; - int64_t smaNoHits; - int64_t smaNoHitsRows; - int64_t sdHits; - int64_t sdHitsRows; } SOperatorInfo; typedef enum { diff --git a/source/libs/executor/src/executil.c b/source/libs/executor/src/executil.c index b2f48042aa80745e39243bfed4e3d13a3cab8d8e..3c4cafb753ce28110bf5a6f783bf03f36d8c2b93 100644 --- a/source/libs/executor/src/executil.c +++ b/source/libs/executor/src/executil.c @@ -1543,11 +1543,6 @@ SqlFunctionCtx* createSqlFunctionCtx(SExprInfo* pExprInfo, int32_t numOfOutput, pCtx->numOfParams = pExpr->base.numOfParams; pCtx->param = pFunct->pParam; pCtx->saveHandle.currentPage = -1; - pCtx->smaHits = 0; - pCtx->smaNoHits = 0; - pCtx->smaNoHitsRows = 0; - pCtx->sdHits = 0; - pCtx->sdHitsRows = 0; } for (int32_t i = 1; i < numOfOutput; ++i) { diff --git a/source/libs/executor/src/executorimpl.c b/source/libs/executor/src/executorimpl.c index b02c9c1d574b4dd3c20159e91e0337bfbdf382dd..e38cfb52850824261715b596e4834885cc1c55e4 100644 --- a/source/libs/executor/src/executorimpl.c +++ b/source/libs/executor/src/executorimpl.c @@ -520,14 +520,7 @@ static int32_t doAggregateImpl(SOperatorInfo* pOperator, SqlFunctionCtx* pCtx) { int64_t st = taosGetTimestampUs(); int32_t code = pCtx[k].fpSet.process(&pCtx[k]); - pOperator->funcExecCalled += 1; - pOperator->totalNumOfRows += pCtx->input.numOfRows; pOperator->funcExecTime += taosGetTimestampUs() - st; - pOperator->smaHits = pCtx->smaHits; - pOperator->smaNoHits = pCtx->smaNoHits; - pOperator->smaNoHitsRows = pCtx->smaNoHitsRows; - pOperator->sdHits = pCtx->sdHits; - pOperator->sdHitsRows = pCtx->sdHitsRows; if (code != TSDB_CODE_SUCCESS) { qError("%s aggregate function error happens, code: %s", GET_TASKID(pOperator->pTaskInfo), tstrerror(code)); return code; @@ -1715,10 +1708,8 @@ void destroyOperatorInfo(SOperatorInfo* pOperator) { double init = (double)pOperator->funcInitTime / 1000000; double exec = (double)pOperator->funcExecTime / 1000000; double fin = (double)pOperator->funcFinTime / 1000000; - qError("operator: %s, downstream time:%lf, init time:%lf, exec time:%lf, exec called:%ld, fin time:%lf, total rows:%ld", - pOperator->name, downstream, init, exec, pOperator->funcExecCalled, fin, pOperator->totalNumOfRows); - qError("operator: %s, sma hits:%ld, sma nohits:%ld, sma nohits rows:%ld, second stage hits:%ld, second stage hits rows:%ld", - pOperator->name, pOperator->smaHits, pOperator->smaNoHits, pOperator->smaNoHitsRows, pOperator->sdHits, pOperator->sdHitsRows); + qError("operator: %s, downstream time:%lf, init time:%lf, exec time:%lf, fin time:%lf", + pOperator->name, downstream, init, exec, fin); } if (pOperator->fpSet.closeFn != NULL) { @@ -1940,14 +1931,7 @@ SOperatorInfo* createAggregateOperatorInfo(SOperatorInfo* downstream, SAggPhysiN pOperator->downstreamTime = 0; pOperator->funcInitTime = 0; pOperator->funcExecTime = 0; - pOperator->funcExecCalled = 0; pOperator->funcFinTime = 0; - pOperator->totalNumOfRows = 0; - pOperator->smaHits = 0; - pOperator->smaNoHits = 0; - pOperator->smaNoHitsRows = 0; - pOperator->sdHits = 0; - pOperator->sdHitsRows= 0; if (downstream->operatorType == QUERY_NODE_PHYSICAL_PLAN_TABLE_SCAN) { STableScanInfo* pTableScanInfo = downstream->info; diff --git a/source/libs/function/src/builtinsimpl.c b/source/libs/function/src/builtinsimpl.c index bf4ca7d01e328f723ce1863b490b2b239894dcc5..68b29875183e621a1a4c6fbfe039640c08aa8eb1 100644 --- a/source/libs/function/src/builtinsimpl.c +++ b/source/libs/function/src/builtinsimpl.c @@ -1614,7 +1614,6 @@ int32_t percentileFunction(SqlFunctionCtx* pCtx) { } pInfo->numOfElems += (pInput->numOfRows - pAgg->numOfNull); - pCtx->smaHits += 1; } else { // check the valid data one by one int32_t start = pInput->startRowIndex; @@ -1637,8 +1636,6 @@ int32_t percentileFunction(SqlFunctionCtx* pCtx) { pInfo->numOfElems += 1; } - pCtx->smaNoHits += 1; - pCtx->smaNoHitsRows += pInput->numOfRows; } } else { // the second stage, calculate the true percentile value @@ -1658,8 +1655,6 @@ int32_t percentileFunction(SqlFunctionCtx* pCtx) { } SET_VAL(pResInfo, numOfElems, 1); - pCtx->sdHits += 1; - pCtx->sdHitsRows += pInput->numOfRows; } return TSDB_CODE_SUCCESS;