diff --git a/include/common/tcommon.h b/include/common/tcommon.h index 9c0c3c0616..f841a7d4cd 100644 --- a/include/common/tcommon.h +++ b/include/common/tcommon.h @@ -68,7 +68,7 @@ typedef struct SDataBlockInfo { STimeWindow window; int32_t rows; int32_t rowSize; - int64_t uid; // the uid of table, from which current data block comes + uint64_t uid; // the uid of table, from which current data block comes uint16_t blockId; // block id, generated by physical planner uint64_t groupId; // no need to serialize int16_t hasVarCol; diff --git a/source/libs/executor/src/scanoperator.c b/source/libs/executor/src/scanoperator.c index e1b9e7e3de..b1bd50daf0 100644 --- a/source/libs/executor/src/scanoperator.c +++ b/source/libs/executor/src/scanoperator.c @@ -969,6 +969,7 @@ static SSDataBlock* doStreamBlockScan(SOperatorInfo* pOperator) { uint64_t uid = 0; int32_t numOfRows = 0; + // todo refactor int32_t code = tqRetrieveDataBlock(&block, pInfo->streamBlockReader, &groupId, &uid, &numOfRows); if (code != TSDB_CODE_SUCCESS || numOfRows == 0) { @@ -976,12 +977,11 @@ static SSDataBlock* doStreamBlockScan(SOperatorInfo* pOperator) { return NULL; } - blockDataEnsureCapacity(pInfo->pRes, numOfRows); - pInfo->pRes->info.groupId = groupId; pInfo->pRes->info.rows = numOfRows; pInfo->pRes->info.uid = uid; pInfo->pRes->info.type = STREAM_NORMAL; + pInfo->pRes->info.capacity = numOfRows; // for generating rollup SMA result, each time is an independent time serie. // TODO temporarily used, when the statement of "partition by tbname" is ready, remove this