Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Tonvia
TDengine
提交
e8d96d43
T
TDengine
项目概览
Tonvia
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
e8d96d43
编写于
2月 11, 2020
作者:
H
Hongze Cheng
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
more
上级
c36491c1
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
69 addition
and
59 deletion
+69
-59
src/vnode/common/data/inc/data.h
src/vnode/common/data/inc/data.h
+0
-28
src/vnode/common/datastructure/inc/dlist.h
src/vnode/common/datastructure/inc/dlist.h
+0
-29
src/vnode/common/inc/dataformat.h
src/vnode/common/inc/dataformat.h
+66
-0
src/vnode/common/inc/schema.h
src/vnode/common/inc/schema.h
+0
-0
src/vnode/common/inc/type.h
src/vnode/common/inc/type.h
+1
-1
src/vnode/common/src/dataformat.c
src/vnode/common/src/dataformat.c
+0
-0
src/vnode/tsdb/inc/tsdbCache.h
src/vnode/tsdb/inc/tsdbCache.h
+2
-1
未找到文件。
src/vnode/common/data/inc/data.h
已删除
100644 → 0
浏览文件 @
c36491c1
#if !defined(_TD_DATA_H_)
#define _TD_DATA_H_
#include <stdint.h>
#include "schema.h"
/* The row data should in the form of
*/
// ---- Row data interface
typedef
struct
{
int32_t
numOfRows
;
char
*
data
;
}
SRData
;
// ---- Column data interface
typedef
struct
{
int32_t
numOfPoints
;
char
*
data
;
}
SCData
;
typedef
struct
{
int32_t
numOfCols
;
SCData
**
pData
;
}
SCDataBlock
;
#endif // _TD_DATA_H_
src/vnode/common/datastructure/inc/dlist.h
已删除
100644 → 0
浏览文件 @
c36491c1
// A doubly linked list
#if !defined(_TD_DLIST_H_)
#define _TD_DLIST_H_
#include <stdint.h>
typedef
struct
{
SListNode
*
prev
;
SListNode
*
next
;
void
*
data
;
}
SListNode
;
// Doubly linked list
typedef
struct
{
SListNode
*
head
;
SListNode
*
tail
;
int32_t
length
;
}
SDList
;
// ----- Set operation
#define TD_GET_DLIST_LENGTH(pDList) (((SDList *)pDList)->length)
#define TD_GET_DLIST_HEAD(pDList) (((SDList *)pDList)->head)
#define TD_GET_DLIST_TAIL(pDList) (((SDList *)pDList)->tail)
#define TD_GET_DLIST_NEXT_NODE(pDNode) (((SListNode *)pDNode)->next)
#define TD_GET_DLIST_PREV_NODE(pDNode) (((SListNode *)pDNode)->prev)
#define TD_GET_DLIST_NODE_DATA(pDNode) (((SListNode *)pDNode)->data)
#endif // _TD_DLIST_H_
src/vnode/common/inc/dataformat.h
0 → 100644
浏览文件 @
e8d96d43
#if !defined(_TD_DATA_FORMAT_H_)
#define _TD_DATA_FORMAT_H_
#include <stdint.h>
#include "type.h"
#include "schema.h"
// ----------------- Data row structure
/* A data row, the format of it is like below:
* +---------+---------------------------------+
* | int32_t | |
* +---------+---------------------------------+
* | len | data |
* +---------+---------------------------------+
*/
typedef
char
*
SDataRow
;
/* Data rows definition, the format of it is like below:
* +---------+---------+-----------------------+--------+-----------------------+
* | int32_t | int32_t | | | |
* +---------+---------+-----------------------+--------+-----------------------+
* | len | nrows | SDataRow | .... | SDataRow |
* +---------+---------+-----------------------+--------+-----------------------+
*/
typedef
char
*
SDataRows
;
/* Data column definition
* +---------+---------+-----------------------+
* | int32_t | int32_t | |
* +---------+---------+-----------------------+
* | len | npoints | data |
* +---------+---------+-----------------------+
*/
typedef
char
*
SDataCol
;
/* Data columns definition
* +---------+---------+-----------------------+--------+-----------------------+
* | int32_t | int32_t | | | |
* +---------+---------+-----------------------+--------+-----------------------+
* | len | npoints | SDataCol | .... | SDataCol |
* +---------+---------+-----------------------+--------+-----------------------+
*/
typedef
char
*
SDataCols
;
// ----------------- Data column structure
// ---- operation on SDataRow;
#define TD_DATAROW_LEN(pDataRow) (*(int32_t *)(pDataRow))
#define TD_DATAROW_DATA(pDataRow) ((pDataRow) + sizeof(int32_t))
// ---- operation on SDataRows
#define TD_DATAROWS_LEN(pDataRows) (*(int32_t *)(pDataRows))
#define TD_DATAROWS_ROWS(pDataRows) (*(int32_t *)(pDataRows + sizeof(int32_t)))
#define TD_NEXT_DATAROW(pDataRow) ((pDataRow) + TD_DATAROW_LEN(pDataRow))
// ---- operation on SDataCol
#define TD_DATACOL_LEN(pDataCol) (*(int32_t *)(pDataCol))
#define TD_DATACOL_NPOINTS(pDataCol) (*(int32_t *)(pDataCol + sizeof(int32_t)))
// ---- operation on SDataCols
#define TD_DATACOLS_LEN(pDataCols) (*(int32_t *)(pDataCols))
#define TD_DATACOLS_NPOINTS(pDataCols) (*(int32_t *)(pDataCols + sizeof(int32_t)))
#endif // _TD_DATA_FORMAT_H_
src/vnode/common/
catalog/
inc/schema.h
→
src/vnode/common/inc/schema.h
浏览文件 @
e8d96d43
文件已移动
src/vnode/common/
catalog/
inc/type.h
→
src/vnode/common/inc/type.h
浏览文件 @
e8d96d43
...
...
@@ -4,7 +4,7 @@
#include <stdint.h>
typedef
enum
:
uint8_t
{
TD_DATATYPE_INVLD
=
0
,
TD_DATATYPE_INVLD
=
0
,
// invalid data type
TD_DATATYPE_BOOL
,
TD_DATATYPE_TINYINT
,
TD_DATATYPE_SMALLINT
,
...
...
src/vnode/common/src/dataformat.c
0 → 100644
浏览文件 @
e8d96d43
src/vnode/tsdb/inc/tsdbCache.h
浏览文件 @
e8d96d43
...
...
@@ -23,6 +23,7 @@ typedef struct {
// Use a doublely linked list to implement this
typedef
struct
STSDBCache
{
// Number of blocks the cache is allocated
int32_t
numOfBlocks
;
SDList
*
cacheList
;
void
*
current
;
...
...
@@ -32,7 +33,7 @@ typedef struct STSDBCache {
// ---- Operation on STSDBCacheBlock
#define TSDB_CACHE_BLOCK_DATA(pBlock) ((pBlock)->pData)
#define TSDB_CACHE_AVAIL_SPACE(pBlock) ((char *)((pBlock)->pTableInfo) - ((pBlock)->pData))
#define TSDB_TABLE_
KEY_RANGE_AT
_CACHE(pBlock, tableId) ((pBlock)->pTableInfo)[tableId]
#define TSDB_TABLE_
INFO_OF
_CACHE(pBlock, tableId) ((pBlock)->pTableInfo)[tableId]
#define TSDB_NEXT_CACHE_BLOCK(pBlock) ((pBlock)->next)
#define TSDB_PREV_CACHE_BLOCK(pBlock) ((pBlock)->prev)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录