Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
36670708
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
36670708
编写于
4月 07, 2022
作者:
dengyihao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add create index msg
上级
628096b3
变更
3
展开全部
隐藏空白更改
内联
并排
Showing
3 changed file
with
231 addition
and
192 deletion
+231
-192
include/common/tmsg.h
include/common/tmsg.h
+24
-19
source/common/src/tmsg.c
source/common/src/tmsg.c
+28
-4
source/libs/parser/src/parTranslater.c
source/libs/parser/src/parTranslater.c
+179
-169
未找到文件。
include/common/tmsg.h
浏览文件 @
36670708
...
...
@@ -273,11 +273,11 @@ typedef struct {
char
name
[
TSDB_COL_NAME_LEN
];
}
SSchemaEx
;
#define SSCHMEA_TYPE(s) ((s)->type)
#define SSCHMEA_SMA(s) ((s)->sma)
#define SSCHMEA_TYPE(s)
((s)->type)
#define SSCHMEA_SMA(s)
((s)->sma)
#define SSCHMEA_COLID(s) ((s)->colId)
#define SSCHMEA_BYTES(s) ((s)->bytes)
#define SSCHMEA_NAME(s) ((s)->name)
#define SSCHMEA_NAME(s)
((s)->name)
typedef
struct
{
char
name
[
TSDB_TABLE_FNAME_LEN
];
...
...
@@ -934,12 +934,12 @@ typedef struct SExplainExecInfo {
uint64_t
startupCost
;
uint64_t
totalCost
;
uint64_t
numOfRows
;
void
*
verboseInfo
;
void
*
verboseInfo
;
}
SExplainExecInfo
;
typedef
struct
{
int32_t
numOfPlans
;
SExplainExecInfo
*
subplanInfo
;
SExplainExecInfo
*
subplanInfo
;
}
SExplainRsp
;
int32_t
tSerializeSExplainRsp
(
void
*
buf
,
int32_t
bufLen
,
SExplainRsp
*
pRsp
);
...
...
@@ -989,8 +989,8 @@ int32_t tDeserializeSDCreateMnodeReq(void* buf, int32_t bufLen, SDCreateMnodeReq
typedef
struct
{
int32_t
dnodeId
;
}
SMCreateQnodeReq
,
SMDropQnodeReq
,
SDCreateQnodeReq
,
SDDropQnodeReq
,
SMCreateSnodeReq
,
SMDropSnodeReq
,
S
DCreateSnodeReq
,
SDDropSnodeReq
,
SMCreateBnodeReq
,
S
MDropBnodeReq
,
SDCreateBnodeReq
,
SDDropBnodeReq
;
}
SMCreateQnodeReq
,
SMDropQnodeReq
,
SDCreateQnodeReq
,
SDDropQnodeReq
,
SMCreateSnodeReq
,
SMDropSnodeReq
,
SDCreateSnodeReq
,
SDDropSnodeReq
,
SMCreateBnodeReq
,
SMDropBnodeReq
,
SDCreateBnodeReq
,
SDDropBnodeReq
;
int32_t
tSerializeSMCreateDropQSBNodeReq
(
void
*
buf
,
int32_t
bufLen
,
SMCreateQnodeReq
*
pReq
);
int32_t
tDeserializeSMCreateDropQSBNodeReq
(
void
*
buf
,
int32_t
bufLen
,
SMCreateQnodeReq
*
pReq
);
...
...
@@ -1432,12 +1432,12 @@ typedef struct SVCreateTbReq {
};
union
{
struct
{
tb_uid_t
suid
;
col_id_t
nCols
;
col_id_t
nBSmaCols
;
SSchemaEx
*
pSchema
;
col_id_t
nTagCols
;
SSchema
*
pTagSchema
;
tb_uid_t
suid
;
col_id_t
nCols
;
col_id_t
nBSmaCols
;
SSchemaEx
*
pSchema
;
col_id_t
nTagCols
;
SSchema
*
pTagSchema
;
SRSmaParam
*
pRSmaParam
;
}
stbCfg
;
struct
{
...
...
@@ -1445,9 +1445,9 @@ typedef struct SVCreateTbReq {
SKVRow
pTag
;
}
ctbCfg
;
struct
{
col_id_t
nCols
;
col_id_t
nBSmaCols
;
SSchemaEx
*
pSchema
;
col_id_t
nCols
;
col_id_t
nBSmaCols
;
SSchemaEx
*
pSchema
;
SRSmaParam
*
pRSmaParam
;
}
ntbCfg
;
};
...
...
@@ -2224,6 +2224,13 @@ static FORCE_INLINE void* tDecodeTSmaWrapper(void* buf, STSmaWrapper* pSW) {
return
buf
;
}
typedef
struct
{
}
SMCreateFullTextReq
;
int32_t
tSerializeSMCreateFullTextReq
(
void
*
buf
,
int32_t
bufLen
,
SMCreateFullTextReq
*
pReq
);
int32_t
tDeserializeSMCreateFullTextReq
(
void
*
buf
,
int32_t
bufLen
,
SMCreateFullTextReq
*
pReq
);
void
tFreeSMCreateFullTextReq
(
SMCreateFullTextReq
*
pReq
);
typedef
struct
{
int8_t
mqMsgType
;
int32_t
code
;
...
...
@@ -2293,9 +2300,7 @@ static FORCE_INLINE void* tDecodeSMqSubVgEp(void* buf, SMqSubVgEp* pVgEp) {
return
buf
;
}
static
FORCE_INLINE
void
tDeleteSMqCMGetSubEpRsp
(
SMqCMGetSubEpRsp
*
pRsp
)
{
taosArrayDestroyEx
(
pRsp
->
topics
,
(
void
(
*
)(
void
*
))
tDeleteSMqSubTopicEp
);
}
static
FORCE_INLINE
void
tDeleteSMqCMGetSubEpRsp
(
SMqCMGetSubEpRsp
*
pRsp
)
{
taosArrayDestroyEx
(
pRsp
->
topics
,
(
void
(
*
)(
void
*
))
tDeleteSMqSubTopicEp
);
}
static
FORCE_INLINE
int32_t
tEncodeSMqSubTopicEp
(
void
**
buf
,
const
SMqSubTopicEp
*
pTopicEp
)
{
int32_t
tlen
=
0
;
...
...
source/common/src/tmsg.c
浏览文件 @
36670708
...
...
@@ -385,7 +385,7 @@ void *tDeserializeSVCreateTbReq(void *buf, SVCreateTbReq *pReq) {
if
(
pReq
->
rollup
)
{
pReq
->
stbCfg
.
pRSmaParam
=
(
SRSmaParam
*
)
taosMemoryMalloc
(
sizeof
(
SRSmaParam
));
SRSmaParam
*
param
=
pReq
->
stbCfg
.
pRSmaParam
;
buf
=
taosDecodeBinaryTo
(
buf
,
(
void
*
)
&
param
->
xFilesFactor
,
sizeof
(
param
->
xFilesFactor
));
buf
=
taosDecodeBinaryTo
(
buf
,
(
void
*
)
&
param
->
xFilesFactor
,
sizeof
(
param
->
xFilesFactor
));
buf
=
taosDecodeFixedI32
(
buf
,
&
param
->
delay
);
buf
=
taosDecodeFixedI8
(
buf
,
&
param
->
nFuncIds
);
if
(
param
->
nFuncIds
>
0
)
{
...
...
@@ -418,7 +418,7 @@ void *tDeserializeSVCreateTbReq(void *buf, SVCreateTbReq *pReq) {
if
(
pReq
->
rollup
)
{
pReq
->
ntbCfg
.
pRSmaParam
=
(
SRSmaParam
*
)
taosMemoryMalloc
(
sizeof
(
SRSmaParam
));
SRSmaParam
*
param
=
pReq
->
ntbCfg
.
pRSmaParam
;
buf
=
taosDecodeBinaryTo
(
buf
,
(
void
*
)
&
param
->
xFilesFactor
,
sizeof
(
param
->
xFilesFactor
));
buf
=
taosDecodeBinaryTo
(
buf
,
(
void
*
)
&
param
->
xFilesFactor
,
sizeof
(
param
->
xFilesFactor
));
buf
=
taosDecodeFixedI32
(
buf
,
&
param
->
delay
);
buf
=
taosDecodeFixedI8
(
buf
,
&
param
->
nFuncIds
);
if
(
param
->
nFuncIds
>
0
)
{
...
...
@@ -808,6 +808,30 @@ int32_t tDeserializeSMDropSmaReq(void *buf, int32_t bufLen, SMDropSmaReq *pReq)
tCoderClear
(
&
decoder
);
return
0
;
}
int32_t
tSerializeSMCreateFullTextReq
(
void
*
buf
,
int32_t
bufLen
,
SMCreateFullTextReq
*
pReq
)
{
SCoder
encoder
=
{
0
};
tCoderInit
(
&
encoder
,
TD_LITTLE_ENDIAN
,
buf
,
bufLen
,
TD_ENCODER
);
if
(
tStartEncode
(
&
encoder
)
<
0
)
return
-
1
;
tEndEncode
(
&
encoder
);
int32_t
tlen
=
encoder
.
pos
;
tCoderClear
(
&
encoder
);
return
tlen
;
}
int32_t
tDeserializeSMCreateFullTextReq
(
void
*
buf
,
int32_t
bufLen
,
SMCreateFullTextReq
*
pReq
)
{
SCoder
decoder
=
{
0
};
tCoderInit
(
&
decoder
,
TD_LITTLE_ENDIAN
,
buf
,
bufLen
,
TD_DECODER
);
if
(
tStartDecode
(
&
decoder
)
<
0
)
return
-
1
;
tEndDecode
(
&
decoder
);
tCoderClear
(
&
decoder
);
return
0
;
}
void
tFreeSMCreateFullTextReq
(
SMCreateFullTextReq
*
pReq
)
{
// impl later
return
;
}
int32_t
tSerializeSStatusReq
(
void
*
buf
,
int32_t
bufLen
,
SStatusReq
*
pReq
)
{
SCoder
encoder
=
{
0
};
...
...
@@ -2769,7 +2793,7 @@ int32_t tDecodeSMqCMCommitOffsetReq(SCoder *decoder, SMqCMCommitOffsetReq *pReq)
return
0
;
}
int32_t
tSerializeSExplainRsp
(
void
*
buf
,
int32_t
bufLen
,
SExplainRsp
*
pRsp
)
{
int32_t
tSerializeSExplainRsp
(
void
*
buf
,
int32_t
bufLen
,
SExplainRsp
*
pRsp
)
{
SCoder
encoder
=
{
0
};
tCoderInit
(
&
encoder
,
TD_LITTLE_ENDIAN
,
buf
,
bufLen
,
TD_ENCODER
);
...
...
@@ -2789,7 +2813,7 @@ int32_t tSerializeSExplainRsp(void* buf, int32_t bufLen, SExplainRsp* pRsp) {
return
tlen
;
}
int32_t
tDeserializeSExplainRsp
(
void
*
buf
,
int32_t
bufLen
,
SExplainRsp
*
pRsp
)
{
int32_t
tDeserializeSExplainRsp
(
void
*
buf
,
int32_t
bufLen
,
SExplainRsp
*
pRsp
)
{
SCoder
decoder
=
{
0
};
tCoderInit
(
&
decoder
,
TD_LITTLE_ENDIAN
,
buf
,
bufLen
,
TD_DECODER
);
...
...
source/libs/parser/src/parTranslater.c
浏览文件 @
36670708
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录