Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
bbd51918
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看板
提交
bbd51918
编写于
3月 23, 2023
作者:
X
Xiaoyu Wang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: udf error check
上级
e15e40ab
变更
12
显示空白变更内容
内联
并排
Showing
12 changed file
with
37 addition
and
37 deletion
+37
-37
tests/script/tsim/query/udf.sim
tests/script/tsim/query/udf.sim
+2
-2
tests/script/tsim/query/udf_with_const.sim
tests/script/tsim/query/udf_with_const.sim
+2
-2
tests/script/tsim/query/udfpy.sim
tests/script/tsim/query/udfpy.sim
+2
-2
tests/script/tsim/valgrind/checkUdf.sim
tests/script/tsim/valgrind/checkUdf.sim
+2
-2
tests/system-test/0-others/udfTest.py
tests/system-test/0-others/udfTest.py
+6
-6
tests/system-test/0-others/udf_cfg1.py
tests/system-test/0-others/udf_cfg1.py
+2
-2
tests/system-test/0-others/udf_cfg2.py
tests/system-test/0-others/udf_cfg2.py
+6
-6
tests/system-test/0-others/udf_create.py
tests/system-test/0-others/udf_create.py
+6
-6
tests/system-test/0-others/udf_restart_taosd.py
tests/system-test/0-others/udf_restart_taosd.py
+6
-6
tests/system-test/7-tmq/tmqUdf-multCtb-snapshot0.py
tests/system-test/7-tmq/tmqUdf-multCtb-snapshot0.py
+1
-1
tests/system-test/7-tmq/tmqUdf-multCtb-snapshot1.py
tests/system-test/7-tmq/tmqUdf-multCtb-snapshot1.py
+1
-1
tests/system-test/7-tmq/tmqUdf.py
tests/system-test/7-tmq/tmqUdf.py
+1
-1
未找到文件。
tests/script/tsim/query/udf.sim
浏览文件 @
bbd51918
...
...
@@ -23,10 +23,10 @@ if $system_content == Windows_NT then
return 0;
endi
if $system_content == Windows_NT then
sql create function bit_and as 'C:\\Windows\\Temp\\bitand.dll' outputtype int
bufSize 8
;
sql create function bit_and as 'C:\\Windows\\Temp\\bitand.dll' outputtype int;
sql create aggregate function l2norm as 'C:\\Windows\\Temp\\l2norm.dll' outputtype double bufSize 8;
else
sql create function bit_and as '/tmp/udf/libbitand.so' outputtype int
bufSize 8
;
sql create function bit_and as '/tmp/udf/libbitand.so' outputtype int;
sql create aggregate function l2norm as '/tmp/udf/libl2norm.so' outputtype double bufSize 8;
endi
...
...
tests/script/tsim/query/udf_with_const.sim
浏览文件 @
bbd51918
...
...
@@ -23,9 +23,9 @@ if $system_content == Windows_NT then
endi
if $system_content == Windows_NT then
sql create function gpd as 'C:\\Windows\\Temp\\gpd.dll' outputtype int
bufSize 8
;
sql create function gpd as 'C:\\Windows\\Temp\\gpd.dll' outputtype int;
else
sql create function gpd as '/tmp/udf/libgpd.so' outputtype int
bufSize 8
;
sql create function gpd as '/tmp/udf/libgpd.so' outputtype int;
endi
sql show functions;
if $rows != 1 then
...
...
tests/script/tsim/query/udfpy.sim
浏览文件 @
bbd51918
...
...
@@ -29,10 +29,10 @@ if $system_content == Windows_NT then
return 0;
endi
if $system_content == Windows_NT then
sql create function bit_and as 'C:\\Windows\\Temp\\bitand.dll' outputtype int
bufSize 8
;
sql create function bit_and as 'C:\\Windows\\Temp\\bitand.dll' outputtype int;
sql create aggregate function l2norm as 'C:\\Windows\\Temp\\l2norm.dll' outputtype double bufSize 8;
else
sql create function bit_and as '/tmp/udf/libbitand.so' outputtype int
bufSize 8
;
sql create function bit_and as '/tmp/udf/libbitand.so' outputtype int;
sql create aggregate function l2norm as '/tmp/udf/libl2norm.so' outputtype double bufSize 8;
endi
sql create function pybitand as '/tmp/pyudf/pybitand.py' outputtype int language 'python';
...
...
tests/script/tsim/valgrind/checkUdf.sim
浏览文件 @
bbd51918
...
...
@@ -15,10 +15,10 @@ sql insert into t values(now, 1)(now+1s, 2);
system_content printf %OS%
if $system_content == Windows_NT then
sql create function udf1 as 'C:\\Windows\\Temp\\udf1.dll' outputtype int
bufSize 8
;
sql create function udf1 as 'C:\\Windows\\Temp\\udf1.dll' outputtype int;
sql create aggregate function udf2 as 'C:\\Windows\\Temp\\udf2.dll' outputtype double bufSize 8;
else
sql create function udf1 as '/tmp/udf/libudf1.so' outputtype int
bufSize 8
;
sql create function udf1 as '/tmp/udf/libudf1.so' outputtype int;
sql create aggregate function udf2 as '/tmp/udf/libudf2.so' outputtype double bufSize 8;
endi
sql show functions;
...
...
tests/system-test/0-others/udfTest.py
浏览文件 @
bbd51918
...
...
@@ -146,7 +146,7 @@ class TDTestCase:
for
i
in
range
(
5
):
# create scalar functions
tdSql
.
execute
(
"create function udf1 as '%s' outputtype int
bufSize 8
;"
%
self
.
libudf1
)
tdSql
.
execute
(
"create function udf1 as '%s' outputtype int;"
%
self
.
libudf1
)
# create aggregate functions
...
...
@@ -171,7 +171,7 @@ class TDTestCase:
tdLog
.
info
(
"drop two udf functions success "
)
# create scalar functions
tdSql
.
execute
(
"create function udf1 as '%s' outputtype int
bufSize 8
;"
%
self
.
libudf1
)
tdSql
.
execute
(
"create function udf1 as '%s' outputtype int;"
%
self
.
libudf1
)
# create aggregate functions
...
...
@@ -562,7 +562,7 @@ class TDTestCase:
# create function without buffer
tdSql
.
execute
(
"create aggregate function udf1 as '%s' outputtype int bufSize 8 "
%
self
.
libudf1
)
tdSql
.
execute
(
"create function udf2 as '%s' outputtype double
bufSize 8
"
%
self
.
libudf2
)
tdSql
.
execute
(
"create function udf2 as '%s' outputtype double"
%
self
.
libudf2
)
udf1_sqls
,
udf2_sqls
=
self
.
try_query_sql
()
for
scalar_sql
in
udf1_sqls
:
...
...
@@ -570,7 +570,7 @@ class TDTestCase:
for
aggregate_sql
in
udf2_sqls
:
tdSql
.
error
(
aggregate_sql
)
tdSql
.
execute
(
" create function db as '%s' outputtype int
bufSize 8
"
%
self
.
libudf1
)
tdSql
.
execute
(
" create function db as '%s' outputtype int "
%
self
.
libudf1
)
tdSql
.
execute
(
" create aggregate function test as '%s' outputtype int bufSize 8 "
%
self
.
libudf1
)
tdSql
.
error
(
" select db(c1) from stb1 "
)
tdSql
.
error
(
" select db(c1,c6), db(c6) from stb1 "
)
...
...
@@ -619,9 +619,9 @@ class TDTestCase:
tdLog
.
info
(
" create function name is not build_in functions "
)
tdSql
.
execute
(
" drop function udf1 "
)
tdSql
.
execute
(
" drop function udf2 "
)
tdSql
.
error
(
"create function max as '%s' outputtype int
bufSize 8
"
%
self
.
libudf1
)
tdSql
.
error
(
"create function max as '%s' outputtype int "
%
self
.
libudf1
)
tdSql
.
error
(
"create aggregate function sum as '%s' outputtype double bufSize 8"
%
self
.
libudf2
)
tdSql
.
error
(
"create function max as '%s' outputtype int
bufSize 8
"
%
self
.
libudf1
)
tdSql
.
error
(
"create function max as '%s' outputtype int "
%
self
.
libudf1
)
tdSql
.
error
(
"create aggregate function sum as '%s' outputtype double bufSize 8"
%
self
.
libudf2
)
tdSql
.
error
(
"create aggregate function tbname as '%s' outputtype double bufSize 8"
%
self
.
libudf2
)
tdSql
.
error
(
"create aggregate function function as '%s' outputtype double bufSize 8"
%
self
.
libudf2
)
...
...
tests/system-test/0-others/udf_cfg1.py
浏览文件 @
bbd51918
...
...
@@ -148,7 +148,7 @@ class TDTestCase:
for
i
in
range
(
5
):
# create scalar functions
tdSql
.
execute
(
"create function udf1 as '%s' outputtype int
bufSize 8
;"
%
self
.
libudf1
)
tdSql
.
execute
(
"create function udf1 as '%s' outputtype int;"
%
self
.
libudf1
)
# create aggregate functions
...
...
@@ -173,7 +173,7 @@ class TDTestCase:
tdLog
.
info
(
"drop two udf functions success "
)
# create scalar functions
tdSql
.
execute
(
"create function udf1 as '%s' outputtype int
bufSize 8
;"
%
self
.
libudf1
)
tdSql
.
execute
(
"create function udf1 as '%s' outputtype int;"
%
self
.
libudf1
)
# create aggregate functions
...
...
tests/system-test/0-others/udf_cfg2.py
浏览文件 @
bbd51918
...
...
@@ -148,7 +148,7 @@ class TDTestCase:
for
i
in
range
(
5
):
# create scalar functions
tdSql
.
execute
(
"create function udf1 as '%s' outputtype int
bufSize 8
;"
%
self
.
libudf1
)
tdSql
.
execute
(
"create function udf1 as '%s' outputtype int;"
%
self
.
libudf1
)
# create aggregate functions
...
...
@@ -173,7 +173,7 @@ class TDTestCase:
tdLog
.
info
(
"drop two udf functions success "
)
# create scalar functions
tdSql
.
execute
(
"create function udf1 as '%s' outputtype int
bufSize 8
;"
%
self
.
libudf1
)
tdSql
.
execute
(
"create function udf1 as '%s' outputtype int;"
%
self
.
libudf1
)
# create aggregate functions
...
...
@@ -564,7 +564,7 @@ class TDTestCase:
# create function without buffer
tdSql
.
execute
(
"create aggregate function udf1 as '%s' outputtype int bufSize 8 "
%
self
.
libudf1
)
tdSql
.
execute
(
"create function udf2 as '%s' outputtype double
bufSize 8
"
%
self
.
libudf2
)
tdSql
.
execute
(
"create function udf2 as '%s' outputtype double"
%
self
.
libudf2
)
udf1_sqls
,
udf2_sqls
=
self
.
try_query_sql
()
for
scalar_sql
in
udf1_sqls
:
...
...
@@ -572,7 +572,7 @@ class TDTestCase:
for
aggregate_sql
in
udf2_sqls
:
tdSql
.
error
(
aggregate_sql
)
tdSql
.
execute
(
" create function db as '%s' outputtype int
bufSize 8
"
%
self
.
libudf1
)
tdSql
.
execute
(
" create function db as '%s' outputtype int "
%
self
.
libudf1
)
tdSql
.
execute
(
" create aggregate function test as '%s' outputtype int bufSize 8 "
%
self
.
libudf1
)
tdSql
.
error
(
" select db(c1) from stb1 "
)
tdSql
.
error
(
" select db(c1,c6), db(c6) from stb1 "
)
...
...
@@ -621,9 +621,9 @@ class TDTestCase:
tdLog
.
info
(
" create function name is not build_in functions "
)
tdSql
.
execute
(
" drop function udf1 "
)
tdSql
.
execute
(
" drop function udf2 "
)
tdSql
.
error
(
"create function max as '%s' outputtype int
bufSize 8
"
%
self
.
libudf1
)
tdSql
.
error
(
"create function max as '%s' outputtype int"
%
self
.
libudf1
)
tdSql
.
error
(
"create aggregate function sum as '%s' outputtype double bufSize 8"
%
self
.
libudf2
)
tdSql
.
error
(
"create function max as '%s' outputtype int
bufSize 8
"
%
self
.
libudf1
)
tdSql
.
error
(
"create function max as '%s' outputtype int"
%
self
.
libudf1
)
tdSql
.
error
(
"create aggregate function sum as '%s' outputtype double bufSize 8"
%
self
.
libudf2
)
tdSql
.
error
(
"create aggregate function tbname as '%s' outputtype double bufSize 8"
%
self
.
libudf2
)
tdSql
.
error
(
"create aggregate function function as '%s' outputtype double bufSize 8"
%
self
.
libudf2
)
...
...
tests/system-test/0-others/udf_create.py
浏览文件 @
bbd51918
...
...
@@ -148,7 +148,7 @@ class TDTestCase:
for
i
in
range
(
5
):
# create scalar functions
tdSql
.
execute
(
"create function udf1 as '%s' outputtype int
bufSize 8
;"
%
self
.
libudf1
)
tdSql
.
execute
(
"create function udf1 as '%s' outputtype int;"
%
self
.
libudf1
)
# create aggregate functions
...
...
@@ -173,7 +173,7 @@ class TDTestCase:
tdLog
.
info
(
"drop two udf functions success "
)
# create scalar functions
tdSql
.
execute
(
"create function udf1 as '%s' outputtype int
bufSize 8
;"
%
self
.
libudf1
)
tdSql
.
execute
(
"create function udf1 as '%s' outputtype int;"
%
self
.
libudf1
)
# create aggregate functions
...
...
@@ -574,7 +574,7 @@ class TDTestCase:
# create function without buffer
tdSql
.
execute
(
"create aggregate function udf1 as '%s' outputtype int bufSize 8 "
%
self
.
libudf1
)
tdSql
.
execute
(
"create function udf2 as '%s' outputtype double
bufSize 8
"
%
self
.
libudf2
)
tdSql
.
execute
(
"create function udf2 as '%s' outputtype double "
%
self
.
libudf2
)
udf1_sqls
,
udf2_sqls
=
self
.
try_query_sql
()
for
scalar_sql
in
udf1_sqls
:
...
...
@@ -582,7 +582,7 @@ class TDTestCase:
for
aggregate_sql
in
udf2_sqls
:
tdSql
.
error
(
aggregate_sql
)
tdSql
.
execute
(
" create function db as '%s' outputtype int
bufSize 8
"
%
self
.
libudf1
)
tdSql
.
execute
(
" create function db as '%s' outputtype int "
%
self
.
libudf1
)
tdSql
.
execute
(
" create aggregate function test as '%s' outputtype int bufSize 8 "
%
self
.
libudf1
)
tdSql
.
error
(
" select db(c1) from stb1 "
)
tdSql
.
error
(
" select db(c1,c6), db(c6) from stb1 "
)
...
...
@@ -631,9 +631,9 @@ class TDTestCase:
tdLog
.
info
(
" create function name is not build_in functions "
)
tdSql
.
execute
(
" drop function udf1 "
)
tdSql
.
execute
(
" drop function udf2 "
)
tdSql
.
error
(
"create function max as '%s' outputtype int
bufSize 8
"
%
self
.
libudf1
)
tdSql
.
error
(
"create function max as '%s' outputtype int"
%
self
.
libudf1
)
tdSql
.
error
(
"create aggregate function sum as '%s' outputtype double bufSize 8"
%
self
.
libudf2
)
tdSql
.
error
(
"create function max as '%s' outputtype int
bufSize 8
"
%
self
.
libudf1
)
tdSql
.
error
(
"create function max as '%s' outputtype int"
%
self
.
libudf1
)
tdSql
.
error
(
"create aggregate function sum as '%s' outputtype double bufSize 8"
%
self
.
libudf2
)
tdSql
.
error
(
"create aggregate function tbname as '%s' outputtype double bufSize 8"
%
self
.
libudf2
)
tdSql
.
error
(
"create aggregate function function as '%s' outputtype double bufSize 8"
%
self
.
libudf2
)
...
...
tests/system-test/0-others/udf_restart_taosd.py
浏览文件 @
bbd51918
...
...
@@ -145,7 +145,7 @@ class TDTestCase:
for
i
in
range
(
5
):
# create scalar functions
tdSql
.
execute
(
"create function udf1 as '%s' outputtype int
bufSize 8
;"
%
self
.
libudf1
)
tdSql
.
execute
(
"create function udf1 as '%s' outputtype int;"
%
self
.
libudf1
)
# create aggregate functions
...
...
@@ -170,7 +170,7 @@ class TDTestCase:
tdLog
.
info
(
"drop two udf functions success "
)
# create scalar functions
tdSql
.
execute
(
"create function udf1 as '%s' outputtype int
bufSize 8
;"
%
self
.
libudf1
)
tdSql
.
execute
(
"create function udf1 as '%s' outputtype int;"
%
self
.
libudf1
)
# create aggregate functions
...
...
@@ -561,7 +561,7 @@ class TDTestCase:
# create function without buffer
tdSql
.
execute
(
"create aggregate function udf1 as '%s' outputtype int bufSize 8 "
%
self
.
libudf1
)
tdSql
.
execute
(
"create function udf2 as '%s' outputtype double
bufSize 8
"
%
self
.
libudf2
)
tdSql
.
execute
(
"create function udf2 as '%s' outputtype double"
%
self
.
libudf2
)
udf1_sqls
,
udf2_sqls
=
self
.
try_query_sql
()
for
scalar_sql
in
udf1_sqls
:
...
...
@@ -569,7 +569,7 @@ class TDTestCase:
for
aggregate_sql
in
udf2_sqls
:
tdSql
.
error
(
aggregate_sql
)
tdSql
.
execute
(
" create function db as '%s' outputtype int
bufSize 8
"
%
self
.
libudf1
)
tdSql
.
execute
(
" create function db as '%s' outputtype int "
%
self
.
libudf1
)
tdSql
.
execute
(
" create aggregate function test as '%s' outputtype int bufSize 8 "
%
self
.
libudf1
)
tdSql
.
error
(
" select db(c1) from stb1 "
)
tdSql
.
error
(
" select db(c1,c6), db(c6) from stb1 "
)
...
...
@@ -618,9 +618,9 @@ class TDTestCase:
tdLog
.
info
(
" create function name is not build_in functions "
)
tdSql
.
execute
(
" drop function udf1 "
)
tdSql
.
execute
(
" drop function udf2 "
)
tdSql
.
error
(
"create function max as '%s' outputtype int
bufSize 8
"
%
self
.
libudf1
)
tdSql
.
error
(
"create function max as '%s' outputtype int"
%
self
.
libudf1
)
tdSql
.
error
(
"create aggregate function sum as '%s' outputtype double bufSize 8"
%
self
.
libudf2
)
tdSql
.
error
(
"create function max as '%s' outputtype int
bufSize 8
"
%
self
.
libudf1
)
tdSql
.
error
(
"create function max as '%s' outputtype int"
%
self
.
libudf1
)
tdSql
.
error
(
"create aggregate function sum as '%s' outputtype double bufSize 8"
%
self
.
libudf2
)
tdSql
.
error
(
"create aggregate function tbname as '%s' outputtype double bufSize 8"
%
self
.
libudf2
)
tdSql
.
error
(
"create aggregate function function as '%s' outputtype double bufSize 8"
%
self
.
libudf2
)
...
...
tests/system-test/7-tmq/tmqUdf-multCtb-snapshot0.py
浏览文件 @
bbd51918
...
...
@@ -50,7 +50,7 @@ class TDTestCase:
def
create_udf_function
(
self
):
# create scalar functions
tdSql
.
execute
(
"create function udf1 as '%s' outputtype int
bufSize 8
;"
%
self
.
libudf1
)
tdSql
.
execute
(
"create function udf1 as '%s' outputtype int;"
%
self
.
libudf1
)
functions
=
tdSql
.
getResult
(
"show functions"
)
function_nums
=
len
(
functions
)
...
...
tests/system-test/7-tmq/tmqUdf-multCtb-snapshot1.py
浏览文件 @
bbd51918
...
...
@@ -50,7 +50,7 @@ class TDTestCase:
def
create_udf_function
(
self
):
# create scalar functions
tdSql
.
execute
(
"create function udf1 as '%s' outputtype int
bufSize 8
;"
%
self
.
libudf1
)
tdSql
.
execute
(
"create function udf1 as '%s' outputtype int;"
%
self
.
libudf1
)
functions
=
tdSql
.
getResult
(
"show functions"
)
function_nums
=
len
(
functions
)
...
...
tests/system-test/7-tmq/tmqUdf.py
浏览文件 @
bbd51918
...
...
@@ -50,7 +50,7 @@ class TDTestCase:
def
create_udf_function
(
self
):
# create scalar functions
tdSql
.
execute
(
"create function udf1 as '%s' outputtype int
bufSize 8
;"
%
self
.
libudf1
)
tdSql
.
execute
(
"create function udf1 as '%s' outputtype int;"
%
self
.
libudf1
)
functions
=
tdSql
.
getResult
(
"show functions"
)
function_nums
=
len
(
functions
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录