Merge pull request #11965 from taosdata/feature/3.0_liaohj
fix(query): the null value is missing when merging two SColumnInfoData.
This commit is contained in:
commit
707be3a826
|
@ -225,12 +225,16 @@ int32_t colDataMergeCol(SColumnInfoData* pColumnInfoData, uint32_t numOfRow1, co
|
|||
// Handle the bitmap
|
||||
char* p = taosMemoryRealloc(pColumnInfoData->varmeta.offset, sizeof(int32_t) * (numOfRow1 + numOfRow2));
|
||||
if (p == NULL) {
|
||||
// TODO
|
||||
return TSDB_CODE_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
pColumnInfoData->varmeta.offset = (int32_t*)p;
|
||||
for (int32_t i = 0; i < numOfRow2; ++i) {
|
||||
pColumnInfoData->varmeta.offset[i + numOfRow1] = pSource->varmeta.offset[i] + pColumnInfoData->varmeta.length;
|
||||
if (pSource->varmeta.offset[i] == -1) {
|
||||
pColumnInfoData->varmeta.offset[i + numOfRow1] = -1;
|
||||
} else {
|
||||
pColumnInfoData->varmeta.offset[i + numOfRow1] = pSource->varmeta.offset[i] + pColumnInfoData->varmeta.length;
|
||||
}
|
||||
}
|
||||
|
||||
// copy data
|
||||
|
@ -239,7 +243,7 @@ int32_t colDataMergeCol(SColumnInfoData* pColumnInfoData, uint32_t numOfRow1, co
|
|||
if (pColumnInfoData->varmeta.allocLen < len + oldLen) {
|
||||
char* tmp = taosMemoryRealloc(pColumnInfoData->pData, len + oldLen);
|
||||
if (tmp == NULL) {
|
||||
return TSDB_CODE_VND_OUT_OF_MEMORY;
|
||||
return TSDB_CODE_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
pColumnInfoData->pData = tmp;
|
||||
|
|
|
@ -5005,6 +5005,7 @@ static int32_t handleLimitOffset(SOperatorInfo* pOperator, SSDataBlock* pBlock)
|
|||
return PROJECT_RETRIEVE_DONE;
|
||||
}
|
||||
|
||||
// todo optimize performance
|
||||
// If there are slimit/soffset value exists, multi-round result can not be packed into one group, since the
|
||||
// they may not belong to the same group the limit/offset value is not valid in this case.
|
||||
if (pRes->info.rows >= pOperator->resultInfo.threshold || pProjectInfo->slimit.offset != -1 || pProjectInfo->slimit.limit != -1) {
|
||||
|
|
Loading…
Reference in New Issue