fix(query): the null value is missing when merging two SColumnInfoData.
This commit is contained in:
parent
d41a9e8bf0
commit
878bb18d08
|
@ -225,13 +225,17 @@ int32_t colDataMergeCol(SColumnInfoData* pColumnInfoData, uint32_t numOfRow1, co
|
||||||
// Handle the bitmap
|
// Handle the bitmap
|
||||||
char* p = taosMemoryRealloc(pColumnInfoData->varmeta.offset, sizeof(int32_t) * (numOfRow1 + numOfRow2));
|
char* p = taosMemoryRealloc(pColumnInfoData->varmeta.offset, sizeof(int32_t) * (numOfRow1 + numOfRow2));
|
||||||
if (p == NULL) {
|
if (p == NULL) {
|
||||||
// TODO
|
return TSDB_CODE_OUT_OF_MEMORY;
|
||||||
}
|
}
|
||||||
|
|
||||||
pColumnInfoData->varmeta.offset = (int32_t*)p;
|
pColumnInfoData->varmeta.offset = (int32_t*)p;
|
||||||
for (int32_t i = 0; i < numOfRow2; ++i) {
|
for (int32_t i = 0; i < numOfRow2; ++i) {
|
||||||
|
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;
|
pColumnInfoData->varmeta.offset[i + numOfRow1] = pSource->varmeta.offset[i] + pColumnInfoData->varmeta.length;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// copy data
|
// copy data
|
||||||
uint32_t len = pSource->varmeta.length;
|
uint32_t len = pSource->varmeta.length;
|
||||||
|
@ -239,7 +243,7 @@ int32_t colDataMergeCol(SColumnInfoData* pColumnInfoData, uint32_t numOfRow1, co
|
||||||
if (pColumnInfoData->varmeta.allocLen < len + oldLen) {
|
if (pColumnInfoData->varmeta.allocLen < len + oldLen) {
|
||||||
char* tmp = taosMemoryRealloc(pColumnInfoData->pData, len + oldLen);
|
char* tmp = taosMemoryRealloc(pColumnInfoData->pData, len + oldLen);
|
||||||
if (tmp == NULL) {
|
if (tmp == NULL) {
|
||||||
return TSDB_CODE_VND_OUT_OF_MEMORY;
|
return TSDB_CODE_OUT_OF_MEMORY;
|
||||||
}
|
}
|
||||||
|
|
||||||
pColumnInfoData->pData = tmp;
|
pColumnInfoData->pData = tmp;
|
||||||
|
|
|
@ -5005,6 +5005,7 @@ static int32_t handleLimitOffset(SOperatorInfo* pOperator, SSDataBlock* pBlock)
|
||||||
return PROJECT_RETRIEVE_DONE;
|
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
|
// 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.
|
// 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) {
|
if (pRes->info.rows >= pOperator->resultInfo.threshold || pProjectInfo->slimit.offset != -1 || pProjectInfo->slimit.limit != -1) {
|
||||||
|
|
Loading…
Reference in New Issue