From ec7ad45b2b8d2ffb8b2f7aa931db8c5a47b85b18 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Thu, 17 Nov 2022 17:37:45 +0800 Subject: [PATCH] fix(query): fix a typo. --- source/libs/function/src/detail/tavgfunction.c | 6 ++---- source/libs/qworker/src/qwUtil.c | 4 ++-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/source/libs/function/src/detail/tavgfunction.c b/source/libs/function/src/detail/tavgfunction.c index d7ef73b08e..744927d6c8 100644 --- a/source/libs/function/src/detail/tavgfunction.c +++ b/source/libs/function/src/detail/tavgfunction.c @@ -31,7 +31,7 @@ do { \ T* plist = (T*)pCol->pData; \ for (int32_t i = start; i < numOfRows + pInput->startRowIndex; ++i) { \ - if (pCol->hasNull && colDataIsNull_f(pCol->nullbitmap, i)) { \ + if (colDataIsNull_f(pCol->nullbitmap, i)) { \ continue; \ } \ \ @@ -661,8 +661,6 @@ int32_t avgInvertFunction(SqlFunctionCtx* pCtx) { // Only the pre-computing information loaded and actual data does not loaded SInputColumnInfoData* pInput = &pCtx->input; - int32_t type = pInput->pData[0]->info.type; - SAvgRes* pAvgRes = GET_ROWCELL_INTERBUF(GET_RES_INFO(pCtx)); // computing based on the true data block @@ -671,7 +669,7 @@ int32_t avgInvertFunction(SqlFunctionCtx* pCtx) { int32_t start = pInput->startRowIndex; int32_t numOfRows = pInput->numOfRows; - switch (type) { + switch (pCol->info.type) { case TSDB_DATA_TYPE_TINYINT: { LIST_AVG_N(pAvgRes->sum.isum, int8_t); break; diff --git a/source/libs/qworker/src/qwUtil.c b/source/libs/qworker/src/qwUtil.c index e9ded9b269..80a0a6e0ae 100644 --- a/source/libs/qworker/src/qwUtil.c +++ b/source/libs/qworker/src/qwUtil.c @@ -275,7 +275,7 @@ void qwFreeTaskHandle(qTaskInfo_t *taskHandle) { qTaskInfo_t otaskHandle = atomic_load_ptr(taskHandle); if (otaskHandle && atomic_val_compare_exchange_ptr(taskHandle, otaskHandle, NULL)) { qDestroyTask(otaskHandle); - qDebug("task handle destryed"); + qDebug("task handle destroyed"); } } @@ -306,7 +306,7 @@ void qwFreeTaskCtx(SQWTaskCtx *ctx) { if (ctx->sinkHandle) { dsDestroyDataSinker(ctx->sinkHandle); ctx->sinkHandle = NULL; - qDebug("sink handle destryed"); + qDebug("sink handle destroyed"); } } -- GitLab