Merge pull request #18742 from taosdata/fix/TD-20906
fix: fix count VAR type column error cause of reading incorrect sma results
This commit is contained in:
commit
5b8294122a
|
@ -504,7 +504,7 @@ static int32_t getNumOfElems(SqlFunctionCtx* pCtx) {
|
||||||
*/
|
*/
|
||||||
SInputColumnInfoData* pInput = &pCtx->input;
|
SInputColumnInfoData* pInput = &pCtx->input;
|
||||||
SColumnInfoData* pInputCol = pInput->pData[0];
|
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;
|
numOfElem = pInput->numOfRows - pInput->pColumnDataAgg[0]->numOfNull;
|
||||||
ASSERT(numOfElem >= 0);
|
ASSERT(numOfElem >= 0);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue