Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
1bc9512c
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看板
提交
1bc9512c
编写于
12月 08, 2021
作者:
S
shenglian zhou
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add asin test case
上级
45481da2
变更
3
展开全部
隐藏空白更改
内联
并排
Showing
3 changed file
with
1442 addition
and
0 deletion
+1442
-0
tests/script/general/compute/math_asin.sim
tests/script/general/compute/math_asin.sim
+1073
-0
tests/script/general/compute/math_asin2.sim
tests/script/general/compute/math_asin2.sim
+366
-0
tests/script/general/compute/math_str_func.sim
tests/script/general/compute/math_str_func.sim
+3
-0
未找到文件。
tests/script/general/compute/math_asin.sim
0 → 100644
浏览文件 @
1bc9512c
此差异已折叠。
点击以展开。
tests/script/general/compute/math_asin2.sim
0 → 100644
浏览文件 @
1bc9512c
sleep 100
sql connect
sql use db
print execute sql select asin(stb1.c4),asin(stba.c5) from stb1,stba where stb1.t1=stba.t1 and stb1.ts=stba.ts;
sql select asin(stb1.c4),asin(stba.c5) from stb1,stba where stb1.t1=stba.t1 and stb1.ts=stba.ts;
if $data00 != @1.570796327@ then
return -1
endi
if $data01 != @1.570796327@ then
return -1
endi
if $data10 != NULL then
return -1
endi
if $data11 != @nan@ then
return -1
endi
if $data20 != @nan@ then
return -1
endi
if $data21 != @nan@ then
return -1
endi
if $data30 != NULL then
return -1
endi
if $data31 != @nan@ then
return -1
endi
if $data40 != @nan@ then
return -1
endi
if $data41 != @nan@ then
return -1
endi
if $data50 != @nan@ then
return -1
endi
if $data51 != @nan@ then
return -1
endi
if $data60 != @nan@ then
return -1
endi
if $data61 != @nan@ then
return -1
endi
print execute sql select asin(c4) as a from stb1 union all select asin(c5) as a from stba;
sql select asin(c4) as a from stb1 union all select asin(c5) as a from stba;
if $data00 != @1.570796327@ then
return -1
endi
if $data10 != NULL then
return -1
endi
if $data20 != @nan@ then
return -1
endi
if $data30 != NULL then
return -1
endi
if $data40 != @nan@ then
return -1
endi
if $data50 != @nan@ then
return -1
endi
if $data60 != @nan@ then
return -1
endi
if $data70 != @1.570796327@ then
return -1
endi
if $data80 != @nan@ then
return -1
endi
if $data90 != @nan@ then
return -1
endi
print execute sql select asin(c2) from stba;
sql select asin(c2) from stba;
if $data00 != @1.570796327@ then
return -1
endi
if $data10 != @nan@ then
return -1
endi
if $data20 != @nan@ then
return -1
endi
if $data30 != @nan@ then
return -1
endi
if $data40 != @nan@ then
return -1
endi
if $data50 != @nan@ then
return -1
endi
if $data60 != @nan@ then
return -1
endi
if $data70 != @nan@ then
return -1
endi
if $data80 != @nan@ then
return -1
endi
if $data90 != @0.000000000@ then
return -1
endi
print execute sql select asin(min(c2)) from tba1;
sql select asin(min(c2)) from tba1;
if $data00 != @0.000000000@ then
return -1
endi
print execute sql select asin(max(c2)) from tba1;
sql select asin(max(c2)) from tba1;
if $data00 != @nan@ then
return -1
endi
print execute sql select asin(count(c2)) from tba1;
sql select asin(count(c2)) from tba1;
if $data00 != @nan@ then
return -1
endi
print execute sql select asin(sum(c2)) from tba1;
sql select asin(sum(c2)) from tba1;
if $data00 != @nan@ then
return -1
endi
print execute sql select asin(avg(c2)) from tba1;
sql select asin(avg(c2)) from tba1;
if $data00 != @nan@ then
return -1
endi
print execute sql select asin(percentile(c2, 10)) from tba1;
sql select asin(percentile(c2, 10)) from tba1;
if $data00 != @1.119769515@ then
return -1
endi
print execute sql select asin(apercentile(c2, 10)) from tba1;
sql select asin(apercentile(c2, 10)) from tba1;
if $data00 != @0.000000000@ then
return -1
endi
print execute sql select asin(stddev(c2)) from tba1;
sql select asin(stddev(c2)) from tba1;
if $data00 != @nan@ then
return -1
endi
print execute sql select asin(spread(c2)) from tba1;
sql select asin(spread(c2)) from tba1;
if $data00 != @nan@ then
return -1
endi
print execute sql select asin(twa(c2)) from tba1;
sql select asin(twa(c2)) from tba1;
if $data00 != @nan@ then
return -1
endi
print execute sql select asin(leastsquares(c2, 1, 1)) from tba1;
sql_error select asin(leastsquares(c2, 1, 1)) from tba1;
print execute sql select asin(interp(c2)) from tba1 every(1s)
sql select asin(interp(c2)) from tba1 every(1s)
if $data00 != @21-11-11 09:00:00.000@ then
return -1
endi
if $data01 != @1.570796327@ then
return -1
endi
if $data10 != @21-11-11 09:00:01.000@ then
return -1
endi
if $data11 != @nan@ then
return -1
endi
if $data20 != @21-11-11 09:00:02.000@ then
return -1
endi
if $data21 != @nan@ then
return -1
endi
if $data30 != @21-11-11 09:00:03.000@ then
return -1
endi
if $data31 != @nan@ then
return -1
endi
if $data40 != @21-11-11 09:00:04.000@ then
return -1
endi
if $data41 != @nan@ then
return -1
endi
if $data50 != @21-11-11 09:00:05.000@ then
return -1
endi
if $data51 != @nan@ then
return -1
endi
if $data60 != @21-11-11 09:00:06.000@ then
return -1
endi
if $data61 != @nan@ then
return -1
endi
if $data70 != @21-11-11 09:00:07.000@ then
return -1
endi
if $data71 != @nan@ then
return -1
endi
if $data80 != @21-11-11 09:00:08.000@ then
return -1
endi
if $data81 != @nan@ then
return -1
endi
if $data90 != @21-11-11 09:00:09.000@ then
return -1
endi
if $data91 != @0.000000000@ then
return -1
endi
print execute sql select asin(interp(c2)) from stba every(1s) group by tbname;
sql select asin(interp(c2)) from stba every(1s) group by tbname;
if $data00 != @21-11-11 09:00:00.000@ then
return -1
endi
if $data01 != @1.570796327@ then
return -1
endi
if $data02 != @tba1@ then
return -1
endi
if $data10 != @21-11-11 09:00:01.000@ then
return -1
endi
if $data11 != @nan@ then
return -1
endi
if $data12 != @tba1@ then
return -1
endi
if $data20 != @21-11-11 09:00:02.000@ then
return -1
endi
if $data21 != @nan@ then
return -1
endi
if $data22 != @tba1@ then
return -1
endi
if $data30 != @21-11-11 09:00:03.000@ then
return -1
endi
if $data31 != @nan@ then
return -1
endi
if $data32 != @tba1@ then
return -1
endi
if $data40 != @21-11-11 09:00:04.000@ then
return -1
endi
if $data41 != @nan@ then
return -1
endi
if $data42 != @tba1@ then
return -1
endi
if $data50 != @21-11-11 09:00:05.000@ then
return -1
endi
if $data51 != @nan@ then
return -1
endi
if $data52 != @tba1@ then
return -1
endi
if $data60 != @21-11-11 09:00:06.000@ then
return -1
endi
if $data61 != @nan@ then
return -1
endi
if $data62 != @tba1@ then
return -1
endi
if $data70 != @21-11-11 09:00:07.000@ then
return -1
endi
if $data71 != @nan@ then
return -1
endi
if $data72 != @tba1@ then
return -1
endi
if $data80 != @21-11-11 09:00:08.000@ then
return -1
endi
if $data81 != @nan@ then
return -1
endi
if $data82 != @tba1@ then
return -1
endi
if $data90 != @21-11-11 09:00:09.000@ then
return -1
endi
if $data91 != @0.000000000@ then
return -1
endi
if $data92 != @tba1@ then
return -1
endi
print execute sql select asin(elapsed(ts)) from tba1;
sql select asin(elapsed(ts)) from tba1;
if $data00 != @nan@ then
return -1
endi
print execute sql select asin(rate(c2)) from tba1;
sql select asin(rate(c2)) from tba1;
if $data00 != @1.111922122@ then
return -1
endi
print execute sql select asin(irate(c2)) from tba1;
sql select asin(irate(c2)) from tba1;
if $data00 != @0.000000000@ then
return -1
endi
print execute sql select asin(first(c2)) from tba1;
sql select asin(first(c2)) from tba1;
if $data00 != @1.570796327@ then
return -1
endi
print execute sql select asin(last(c2)) from tba1;
sql select asin(last(c2)) from tba1;
if $data00 != @0.000000000@ then
return -1
endi
print execute sql select asin(last_row(c2)) from tba1;
sql select asin(last_row(c2)) from tba1;
if $data00 != @0.000000000@ then
return -1
endi
print execute sql select asin(top(c2, 1)) from tba1;
sql_error select asin(top(c2, 1)) from tba1;
print execute sql select asin(bottom(c2, 1)) from tba1;
sql_error select asin(bottom(c2, 1)) from tba1;
print execute sql select asin(leastsquares(c2, 1, 1)) from tba1;
sql_error select asin(leastsquares(c2, 1, 1)) from tba1;
print execute sql select asin(derivative(c2, 1s, 0)) from tba1;
sql_error select asin(derivative(c2, 1s, 0)) from tba1;
print execute sql select asin(diff(c2)) from tba1;
sql_error select asin(diff(c2)) from tba1;
print execute sql select asin(csum(c2)) from tba1;
sql_error select asin(csum(c2)) from tba1;
print execute sql select asin(mavg(c2,2)) from tba1;
sql_error select asin(mavg(c2,2)) from tba1;
print execute sql select asin(sample(c2,2)) from tba1;
sql_error select asin(sample(c2,2)) from tba1;
print execute sql select asin(_block_dist()) from tba1;
sql_error select asin(_block_dist()) from tba1;
tests/script/general/compute/math_str_func.sim
浏览文件 @
1bc9512c
...
...
@@ -47,6 +47,7 @@ sql insert into tbn values ('2021-11-11 09:00:06',true,7,7,7,7,7,7,"777","7777",
run general/compute/math_sqrt.sim
run general/compute/math_abs.sim
run general/compute/math_asin.sim
sql create table stba (ts timestamp, c1 bool, c2 tinyint, c3 smallint, c4 int, c5 bigint, c6 float, c7 double, c8 binary(10), c9 nchar(10), c10 tinyint unsigned, c11 smallint unsigned, c12 int unsigned, c13 bigint unsigned) TAGS(t1 int, t2 binary(10), t3 double);
...
...
@@ -102,6 +103,8 @@ run general/compute/math_sqrt.sim
run general/compute/math_sqrt2.sim
run general/compute/math_abs.sim
run general/compute/math_abs2.sim
run general/compute/math_asin.sim
run general/compute/math_asin2.sim
#system sh/exec.sh -n dnode1 -s stop -x SIGINT
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录