fix: merge bitmap when data col have data
This commit is contained in:
parent
30c09b5b9d
commit
f41caed14a
|
@ -1063,7 +1063,7 @@ bool tdSTpRowGetVal(STSRow *pRow, col_id_t colId, col_type_t colType, int32_t fl
|
||||||
|
|
||||||
int32_t tdGetColDataOfRow(SCellVal *pVal, SDataCol *pCol, int32_t row, int8_t bitmapMode) {
|
int32_t tdGetColDataOfRow(SCellVal *pVal, SDataCol *pCol, int32_t row, int8_t bitmapMode) {
|
||||||
if (isAllRowsNone(pCol)) {
|
if (isAllRowsNone(pCol)) {
|
||||||
pVal->valType = TD_VTYPE_NULL;
|
pVal->valType = TD_VTYPE_NONE;
|
||||||
#ifdef TD_SUPPORT_READ2
|
#ifdef TD_SUPPORT_READ2
|
||||||
pVal->val = (void *)getNullValue(pCol->type);
|
pVal->val = (void *)getNullValue(pCol->type);
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -330,12 +330,12 @@ int tsdbLoadBlockDataCols(SReadH *pReadh, SBlock *pBlock, SBlockInfo *pBlkInfo,
|
||||||
ASSERT(pReadh->pDCols[0]->bitmapMode != 0);
|
ASSERT(pReadh->pDCols[0]->bitmapMode != 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (mergeBitmap && !tdDataColsIsBitmapI(pReadh->pDCols[0])) {
|
if (mergeBitmap && !tdDataColsIsBitmapI(pReadh->pDCols[0])) {
|
||||||
for (int i = 0; i < numOfColsIds; ++i) {
|
for (int i = 0; i < numOfColsIds; ++i) {
|
||||||
SDataCol *pDataCol = pReadh->pDCols[0]->cols + i;
|
SDataCol *pDataCol = pReadh->pDCols[0]->cols + i;
|
||||||
if (pDataCol->bitmap) {
|
if (pDataCol->len > 0 && pDataCol->bitmap) {
|
||||||
ASSERT(pDataCol->colId != PRIMARYKEY_TIMESTAMP_COL_ID);
|
ASSERT(pDataCol->colId != PRIMARYKEY_TIMESTAMP_COL_ID);
|
||||||
|
ASSERT(pDataCol->pBitmap);
|
||||||
tdMergeBitmap(pDataCol->pBitmap, pReadh->pDCols[0]->numOfRows, pDataCol->pBitmap);
|
tdMergeBitmap(pDataCol->pBitmap, pReadh->pDCols[0]->numOfRows, pDataCol->pBitmap);
|
||||||
tdDataColsSetBitmapI(pReadh->pDCols[0]);
|
tdDataColsSetBitmapI(pReadh->pDCols[0]);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue