fix(query): adjust the capacity of ssdatablock.
This commit is contained in:
parent
673261a1bd
commit
0457fab077
|
@ -68,7 +68,7 @@ typedef struct SDataBlockInfo {
|
||||||
STimeWindow window;
|
STimeWindow window;
|
||||||
int32_t rows;
|
int32_t rows;
|
||||||
int32_t rowSize;
|
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
|
uint16_t blockId; // block id, generated by physical planner
|
||||||
uint64_t groupId; // no need to serialize
|
uint64_t groupId; // no need to serialize
|
||||||
int16_t hasVarCol;
|
int16_t hasVarCol;
|
||||||
|
|
|
@ -969,6 +969,7 @@ static SSDataBlock* doStreamBlockScan(SOperatorInfo* pOperator) {
|
||||||
uint64_t uid = 0;
|
uint64_t uid = 0;
|
||||||
int32_t numOfRows = 0;
|
int32_t numOfRows = 0;
|
||||||
|
|
||||||
|
// todo refactor
|
||||||
int32_t code = tqRetrieveDataBlock(&block, pInfo->streamBlockReader, &groupId, &uid, &numOfRows);
|
int32_t code = tqRetrieveDataBlock(&block, pInfo->streamBlockReader, &groupId, &uid, &numOfRows);
|
||||||
|
|
||||||
if (code != TSDB_CODE_SUCCESS || numOfRows == 0) {
|
if (code != TSDB_CODE_SUCCESS || numOfRows == 0) {
|
||||||
|
@ -976,12 +977,11 @@ static SSDataBlock* doStreamBlockScan(SOperatorInfo* pOperator) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
blockDataEnsureCapacity(pInfo->pRes, numOfRows);
|
|
||||||
|
|
||||||
pInfo->pRes->info.groupId = groupId;
|
pInfo->pRes->info.groupId = groupId;
|
||||||
pInfo->pRes->info.rows = numOfRows;
|
pInfo->pRes->info.rows = numOfRows;
|
||||||
pInfo->pRes->info.uid = uid;
|
pInfo->pRes->info.uid = uid;
|
||||||
pInfo->pRes->info.type = STREAM_NORMAL;
|
pInfo->pRes->info.type = STREAM_NORMAL;
|
||||||
|
pInfo->pRes->info.capacity = numOfRows;
|
||||||
|
|
||||||
// for generating rollup SMA result, each time is an independent time serie.
|
// 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
|
// TODO temporarily used, when the statement of "partition by tbname" is ready, remove this
|
||||||
|
|
Loading…
Reference in New Issue