enh: code optimization

This commit is contained in:
kailixu 2024-08-14 13:57:33 +08:00
parent fe07324d72
commit cec7643ea8
3 changed files with 3 additions and 10 deletions

View File

@ -463,9 +463,7 @@ int32_t tsdbDataFileReadBlockDataByColumn(SDataFileReader *reader, const SBrinRe
if (cid < blockCol.cid) {
const STColumn *tcol = tTSchemaSearchColumn(pTSchema, cid);
if (tcol == NULL) {
TAOS_CHECK_GOTO(TSDB_CODE_TDB_INVALID_TABLE_SCHEMA_VER, &lino, _exit);
}
TSDB_CHECK_NULL(tcol, code,lino,_exit,TSDB_CODE_TDB_INVALID_TABLE_SCHEMA_VER);
SBlockCol none = {
.cid = cid,
.type = tcol->type,

View File

@ -1004,10 +1004,7 @@ int32_t tMergeTreeOpen2(SMergeTree *pMTree, SMergeTreeConf *pConf, SSttDataInfoF
pSttDataInfo->numOfRows += numOfRows;
}
} else {
if(terrno != TSDB_CODE_SUCCESS) {
code = terrno;
goto _end;
}
TAOS_CHECK_GOTO(terrno, NULL, _end);
if (!pMTree->ignoreEarlierTs) {
pMTree->ignoreEarlierTs = pIter->ignoreEarlierTs;
}

View File

@ -309,9 +309,7 @@ int32_t tsdbSttFileReadBlockDataByColumn(SSttFileReader *reader, const SSttBlk *
if (cid < blockCol.cid) {
const STColumn *tcol = tTSchemaSearchColumn(pTSchema, cid);
if (tcol == NULL) {
TAOS_CHECK_GOTO(TSDB_CODE_TDB_INVALID_TABLE_SCHEMA_VER, &lino, _exit);
}
TSDB_CHECK_NULL(tcol, code,lino,_exit,TSDB_CODE_TDB_INVALID_TABLE_SCHEMA_VER);
SBlockCol none = {
.cid = cid,
.type = tcol->type,