more work
This commit is contained in:
parent
baea84c6bf
commit
c000c15e58
|
@ -177,6 +177,11 @@ struct SColData {
|
||||||
uint8_t *pData;
|
uint8_t *pData;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct SColDataBatch {
|
||||||
|
uint8_t flags;
|
||||||
|
SColData *aColData[];
|
||||||
|
};
|
||||||
|
|
||||||
#if 1 //================================================================================================================================================
|
#if 1 //================================================================================================================================================
|
||||||
// Imported since 3.0 and use bitmap to demonstrate None/Null/Norm, while use Null/Norm below 3.0 without of bitmap.
|
// Imported since 3.0 and use bitmap to demonstrate None/Null/Norm, while use Null/Norm below 3.0 without of bitmap.
|
||||||
#define TD_SUPPORT_BITMAP
|
#define TD_SUPPORT_BITMAP
|
||||||
|
|
|
@ -46,6 +46,7 @@ typedef struct SMergeInfo SMergeInfo;
|
||||||
typedef struct STable STable;
|
typedef struct STable STable;
|
||||||
typedef struct SOffset SOffset;
|
typedef struct SOffset SOffset;
|
||||||
typedef struct SMapData SMapData;
|
typedef struct SMapData SMapData;
|
||||||
|
typedef struct SVDataCols SVDataCols;
|
||||||
|
|
||||||
// tsdbMemTable ==============================================================================================
|
// tsdbMemTable ==============================================================================================
|
||||||
|
|
||||||
|
@ -127,18 +128,18 @@ typedef struct SDFileSetReader SDFileSetReader;
|
||||||
typedef struct SDFileSetWriter SDFileSetWriter;
|
typedef struct SDFileSetWriter SDFileSetWriter;
|
||||||
|
|
||||||
// SDFileSetWriter
|
// SDFileSetWriter
|
||||||
int32_t tsdbDFileSetWriterOpen(SDFileSetWriter *pWriter, STsdb *pTsdb, SDFileSet *pSet);
|
// int32_t tsdbDFileSetWriterOpen(SDFileSetWriter *pWriter, STsdb *pTsdb, SDFileSet *pSet);
|
||||||
int32_t tsdbDFileSetWriterClose(SDFileSetWriter *pWriter, int8_t sync);
|
// int32_t tsdbDFileSetWriterClose(SDFileSetWriter *pWriter, int8_t sync);
|
||||||
int32_t tsdbWriteBlockData(SDFileSetWriter *pWriter, SDataCols *pDataCols, SBlock *pBlock);
|
// int32_t tsdbWriteBlockData(SDFileSetWriter *pWriter, SDataCols *pDataCols, SBlock *pBlock);
|
||||||
int32_t tsdbWriteSBlockInfo(SDFileSetWriter *pWriter, SBlockInfo *pBlockInfo, SBlockIdx *pBlockIdx);
|
// int32_t tsdbWriteSBlockInfo(SDFileSetWriter *pWriter, SBlockInfo *pBlockInfo, SBlockIdx *pBlockIdx);
|
||||||
int32_t tsdbWriteSBlockIdx(SDFileSetWriter *pWriter, SBlockIdx *pBlockIdx);
|
// int32_t tsdbWriteSBlockIdx(SDFileSetWriter *pWriter, SBlockIdx *pBlockIdx);
|
||||||
|
|
||||||
// SDFileSetReader
|
// SDFileSetReader
|
||||||
int32_t tsdbDFileSetReaderOpen(SDFileSetReader *pReader, STsdb *pTsdb, SDFileSet *pSet);
|
// int32_t tsdbDFileSetReaderOpen(SDFileSetReader *pReader, STsdb *pTsdb, SDFileSet *pSet);
|
||||||
int32_t tsdbDFileSetReaderClose(SDFileSetReader *pReader);
|
// int32_t tsdbDFileSetReaderClose(SDFileSetReader *pReader);
|
||||||
int32_t tsdbLoadSBlockIdx(SDFileSetReader *pReader, SArray *pArray);
|
// int32_t tsdbLoadSBlockIdx(SDFileSetReader *pReader, SArray *pArray);
|
||||||
int32_t tsdbLoadSBlockInfo(SDFileSetReader *pReader, SBlockIdx *pBlockIdx, SBlockInfo *pBlockInfo);
|
// int32_t tsdbLoadSBlockInfo(SDFileSetReader *pReader, SBlockIdx *pBlockIdx, SBlockInfo *pBlockInfo);
|
||||||
int32_t tsdbLoadSBlockStatis(SDFileSetReader *pReader, SBlock *pBlock, SBlockStatis *pBlockStatis);
|
// int32_t tsdbLoadSBlockStatis(SDFileSetReader *pReader, SBlock *pBlock, SBlockStatis *pBlockStatis);
|
||||||
|
|
||||||
// SDelFWriter
|
// SDelFWriter
|
||||||
|
|
||||||
|
@ -306,13 +307,24 @@ struct SBlockItem {
|
||||||
int64_t maxVersion;
|
int64_t maxVersion;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct SBlockInfo {
|
||||||
|
uint8_t flags;
|
||||||
|
int32_t nCols;
|
||||||
|
int64_t offset;
|
||||||
|
int64_t size;
|
||||||
|
int32_t nSmaCols;
|
||||||
|
int64_t smaOffset;
|
||||||
|
int64_t smaSize;
|
||||||
|
};
|
||||||
|
|
||||||
struct SBlock {
|
struct SBlock {
|
||||||
uint32_t delimiter;
|
TSDBKEY minKey;
|
||||||
int64_t suid;
|
TSDBKEY maxKey;
|
||||||
int64_t uid;
|
int64_t minVersion;
|
||||||
SOffset offset;
|
int64_t maxVersion;
|
||||||
uint32_t nData;
|
int32_t nRows;
|
||||||
uint8_t *pData;
|
int8_t nBlockInfo;
|
||||||
|
SBlockInfo blockInfos[];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct SBlockCol {
|
struct SBlockCol {
|
||||||
|
@ -436,6 +448,11 @@ struct SMapData {
|
||||||
uint8_t *pData;
|
uint8_t *pData;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct SVDataCols {
|
||||||
|
int64_t *aVersion;
|
||||||
|
SDataCols dataCols;
|
||||||
|
};
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -37,9 +37,11 @@ struct SCommitter {
|
||||||
SMapData oBlockIdx;
|
SMapData oBlockIdx;
|
||||||
SMapData nBlockIdx;
|
SMapData nBlockIdx;
|
||||||
// commit table data
|
// commit table data
|
||||||
SBlockIdx *pBlockIdx;
|
SBlockIdx *pBlockIdx;
|
||||||
SMapData oBlock;
|
SMapData oBlock;
|
||||||
SMapData nBlock;
|
SMapData nBlock;
|
||||||
|
SColDataBatch oBatch;
|
||||||
|
SColDataBatch nBatch;
|
||||||
/* commit del */
|
/* commit del */
|
||||||
SDelFReader *pDelFReader;
|
SDelFReader *pDelFReader;
|
||||||
SDelFWriter *pDelFWriter;
|
SDelFWriter *pDelFWriter;
|
||||||
|
|
Loading…
Reference in New Issue