more work

This commit is contained in:
Hongze Cheng 2022-06-17 07:14:20 +00:00
parent 189f99eb74
commit 0b05c8802e
3 changed files with 18 additions and 16 deletions

View File

@ -48,9 +48,9 @@ typedef struct SMapData SMapData;
typedef struct SBlockSMA SBlockSMA;
typedef struct SBlockIdx SBlockIdx;
typedef struct SBlock SBlock;
typedef struct SBlockCol SBlockCol;
typedef struct SBlockStatis SBlockStatis;
typedef struct SAggrBlkCol SAggrBlkCol;
typedef struct SColData SColData;
typedef struct SBlockData SBlockData;
typedef struct SReadH SReadH;
@ -305,14 +305,6 @@ struct SBlock {
SSubBlock sBlocks[TSDB_MAX_SUBBLOCKS];
};
struct SBlockCol {
int16_t colId;
uint16_t type : 6;
uint16_t blen : 10; // 0 no bitmap if all rows are NORM, > 0 bitmap length
uint32_t len; // data length + bitmap length
uint32_t offset;
};
struct SAggrBlkCol {
int16_t colId;
int16_t maxIndex;
@ -323,12 +315,20 @@ struct SAggrBlkCol {
int64_t min;
};
struct SBlockData {
int32_t nRow;
SBlockCol cols[];
struct SColData {
int16_t cid;
int8_t type;
int32_t bytes;
uint8_t flags;
uint8_t *pBitMap;
uint32_t nData;
uint8_t *pData;
};
typedef void SAggrBlkData; // SBlockCol cols[];
struct SBlockData {
int32_t nRow;
SArray *aColData;
};
// ================== TSDB global config
extern bool tsdbForceKeepFile;

View File

@ -258,7 +258,7 @@ struct SSma {
#define SMA_CFG(s) (&(s)->pVnode->config)
#define SMA_TSDB_CFG(s) (&(s)->pVnode->config.tsdbCfg)
#define SMA_RETENTION(s) ((SRetention *)&(s)->pVnode->config.tsdbCfg.retentions)
#define SMA_RETENTION(s) ((SRetention*)&(s)->pVnode->config.tsdbCfg.retentions)
#define SMA_LOCKED(s) ((s)->locked)
#define SMA_META(s) ((s)->pVnode->pMeta)
#define SMA_VID(s) TD_VID((s)->pVnode)

View File

@ -164,7 +164,7 @@ int32_t tsdbRealloc(uint8_t **ppBuf, int64_t size) {
if (bsize >= size) goto _exit;
if (bsize == 0) bsize = 128;
if (bsize == 0) bsize = 16;
while (bsize < size) {
bsize *= 2;
}
@ -543,4 +543,6 @@ int32_t tGetKEYINFO(uint8_t *p, KEYINFO *pKeyInfo) {
n += tGetI64v(p + n, &pKeyInfo->maxVersion);
return n;
}
}
// SBlockData ======================================================