diff --git a/source/dnode/vnode/src/tsdb/tsdbRead.c b/source/dnode/vnode/src/tsdb/tsdbRead.c index ca877f599f7e052a842a186964a0b6961ca150f0..f94dbc51d159fe6850fa71c5a8578e04ff19e085 100644 --- a/source/dnode/vnode/src/tsdb/tsdbRead.c +++ b/source/dnode/vnode/src/tsdb/tsdbRead.c @@ -1631,7 +1631,7 @@ static int32_t doMergeBufAndFileRows(STsdbReader* pReader, STableBlockScanInfo* } code = doMergeRowsInBuf(pIter, pBlockScanInfo->uid, k.ts, pBlockScanInfo->delSkyline, &merge, pReader); - if (code != TSDB_CODE_SUCCESS) { + if (code != TSDB_CODE_SUCCESS || merge.pTSchema == NULL) { return code; } } @@ -3768,6 +3768,15 @@ bool tsdbNextDataBlock(STsdbReader* pReader) { return false; } +bool tsdbTableNextDataBlock(STsdbReader* pReader, uint64_t uid) { + void* pBlockScanInfo = taosHashGet(pReader->status.pTableMap, &uid, sizeof(uid)); + if (pBlockScanInfo == NULL) { // no data block for the table of given uid + return false; + } + + +} + static void setBlockInfo(STsdbReader* pReader, SDataBlockInfo* pDataBlockInfo) { ASSERT(pDataBlockInfo != NULL && pReader != NULL); pDataBlockInfo->rows = pReader->pResBlock->info.rows; diff --git a/source/libs/executor/src/cachescanoperator.c b/source/libs/executor/src/cachescanoperator.c index 22a685230a12d4981a3b0729ef1f11b6504688d4..914da422adf3c3d656e07323dd27a26f8b7c03be 100644 --- a/source/libs/executor/src/cachescanoperator.c +++ b/source/libs/executor/src/cachescanoperator.c @@ -279,7 +279,7 @@ int32_t removeRedundantTsCol(SLastRowScanPhysiNode* pScanNode, SColMatchInfo* pC } size_t size = taosArrayGetSize(pColMatchInfo->pList); - SArray* pMatchInfo = taosArrayInit(size, sizeof(SColMatchInfo)); + SArray* pMatchInfo = taosArrayInit(size, sizeof(SColMatchItem)); for (int32_t i = 0; i < size; ++i) { SColMatchItem* pColInfo = taosArrayGet(pColMatchInfo->pList, i); diff --git a/source/libs/executor/src/executil.c b/source/libs/executor/src/executil.c index f58c2a0e344c56b120c4585fb1af23308a58cbcb..971b28eb09d3f3de5ba888925af061ebe285de40 100644 --- a/source/libs/executor/src/executil.c +++ b/source/libs/executor/src/executil.c @@ -1073,7 +1073,7 @@ int32_t extractColMatchInfo(SNodeList* pNodeList, SDataBlockDescNode* pOutputNod pMatchInfo->matchType = type; - SArray* pList = taosArrayInit(numOfCols, sizeof(SColMatchInfo)); + SArray* pList = taosArrayInit(numOfCols, sizeof(SColMatchItem)); if (pList == NULL) { code = TSDB_CODE_OUT_OF_MEMORY; return code;