refactor: do some internal refactor.
This commit is contained in:
parent
24218752ab
commit
fe6772f940
|
@ -1183,15 +1183,12 @@ static int32_t doEnsureCapacity(SColumnInfoData* pColumn, const SDataBlockInfo*
|
||||||
void colInfoDataCleanup(SColumnInfoData* pColumn, uint32_t numOfRows) {
|
void colInfoDataCleanup(SColumnInfoData* pColumn, uint32_t numOfRows) {
|
||||||
if (IS_VAR_DATA_TYPE(pColumn->info.type)) {
|
if (IS_VAR_DATA_TYPE(pColumn->info.type)) {
|
||||||
pColumn->varmeta.length = 0;
|
pColumn->varmeta.length = 0;
|
||||||
if (pColumn->varmeta.offset > 0) {
|
if (pColumn->varmeta.offset != NULL) {
|
||||||
memset(pColumn->varmeta.offset, 0, sizeof(int32_t) * numOfRows);
|
memset(pColumn->varmeta.offset, 0, sizeof(int32_t) * numOfRows);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (pColumn->nullbitmap != NULL) {
|
if (pColumn->nullbitmap != NULL) {
|
||||||
memset(pColumn->nullbitmap, 0, BitmapLen(numOfRows));
|
memset(pColumn->nullbitmap, 0, BitmapLen(numOfRows));
|
||||||
if (pColumn->pData != NULL) {
|
|
||||||
memset(pColumn->pData, 0, pColumn->info.bytes * numOfRows);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue