add assert as condition should not be true

This commit is contained in:
Bomin Zhang 2020-06-28 18:18:48 +08:00
parent f007bdf8f6
commit 51439cb76f
2 changed files with 2 additions and 0 deletions

View File

@ -316,6 +316,7 @@ void tscCreateLocalReducer(tExtMemBuffer **pMemBuffer, int32_t numOfBuffer, tOrd
pReducer->finalRowSize = tscGetResRowLength(pQueryInfo->exprList);
pReducer->resColModel = finalmodel;
pReducer->resColModel->capacity = pReducer->nResultBufSize;
assert(pReducer->finalRowSize > 0);
if (pReducer->finalRowSize > 0) {
pReducer->resColModel->capacity /= pReducer->finalRowSize;
}

View File

@ -936,6 +936,7 @@ static SJoinSupporter* tscUpdateSubqueryStatus(SSqlObj* pSql, int32_t numOfFetch
}
}
assert(pState != NULL);
if (pState != NULL) {
pState->numOfTotal = pSql->numOfSubs;
pState->numOfRemain = numOfFetch;