Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
cb690ee2
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
cb690ee2
编写于
4月 11, 2023
作者:
M
Minglei Jin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(test/udf): use 1 as lucky number instead of 88
上级
9961f824
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
110 addition
and
110 deletion
+110
-110
tests/script/tsim/valgrind/checkUdf.sim
tests/script/tsim/valgrind/checkUdf.sim
+8
-8
tests/system-test/0-others/udfTest.py
tests/system-test/0-others/udfTest.py
+25
-25
tests/system-test/0-others/udf_cfg2.py
tests/system-test/0-others/udf_cfg2.py
+25
-25
tests/system-test/0-others/udf_create.py
tests/system-test/0-others/udf_create.py
+25
-25
tests/system-test/0-others/udf_restart_taosd.py
tests/system-test/0-others/udf_restart_taosd.py
+27
-27
未找到文件。
tests/script/tsim/valgrind/checkUdf.sim
浏览文件 @
cb690ee2
...
@@ -29,10 +29,10 @@ sql select udf1(f) from t;
...
@@ -29,10 +29,10 @@ sql select udf1(f) from t;
if $rows != 2 then
if $rows != 2 then
return -1
return -1
endi
endi
if $data00 !=
88
then
if $data00 !=
1
then
return -1
return -1
endi
endi
if $data10 !=
88
then
if $data10 !=
1
then
return -1
return -1
endi
endi
...
@@ -51,10 +51,10 @@ sql select udf1(f1, f2) from t2;
...
@@ -51,10 +51,10 @@ sql select udf1(f1, f2) from t2;
if $rows != 2 then
if $rows != 2 then
return -1
return -1
endi
endi
if $data00 !=
88
then
if $data00 !=
1
then
return -1
return -1
endi
endi
if $data10 !=
88
then
if $data10 !=
1
then
return -1
return -1
endi
endi
...
@@ -72,10 +72,10 @@ print $rows , $data00 , $data10 , $data20 , $data30
...
@@ -72,10 +72,10 @@ print $rows , $data00 , $data10 , $data20 , $data30
if $rows != 4 then
if $rows != 4 then
return -1
return -1
endi
endi
if $data00 !=
88
then
if $data00 !=
1
then
return -1
return -1
endi
endi
if $data10 !=
88
then
if $data10 !=
1
then
return -1
return -1
endi
endi
...
@@ -114,10 +114,10 @@ print $rows , $data00 , $data01
...
@@ -114,10 +114,10 @@ print $rows , $data00 , $data01
if $rows != 1 then
if $rows != 1 then
return -1
return -1
endi
endi
if $data00 !=
176
.000000000 then
if $data00 !=
2
.000000000 then
return -1
return -1
endi
endi
if $data01 != 1
52.420471066
then
if $data01 != 1
.732050808
then
return -1
return -1
endi
endi
...
...
tests/system-test/0-others/udfTest.py
浏览文件 @
cb690ee2
...
@@ -191,20 +191,20 @@ class TDTestCase:
...
@@ -191,20 +191,20 @@ class TDTestCase:
tdSql
.
checkData
(
0
,
0
,
None
)
tdSql
.
checkData
(
0
,
0
,
None
)
tdSql
.
checkData
(
0
,
1
,
None
)
tdSql
.
checkData
(
0
,
1
,
None
)
tdSql
.
checkData
(
0
,
2
,
1
)
tdSql
.
checkData
(
0
,
2
,
1
)
tdSql
.
checkData
(
0
,
3
,
88
)
tdSql
.
checkData
(
0
,
3
,
1
)
tdSql
.
checkData
(
0
,
4
,
1.000000000
)
tdSql
.
checkData
(
0
,
4
,
1.000000000
)
tdSql
.
checkData
(
0
,
5
,
88
)
tdSql
.
checkData
(
0
,
5
,
1
)
tdSql
.
checkData
(
0
,
6
,
"binary1"
)
tdSql
.
checkData
(
0
,
6
,
"binary1"
)
tdSql
.
checkData
(
0
,
7
,
88
)
tdSql
.
checkData
(
0
,
7
,
1
)
tdSql
.
checkData
(
3
,
0
,
3
)
tdSql
.
checkData
(
3
,
0
,
3
)
tdSql
.
checkData
(
3
,
1
,
88
)
tdSql
.
checkData
(
3
,
1
,
1
)
tdSql
.
checkData
(
3
,
2
,
33333
)
tdSql
.
checkData
(
3
,
2
,
33333
)
tdSql
.
checkData
(
3
,
3
,
88
)
tdSql
.
checkData
(
3
,
3
,
1
)
tdSql
.
checkData
(
3
,
4
,
33.000000000
)
tdSql
.
checkData
(
3
,
4
,
33.000000000
)
tdSql
.
checkData
(
3
,
5
,
88
)
tdSql
.
checkData
(
3
,
5
,
1
)
tdSql
.
checkData
(
3
,
6
,
"binary1"
)
tdSql
.
checkData
(
3
,
6
,
"binary1"
)
tdSql
.
checkData
(
3
,
7
,
88
)
tdSql
.
checkData
(
3
,
7
,
1
)
tdSql
.
checkData
(
11
,
0
,
None
)
tdSql
.
checkData
(
11
,
0
,
None
)
tdSql
.
checkData
(
11
,
1
,
None
)
tdSql
.
checkData
(
11
,
1
,
None
)
...
@@ -213,7 +213,7 @@ class TDTestCase:
...
@@ -213,7 +213,7 @@ class TDTestCase:
tdSql
.
checkData
(
11
,
4
,
None
)
tdSql
.
checkData
(
11
,
4
,
None
)
tdSql
.
checkData
(
11
,
5
,
None
)
tdSql
.
checkData
(
11
,
5
,
None
)
tdSql
.
checkData
(
11
,
6
,
"binary1"
)
tdSql
.
checkData
(
11
,
6
,
"binary1"
)
tdSql
.
checkData
(
11
,
7
,
88
)
tdSql
.
checkData
(
11
,
7
,
1
)
tdSql
.
query
(
"select c1 , udf1(c1) ,c2 ,udf1(c2), c3 ,udf1(c3), c4 ,udf1(c4) from stb1 order by c1"
)
tdSql
.
query
(
"select c1 , udf1(c1) ,c2 ,udf1(c2), c3 ,udf1(c3), c4 ,udf1(c4) from stb1 order by c1"
)
tdSql
.
checkData
(
0
,
0
,
None
)
tdSql
.
checkData
(
0
,
0
,
None
)
...
@@ -226,13 +226,13 @@ class TDTestCase:
...
@@ -226,13 +226,13 @@ class TDTestCase:
tdSql
.
checkData
(
0
,
7
,
None
)
tdSql
.
checkData
(
0
,
7
,
None
)
tdSql
.
checkData
(
20
,
0
,
8
)
tdSql
.
checkData
(
20
,
0
,
8
)
tdSql
.
checkData
(
20
,
1
,
88
)
tdSql
.
checkData
(
20
,
1
,
1
)
tdSql
.
checkData
(
20
,
2
,
88888
)
tdSql
.
checkData
(
20
,
2
,
88888
)
tdSql
.
checkData
(
20
,
3
,
88
)
tdSql
.
checkData
(
20
,
3
,
1
)
tdSql
.
checkData
(
20
,
4
,
888
)
tdSql
.
checkData
(
20
,
4
,
888
)
tdSql
.
checkData
(
20
,
5
,
88
)
tdSql
.
checkData
(
20
,
5
,
1
)
tdSql
.
checkData
(
20
,
6
,
88
)
tdSql
.
checkData
(
20
,
6
,
88
)
tdSql
.
checkData
(
20
,
7
,
88
)
tdSql
.
checkData
(
20
,
7
,
1
)
# aggregate functions
# aggregate functions
...
@@ -375,14 +375,14 @@ class TDTestCase:
...
@@ -375,14 +375,14 @@ class TDTestCase:
tdSql
.
checkRows
(
25
)
tdSql
.
checkRows
(
25
)
tdSql
.
checkData
(
0
,
0
,
None
)
tdSql
.
checkData
(
0
,
0
,
None
)
tdSql
.
checkData
(
0
,
1
,
None
)
tdSql
.
checkData
(
0
,
1
,
None
)
tdSql
.
checkData
(
1
,
0
,
88
)
tdSql
.
checkData
(
1
,
0
,
1
)
tdSql
.
checkData
(
1
,
1
,
8
)
tdSql
.
checkData
(
1
,
1
,
8
)
tdSql
.
query
(
"select abs(udf1(c1)) , abs(ceil(c1)) from ct1 order by ts;"
)
tdSql
.
query
(
"select abs(udf1(c1)) , abs(ceil(c1)) from ct1 order by ts;"
)
tdSql
.
checkRows
(
13
)
tdSql
.
checkRows
(
13
)
tdSql
.
checkData
(
0
,
0
,
88
)
tdSql
.
checkData
(
0
,
0
,
1
)
tdSql
.
checkData
(
0
,
1
,
8
)
tdSql
.
checkData
(
0
,
1
,
8
)
tdSql
.
checkData
(
1
,
0
,
88
)
tdSql
.
checkData
(
1
,
0
,
1
)
tdSql
.
checkData
(
1
,
1
,
7
)
tdSql
.
checkData
(
1
,
1
,
7
)
# bug fix for crash
# bug fix for crash
...
@@ -401,9 +401,9 @@ class TDTestCase:
...
@@ -401,9 +401,9 @@ class TDTestCase:
tdSql
.
query
(
"select c1 ,udf1(c1) , c6 ,udf1(c6) from stb1 where c1 > 8 order by ts"
)
tdSql
.
query
(
"select c1 ,udf1(c1) , c6 ,udf1(c6) from stb1 where c1 > 8 order by ts"
)
tdSql
.
checkRows
(
3
)
tdSql
.
checkRows
(
3
)
tdSql
.
checkData
(
0
,
0
,
9
)
tdSql
.
checkData
(
0
,
0
,
9
)
tdSql
.
checkData
(
0
,
1
,
88
)
tdSql
.
checkData
(
0
,
1
,
1
)
tdSql
.
checkData
(
0
,
2
,
-
99.990000000
)
tdSql
.
checkData
(
0
,
2
,
-
99.990000000
)
tdSql
.
checkData
(
0
,
3
,
88
)
tdSql
.
checkData
(
0
,
3
,
1
)
tdSql
.
query
(
"select sub1.c1, sub2.c2 from sub1, sub2 where sub1.ts=sub2.ts and sub1.c1 is not null"
)
tdSql
.
query
(
"select sub1.c1, sub2.c2 from sub1, sub2 where sub1.ts=sub2.ts and sub1.c1 is not null"
)
tdSql
.
checkData
(
0
,
0
,
0
)
tdSql
.
checkData
(
0
,
0
,
0
)
...
@@ -412,20 +412,20 @@ class TDTestCase:
...
@@ -412,20 +412,20 @@ class TDTestCase:
tdSql
.
checkData
(
1
,
1
,
10
)
tdSql
.
checkData
(
1
,
1
,
10
)
tdSql
.
query
(
"select udf1(sub1.c1), udf1(sub2.c2) from sub1, sub2 where sub1.ts=sub2.ts and sub1.c1 is not null"
)
tdSql
.
query
(
"select udf1(sub1.c1), udf1(sub2.c2) from sub1, sub2 where sub1.ts=sub2.ts and sub1.c1 is not null"
)
tdSql
.
checkData
(
0
,
0
,
88
)
tdSql
.
checkData
(
0
,
0
,
1
)
tdSql
.
checkData
(
0
,
1
,
88
)
tdSql
.
checkData
(
0
,
1
,
1
)
tdSql
.
checkData
(
1
,
0
,
88
)
tdSql
.
checkData
(
1
,
0
,
1
)
tdSql
.
checkData
(
1
,
1
,
88
)
tdSql
.
checkData
(
1
,
1
,
1
)
tdSql
.
query
(
"select sub1.c1 , udf1(sub1.c1), sub2.c2 ,udf1(sub2.c2) from sub1, sub2 where sub1.ts=sub2.ts and sub1.c1 is not null"
)
tdSql
.
query
(
"select sub1.c1 , udf1(sub1.c1), sub2.c2 ,udf1(sub2.c2) from sub1, sub2 where sub1.ts=sub2.ts and sub1.c1 is not null"
)
tdSql
.
checkData
(
0
,
0
,
0
)
tdSql
.
checkData
(
0
,
0
,
0
)
tdSql
.
checkData
(
0
,
1
,
88
)
tdSql
.
checkData
(
0
,
1
,
1
)
tdSql
.
checkData
(
0
,
2
,
0
)
tdSql
.
checkData
(
0
,
2
,
0
)
tdSql
.
checkData
(
0
,
3
,
88
)
tdSql
.
checkData
(
0
,
3
,
1
)
tdSql
.
checkData
(
1
,
0
,
1
)
tdSql
.
checkData
(
1
,
0
,
1
)
tdSql
.
checkData
(
1
,
1
,
88
)
tdSql
.
checkData
(
1
,
1
,
1
)
tdSql
.
checkData
(
1
,
2
,
10
)
tdSql
.
checkData
(
1
,
2
,
10
)
tdSql
.
checkData
(
1
,
3
,
88
)
tdSql
.
checkData
(
1
,
3
,
1
)
tdSql
.
query
(
"select udf2(sub1.c1), udf2(sub2.c2) from sub1, sub2 where sub1.ts=sub2.ts and sub1.c1 is not null"
)
tdSql
.
query
(
"select udf2(sub1.c1), udf2(sub2.c2) from sub1, sub2 where sub1.ts=sub2.ts and sub1.c1 is not null"
)
tdSql
.
checkData
(
0
,
0
,
16.881943016
)
tdSql
.
checkData
(
0
,
0
,
16.881943016
)
...
...
tests/system-test/0-others/udf_cfg2.py
浏览文件 @
cb690ee2
...
@@ -193,20 +193,20 @@ class TDTestCase:
...
@@ -193,20 +193,20 @@ class TDTestCase:
tdSql
.
checkData
(
0
,
0
,
None
)
tdSql
.
checkData
(
0
,
0
,
None
)
tdSql
.
checkData
(
0
,
1
,
None
)
tdSql
.
checkData
(
0
,
1
,
None
)
tdSql
.
checkData
(
0
,
2
,
1
)
tdSql
.
checkData
(
0
,
2
,
1
)
tdSql
.
checkData
(
0
,
3
,
88
)
tdSql
.
checkData
(
0
,
3
,
1
)
tdSql
.
checkData
(
0
,
4
,
1.000000000
)
tdSql
.
checkData
(
0
,
4
,
1.000000000
)
tdSql
.
checkData
(
0
,
5
,
88
)
tdSql
.
checkData
(
0
,
5
,
1
)
tdSql
.
checkData
(
0
,
6
,
"binary1"
)
tdSql
.
checkData
(
0
,
6
,
"binary1"
)
tdSql
.
checkData
(
0
,
7
,
88
)
tdSql
.
checkData
(
0
,
7
,
1
)
tdSql
.
checkData
(
3
,
0
,
3
)
tdSql
.
checkData
(
3
,
0
,
3
)
tdSql
.
checkData
(
3
,
1
,
88
)
tdSql
.
checkData
(
3
,
1
,
1
)
tdSql
.
checkData
(
3
,
2
,
33333
)
tdSql
.
checkData
(
3
,
2
,
33333
)
tdSql
.
checkData
(
3
,
3
,
88
)
tdSql
.
checkData
(
3
,
3
,
1
)
tdSql
.
checkData
(
3
,
4
,
33.000000000
)
tdSql
.
checkData
(
3
,
4
,
33.000000000
)
tdSql
.
checkData
(
3
,
5
,
88
)
tdSql
.
checkData
(
3
,
5
,
1
)
tdSql
.
checkData
(
3
,
6
,
"binary1"
)
tdSql
.
checkData
(
3
,
6
,
"binary1"
)
tdSql
.
checkData
(
3
,
7
,
88
)
tdSql
.
checkData
(
3
,
7
,
1
)
tdSql
.
checkData
(
11
,
0
,
None
)
tdSql
.
checkData
(
11
,
0
,
None
)
tdSql
.
checkData
(
11
,
1
,
None
)
tdSql
.
checkData
(
11
,
1
,
None
)
...
@@ -215,7 +215,7 @@ class TDTestCase:
...
@@ -215,7 +215,7 @@ class TDTestCase:
tdSql
.
checkData
(
11
,
4
,
None
)
tdSql
.
checkData
(
11
,
4
,
None
)
tdSql
.
checkData
(
11
,
5
,
None
)
tdSql
.
checkData
(
11
,
5
,
None
)
tdSql
.
checkData
(
11
,
6
,
"binary1"
)
tdSql
.
checkData
(
11
,
6
,
"binary1"
)
tdSql
.
checkData
(
11
,
7
,
88
)
tdSql
.
checkData
(
11
,
7
,
1
)
tdSql
.
query
(
"select c1 , udf1(c1) ,c2 ,udf1(c2), c3 ,udf1(c3), c4 ,udf1(c4) from stb1 order by c1"
)
tdSql
.
query
(
"select c1 , udf1(c1) ,c2 ,udf1(c2), c3 ,udf1(c3), c4 ,udf1(c4) from stb1 order by c1"
)
tdSql
.
checkData
(
0
,
0
,
None
)
tdSql
.
checkData
(
0
,
0
,
None
)
...
@@ -228,13 +228,13 @@ class TDTestCase:
...
@@ -228,13 +228,13 @@ class TDTestCase:
tdSql
.
checkData
(
0
,
7
,
None
)
tdSql
.
checkData
(
0
,
7
,
None
)
tdSql
.
checkData
(
20
,
0
,
8
)
tdSql
.
checkData
(
20
,
0
,
8
)
tdSql
.
checkData
(
20
,
1
,
88
)
tdSql
.
checkData
(
20
,
1
,
1
)
tdSql
.
checkData
(
20
,
2
,
88888
)
tdSql
.
checkData
(
20
,
2
,
88888
)
tdSql
.
checkData
(
20
,
3
,
88
)
tdSql
.
checkData
(
20
,
3
,
1
)
tdSql
.
checkData
(
20
,
4
,
888
)
tdSql
.
checkData
(
20
,
4
,
888
)
tdSql
.
checkData
(
20
,
5
,
88
)
tdSql
.
checkData
(
20
,
5
,
1
)
tdSql
.
checkData
(
20
,
6
,
88
)
tdSql
.
checkData
(
20
,
6
,
88
)
tdSql
.
checkData
(
20
,
7
,
88
)
tdSql
.
checkData
(
20
,
7
,
1
)
# aggregate functions
# aggregate functions
...
@@ -377,14 +377,14 @@ class TDTestCase:
...
@@ -377,14 +377,14 @@ class TDTestCase:
tdSql
.
checkRows
(
25
)
tdSql
.
checkRows
(
25
)
tdSql
.
checkData
(
0
,
0
,
None
)
tdSql
.
checkData
(
0
,
0
,
None
)
tdSql
.
checkData
(
0
,
1
,
None
)
tdSql
.
checkData
(
0
,
1
,
None
)
tdSql
.
checkData
(
1
,
0
,
88
)
tdSql
.
checkData
(
1
,
0
,
1
)
tdSql
.
checkData
(
1
,
1
,
8
)
tdSql
.
checkData
(
1
,
1
,
8
)
tdSql
.
query
(
"select abs(udf1(c1)) , abs(ceil(c1)) from ct1 order by ts;"
)
tdSql
.
query
(
"select abs(udf1(c1)) , abs(ceil(c1)) from ct1 order by ts;"
)
tdSql
.
checkRows
(
13
)
tdSql
.
checkRows
(
13
)
tdSql
.
checkData
(
0
,
0
,
88
)
tdSql
.
checkData
(
0
,
0
,
1
)
tdSql
.
checkData
(
0
,
1
,
8
)
tdSql
.
checkData
(
0
,
1
,
8
)
tdSql
.
checkData
(
1
,
0
,
88
)
tdSql
.
checkData
(
1
,
0
,
1
)
tdSql
.
checkData
(
1
,
1
,
7
)
tdSql
.
checkData
(
1
,
1
,
7
)
# bug fix for crash
# bug fix for crash
...
@@ -403,9 +403,9 @@ class TDTestCase:
...
@@ -403,9 +403,9 @@ class TDTestCase:
tdSql
.
query
(
"select c1 ,udf1(c1) , c6 ,udf1(c6) from stb1 where c1 > 8 order by ts"
)
tdSql
.
query
(
"select c1 ,udf1(c1) , c6 ,udf1(c6) from stb1 where c1 > 8 order by ts"
)
tdSql
.
checkRows
(
3
)
tdSql
.
checkRows
(
3
)
tdSql
.
checkData
(
0
,
0
,
9
)
tdSql
.
checkData
(
0
,
0
,
9
)
tdSql
.
checkData
(
0
,
1
,
88
)
tdSql
.
checkData
(
0
,
1
,
1
)
tdSql
.
checkData
(
0
,
2
,
-
99.990000000
)
tdSql
.
checkData
(
0
,
2
,
-
99.990000000
)
tdSql
.
checkData
(
0
,
3
,
88
)
tdSql
.
checkData
(
0
,
3
,
1
)
tdSql
.
query
(
"select sub1.c1, sub2.c2 from sub1, sub2 where sub1.ts=sub2.ts and sub1.c1 is not null"
)
tdSql
.
query
(
"select sub1.c1, sub2.c2 from sub1, sub2 where sub1.ts=sub2.ts and sub1.c1 is not null"
)
tdSql
.
checkData
(
0
,
0
,
0
)
tdSql
.
checkData
(
0
,
0
,
0
)
...
@@ -414,20 +414,20 @@ class TDTestCase:
...
@@ -414,20 +414,20 @@ class TDTestCase:
tdSql
.
checkData
(
1
,
1
,
10
)
tdSql
.
checkData
(
1
,
1
,
10
)
tdSql
.
query
(
"select udf1(sub1.c1), udf1(sub2.c2) from sub1, sub2 where sub1.ts=sub2.ts and sub1.c1 is not null"
)
tdSql
.
query
(
"select udf1(sub1.c1), udf1(sub2.c2) from sub1, sub2 where sub1.ts=sub2.ts and sub1.c1 is not null"
)
tdSql
.
checkData
(
0
,
0
,
88
)
tdSql
.
checkData
(
0
,
0
,
1
)
tdSql
.
checkData
(
0
,
1
,
88
)
tdSql
.
checkData
(
0
,
1
,
1
)
tdSql
.
checkData
(
1
,
0
,
88
)
tdSql
.
checkData
(
1
,
0
,
1
)
tdSql
.
checkData
(
1
,
1
,
88
)
tdSql
.
checkData
(
1
,
1
,
1
)
tdSql
.
query
(
"select sub1.c1 , udf1(sub1.c1), sub2.c2 ,udf1(sub2.c2) from sub1, sub2 where sub1.ts=sub2.ts and sub1.c1 is not null"
)
tdSql
.
query
(
"select sub1.c1 , udf1(sub1.c1), sub2.c2 ,udf1(sub2.c2) from sub1, sub2 where sub1.ts=sub2.ts and sub1.c1 is not null"
)
tdSql
.
checkData
(
0
,
0
,
0
)
tdSql
.
checkData
(
0
,
0
,
0
)
tdSql
.
checkData
(
0
,
1
,
88
)
tdSql
.
checkData
(
0
,
1
,
1
)
tdSql
.
checkData
(
0
,
2
,
0
)
tdSql
.
checkData
(
0
,
2
,
0
)
tdSql
.
checkData
(
0
,
3
,
88
)
tdSql
.
checkData
(
0
,
3
,
1
)
tdSql
.
checkData
(
1
,
0
,
1
)
tdSql
.
checkData
(
1
,
0
,
1
)
tdSql
.
checkData
(
1
,
1
,
88
)
tdSql
.
checkData
(
1
,
1
,
1
)
tdSql
.
checkData
(
1
,
2
,
10
)
tdSql
.
checkData
(
1
,
2
,
10
)
tdSql
.
checkData
(
1
,
3
,
88
)
tdSql
.
checkData
(
1
,
3
,
1
)
tdSql
.
query
(
"select udf2(sub1.c1), udf2(sub2.c2) from sub1, sub2 where sub1.ts=sub2.ts and sub1.c1 is not null"
)
tdSql
.
query
(
"select udf2(sub1.c1), udf2(sub2.c2) from sub1, sub2 where sub1.ts=sub2.ts and sub1.c1 is not null"
)
tdSql
.
checkData
(
0
,
0
,
16.881943016
)
tdSql
.
checkData
(
0
,
0
,
16.881943016
)
...
...
tests/system-test/0-others/udf_create.py
浏览文件 @
cb690ee2
...
@@ -193,20 +193,20 @@ class TDTestCase:
...
@@ -193,20 +193,20 @@ class TDTestCase:
tdSql
.
checkData
(
0
,
0
,
None
)
tdSql
.
checkData
(
0
,
0
,
None
)
tdSql
.
checkData
(
0
,
1
,
None
)
tdSql
.
checkData
(
0
,
1
,
None
)
tdSql
.
checkData
(
0
,
2
,
1
)
tdSql
.
checkData
(
0
,
2
,
1
)
tdSql
.
checkData
(
0
,
3
,
88
)
tdSql
.
checkData
(
0
,
3
,
1
)
tdSql
.
checkData
(
0
,
4
,
1.000000000
)
tdSql
.
checkData
(
0
,
4
,
1.000000000
)
tdSql
.
checkData
(
0
,
5
,
88
)
tdSql
.
checkData
(
0
,
5
,
1
)
tdSql
.
checkData
(
0
,
6
,
"binary1"
)
tdSql
.
checkData
(
0
,
6
,
"binary1"
)
tdSql
.
checkData
(
0
,
7
,
88
)
tdSql
.
checkData
(
0
,
7
,
1
)
tdSql
.
checkData
(
3
,
0
,
3
)
tdSql
.
checkData
(
3
,
0
,
3
)
tdSql
.
checkData
(
3
,
1
,
88
)
tdSql
.
checkData
(
3
,
1
,
1
)
tdSql
.
checkData
(
3
,
2
,
33333
)
tdSql
.
checkData
(
3
,
2
,
33333
)
tdSql
.
checkData
(
3
,
3
,
88
)
tdSql
.
checkData
(
3
,
3
,
1
)
tdSql
.
checkData
(
3
,
4
,
33.000000000
)
tdSql
.
checkData
(
3
,
4
,
33.000000000
)
tdSql
.
checkData
(
3
,
5
,
88
)
tdSql
.
checkData
(
3
,
5
,
1
)
tdSql
.
checkData
(
3
,
6
,
"binary1"
)
tdSql
.
checkData
(
3
,
6
,
"binary1"
)
tdSql
.
checkData
(
3
,
7
,
88
)
tdSql
.
checkData
(
3
,
7
,
1
)
tdSql
.
checkData
(
11
,
0
,
None
)
tdSql
.
checkData
(
11
,
0
,
None
)
tdSql
.
checkData
(
11
,
1
,
None
)
tdSql
.
checkData
(
11
,
1
,
None
)
...
@@ -215,7 +215,7 @@ class TDTestCase:
...
@@ -215,7 +215,7 @@ class TDTestCase:
tdSql
.
checkData
(
11
,
4
,
None
)
tdSql
.
checkData
(
11
,
4
,
None
)
tdSql
.
checkData
(
11
,
5
,
None
)
tdSql
.
checkData
(
11
,
5
,
None
)
tdSql
.
checkData
(
11
,
6
,
"binary1"
)
tdSql
.
checkData
(
11
,
6
,
"binary1"
)
tdSql
.
checkData
(
11
,
7
,
88
)
tdSql
.
checkData
(
11
,
7
,
1
)
tdSql
.
query
(
"select c1 , udf1(c1) ,c2 ,udf1(c2), c3 ,udf1(c3), c4 ,udf1(c4) from stb1 order by c1"
)
tdSql
.
query
(
"select c1 , udf1(c1) ,c2 ,udf1(c2), c3 ,udf1(c3), c4 ,udf1(c4) from stb1 order by c1"
)
tdSql
.
checkData
(
0
,
0
,
None
)
tdSql
.
checkData
(
0
,
0
,
None
)
...
@@ -228,13 +228,13 @@ class TDTestCase:
...
@@ -228,13 +228,13 @@ class TDTestCase:
tdSql
.
checkData
(
0
,
7
,
None
)
tdSql
.
checkData
(
0
,
7
,
None
)
tdSql
.
checkData
(
20
,
0
,
8
)
tdSql
.
checkData
(
20
,
0
,
8
)
tdSql
.
checkData
(
20
,
1
,
88
)
tdSql
.
checkData
(
20
,
1
,
1
)
tdSql
.
checkData
(
20
,
2
,
88888
)
tdSql
.
checkData
(
20
,
2
,
88888
)
tdSql
.
checkData
(
20
,
3
,
88
)
tdSql
.
checkData
(
20
,
3
,
1
)
tdSql
.
checkData
(
20
,
4
,
888
)
tdSql
.
checkData
(
20
,
4
,
888
)
tdSql
.
checkData
(
20
,
5
,
88
)
tdSql
.
checkData
(
20
,
5
,
1
)
tdSql
.
checkData
(
20
,
6
,
88
)
tdSql
.
checkData
(
20
,
6
,
88
)
tdSql
.
checkData
(
20
,
7
,
88
)
tdSql
.
checkData
(
20
,
7
,
1
)
# aggregate functions
# aggregate functions
...
@@ -377,14 +377,14 @@ class TDTestCase:
...
@@ -377,14 +377,14 @@ class TDTestCase:
tdSql
.
checkRows
(
25
)
tdSql
.
checkRows
(
25
)
tdSql
.
checkData
(
0
,
0
,
None
)
tdSql
.
checkData
(
0
,
0
,
None
)
tdSql
.
checkData
(
0
,
1
,
None
)
tdSql
.
checkData
(
0
,
1
,
None
)
tdSql
.
checkData
(
1
,
0
,
88
)
tdSql
.
checkData
(
1
,
0
,
1
)
tdSql
.
checkData
(
1
,
1
,
8
)
tdSql
.
checkData
(
1
,
1
,
8
)
tdSql
.
query
(
"select abs(udf1(c1)) , abs(ceil(c1)) from ct1 order by ts;"
)
tdSql
.
query
(
"select abs(udf1(c1)) , abs(ceil(c1)) from ct1 order by ts;"
)
tdSql
.
checkRows
(
13
)
tdSql
.
checkRows
(
13
)
tdSql
.
checkData
(
0
,
0
,
88
)
tdSql
.
checkData
(
0
,
0
,
1
)
tdSql
.
checkData
(
0
,
1
,
8
)
tdSql
.
checkData
(
0
,
1
,
8
)
tdSql
.
checkData
(
1
,
0
,
88
)
tdSql
.
checkData
(
1
,
0
,
1
)
tdSql
.
checkData
(
1
,
1
,
7
)
tdSql
.
checkData
(
1
,
1
,
7
)
# bug fix for crash
# bug fix for crash
...
@@ -403,9 +403,9 @@ class TDTestCase:
...
@@ -403,9 +403,9 @@ class TDTestCase:
tdSql
.
query
(
"select c1 ,udf1(c1) , c6 ,udf1(c6) from stb1 where c1 > 8 order by ts"
)
tdSql
.
query
(
"select c1 ,udf1(c1) , c6 ,udf1(c6) from stb1 where c1 > 8 order by ts"
)
tdSql
.
checkRows
(
3
)
tdSql
.
checkRows
(
3
)
tdSql
.
checkData
(
0
,
0
,
9
)
tdSql
.
checkData
(
0
,
0
,
9
)
tdSql
.
checkData
(
0
,
1
,
88
)
tdSql
.
checkData
(
0
,
1
,
1
)
tdSql
.
checkData
(
0
,
2
,
-
99.990000000
)
tdSql
.
checkData
(
0
,
2
,
-
99.990000000
)
tdSql
.
checkData
(
0
,
3
,
88
)
tdSql
.
checkData
(
0
,
3
,
1
)
tdSql
.
query
(
"select sub1.c1, sub2.c2 from sub1, sub2 where sub1.ts=sub2.ts and sub1.c1 is not null"
)
tdSql
.
query
(
"select sub1.c1, sub2.c2 from sub1, sub2 where sub1.ts=sub2.ts and sub1.c1 is not null"
)
tdSql
.
checkData
(
0
,
0
,
0
)
tdSql
.
checkData
(
0
,
0
,
0
)
...
@@ -414,20 +414,20 @@ class TDTestCase:
...
@@ -414,20 +414,20 @@ class TDTestCase:
tdSql
.
checkData
(
1
,
1
,
10
)
tdSql
.
checkData
(
1
,
1
,
10
)
tdSql
.
query
(
"select udf1(sub1.c1), udf1(sub2.c2) from sub1, sub2 where sub1.ts=sub2.ts and sub1.c1 is not null"
)
tdSql
.
query
(
"select udf1(sub1.c1), udf1(sub2.c2) from sub1, sub2 where sub1.ts=sub2.ts and sub1.c1 is not null"
)
tdSql
.
checkData
(
0
,
0
,
88
)
tdSql
.
checkData
(
0
,
0
,
1
)
tdSql
.
checkData
(
0
,
1
,
88
)
tdSql
.
checkData
(
0
,
1
,
1
)
tdSql
.
checkData
(
1
,
0
,
88
)
tdSql
.
checkData
(
1
,
0
,
1
)
tdSql
.
checkData
(
1
,
1
,
88
)
tdSql
.
checkData
(
1
,
1
,
1
)
tdSql
.
query
(
"select sub1.c1 , udf1(sub1.c1), sub2.c2 ,udf1(sub2.c2) from sub1, sub2 where sub1.ts=sub2.ts and sub1.c1 is not null"
)
tdSql
.
query
(
"select sub1.c1 , udf1(sub1.c1), sub2.c2 ,udf1(sub2.c2) from sub1, sub2 where sub1.ts=sub2.ts and sub1.c1 is not null"
)
tdSql
.
checkData
(
0
,
0
,
0
)
tdSql
.
checkData
(
0
,
0
,
0
)
tdSql
.
checkData
(
0
,
1
,
88
)
tdSql
.
checkData
(
0
,
1
,
1
)
tdSql
.
checkData
(
0
,
2
,
0
)
tdSql
.
checkData
(
0
,
2
,
0
)
tdSql
.
checkData
(
0
,
3
,
88
)
tdSql
.
checkData
(
0
,
3
,
1
)
tdSql
.
checkData
(
1
,
0
,
1
)
tdSql
.
checkData
(
1
,
0
,
1
)
tdSql
.
checkData
(
1
,
1
,
88
)
tdSql
.
checkData
(
1
,
1
,
1
)
tdSql
.
checkData
(
1
,
2
,
10
)
tdSql
.
checkData
(
1
,
2
,
10
)
tdSql
.
checkData
(
1
,
3
,
88
)
tdSql
.
checkData
(
1
,
3
,
1
)
tdSql
.
query
(
"select udf2(sub1.c1), udf2(sub2.c2) from sub1, sub2 where sub1.ts=sub2.ts and sub1.c1 is not null"
)
tdSql
.
query
(
"select udf2(sub1.c1), udf2(sub2.c2) from sub1, sub2 where sub1.ts=sub2.ts and sub1.c1 is not null"
)
tdSql
.
checkData
(
0
,
0
,
16.881943016
)
tdSql
.
checkData
(
0
,
0
,
16.881943016
)
...
...
tests/system-test/0-others/udf_restart_taosd.py
浏览文件 @
cb690ee2
...
@@ -190,20 +190,20 @@ class TDTestCase:
...
@@ -190,20 +190,20 @@ class TDTestCase:
tdSql
.
checkData
(
0
,
0
,
None
)
tdSql
.
checkData
(
0
,
0
,
None
)
tdSql
.
checkData
(
0
,
1
,
None
)
tdSql
.
checkData
(
0
,
1
,
None
)
tdSql
.
checkData
(
0
,
2
,
1
)
tdSql
.
checkData
(
0
,
2
,
1
)
tdSql
.
checkData
(
0
,
3
,
88
)
tdSql
.
checkData
(
0
,
3
,
1
)
tdSql
.
checkData
(
0
,
4
,
1.000000000
)
tdSql
.
checkData
(
0
,
4
,
1.000000000
)
tdSql
.
checkData
(
0
,
5
,
88
)
tdSql
.
checkData
(
0
,
5
,
1
)
tdSql
.
checkData
(
0
,
6
,
"binary1"
)
tdSql
.
checkData
(
0
,
6
,
"binary1"
)
tdSql
.
checkData
(
0
,
7
,
88
)
tdSql
.
checkData
(
0
,
7
,
1
)
tdSql
.
checkData
(
3
,
0
,
3
)
tdSql
.
checkData
(
3
,
0
,
3
)
tdSql
.
checkData
(
3
,
1
,
88
)
tdSql
.
checkData
(
3
,
1
,
1
)
tdSql
.
checkData
(
3
,
2
,
33333
)
tdSql
.
checkData
(
3
,
2
,
33333
)
tdSql
.
checkData
(
3
,
3
,
88
)
tdSql
.
checkData
(
3
,
3
,
1
)
tdSql
.
checkData
(
3
,
4
,
33.000000000
)
tdSql
.
checkData
(
3
,
4
,
33.000000000
)
tdSql
.
checkData
(
3
,
5
,
88
)
tdSql
.
checkData
(
3
,
5
,
1
)
tdSql
.
checkData
(
3
,
6
,
"binary1"
)
tdSql
.
checkData
(
3
,
6
,
"binary1"
)
tdSql
.
checkData
(
3
,
7
,
88
)
tdSql
.
checkData
(
3
,
7
,
1
)
tdSql
.
checkData
(
11
,
0
,
None
)
tdSql
.
checkData
(
11
,
0
,
None
)
tdSql
.
checkData
(
11
,
1
,
None
)
tdSql
.
checkData
(
11
,
1
,
None
)
...
@@ -212,7 +212,7 @@ class TDTestCase:
...
@@ -212,7 +212,7 @@ class TDTestCase:
tdSql
.
checkData
(
11
,
4
,
None
)
tdSql
.
checkData
(
11
,
4
,
None
)
tdSql
.
checkData
(
11
,
5
,
None
)
tdSql
.
checkData
(
11
,
5
,
None
)
tdSql
.
checkData
(
11
,
6
,
"binary1"
)
tdSql
.
checkData
(
11
,
6
,
"binary1"
)
tdSql
.
checkData
(
11
,
7
,
88
)
tdSql
.
checkData
(
11
,
7
,
1
)
tdSql
.
query
(
"select c1 , udf1(c1) ,c2 ,udf1(c2), c3 ,udf1(c3), c4 ,udf1(c4) from stb1 order by c1"
)
tdSql
.
query
(
"select c1 , udf1(c1) ,c2 ,udf1(c2), c3 ,udf1(c3), c4 ,udf1(c4) from stb1 order by c1"
)
tdSql
.
checkData
(
0
,
0
,
None
)
tdSql
.
checkData
(
0
,
0
,
None
)
...
@@ -225,13 +225,13 @@ class TDTestCase:
...
@@ -225,13 +225,13 @@ class TDTestCase:
tdSql
.
checkData
(
0
,
7
,
None
)
tdSql
.
checkData
(
0
,
7
,
None
)
tdSql
.
checkData
(
20
,
0
,
8
)
tdSql
.
checkData
(
20
,
0
,
8
)
tdSql
.
checkData
(
20
,
1
,
88
)
tdSql
.
checkData
(
20
,
1
,
1
)
tdSql
.
checkData
(
20
,
2
,
88888
)
tdSql
.
checkData
(
20
,
2
,
88888
)
tdSql
.
checkData
(
20
,
3
,
88
)
tdSql
.
checkData
(
20
,
3
,
1
)
tdSql
.
checkData
(
20
,
4
,
888
)
tdSql
.
checkData
(
20
,
4
,
888
)
tdSql
.
checkData
(
20
,
5
,
88
)
tdSql
.
checkData
(
20
,
5
,
1
)
tdSql
.
checkData
(
20
,
6
,
88
)
tdSql
.
checkData
(
20
,
6
,
88
)
tdSql
.
checkData
(
20
,
7
,
88
)
tdSql
.
checkData
(
20
,
7
,
1
)
# aggregate functions
# aggregate functions
...
@@ -374,14 +374,14 @@ class TDTestCase:
...
@@ -374,14 +374,14 @@ class TDTestCase:
tdSql
.
checkRows
(
25
)
tdSql
.
checkRows
(
25
)
tdSql
.
checkData
(
0
,
0
,
None
)
tdSql
.
checkData
(
0
,
0
,
None
)
tdSql
.
checkData
(
0
,
1
,
None
)
tdSql
.
checkData
(
0
,
1
,
None
)
tdSql
.
checkData
(
1
,
0
,
88
)
tdSql
.
checkData
(
1
,
0
,
1
)
tdSql
.
checkData
(
1
,
1
,
8
)
tdSql
.
checkData
(
1
,
1
,
8
)
tdSql
.
query
(
"select abs(udf1(c1)) , abs(ceil(c1)) from ct1 order by ts;"
)
tdSql
.
query
(
"select abs(udf1(c1)) , abs(ceil(c1)) from ct1 order by ts;"
)
tdSql
.
checkRows
(
13
)
tdSql
.
checkRows
(
13
)
tdSql
.
checkData
(
0
,
0
,
88
)
tdSql
.
checkData
(
0
,
0
,
1
)
tdSql
.
checkData
(
0
,
1
,
8
)
tdSql
.
checkData
(
0
,
1
,
8
)
tdSql
.
checkData
(
1
,
0
,
88
)
tdSql
.
checkData
(
1
,
0
,
1
)
tdSql
.
checkData
(
1
,
1
,
7
)
tdSql
.
checkData
(
1
,
1
,
7
)
# bug fix for crash
# bug fix for crash
...
@@ -400,9 +400,9 @@ class TDTestCase:
...
@@ -400,9 +400,9 @@ class TDTestCase:
tdSql
.
query
(
"select c1 ,udf1(c1) , c6 ,udf1(c6) from stb1 where c1 > 8 order by ts"
)
tdSql
.
query
(
"select c1 ,udf1(c1) , c6 ,udf1(c6) from stb1 where c1 > 8 order by ts"
)
tdSql
.
checkRows
(
3
)
tdSql
.
checkRows
(
3
)
tdSql
.
checkData
(
0
,
0
,
9
)
tdSql
.
checkData
(
0
,
0
,
9
)
tdSql
.
checkData
(
0
,
1
,
88
)
tdSql
.
checkData
(
0
,
1
,
1
)
tdSql
.
checkData
(
0
,
2
,
-
99.990000000
)
tdSql
.
checkData
(
0
,
2
,
-
99.990000000
)
tdSql
.
checkData
(
0
,
3
,
88
)
tdSql
.
checkData
(
0
,
3
,
1
)
tdSql
.
query
(
"select sub1.c1, sub2.c2 from sub1, sub2 where sub1.ts=sub2.ts and sub1.c1 is not null"
)
tdSql
.
query
(
"select sub1.c1, sub2.c2 from sub1, sub2 where sub1.ts=sub2.ts and sub1.c1 is not null"
)
tdSql
.
checkData
(
0
,
0
,
0
)
tdSql
.
checkData
(
0
,
0
,
0
)
...
@@ -411,20 +411,20 @@ class TDTestCase:
...
@@ -411,20 +411,20 @@ class TDTestCase:
tdSql
.
checkData
(
1
,
1
,
10
)
tdSql
.
checkData
(
1
,
1
,
10
)
tdSql
.
query
(
"select udf1(sub1.c1), udf1(sub2.c2) from sub1, sub2 where sub1.ts=sub2.ts and sub1.c1 is not null"
)
tdSql
.
query
(
"select udf1(sub1.c1), udf1(sub2.c2) from sub1, sub2 where sub1.ts=sub2.ts and sub1.c1 is not null"
)
tdSql
.
checkData
(
0
,
0
,
88
)
tdSql
.
checkData
(
0
,
0
,
1
)
tdSql
.
checkData
(
0
,
1
,
88
)
tdSql
.
checkData
(
0
,
1
,
1
)
tdSql
.
checkData
(
1
,
0
,
88
)
tdSql
.
checkData
(
1
,
0
,
1
)
tdSql
.
checkData
(
1
,
1
,
88
)
tdSql
.
checkData
(
1
,
1
,
1
)
tdSql
.
query
(
"select sub1.c1 , udf1(sub1.c1), sub2.c2 ,udf1(sub2.c2) from sub1, sub2 where sub1.ts=sub2.ts and sub1.c1 is not null"
)
tdSql
.
query
(
"select sub1.c1 , udf1(sub1.c1), sub2.c2 ,udf1(sub2.c2) from sub1, sub2 where sub1.ts=sub2.ts and sub1.c1 is not null"
)
tdSql
.
checkData
(
0
,
0
,
0
)
tdSql
.
checkData
(
0
,
0
,
0
)
tdSql
.
checkData
(
0
,
1
,
88
)
tdSql
.
checkData
(
0
,
1
,
1
)
tdSql
.
checkData
(
0
,
2
,
0
)
tdSql
.
checkData
(
0
,
2
,
0
)
tdSql
.
checkData
(
0
,
3
,
88
)
tdSql
.
checkData
(
0
,
3
,
1
)
tdSql
.
checkData
(
1
,
0
,
1
)
tdSql
.
checkData
(
1
,
0
,
1
)
tdSql
.
checkData
(
1
,
1
,
88
)
tdSql
.
checkData
(
1
,
1
,
1
)
tdSql
.
checkData
(
1
,
2
,
10
)
tdSql
.
checkData
(
1
,
2
,
10
)
tdSql
.
checkData
(
1
,
3
,
88
)
tdSql
.
checkData
(
1
,
3
,
1
)
tdSql
.
query
(
"select udf2(sub1.c1), udf2(sub2.c2) from sub1, sub2 where sub1.ts=sub2.ts and sub1.c1 is not null"
)
tdSql
.
query
(
"select udf2(sub1.c1), udf2(sub2.c2) from sub1, sub2 where sub1.ts=sub2.ts and sub1.c1 is not null"
)
tdSql
.
checkData
(
0
,
0
,
16.881943016
)
tdSql
.
checkData
(
0
,
0
,
16.881943016
)
...
@@ -468,12 +468,12 @@ class TDTestCase:
...
@@ -468,12 +468,12 @@ class TDTestCase:
tdSql
.
checkData
(
1
,
0
,
1
)
tdSql
.
checkData
(
1
,
0
,
1
)
tdSql
.
checkData
(
1
,
1
,
1
)
tdSql
.
checkData
(
1
,
1
,
1
)
tdSql
.
checkData
(
1
,
2
,
1.110000000
)
tdSql
.
checkData
(
1
,
2
,
1.110000000
)
tdSql
.
checkData
(
1
,
3
,
88
)
tdSql
.
checkData
(
1
,
3
,
1
)
tdSql
.
query
(
"select c1,c6,udf1(c1,c6) from stb1 order by ts"
)
tdSql
.
query
(
"select c1,c6,udf1(c1,c6) from stb1 order by ts"
)
tdSql
.
checkData
(
1
,
0
,
8
)
tdSql
.
checkData
(
1
,
0
,
8
)
tdSql
.
checkData
(
1
,
1
,
88.880000000
)
tdSql
.
checkData
(
1
,
1
,
88.880000000
)
tdSql
.
checkData
(
1
,
2
,
88
)
tdSql
.
checkData
(
1
,
2
,
1
)
tdSql
.
query
(
"select abs(udf1(c1,c6,c1,c6)) , abs(ceil(c1)) from stb1 where c1 is not null order by ts;"
)
tdSql
.
query
(
"select abs(udf1(c1,c6,c1,c6)) , abs(ceil(c1)) from stb1 where c1 is not null order by ts;"
)
tdSql
.
checkRows
(
22
)
tdSql
.
checkRows
(
22
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录