Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
4241da56
T
TDengine
项目概览
taosdata
/
TDengine
大约 1 年 前同步成功
通知
1185
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,发现更多精彩内容 >>
提交
4241da56
编写于
4月 10, 2020
作者:
H
hjxilinx
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[td-98] update macro
上级
3f9d5cca
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
16 addition
and
14 deletion
+16
-14
src/query/tests/astTest.cpp
src/query/tests/astTest.cpp
+7
-5
src/query/tests/tsBufTest.cpp
src/query/tests/tsBufTest.cpp
+9
-9
未找到文件。
src/query/tests/astTest.cpp
浏览文件 @
4241da56
...
...
@@ -255,7 +255,7 @@ static void testQueryStr(SSchema *schema, int32_t numOfCols, char *sql, tSkipLis
printf
(
"expr is: %s
\n
"
,
str
);
SArray
*
result
=
NULL
;
// t
SQLBinaryExpr
Traverse(pExpr, pSkipList, result, tSkipListNodeFilterCallback, &result);
// t
ExprTree
Traverse(pExpr, pSkipList, result, tSkipListNodeFilterCallback, &result);
// printf("the result is:%lld\n", result.num);
//
// bool findResult = false;
...
...
@@ -533,7 +533,7 @@ tExprNode* createExpr2() {
auto
*
p2
=
(
tExprNode
*
)
calloc
(
1
,
sizeof
(
tExprNode
));
p2
->
nodeType
=
TSQL_NODE_EXPR
;
p2
->
_node
.
optr
=
TSDB_RELATION_
LARGE
_EQUAL
;
p2
->
_node
.
optr
=
TSDB_RELATION_
GREATER
_EQUAL
;
p2
->
_node
.
pLeft
=
pLeft1
;
p2
->
_node
.
pRight
=
pRight1
;
p2
->
_node
.
hasPK
=
false
;
...
...
@@ -556,7 +556,8 @@ void exprSerializeTest1() {
ASSERT_TRUE
(
size
>
0
);
char
*
b
=
tbufGetData
(
&
buf
,
false
);
tExprNode
*
p2
=
exprTreeFromBinary
(
b
,
size
);
tExprNode
*
p2
=
NULL
;
exprTreeFromBinary
(
b
,
size
,
&
p2
);
ASSERT_EQ
(
p1
->
nodeType
,
p2
->
nodeType
);
ASSERT_EQ
(
p2
->
_node
.
optr
,
p1
->
_node
.
optr
);
...
...
@@ -592,7 +593,8 @@ void exprSerializeTest2() {
ASSERT_TRUE
(
size
>
0
);
char
*
b
=
tbufGetData
(
&
buf
,
false
);
tExprNode
*
p2
=
exprTreeFromBinary
(
b
,
size
);
tExprNode
*
p2
=
NULL
;
exprTreeFromBinary
(
b
,
size
,
&
p2
);
ASSERT_EQ
(
p1
->
nodeType
,
p2
->
nodeType
);
ASSERT_EQ
(
p2
->
_node
.
optr
,
p1
->
_node
.
optr
);
...
...
@@ -617,7 +619,7 @@ void exprSerializeTest2() {
ASSERT_EQ
(
c1Right
->
nodeType
,
c2Right
->
nodeType
);
ASSERT_EQ
(
c2Right
->
nodeType
,
TSQL_NODE_EXPR
);
ASSERT_EQ
(
c2Right
->
_node
.
optr
,
TSDB_RELATION_
LARGE
_EQUAL
);
ASSERT_EQ
(
c2Right
->
_node
.
optr
,
TSDB_RELATION_
GREATER
_EQUAL
);
ASSERT_EQ
(
c2Right
->
_node
.
pRight
->
pVal
->
dKey
,
91.99
);
ASSERT_EQ
(
p2
->
_node
.
hasPK
,
true
);
...
...
src/query/tests/tsBufTest.cpp
浏览文件 @
4241da56
...
...
@@ -37,7 +37,7 @@ void simpleTest() {
int64_t
*
list
=
createTsList
(
10
,
10000000
,
30
);
tsBufAppend
(
pTSBuf
,
0
,
tag
,
(
const
char
*
)
list
,
num
*
sizeof
(
int64_t
));
EXPECT_EQ
(
pTSBuf
->
tsOrder
,
TS
QL_SO
_ASC
);
EXPECT_EQ
(
pTSBuf
->
tsOrder
,
TS
DB_ORDER
_ASC
);
EXPECT_EQ
(
pTSBuf
->
tsData
.
len
,
sizeof
(
int64_t
)
*
num
);
EXPECT_EQ
(
pTSBuf
->
block
.
tag
,
tag
);
...
...
@@ -65,7 +65,7 @@ void largeTSTest() {
EXPECT_EQ
(
pTSBuf
->
tsData
.
len
,
0
);
EXPECT_EQ
(
pTSBuf
->
block
.
tag
,
tag
);
EXPECT_EQ
(
pTSBuf
->
numOfVnodes
,
1
);
EXPECT_EQ
(
pTSBuf
->
tsOrder
,
TS
QL_SO
_ASC
);
EXPECT_EQ
(
pTSBuf
->
tsOrder
,
TS
DB_ORDER
_ASC
);
tsBufFlush
(
pTSBuf
);
EXPECT_EQ
(
pTSBuf
->
tsData
.
len
,
0
);
...
...
@@ -91,7 +91,7 @@ void multiTagsTest() {
start
+=
step
*
num
;
}
EXPECT_EQ
(
pTSBuf
->
tsOrder
,
TS
QL_SO
_ASC
);
EXPECT_EQ
(
pTSBuf
->
tsOrder
,
TS
DB_ORDER
_ASC
);
EXPECT_EQ
(
pTSBuf
->
tsData
.
len
,
num
*
sizeof
(
int64_t
));
EXPECT_EQ
(
pTSBuf
->
block
.
tag
,
numOfTags
-
1
);
...
...
@@ -127,7 +127,7 @@ void multiVnodeTagsTest() {
EXPECT_EQ
(
pTSBuf
->
numOfVnodes
,
j
+
1
);
}
EXPECT_EQ
(
pTSBuf
->
tsOrder
,
TS
QL_SO
_ASC
);
EXPECT_EQ
(
pTSBuf
->
tsOrder
,
TS
DB_ORDER
_ASC
);
EXPECT_EQ
(
pTSBuf
->
tsData
.
len
,
num
*
sizeof
(
int64_t
));
EXPECT_EQ
(
pTSBuf
->
block
.
tag
,
numOfTags
-
1
);
...
...
@@ -167,7 +167,7 @@ void loadDataTest() {
EXPECT_EQ
(
pTSBuf
->
numOfVnodes
,
j
+
1
);
}
EXPECT_EQ
(
pTSBuf
->
tsOrder
,
TS
QL_SO
_ASC
);
EXPECT_EQ
(
pTSBuf
->
tsOrder
,
TS
DB_ORDER
_ASC
);
EXPECT_EQ
(
pTSBuf
->
tsData
.
len
,
num
*
sizeof
(
int64_t
));
EXPECT_EQ
(
pTSBuf
->
block
.
tag
,
numOfTags
-
1
);
...
...
@@ -252,7 +252,7 @@ void TSTraverse() {
int64_t
s
=
taosGetTimestampUs
();
printf
(
"start:%"
PRIu64
"
\n
"
,
s
);
pTSBuf
->
cur
.
order
=
TS
QL_SO
_DESC
;
pTSBuf
->
cur
.
order
=
TS
DB_ORDER
_DESC
;
// complete reverse traverse
int32_t
x
=
0
;
...
...
@@ -263,7 +263,7 @@ void TSTraverse() {
// specify the data block with vnode and tags value
tsBufResetPos
(
pTSBuf
);
pTSBuf
->
cur
.
order
=
TS
QL_SO
_DESC
;
pTSBuf
->
cur
.
order
=
TS
DB_ORDER
_DESC
;
int32_t
startVnode
=
1
;
int32_t
startTag
=
2
;
...
...
@@ -297,7 +297,7 @@ void TSTraverse() {
/////////////////////////////////////////////////////////////////////////////////
// traverse
pTSBuf
->
cur
.
order
=
TS
QL_SO
_ASC
;
pTSBuf
->
cur
.
order
=
TS
DB_ORDER
_ASC
;
tsBufResetPos
(
pTSBuf
);
// complete forwards traverse
...
...
@@ -308,7 +308,7 @@ void TSTraverse() {
// specify the data block with vnode and tags value
tsBufResetPos
(
pTSBuf
);
pTSBuf
->
cur
.
order
=
TS
QL_SO
_ASC
;
pTSBuf
->
cur
.
order
=
TS
DB_ORDER
_ASC
;
startVnode
=
1
;
startTag
=
2
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录