diff --git a/source/libs/executor/src/dataDeleter.c b/source/libs/executor/src/dataDeleter.c index d693faf7f14e90399c4c2393f48c8da26ac1ff39..96d061fc049f3cea16d8337f8fbdc51746068a42 100644 --- a/source/libs/executor/src/dataDeleter.c +++ b/source/libs/executor/src/dataDeleter.c @@ -179,7 +179,7 @@ static void getDataLength(SDataSinkHandle* pHandle, int64_t* pLen, bool* pQueryE static int32_t getDataBlock(SDataSinkHandle* pHandle, SOutputData* pOutput) { SDataDeleterHandle* pDeleter = (SDataDeleterHandle*)pHandle; if (NULL == pDeleter->nextOutput.pData) { - assert(pDeleter->queryEnd); + ASSERT(pDeleter->queryEnd); pOutput->useconds = pDeleter->useconds; pOutput->precision = pDeleter->pSchema->precision; pOutput->bufStatus = DS_BUF_EMPTY; diff --git a/source/libs/executor/src/dataDispatcher.c b/source/libs/executor/src/dataDispatcher.c index d8efcf50cac24dca0b444f2e54bf886453e1bb96..8e32559fac33ff875309f91b0eab35f362d31253 100644 --- a/source/libs/executor/src/dataDispatcher.c +++ b/source/libs/executor/src/dataDispatcher.c @@ -181,7 +181,7 @@ static void getDataLength(SDataSinkHandle* pHandle, int64_t* pLen, bool* pQueryE static int32_t getDataBlock(SDataSinkHandle* pHandle, SOutputData* pOutput) { SDataDispatchHandle* pDispatcher = (SDataDispatchHandle*)pHandle; if (NULL == pDispatcher->nextOutput.pData) { - assert(pDispatcher->queryEnd); + ASSERT(pDispatcher->queryEnd); pOutput->useconds = pDispatcher->useconds; pOutput->precision = pDispatcher->pSchema->precision; pOutput->bufStatus = DS_BUF_EMPTY; diff --git a/source/libs/executor/src/executil.c b/source/libs/executor/src/executil.c index f61fd1ae0159c8219a7070d56f9874c10190f329..d79ed0176db5c74c0f8d11b2e513eb1ac8097128 100644 --- a/source/libs/executor/src/executil.c +++ b/source/libs/executor/src/executil.c @@ -88,7 +88,6 @@ void resetResultRow(SResultRow* pResultRow, size_t entrySize) { // TODO refactor: use macro SResultRowEntryInfo* getResultEntryInfo(const SResultRow* pRow, int32_t index, const int32_t* offset) { - assert(index >= 0 && offset != NULL); return (SResultRowEntryInfo*)((char*)pRow->pEntryInfo + offset[index]); } diff --git a/source/libs/executor/src/groupoperator.c b/source/libs/executor/src/groupoperator.c index 3d9bacf39f3ea14e5e753d24dd618d6b53de0cbe..aaab95e36186bb3fc73da0d4e49909a35c3b219c 100644 --- a/source/libs/executor/src/groupoperator.c +++ b/source/libs/executor/src/groupoperator.c @@ -926,7 +926,6 @@ int32_t setGroupResultOutputBuf(SOperatorInfo* pOperator, SOptrBasicInfo* binfo, SResultRow* pResultRow = doSetResultOutBufByKey(pBuf, pResultRowInfo, (char*)pData, bytes, true, groupId, pTaskInfo, false, pAggSup, false); - assert(pResultRow != NULL); setResultRowInitCtx(pResultRow, pCtx, numOfCols, pOperator->exprSupp.rowEntryInfoOffset); return TSDB_CODE_SUCCESS; diff --git a/source/libs/executor/src/scanoperator.c b/source/libs/executor/src/scanoperator.c index 8542481419d5dcbb4e4c6ebd638947396f48e378..8d9d1bb88770c35d202c674a59e1d03c1e30092c 100644 --- a/source/libs/executor/src/scanoperator.c +++ b/source/libs/executor/src/scanoperator.c @@ -156,7 +156,7 @@ static bool overlapWithTimeWindow(SInterval* pInterval, SDataBlockInfo* pBlockIn break; } - assert(w.skey < pBlockInfo->window.skey); + ASSERT(w.skey < pBlockInfo->window.skey); if (pBlockInfo->window.skey <= TMIN(w.ekey, pBlockInfo->window.ekey)) { return true; } diff --git a/source/libs/executor/src/tfill.c b/source/libs/executor/src/tfill.c index e59ea253ccee8e3badda35445d4f681e76c1542e..8376caace0698bac32a423898c26089262a33bd8 100644 --- a/source/libs/executor/src/tfill.c +++ b/source/libs/executor/src/tfill.c @@ -408,7 +408,7 @@ static int64_t appendFilledResult(SFillInfo* pFillInfo, SSDataBlock* pBlock, int pFillInfo->numOfTotal += pFillInfo->numOfCurrent; - assert(pFillInfo->numOfCurrent == resultCapacity); + ASSERT(pFillInfo->numOfCurrent == resultCapacity); return resultCapacity; } @@ -558,7 +558,7 @@ int64_t getNumOfResultsAfterFillGap(SFillInfo* pFillInfo, TSKEY ekey, int32_t ma numOfRes = taosTimeCountInterval(lastKey, pFillInfo->currentKey, pFillInfo->interval.sliding, pFillInfo->interval.slidingUnit, pFillInfo->interval.precision); numOfRes += 1; - assert(numOfRes >= numOfRows); + ASSERT(numOfRes >= numOfRows); } else { // reach the end of data if ((ekey1 < pFillInfo->currentKey && FILL_IS_ASC_FILL(pFillInfo)) || (ekey1 >= pFillInfo->currentKey && !FILL_IS_ASC_FILL(pFillInfo))) { @@ -593,14 +593,14 @@ int64_t taosFillResultDataBlock(SFillInfo* pFillInfo, SSDataBlock* p, int32_t ca int32_t remain = taosNumOfRemainRows(pFillInfo); int64_t numOfRes = getNumOfResultsAfterFillGap(pFillInfo, pFillInfo->end, capacity); - assert(numOfRes <= capacity); + ASSERT(numOfRes <= capacity); // no data existed for fill operation now, append result according to the fill strategy if (remain == 0) { appendFilledResult(pFillInfo, p, numOfRes); } else { fillResultImpl(pFillInfo, p, (int32_t)numOfRes); - assert(numOfRes == pFillInfo->numOfCurrent); + ASSERT(numOfRes == pFillInfo->numOfCurrent); } qDebug("fill:%p, generated fill result, src block:%d, index:%d, brange:%" PRId64 "-%" PRId64 ", currentKey:%" PRId64 diff --git a/source/libs/executor/src/tsort.c b/source/libs/executor/src/tsort.c index 6c8e581b3fe837aa1bf101bf8cf6748a2cac5f4d..5fe2746b12cc6a0095739bc8dc2aad96faf66538 100644 --- a/source/libs/executor/src/tsort.c +++ b/source/libs/executor/src/tsort.c @@ -229,7 +229,7 @@ static int32_t doAddToBuf(SSDataBlock* pDataBlock, SSortHandle* pHandle) { taosArrayPush(pPageIdList, &pageId); int32_t size = blockDataGetSize(p) + sizeof(int32_t) + taosArrayGetSize(p->pDataBlock) * sizeof(int32_t); - assert(size <= getBufPageSize(pHandle->pBuf)); + ASSERT(size <= getBufPageSize(pHandle->pBuf)); blockDataToBuf(pPage, p); @@ -592,7 +592,7 @@ static int32_t doInternalMergeSort(SSortHandle* pHandle) { int32_t size = blockDataGetSize(pDataBlock) + sizeof(int32_t) + taosArrayGetSize(pDataBlock->pDataBlock) * sizeof(int32_t); - assert(size <= getBufPageSize(pHandle->pBuf)); + ASSERT(size <= getBufPageSize(pHandle->pBuf)); blockDataToBuf(pPage, pDataBlock); diff --git a/source/libs/index/src/indexFstDfa.c b/source/libs/index/src/indexFstDfa.c index 4d348e76f25eb9ec4575b536f2b5de73f1fabe6a..a3e26d8518cfa934eaa6e9163a92c1043cd8e841 100644 --- a/source/libs/index/src/indexFstDfa.c +++ b/source/libs/index/src/indexFstDfa.c @@ -188,7 +188,6 @@ void dfaAdd(FstDfa *dfa, FstSparseSet *set, uint32_t ip) { return; } bool succ = sparSetAdd(set, ip, NULL); - // assert(succ == true); Inst *inst = taosArrayGet(dfa->insts, ip); if (inst->ty == MATCH || inst->ty == RANGE) { // do nothing diff --git a/source/libs/scalar/src/sclfunc.c b/source/libs/scalar/src/sclfunc.c index 24b25cec80ce58390b7a83d71a607bbaba18fe50..df327075297428f9ba1d9cc717db913b4e33c931 100644 --- a/source/libs/scalar/src/sclfunc.c +++ b/source/libs/scalar/src/sclfunc.c @@ -1662,73 +1662,6 @@ int32_t charLengthFunction(SScalarParam *pInput, int32_t inputNum, SScalarParam return doLengthFunction(pInput, inputNum, pOutput, tcharlength); } -#if 0 -static void reverseCopy(char* dest, const char* src, int16_t type, int32_t numOfRows) { - switch(type) { - case TSDB_DATA_TYPE_TINYINT: - case TSDB_DATA_TYPE_UTINYINT:{ - int8_t* p = (int8_t*) dest; - int8_t* pSrc = (int8_t*) src; - - for(int32_t i = 0; i < numOfRows; ++i) { - p[i] = pSrc[numOfRows - i - 1]; - } - return; - } - - case TSDB_DATA_TYPE_SMALLINT: - case TSDB_DATA_TYPE_USMALLINT:{ - int16_t* p = (int16_t*) dest; - int16_t* pSrc = (int16_t*) src; - - for(int32_t i = 0; i < numOfRows; ++i) { - p[i] = pSrc[numOfRows - i - 1]; - } - return; - } - case TSDB_DATA_TYPE_INT: - case TSDB_DATA_TYPE_UINT: { - int32_t* p = (int32_t*) dest; - int32_t* pSrc = (int32_t*) src; - - for(int32_t i = 0; i < numOfRows; ++i) { - p[i] = pSrc[numOfRows - i - 1]; - } - return; - } - case TSDB_DATA_TYPE_BIGINT: - case TSDB_DATA_TYPE_UBIGINT: { - int64_t* p = (int64_t*) dest; - int64_t* pSrc = (int64_t*) src; - - for(int32_t i = 0; i < numOfRows; ++i) { - p[i] = pSrc[numOfRows - i - 1]; - } - return; - } - case TSDB_DATA_TYPE_FLOAT: { - float* p = (float*) dest; - float* pSrc = (float*) src; - - for(int32_t i = 0; i < numOfRows; ++i) { - p[i] = pSrc[numOfRows - i - 1]; - } - return; - } - case TSDB_DATA_TYPE_DOUBLE: { - double* p = (double*) dest; - double* pSrc = (double*) src; - - for(int32_t i = 0; i < numOfRows; ++i) { - p[i] = pSrc[numOfRows - i - 1]; - } - return; - } - default: assert(0); - } -} -#endif - bool getTimePseudoFuncEnv(SFunctionNode *UNUSED_PARAM(pFunc), SFuncExecEnv *pEnv) { pEnv->calcMemSize = sizeof(int64_t); return true; diff --git a/source/util/src/tcache.c b/source/util/src/tcache.c index f9606e5d49ce6debfebe49c0e5eedaedece433ba..22eee547d02cd8724b10ac02ef148a56167498b9 100644 --- a/source/util/src/tcache.c +++ b/source/util/src/tcache.c @@ -243,11 +243,6 @@ static FORCE_INLINE STrashElem *doRemoveElemInTrashcan(SCacheObj *pCacheObj, STr if (next) { next->prev = pElem->prev; } - -// if (pCacheObj->numOfElemsInTrash == 0) { -// assert(pCacheObj->pTrash == NULL); -// } - return next; } diff --git a/source/util/src/thash.c b/source/util/src/thash.c index a3cfb815d55b49fd2aa716ed906c607167555464..b79824e910558448eae38f5a7215df909985e5b0 100644 --- a/source/util/src/thash.c +++ b/source/util/src/thash.c @@ -545,7 +545,6 @@ void taosHashClear(SHashObj *pHashObj) { for (int32_t i = 0; i < pHashObj->capacity; ++i) { SHashEntry *pEntry = pHashObj->hashList[i]; if (pEntry->num == 0) { - assert(pEntry->next == NULL); continue; } @@ -646,7 +645,6 @@ void taosHashTableResize(SHashObj *pHashObj) { SHashNode *pPrev = NULL; if (pe->num == 0) { - assert(pe->next == NULL); continue; } diff --git a/source/util/src/tlist.c b/source/util/src/tlist.c index 1b12ea0cddb12545e17acfb193ba1ede592fc9e1..5d729d27d6d633d05079c6ebb708a89d5dfe7007 100644 --- a/source/util/src/tlist.c +++ b/source/util/src/tlist.c @@ -104,7 +104,6 @@ SListNode *tdListPopNode(SList *list, SListNode *node) { // Move all node elements from src to dst, the dst is assumed as an empty list void tdListMove(SList *src, SList *dst) { - // assert(dst->eleSize == src->eleSize); SListNode *node = NULL; while ((node = tdListPopHead(src)) != NULL) { tdListAppendNode(dst, node);