add more code

This commit is contained in:
hzcheng 2020-03-13 22:53:27 +08:00
parent d084ec804b
commit 1f27641205
2 changed files with 52 additions and 2 deletions

View File

@ -16,7 +16,8 @@
#define _TD_TSDB_FILE_H_
#include <stdint.h>
// #include "tstring.h"
#include "taosdef.h"
#ifdef __cplusplus
extern "C" {
@ -34,7 +35,8 @@ typedef enum {
extern const char *tsdbFileSuffix[];
typedef struct {
int64_t fileSize;
int64_t size;
int64_t tombSize;
} SFileInfo;
typedef struct {

View File

@ -18,6 +18,54 @@
#include "tsdbFile.h"
typedef struct {
int64_t offset;
} SCompHeader;
typedef struct {
int64_t uid;
int64_t last : 1;
int64_t numOfBlocks : 63;
int32_t delimiter;
} SCompInfo;
typedef struct {
TSKEY keyFirst;
TSKEY keyLast;
int32_t numOfBlocks;
int32_t offset;
} SCompIdx;
typedef struct {
TSKEY keyFirst;
TSKEY keyLast;
int64_t offset;
int32_t len;
int32_t sversion;
} SCompBlock;
typedef struct {
int64_t uid;
} SBlock;
typedef struct {
int16_t colId;
int16_t bytes;
int32_t nNullPoints;
int32_t type:8;
int32_t offset:24;
int32_t len;
// fields for pre-aggregate
// TODO: pre-aggregation should be seperated
int64_t sum;
int64_t max;
int64_t min;
int16_t maxIdx;
int16_t minIdx;
char reserverd[20]:
} SField;
const char *tsdbFileSuffix[] = {
".head", // TSDB_FILE_TYPE_HEAD
".data", // TSDB_FILE_TYPE_DATA