diff --git a/source/libs/function/src/detail/tavgfunction.c b/source/libs/function/src/detail/tavgfunction.c index d7ef73b08ea571984150e418dbd16785e967d5ea..744927d6c8413218dfd4db47700a30b2f33a3ea3 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 e9ded9b269bba34d366c3a0a20f01cce4e83b10e..80a0a6e0ae50ce402ebd6b7bdbf156a8f74df3e1 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"); } }