提交 b6fa8f70 编写于 作者: S slzhou

feat: add test case to udf.sim

上级 b766c051
......@@ -94,6 +94,31 @@ endi
if $data00 != 2.645751311 then
return -1
endi
sql insert into t2 values(now+4s, 4, 8)(now+5s, 5, 9);
sql select udf2(f1-f2), udf2(f1+f2) from t2;
print $rows , $data00 , $data01
if $rows != 1 then
return -1;
endi
if $data00 != 5.656854249 then
return -1
endi
if $data01 != 18.547236991 then
return -1
endi
sql select udf2(udf1(f2-f1)), udf2(udf1(f2/f1)) from t2;
if $rows != 1 then
return -1
endi
if $data00 != 176.000000000 then
return -1
endi
if $data01 != 152.420471066 then
return -1
endi
print $rows , $data00 , $data01
sql drop function udf1;
sql show functions;
if $rows != 1 then
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册