fix: fix count VAR type column error cause of reading

incoorect sma results
This commit is contained in:
Ganlin Zhao 2022-12-06 00:29:38 -08:00
parent 302a713f72
commit 2cc58eebd3
1 changed files with 1 additions and 1 deletions

View File

@ -501,7 +501,7 @@ static int32_t getNumOfElems(SqlFunctionCtx* pCtx) {
*/
SInputColumnInfoData* pInput = &pCtx->input;
SColumnInfoData* pInputCol = pInput->pData[0];
if (pInput->colDataSMAIsSet && pInput->totalRows == pInput->numOfRows) {
if (pInput->colDataSMAIsSet && pInput->totalRows == pInput->numOfRows && !IS_VAR_DATA_TYPE(pInputCol->info.type)) {
numOfElem = pInput->numOfRows - pInput->pColumnDataAgg[0]->numOfNull;
ASSERT(numOfElem >= 0);
} else {