remove some check

This commit is contained in:
facetosea 2024-11-27 19:51:27 +08:00
parent d50ee39dab
commit a2f8a822da
8 changed files with 0 additions and 30 deletions

View File

@ -202,14 +202,6 @@ void * getOperatorParam(int32_t opType, SOperatorParam* param, int32_t i
void doKeepTuple(SWindowRowsSup* pRowSup, int64_t ts, uint64_t groupId); void doKeepTuple(SWindowRowsSup* pRowSup, int64_t ts, uint64_t groupId);
void doKeepNewWindowStartInfo(SWindowRowsSup* pRowSup, const int64_t* tsList, int32_t rowIndex, uint64_t groupId); void doKeepNewWindowStartInfo(SWindowRowsSup* pRowSup, const int64_t* tsList, int32_t rowIndex, uint64_t groupId);
#define CHECK_CONDITION_FAILED(c) \
do { \
if (!(c)) { \
qError("function:%s condition failed, Line:%d", __FUNCTION__, __LINE__); \
return TSDB_CODE_APP_ERROR; \
} \
} while (0)
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif

View File

@ -171,8 +171,6 @@ _error:
} }
static int32_t anomalyAggregateNext(SOperatorInfo* pOperator, SSDataBlock** ppRes) { static int32_t anomalyAggregateNext(SOperatorInfo* pOperator, SSDataBlock** ppRes) {
CHECK_CONDITION_FAILED(pOperator->info != NULL);
CHECK_CONDITION_FAILED(pOperator->pTaskInfo != NULL);
int32_t code = TSDB_CODE_SUCCESS; int32_t code = TSDB_CODE_SUCCESS;
int32_t lino = 0; int32_t lino = 0;
SAnomalyWindowOperatorInfo* pInfo = pOperator->info; SAnomalyWindowOperatorInfo* pInfo = pOperator->info;
@ -183,7 +181,6 @@ static int32_t anomalyAggregateNext(SOperatorInfo* pOperator, SSDataBlock** ppRe
int64_t st = taosGetTimestampUs(); int64_t st = taosGetTimestampUs();
int32_t numOfBlocks = taosArrayGetSize(pSupp->blocks); int32_t numOfBlocks = taosArrayGetSize(pSupp->blocks);
CHECK_CONDITION_FAILED(pRes != NULL);
blockDataCleanup(pRes); blockDataCleanup(pRes);
while (1) { while (1) {

View File

@ -225,8 +225,6 @@ _end:
} }
static int32_t countWindowAggregateNext(SOperatorInfo* pOperator, SSDataBlock** ppRes) { static int32_t countWindowAggregateNext(SOperatorInfo* pOperator, SSDataBlock** ppRes) {
CHECK_CONDITION_FAILED(pOperator->info != NULL);
CHECK_CONDITION_FAILED(pOperator->pTaskInfo != NULL);
int32_t code = TSDB_CODE_SUCCESS; int32_t code = TSDB_CODE_SUCCESS;
int32_t lino = 0; int32_t lino = 0;
SCountWindowOperatorInfo* pInfo = pOperator->info; SCountWindowOperatorInfo* pInfo = pOperator->info;
@ -234,7 +232,6 @@ static int32_t countWindowAggregateNext(SOperatorInfo* pOperator, SSDataBlock**
SExprSupp* pExprSup = &pOperator->exprSupp; SExprSupp* pExprSup = &pOperator->exprSupp;
int32_t order = pInfo->binfo.inputTsOrder; int32_t order = pInfo->binfo.inputTsOrder;
SSDataBlock* pRes = pInfo->binfo.pRes; SSDataBlock* pRes = pInfo->binfo.pRes;
CHECK_CONDITION_FAILED(pRes != NULL);
blockDataCleanup(pRes); blockDataCleanup(pRes);

View File

@ -182,8 +182,6 @@ void destroyEWindowOperatorInfo(void* param) {
} }
static int32_t eventWindowAggregateNext(SOperatorInfo* pOperator, SSDataBlock** ppRes) { static int32_t eventWindowAggregateNext(SOperatorInfo* pOperator, SSDataBlock** ppRes) {
CHECK_CONDITION_FAILED(pOperator->info != NULL);
CHECK_CONDITION_FAILED(pOperator->pTaskInfo != NULL);
int32_t code = TSDB_CODE_SUCCESS; int32_t code = TSDB_CODE_SUCCESS;
int32_t lino = 0; int32_t lino = 0;
SEventWindowOperatorInfo* pInfo = pOperator->info; SEventWindowOperatorInfo* pInfo = pOperator->info;
@ -193,7 +191,6 @@ static int32_t eventWindowAggregateNext(SOperatorInfo* pOperator, SSDataBlock**
int32_t order = pInfo->binfo.inputTsOrder; int32_t order = pInfo->binfo.inputTsOrder;
SSDataBlock* pRes = pInfo->binfo.pRes; SSDataBlock* pRes = pInfo->binfo.pRes;
CHECK_CONDITION_FAILED(pRes != NULL);
blockDataCleanup(pRes); blockDataCleanup(pRes);

View File

@ -255,7 +255,6 @@ static int32_t doSetInputDataBlockInfo(SExprSupp* pExprSup, SSDataBlock* pBlock,
int32_t code = TSDB_CODE_SUCCESS; int32_t code = TSDB_CODE_SUCCESS;
int32_t lino = 0; int32_t lino = 0;
SqlFunctionCtx* pCtx = pExprSup->pCtx; SqlFunctionCtx* pCtx = pExprSup->pCtx;
CHECK_CONDITION_FAILED(pExprSup->numOfExprs <= 0 || pCtx != NULL);
for (int32_t i = 0; i < pExprSup->numOfExprs; ++i) { for (int32_t i = 0; i < pExprSup->numOfExprs; ++i) {
pCtx[i].order = order; pCtx[i].order = order;
pCtx[i].input.numOfRows = pBlock->info.rows; pCtx[i].input.numOfRows = pBlock->info.rows;

View File

@ -444,8 +444,6 @@ _end:
} }
static int32_t hashGroupbyAggregateNext(SOperatorInfo* pOperator, SSDataBlock** ppRes) { static int32_t hashGroupbyAggregateNext(SOperatorInfo* pOperator, SSDataBlock** ppRes) {
CHECK_CONDITION_FAILED(pOperator->info != NULL);
CHECK_CONDITION_FAILED(pOperator->pTaskInfo != NULL);
int32_t code = TSDB_CODE_SUCCESS; int32_t code = TSDB_CODE_SUCCESS;
int32_t lino = 0; int32_t lino = 0;
SExecTaskInfo* pTaskInfo = pOperator->pTaskInfo; SExecTaskInfo* pTaskInfo = pOperator->pTaskInfo;
@ -1005,14 +1003,11 @@ static int32_t hashPartitionNext(SOperatorInfo* pOperator, SSDataBlock** ppRes)
return TSDB_CODE_SUCCESS; return TSDB_CODE_SUCCESS;
} }
CHECK_CONDITION_FAILED(pOperator->info != NULL);
CHECK_CONDITION_FAILED(pOperator->pTaskInfo != NULL);
int32_t code = TSDB_CODE_SUCCESS; int32_t code = TSDB_CODE_SUCCESS;
int32_t lino = 0; int32_t lino = 0;
SExecTaskInfo* pTaskInfo = pOperator->pTaskInfo; SExecTaskInfo* pTaskInfo = pOperator->pTaskInfo;
SPartitionOperatorInfo* pInfo = pOperator->info; SPartitionOperatorInfo* pInfo = pOperator->info;
SSDataBlock* pRes = pInfo->binfo.pRes; SSDataBlock* pRes = pInfo->binfo.pRes;
CHECK_CONDITION_FAILED(pRes != NULL);
if (pOperator->status == OP_RES_TO_RETURN) { if (pOperator->status == OP_RES_TO_RETURN) {
(*ppRes) = buildPartitionResult(pOperator); (*ppRes) = buildPartitionResult(pOperator);
@ -1464,8 +1459,6 @@ static int32_t doStreamHashPartitionNext(SOperatorInfo* pOperator, SSDataBlock**
int32_t lino = 0; int32_t lino = 0;
SExecTaskInfo* pTaskInfo = pOperator->pTaskInfo; SExecTaskInfo* pTaskInfo = pOperator->pTaskInfo;
SStreamPartitionOperatorInfo* pInfo = pOperator->info; SStreamPartitionOperatorInfo* pInfo = pOperator->info;
CHECK_CONDITION_FAILED(pInfo != NULL);
CHECK_CONDITION_FAILED(pTaskInfo != NULL);
if (pOperator->status == OP_EXEC_DONE) { if (pOperator->status == OP_EXEC_DONE) {
(*ppRes) = NULL; (*ppRes) = NULL;

View File

@ -906,7 +906,6 @@ static int32_t hJoinBuildHash(struct SOperatorInfo* pOperator, bool* queryDone)
SHJoinOperatorInfo* pJoin = pOperator->info; SHJoinOperatorInfo* pJoin = pOperator->info;
SSDataBlock* pBlock = NULL; SSDataBlock* pBlock = NULL;
int32_t code = TSDB_CODE_SUCCESS; int32_t code = TSDB_CODE_SUCCESS;
CHECK_CONDITION_FAILED(pJoin != NULL);
while (true) { while (true) {
pBlock = getNextBlockFromDownstream(pOperator, pJoin->pBuild->downStreamIdx); pBlock = getNextBlockFromDownstream(pOperator, pJoin->pBuild->downStreamIdx);
@ -991,15 +990,12 @@ void hJoinSetDone(struct SOperatorInfo* pOperator) {
} }
static int32_t hJoinMainProcess(struct SOperatorInfo* pOperator, SSDataBlock** pResBlock) { static int32_t hJoinMainProcess(struct SOperatorInfo* pOperator, SSDataBlock** pResBlock) {
CHECK_CONDITION_FAILED(pOperator->info != NULL);
CHECK_CONDITION_FAILED(pOperator->pTaskInfo != NULL);
SHJoinOperatorInfo* pJoin = pOperator->info; SHJoinOperatorInfo* pJoin = pOperator->info;
SExecTaskInfo* pTaskInfo = pOperator->pTaskInfo; SExecTaskInfo* pTaskInfo = pOperator->pTaskInfo;
int32_t code = TSDB_CODE_SUCCESS; int32_t code = TSDB_CODE_SUCCESS;
int32_t lino = 0; int32_t lino = 0;
SSDataBlock* pRes = pJoin->finBlk; SSDataBlock* pRes = pJoin->finBlk;
int64_t st = 0; int64_t st = 0;
CHECK_CONDITION_FAILED(pRes != NULL);
QRY_PARAM_CHECK(pResBlock); QRY_PARAM_CHECK(pResBlock);
if (pOperator->cost.openCost == 0) { if (pOperator->cost.openCost == 0) {

View File

@ -564,7 +564,6 @@ SSDataBlock* doApplyIndefinitFunction1(SOperatorInfo* pOperator) {
int32_t doApplyIndefinitFunction(SOperatorInfo* pOperator, SSDataBlock** pResBlock) { int32_t doApplyIndefinitFunction(SOperatorInfo* pOperator, SSDataBlock** pResBlock) {
QRY_PARAM_CHECK(pResBlock); QRY_PARAM_CHECK(pResBlock);
CHECK_CONDITION_FAILED(pOperator->info != NULL);
SIndefOperatorInfo* pIndefInfo = pOperator->info; SIndefOperatorInfo* pIndefInfo = pOperator->info;
SOptrBasicInfo* pInfo = &pIndefInfo->binfo; SOptrBasicInfo* pInfo = &pIndefInfo->binfo;
SExprSupp* pSup = &pOperator->exprSupp; SExprSupp* pSup = &pOperator->exprSupp;