Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
df277167
T
TDengine
项目概览
taosdata
/
TDengine
大约 1 年 前同步成功
通知
1184
Star
22015
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
df277167
编写于
1月 20, 2022
作者:
X
Xiaoyu Wang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
TD-13120 SELECT statement data structure definition
上级
aa4a4d05
变更
11
显示空白变更内容
内联
并排
Showing
11 changed file
with
52 addition
and
31 deletion
+52
-31
include/nodes/nodes.h
include/nodes/nodes.h
+9
-9
source/libs/parser/inc/new_sql.y
source/libs/parser/inc/new_sql.y
+0
-0
source/libs/parser/src/astTranslate.c
source/libs/parser/src/astTranslate.c
+18
-0
source/nodes/src/nodesCloneFuncs.c
source/nodes/src/nodesCloneFuncs.c
+1
-1
source/nodes/src/nodesCodeFuncs.c
source/nodes/src/nodesCodeFuncs.c
+2
-2
source/nodes/src/nodesEqualFuncs.c
source/nodes/src/nodesEqualFuncs.c
+3
-3
source/nodes/src/nodesTraverseFuncs.c
source/nodes/src/nodesTraverseFuncs.c
+14
-14
source/nodes/src/nodesUtilFuncs.c
source/nodes/src/nodesUtilFuncs.c
+2
-2
src/connector/go
src/connector/go
+1
-0
src/connector/grafanaplugin
src/connector/grafanaplugin
+1
-0
src/connector/hivemq-tdengine-extension
src/connector/hivemq-tdengine-extension
+1
-0
未找到文件。
include/nodes/nodes.h
浏览文件 @
df277167
...
...
@@ -249,20 +249,20 @@ typedef struct SSetOperator {
typedef
bool
(
*
FQueryNodeWalker
)(
SNode
*
pNode
,
void
*
pContext
);
bool
node
ArrayWalker
(
SArray
*
pArray
,
FQueryNodeWalker
walker
,
void
*
pContext
);
bool
node
TreeWalker
(
SNode
*
pNode
,
FQueryNodeWalker
walker
,
void
*
pContext
);
bool
node
sWalkArray
(
SArray
*
pArray
,
FQueryNodeWalker
walker
,
void
*
pContext
);
bool
node
sWalkNode
(
SNode
*
pNode
,
FQueryNodeWalker
walker
,
void
*
pContext
);
bool
stmtWalker
(
SNode
*
pNode
,
FQueryNodeWalker
walker
,
void
*
pContext
);
bool
nodesWalkStmt
(
SNode
*
pNode
,
FQueryNodeWalker
walker
,
void
*
pContext
);
bool
node
Equal
(
const
SNode
*
a
,
const
SNode
*
b
);
bool
node
sEqualNode
(
const
SNode
*
a
,
const
SNode
*
b
);
void
c
loneNode
(
const
SNode
*
pNode
);
void
nodesC
loneNode
(
const
SNode
*
pNode
);
int32_t
nodeToString
(
const
SNode
*
pNode
,
char
**
pStr
,
int32_t
*
pLen
);
int32_t
s
tringToNode
(
const
char
*
pStr
,
SNode
**
pNode
);
int32_t
node
sNode
ToString
(
const
SNode
*
pNode
,
char
**
pStr
,
int32_t
*
pLen
);
int32_t
nodesS
tringToNode
(
const
char
*
pStr
,
SNode
**
pNode
);
bool
i
sTimeorderQuery
(
const
SNode
*
pQuery
);
bool
i
sTimelineQuery
(
const
SNode
*
pQuery
);
bool
nodesI
sTimeorderQuery
(
const
SNode
*
pQuery
);
bool
nodesI
sTimelineQuery
(
const
SNode
*
pQuery
);
#ifdef __cplusplus
}
...
...
source/libs/parser/inc/new_sql.y
0 → 100644
浏览文件 @
df277167
source/libs/parser/src/astTranslate.c
0 → 100644
浏览文件 @
df277167
/*
* Copyright (c) 2019 TAOS Data, Inc. <jhtao@taosdata.com>
*
* This program is free software: you can use, redistribute, and/or modify
* it under the terms of the GNU Affero General Public License, version 3
* or later ("AGPL"), as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
int32_t
doTranslate
()
{
}
source/nodes/src/nodesClone.c
→
source/nodes/src/nodesClone
Funcs
.c
浏览文件 @
df277167
...
...
@@ -15,6 +15,6 @@
#include "nodes.h"
void
c
loneNode
(
const
SNode
*
pNode
)
{
void
nodesC
loneNode
(
const
SNode
*
pNode
)
{
}
source/nodes/src/nodesCode.c
→
source/nodes/src/nodesCode
Funcs
.c
浏览文件 @
df277167
...
...
@@ -15,10 +15,10 @@
#include "nodes.h"
int32_t
nodeToString
(
const
SNode
*
pNode
,
char
**
pStr
,
int32_t
*
pLen
)
{
int32_t
node
sNode
ToString
(
const
SNode
*
pNode
,
char
**
pStr
,
int32_t
*
pLen
)
{
}
int32_t
s
tringToNode
(
const
char
*
pStr
,
SNode
**
pNode
)
{
int32_t
nodesS
tringToNode
(
const
char
*
pStr
,
SNode
**
pNode
)
{
}
source/nodes/src/nodesEqual.c
→
source/nodes/src/nodesEqual
Funcs
.c
浏览文件 @
df277167
...
...
@@ -32,7 +32,7 @@
#define COMPARE_NODE_FIELD(fldname) \
do { \
if (!node
Equal
(a->fldname, b->fldname)) \
if (!node
sEqualNode
(a->fldname, b->fldname)) \
return false; \
} while (0)
...
...
@@ -57,7 +57,7 @@ static bool nodeArrayEqual(const SArray* a, const SArray* b) {
size_t
size
=
taosArrayGetSize
(
a
);
for
(
size_t
i
=
0
;
i
<
size
;
++
i
)
{
if
(
!
node
Equal
((
SNode
*
)
taosArrayGetP
(
a
,
i
),
(
SNode
*
)
taosArrayGetP
(
b
,
i
)))
{
if
(
!
node
sEqualNode
((
SNode
*
)
taosArrayGetP
(
a
,
i
),
(
SNode
*
)
taosArrayGetP
(
b
,
i
)))
{
return
false
;
}
}
...
...
@@ -101,7 +101,7 @@ static bool functionNodeEqual(const SFunctionNode* a, const SFunctionNode* b) {
return
true
;
}
bool
node
Equal
(
const
SNode
*
a
,
const
SNode
*
b
)
{
bool
node
sEqualNode
(
const
SNode
*
a
,
const
SNode
*
b
)
{
if
(
a
==
b
)
{
return
true
;
}
...
...
source/nodes/src/nodesTraverse.c
→
source/nodes/src/nodesTraverse
Funcs
.c
浏览文件 @
df277167
...
...
@@ -17,17 +17,17 @@
typedef
bool
(
*
FQueryNodeWalker
)(
SNode
*
pNode
,
void
*
pContext
);
bool
node
ArrayWalker
(
SArray
*
pArray
,
FQueryNodeWalker
walker
,
void
*
pContext
)
{
bool
node
sWalkArray
(
SArray
*
pArray
,
FQueryNodeWalker
walker
,
void
*
pContext
)
{
size_t
size
=
taosArrayGetSize
(
pArray
);
for
(
size_t
i
=
0
;
i
<
size
;
++
i
)
{
if
(
!
node
TreeWalker
((
SNode
*
)
taosArrayGetP
(
pArray
,
i
),
walker
,
pContext
))
{
if
(
!
node
sWalkNode
((
SNode
*
)
taosArrayGetP
(
pArray
,
i
),
walker
,
pContext
))
{
return
false
;
}
}
return
true
;
}
bool
node
TreeWalker
(
SNode
*
pNode
,
FQueryNodeWalker
walker
,
void
*
pContext
)
{
bool
node
sWalkNode
(
SNode
*
pNode
,
FQueryNodeWalker
walker
,
void
*
pContext
)
{
if
(
NULL
==
pNode
)
{
return
true
;
}
...
...
@@ -43,34 +43,34 @@ bool nodeTreeWalker(SNode* pNode, FQueryNodeWalker walker, void* pContext) {
return
true
;
case
QUERY_NODE_OPERATOR
:
{
SOperatorNode
*
pOpNode
=
(
SOperatorNode
*
)
pNode
;
if
(
!
node
TreeWalker
(
pOpNode
->
pLeft
,
walker
,
pContext
))
{
if
(
!
node
sWalkNode
(
pOpNode
->
pLeft
,
walker
,
pContext
))
{
return
false
;
}
return
node
TreeWalker
(
pOpNode
->
pRight
,
walker
,
pContext
);
return
node
sWalkNode
(
pOpNode
->
pRight
,
walker
,
pContext
);
}
case
QUERY_NODE_LOGIC_CONDITION
:
return
node
ArrayWalker
(((
SLogicConditionNode
*
)
pNode
)
->
pParameterList
,
walker
,
pContext
);
return
node
sWalkArray
(((
SLogicConditionNode
*
)
pNode
)
->
pParameterList
,
walker
,
pContext
);
case
QUERY_NODE_IS_NULL_CONDITION
:
return
node
TreeWalker
(((
SIsNullCondNode
*
)
pNode
)
->
pExpr
,
walker
,
pContext
);
return
node
sWalkNode
(((
SIsNullCondNode
*
)
pNode
)
->
pExpr
,
walker
,
pContext
);
case
QUERY_NODE_FUNCTION
:
return
node
ArrayWalker
(((
SFunctionNode
*
)
pNode
)
->
pParameterList
,
walker
,
pContext
);
return
node
sWalkArray
(((
SFunctionNode
*
)
pNode
)
->
pParameterList
,
walker
,
pContext
);
case
QUERY_NODE_REAL_TABLE
:
case
QUERY_NODE_TEMP_TABLE
:
return
true
;
// todo
case
QUERY_NODE_JOIN_TABLE
:
{
SJoinTableNode
*
pJoinTableNode
=
(
SJoinTableNode
*
)
pNode
;
if
(
!
node
TreeWalker
(
pJoinTableNode
->
pLeft
,
walker
,
pContext
))
{
if
(
!
node
sWalkNode
(
pJoinTableNode
->
pLeft
,
walker
,
pContext
))
{
return
false
;
}
if
(
!
node
TreeWalker
(
pJoinTableNode
->
pRight
,
walker
,
pContext
))
{
if
(
!
node
sWalkNode
(
pJoinTableNode
->
pRight
,
walker
,
pContext
))
{
return
false
;
}
return
node
TreeWalker
(
pJoinTableNode
->
pOnCond
,
walker
,
pContext
);
return
node
sWalkNode
(
pJoinTableNode
->
pOnCond
,
walker
,
pContext
);
}
case
QUERY_NODE_GROUPING_SET
:
return
node
ArrayWalker
(((
SGroupingSetNode
*
)
pNode
)
->
pParameterList
,
walker
,
pContext
);
return
node
sWalkArray
(((
SGroupingSetNode
*
)
pNode
)
->
pParameterList
,
walker
,
pContext
);
case
QUERY_NODE_ORDER_BY_EXPR
:
return
node
TreeWalker
(((
SOrderByExprNode
*
)
pNode
)
->
pExpr
,
walker
,
pContext
);
return
node
sWalkNode
(((
SOrderByExprNode
*
)
pNode
)
->
pExpr
,
walker
,
pContext
);
default:
break
;
}
...
...
@@ -78,6 +78,6 @@ bool nodeTreeWalker(SNode* pNode, FQueryNodeWalker walker, void* pContext) {
return
false
;
}
bool
stmtWalker
(
SNode
*
pNode
,
FQueryNodeWalker
walker
,
void
*
pContext
)
{
bool
nodesWalkStmt
(
SNode
*
pNode
,
FQueryNodeWalker
walker
,
void
*
pContext
)
{
}
source/nodes/src/nodesUtil.c
→
source/nodes/src/nodesUtil
Funcs
.c
浏览文件 @
df277167
...
...
@@ -15,10 +15,10 @@
#include "nodes.h"
bool
i
sTimeorderQuery
(
const
SNode
*
pQuery
)
{
bool
nodesI
sTimeorderQuery
(
const
SNode
*
pQuery
)
{
}
bool
i
sTimelineQuery
(
const
SNode
*
pQuery
)
{
bool
nodesI
sTimelineQuery
(
const
SNode
*
pQuery
)
{
}
go
@
b8f76da4
Subproject commit b8f76da4a708d158ec3cc4b844571dc4414e36b4
grafanaplugin
@
4a4d7909
Subproject commit 4a4d79099b076b8ff12d5b4fdbcba54049a6866d
hivemq-tdengine-extension
@
ce520101
Subproject commit ce5201014136503d34fecbd56494b67b4961056c
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录