fix:[TD-31828] fix crash in mode function.

This commit is contained in:
Jing Sima 2024-09-02 10:25:23 +08:00
parent 222979402d
commit c2d9178bf0
1 changed files with 2 additions and 0 deletions

View File

@ -551,6 +551,8 @@ int32_t setResultRowInitCtx(SResultRow* pResult, SqlFunctionCtx* pCtx, int32_t n
if (code != TSDB_CODE_SUCCESS && fmIsUserDefinedFunc(pCtx[i].functionId)) {
pResInfo->initialized = false;
return TSDB_CODE_UDF_FUNC_EXEC_FAILURE;
} else if (code != TSDB_CODE_SUCCESS) {
return code;
}
} else {
pResInfo->initialized = true;