more work
This commit is contained in:
parent
189f99eb74
commit
0b05c8802e
|
@ -48,9 +48,9 @@ typedef struct SMapData SMapData;
|
||||||
typedef struct SBlockSMA SBlockSMA;
|
typedef struct SBlockSMA SBlockSMA;
|
||||||
typedef struct SBlockIdx SBlockIdx;
|
typedef struct SBlockIdx SBlockIdx;
|
||||||
typedef struct SBlock SBlock;
|
typedef struct SBlock SBlock;
|
||||||
typedef struct SBlockCol SBlockCol;
|
|
||||||
typedef struct SBlockStatis SBlockStatis;
|
typedef struct SBlockStatis SBlockStatis;
|
||||||
typedef struct SAggrBlkCol SAggrBlkCol;
|
typedef struct SAggrBlkCol SAggrBlkCol;
|
||||||
|
typedef struct SColData SColData;
|
||||||
typedef struct SBlockData SBlockData;
|
typedef struct SBlockData SBlockData;
|
||||||
typedef struct SReadH SReadH;
|
typedef struct SReadH SReadH;
|
||||||
|
|
||||||
|
@ -305,14 +305,6 @@ struct SBlock {
|
||||||
SSubBlock sBlocks[TSDB_MAX_SUBBLOCKS];
|
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 {
|
struct SAggrBlkCol {
|
||||||
int16_t colId;
|
int16_t colId;
|
||||||
int16_t maxIndex;
|
int16_t maxIndex;
|
||||||
|
@ -323,12 +315,20 @@ struct SAggrBlkCol {
|
||||||
int64_t min;
|
int64_t min;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct SBlockData {
|
struct SColData {
|
||||||
int32_t nRow;
|
int16_t cid;
|
||||||
SBlockCol cols[];
|
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
|
// ================== TSDB global config
|
||||||
extern bool tsdbForceKeepFile;
|
extern bool tsdbForceKeepFile;
|
||||||
|
|
|
@ -164,7 +164,7 @@ int32_t tsdbRealloc(uint8_t **ppBuf, int64_t size) {
|
||||||
|
|
||||||
if (bsize >= size) goto _exit;
|
if (bsize >= size) goto _exit;
|
||||||
|
|
||||||
if (bsize == 0) bsize = 128;
|
if (bsize == 0) bsize = 16;
|
||||||
while (bsize < size) {
|
while (bsize < size) {
|
||||||
bsize *= 2;
|
bsize *= 2;
|
||||||
}
|
}
|
||||||
|
@ -544,3 +544,5 @@ int32_t tGetKEYINFO(uint8_t *p, KEYINFO *pKeyInfo) {
|
||||||
|
|
||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SBlockData ======================================================
|
Loading…
Reference in New Issue