fix coverity
This commit is contained in:
parent
b53a51e5e7
commit
d03058aff8
|
@ -5369,9 +5369,12 @@ int32_t modeFinalize(SqlFunctionCtx* pCtx, SSDataBlock* pBlock) {
|
|||
}
|
||||
}
|
||||
|
||||
ASSERT(resIndex >= 0);
|
||||
SModeItem* pResItem = (SModeItem*)(pInfo->pItems + resIndex * (sizeof(SModeItem) + pInfo->colBytes));
|
||||
colDataAppend(pCol, currentRow, pResItem->data, (maxCount == 0) ? true : false);
|
||||
if (maxCount != 0) {
|
||||
SModeItem* pResItem = (SModeItem*)(pInfo->pItems + resIndex * (sizeof(SModeItem) + pInfo->colBytes));
|
||||
colDataAppend(pCol, currentRow, pResItem->data, false);
|
||||
} else {
|
||||
colDataAppendNULL(pCol, currentRow);
|
||||
}
|
||||
|
||||
return pResInfo->numOfRes;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue