Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
ba878b03
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
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看板
提交
ba878b03
编写于
12月 08, 2021
作者:
S
shenglian zhou
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add triangle test case
上级
1bc9512c
变更
11
展开全部
隐藏空白更改
内联
并排
Showing
11 changed file
with
7210 addition
and
0 deletion
+7210
-0
tests/script/general/compute/math_acos.sim
tests/script/general/compute/math_acos.sim
+1073
-0
tests/script/general/compute/math_acos2.sim
tests/script/general/compute/math_acos2.sim
+366
-0
tests/script/general/compute/math_atan.sim
tests/script/general/compute/math_atan.sim
+1073
-0
tests/script/general/compute/math_atan2.sim
tests/script/general/compute/math_atan2.sim
+366
-0
tests/script/general/compute/math_cos.sim
tests/script/general/compute/math_cos.sim
+1073
-0
tests/script/general/compute/math_cos2.sim
tests/script/general/compute/math_cos2.sim
+366
-0
tests/script/general/compute/math_sin.sim
tests/script/general/compute/math_sin.sim
+1073
-0
tests/script/general/compute/math_sin2.sim
tests/script/general/compute/math_sin2.sim
+366
-0
tests/script/general/compute/math_str_func.sim
tests/script/general/compute/math_str_func.sim
+15
-0
tests/script/general/compute/math_tan.sim
tests/script/general/compute/math_tan.sim
+1073
-0
tests/script/general/compute/math_tan2.sim
tests/script/general/compute/math_tan2.sim
+366
-0
未找到文件。
tests/script/general/compute/math_acos.sim
0 → 100644
浏览文件 @
ba878b03
此差异已折叠。
点击以展开。
tests/script/general/compute/math_acos2.sim
0 → 100644
浏览文件 @
ba878b03
sleep 100
sql connect
sql use db
print execute sql select acos(stb1.c4),acos(stba.c5) from stb1,stba where stb1.t1=stba.t1 and stb1.ts=stba.ts;
sql select acos(stb1.c4),acos(stba.c5) from stb1,stba where stb1.t1=stba.t1 and stb1.ts=stba.ts;
if $data00 != @0.000000000@ then
return -1
endi
if $data01 != @0.000000000@ 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 acos(c4) as a from stb1 union all select acos(c5) as a from stba;
sql select acos(c4) as a from stb1 union all select acos(c5) as a from stba;
if $data00 != @0.000000000@ 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 != @0.000000000@ then
return -1
endi
if $data80 != @nan@ then
return -1
endi
if $data90 != @nan@ then
return -1
endi
print execute sql select acos(c2) from stba;
sql select acos(c2) from stba;
if $data00 != @0.000000000@ 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 != @1.570796327@ then
return -1
endi
print execute sql select acos(min(c2)) from tba1;
sql select acos(min(c2)) from tba1;
if $data00 != @1.570796327@ then
return -1
endi
print execute sql select acos(max(c2)) from tba1;
sql select acos(max(c2)) from tba1;
if $data00 != @nan@ then
return -1
endi
print execute sql select acos(count(c2)) from tba1;
sql select acos(count(c2)) from tba1;
if $data00 != @nan@ then
return -1
endi
print execute sql select acos(sum(c2)) from tba1;
sql select acos(sum(c2)) from tba1;
if $data00 != @nan@ then
return -1
endi
print execute sql select acos(avg(c2)) from tba1;
sql select acos(avg(c2)) from tba1;
if $data00 != @nan@ then
return -1
endi
print execute sql select acos(percentile(c2, 10)) from tba1;
sql select acos(percentile(c2, 10)) from tba1;
if $data00 != @0.451026812@ then
return -1
endi
print execute sql select acos(apercentile(c2, 10)) from tba1;
sql select acos(apercentile(c2, 10)) from tba1;
if $data00 != @1.570796327@ then
return -1
endi
print execute sql select acos(stddev(c2)) from tba1;
sql select acos(stddev(c2)) from tba1;
if $data00 != @nan@ then
return -1
endi
print execute sql select acos(spread(c2)) from tba1;
sql select acos(spread(c2)) from tba1;
if $data00 != @nan@ then
return -1
endi
print execute sql select acos(twa(c2)) from tba1;
sql select acos(twa(c2)) from tba1;
if $data00 != @nan@ then
return -1
endi
print execute sql select acos(leastsquares(c2, 1, 1)) from tba1;
sql_error select acos(leastsquares(c2, 1, 1)) from tba1;
print execute sql select acos(interp(c2)) from tba1 every(1s)
sql select acos(interp(c2)) from tba1 every(1s)
if $data00 != @21-11-11 09:00:00.000@ then
return -1
endi
if $data01 != @0.000000000@ 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 != @1.570796327@ then
return -1
endi
print execute sql select acos(interp(c2)) from stba every(1s) group by tbname;
sql select acos(interp(c2)) from stba every(1s) group by tbname;
if $data00 != @21-11-11 09:00:00.000@ then
return -1
endi
if $data01 != @0.000000000@ 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 != @1.570796327@ then
return -1
endi
if $data92 != @tba1@ then
return -1
endi
print execute sql select acos(elapsed(ts)) from tba1;
sql select acos(elapsed(ts)) from tba1;
if $data00 != @nan@ then
return -1
endi
print execute sql select acos(rate(c2)) from tba1;
sql select acos(rate(c2)) from tba1;
if $data00 != @0.458874205@ then
return -1
endi
print execute sql select acos(irate(c2)) from tba1;
sql select acos(irate(c2)) from tba1;
if $data00 != @1.570796327@ then
return -1
endi
print execute sql select acos(first(c2)) from tba1;
sql select acos(first(c2)) from tba1;
if $data00 != @0.000000000@ then
return -1
endi
print execute sql select acos(last(c2)) from tba1;
sql select acos(last(c2)) from tba1;
if $data00 != @1.570796327@ then
return -1
endi
print execute sql select acos(last_row(c2)) from tba1;
sql select acos(last_row(c2)) from tba1;
if $data00 != @1.570796327@ then
return -1
endi
print execute sql select acos(top(c2, 1)) from tba1;
sql_error select acos(top(c2, 1)) from tba1;
print execute sql select acos(bottom(c2, 1)) from tba1;
sql_error select acos(bottom(c2, 1)) from tba1;
print execute sql select acos(leastsquares(c2, 1, 1)) from tba1;
sql_error select acos(leastsquares(c2, 1, 1)) from tba1;
print execute sql select acos(derivative(c2, 1s, 0)) from tba1;
sql_error select acos(derivative(c2, 1s, 0)) from tba1;
print execute sql select acos(diff(c2)) from tba1;
sql_error select acos(diff(c2)) from tba1;
print execute sql select acos(csum(c2)) from tba1;
sql_error select acos(csum(c2)) from tba1;
print execute sql select acos(mavg(c2,2)) from tba1;
sql_error select acos(mavg(c2,2)) from tba1;
print execute sql select acos(sample(c2,2)) from tba1;
sql_error select acos(sample(c2,2)) from tba1;
print execute sql select acos(_block_dist()) from tba1;
sql_error select acos(_block_dist()) from tba1;
tests/script/general/compute/math_atan.sim
0 → 100644
浏览文件 @
ba878b03
此差异已折叠。
点击以展开。
tests/script/general/compute/math_atan2.sim
0 → 100644
浏览文件 @
ba878b03
sleep 100
sql connect
sql use db
print execute sql select acos(stb1.c4),acos(stba.c5) from stb1,stba where stb1.t1=stba.t1 and stb1.ts=stba.ts;
sql select acos(stb1.c4),acos(stba.c5) from stb1,stba where stb1.t1=stba.t1 and stb1.ts=stba.ts;
if $data00 != @0.000000000@ then
return -1
endi
if $data01 != @0.000000000@ 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 acos(c4) as a from stb1 union all select acos(c5) as a from stba;
sql select acos(c4) as a from stb1 union all select acos(c5) as a from stba;
if $data00 != @0.000000000@ 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 != @0.000000000@ then
return -1
endi
if $data80 != @nan@ then
return -1
endi
if $data90 != @nan@ then
return -1
endi
print execute sql select acos(c2) from stba;
sql select acos(c2) from stba;
if $data00 != @0.000000000@ 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 != @1.570796327@ then
return -1
endi
print execute sql select acos(min(c2)) from tba1;
sql select acos(min(c2)) from tba1;
if $data00 != @1.570796327@ then
return -1
endi
print execute sql select acos(max(c2)) from tba1;
sql select acos(max(c2)) from tba1;
if $data00 != @nan@ then
return -1
endi
print execute sql select acos(count(c2)) from tba1;
sql select acos(count(c2)) from tba1;
if $data00 != @nan@ then
return -1
endi
print execute sql select acos(sum(c2)) from tba1;
sql select acos(sum(c2)) from tba1;
if $data00 != @nan@ then
return -1
endi
print execute sql select acos(avg(c2)) from tba1;
sql select acos(avg(c2)) from tba1;
if $data00 != @nan@ then
return -1
endi
print execute sql select acos(percentile(c2, 10)) from tba1;
sql select acos(percentile(c2, 10)) from tba1;
if $data00 != @0.451026812@ then
return -1
endi
print execute sql select acos(apercentile(c2, 10)) from tba1;
sql select acos(apercentile(c2, 10)) from tba1;
if $data00 != @1.570796327@ then
return -1
endi
print execute sql select acos(stddev(c2)) from tba1;
sql select acos(stddev(c2)) from tba1;
if $data00 != @nan@ then
return -1
endi
print execute sql select acos(spread(c2)) from tba1;
sql select acos(spread(c2)) from tba1;
if $data00 != @nan@ then
return -1
endi
print execute sql select acos(twa(c2)) from tba1;
sql select acos(twa(c2)) from tba1;
if $data00 != @nan@ then
return -1
endi
print execute sql select acos(leastsquares(c2, 1, 1)) from tba1;
sql_error select acos(leastsquares(c2, 1, 1)) from tba1;
print execute sql select acos(interp(c2)) from tba1 every(1s)
sql select acos(interp(c2)) from tba1 every(1s)
if $data00 != @21-11-11 09:00:00.000@ then
return -1
endi
if $data01 != @0.000000000@ 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 != @1.570796327@ then
return -1
endi
print execute sql select acos(interp(c2)) from stba every(1s) group by tbname;
sql select acos(interp(c2)) from stba every(1s) group by tbname;
if $data00 != @21-11-11 09:00:00.000@ then
return -1
endi
if $data01 != @0.000000000@ 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 != @1.570796327@ then
return -1
endi
if $data92 != @tba1@ then
return -1
endi
print execute sql select acos(elapsed(ts)) from tba1;
sql select acos(elapsed(ts)) from tba1;
if $data00 != @nan@ then
return -1
endi
print execute sql select acos(rate(c2)) from tba1;
sql select acos(rate(c2)) from tba1;
if $data00 != @0.458874205@ then
return -1
endi
print execute sql select acos(irate(c2)) from tba1;
sql select acos(irate(c2)) from tba1;
if $data00 != @1.570796327@ then
return -1
endi
print execute sql select acos(first(c2)) from tba1;
sql select acos(first(c2)) from tba1;
if $data00 != @0.000000000@ then
return -1
endi
print execute sql select acos(last(c2)) from tba1;
sql select acos(last(c2)) from tba1;
if $data00 != @1.570796327@ then
return -1
endi
print execute sql select acos(last_row(c2)) from tba1;
sql select acos(last_row(c2)) from tba1;
if $data00 != @1.570796327@ then
return -1
endi
print execute sql select acos(top(c2, 1)) from tba1;
sql_error select acos(top(c2, 1)) from tba1;
print execute sql select acos(bottom(c2, 1)) from tba1;
sql_error select acos(bottom(c2, 1)) from tba1;
print execute sql select acos(leastsquares(c2, 1, 1)) from tba1;
sql_error select acos(leastsquares(c2, 1, 1)) from tba1;
print execute sql select acos(derivative(c2, 1s, 0)) from tba1;
sql_error select acos(derivative(c2, 1s, 0)) from tba1;
print execute sql select acos(diff(c2)) from tba1;
sql_error select acos(diff(c2)) from tba1;
print execute sql select acos(csum(c2)) from tba1;
sql_error select acos(csum(c2)) from tba1;
print execute sql select acos(mavg(c2,2)) from tba1;
sql_error select acos(mavg(c2,2)) from tba1;
print execute sql select acos(sample(c2,2)) from tba1;
sql_error select acos(sample(c2,2)) from tba1;
print execute sql select acos(_block_dist()) from tba1;
sql_error select acos(_block_dist()) from tba1;
tests/script/general/compute/math_cos.sim
0 → 100644
浏览文件 @
ba878b03
此差异已折叠。
点击以展开。
tests/script/general/compute/math_cos2.sim
0 → 100644
浏览文件 @
ba878b03
sleep 100
sql connect
sql use db
print execute sql select cos(stb1.c4),cos(stba.c5) from stb1,stba where stb1.t1=stba.t1 and stb1.ts=stba.ts;
sql select cos(stb1.c4),cos(stba.c5) from stb1,stba where stb1.t1=stba.t1 and stb1.ts=stba.ts;
if $data00 != @0.540302306@ then
return -1
endi
if $data01 != @0.540302306@ then
return -1
endi
if $data10 != @NULL@ then
return -1
endi
if $data11 != @-0.416146837@ then
return -1
endi
if $data20 != @-0.416146837@ then
return -1
endi
if $data21 != @-0.989992497@ then
return -1
endi
if $data30 != @NULL@ then
return -1
endi
if $data31 != @-0.653643621@ then
return -1
endi
if $data40 != @-0.653643621@ then
return -1
endi
if $data41 != @0.283662185@ then
return -1
endi
if $data50 != @-0.688836692@ then
return -1
endi
if $data51 != @0.960170287@ then
return -1
endi
if $data60 != @-0.688836692@ then
return -1
endi
if $data61 != @0.753902254@ then
return -1
endi
print execute sql select cos(c4) as a from stb1 union all select cos(c5) as a from stba;
sql select cos(c4) as a from stb1 union all select cos(c5) as a from stba;
if $data00 != @0.540302306@ then
return -1
endi
if $data10 != @NULL@ then
return -1
endi
if $data20 != @-0.416146837@ then
return -1
endi
if $data30 != @NULL@ then
return -1
endi
if $data40 != @-0.653643621@ then
return -1
endi
if $data50 != @-0.688836692@ then
return -1
endi
if $data60 != @-0.688836692@ then
return -1
endi
if $data70 != @0.540302306@ then
return -1
endi
if $data80 != @-0.416146837@ then
return -1
endi
if $data90 != @-0.416146837@ then
return -1
endi
print execute sql select cos(c2) from stba;
sql select cos(c2) from stba;
if $data00 != @0.540302306@ then
return -1
endi
if $data10 != @-0.416146837@ then
return -1
endi
if $data20 != @-0.989992497@ then
return -1
endi
if $data30 != @-0.653643621@ then
return -1
endi
if $data40 != @0.283662185@ then
return -1
endi
if $data50 != @0.960170287@ then
return -1
endi
if $data60 != @0.753902254@ then
return -1
endi
if $data70 != @-0.145500034@ then
return -1
endi
if $data80 != @-0.911130262@ then
return -1
endi
if $data90 != @1.000000000@ then
return -1
endi
print execute sql select cos(min(c2)) from tba1;
sql select cos(min(c2)) from tba1;
if $data00 != @1.000000000@ then
return -1
endi
print execute sql select cos(max(c2)) from tba1;
sql select cos(max(c2)) from tba1;
if $data00 != @-0.911130262@ then
return -1
endi
print execute sql select cos(count(c2)) from tba1;
sql select cos(count(c2)) from tba1;
if $data00 != @0.154251450@ then
return -1
endi
print execute sql select cos(sum(c2)) from tba1;
sql select cos(sum(c2)) from tba1;
if $data00 != @-0.996087835@ then
return -1
endi
print execute sql select cos(avg(c2)) from tba1;
sql select cos(avg(c2)) from tba1;
if $data00 != @-0.210795799@ then
return -1
endi
print execute sql select cos(percentile(c2, 10)) from tba1;
sql select cos(percentile(c2, 10)) from tba1;
if $data00 != @0.621609968@ then
return -1
endi
print execute sql select cos(apercentile(c2, 10)) from tba1;
sql select cos(apercentile(c2, 10)) from tba1;
if $data00 != @1.000000000@ then
return -1
endi
print execute sql select cos(stddev(c2)) from tba1;
sql select cos(stddev(c2)) from tba1;
if $data00 != @-0.963954358@ then
return -1
endi
print execute sql select cos(spread(c2)) from tba1;
sql select cos(spread(c2)) from tba1;
if $data00 != @-0.911130262@ then
return -1
endi
print execute sql select cos(twa(c2)) from tba1;
sql select cos(twa(c2)) from tba1;
if $data00 != @-0.074389166@ then
return -1
endi
print execute sql select cos(leastsquares(c2, 1, 1)) from tba1;
sql_error select cos(leastsquares(c2, 1, 1)) from tba1;
print execute sql select cos(interp(c2)) from tba1 every(1s)
sql select cos(interp(c2)) from tba1 every(1s)
if $data00 != @21-11-11 09:00:00.000@ then
return -1
endi
if $data01 != @0.540302306@ then
return -1
endi
if $data10 != @21-11-11 09:00:01.000@ then
return -1
endi
if $data11 != @-0.416146837@ then
return -1
endi
if $data20 != @21-11-11 09:00:02.000@ then
return -1
endi
if $data21 != @-0.989992497@ then
return -1
endi
if $data30 != @21-11-11 09:00:03.000@ then
return -1
endi
if $data31 != @-0.653643621@ then
return -1
endi
if $data40 != @21-11-11 09:00:04.000@ then
return -1
endi
if $data41 != @0.283662185@ then
return -1
endi
if $data50 != @21-11-11 09:00:05.000@ then
return -1
endi
if $data51 != @0.960170287@ then
return -1
endi
if $data60 != @21-11-11 09:00:06.000@ then
return -1
endi
if $data61 != @0.753902254@ then
return -1
endi
if $data70 != @21-11-11 09:00:07.000@ then
return -1
endi
if $data71 != @-0.145500034@ then
return -1
endi
if $data80 != @21-11-11 09:00:08.000@ then
return -1
endi
if $data81 != @-0.911130262@ then
return -1
endi
if $data90 != @21-11-11 09:00:09.000@ then
return -1
endi
if $data91 != @1.000000000@ then
return -1
endi
print execute sql select cos(interp(c2)) from stba every(1s) group by tbname;
sql select cos(interp(c2)) from stba every(1s) group by tbname;
if $data00 != @21-11-11 09:00:00.000@ then
return -1
endi
if $data01 != @0.540302306@ 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 != @-0.416146837@ 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 != @-0.989992497@ 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 != @-0.653643621@ 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 != @0.283662185@ 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 != @0.960170287@ 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 != @0.753902254@ 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 != @-0.145500034@ 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 != @-0.911130262@ 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 != @1.000000000@ then
return -1
endi
if $data92 != @tba1@ then
return -1
endi
print execute sql select cos(elapsed(ts)) from tba1;
sql select cos(elapsed(ts)) from tba1;
if $data00 != @-0.999127122@ then
return -1
endi
print execute sql select cos(rate(c2)) from tba1;
sql select cos(rate(c2)) from tba1;
if $data00 != @0.624307395@ then
return -1
endi
print execute sql select cos(irate(c2)) from tba1;
sql select cos(irate(c2)) from tba1;
if $data00 != @1.000000000@ then
return -1
endi
print execute sql select cos(first(c2)) from tba1;
sql select cos(first(c2)) from tba1;
if $data00 != @0.540302306@ then
return -1
endi
print execute sql select cos(last(c2)) from tba1;
sql select cos(last(c2)) from tba1;
if $data00 != @1.000000000@ then
return -1
endi
print execute sql select cos(last_row(c2)) from tba1;
sql select cos(last_row(c2)) from tba1;
if $data00 != @1.000000000@ then
return -1
endi
print execute sql select cos(top(c2, 1)) from tba1;
sql_error select cos(top(c2, 1)) from tba1;
print execute sql select cos(bottom(c2, 1)) from tba1;
sql_error select cos(bottom(c2, 1)) from tba1;
print execute sql select cos(leastsquares(c2, 1, 1)) from tba1;
sql_error select cos(leastsquares(c2, 1, 1)) from tba1;
print execute sql select cos(derivative(c2, 1s, 0)) from tba1;
sql_error select cos(derivative(c2, 1s, 0)) from tba1;
print execute sql select cos(diff(c2)) from tba1;
sql_error select cos(diff(c2)) from tba1;
print execute sql select cos(csum(c2)) from tba1;
sql_error select cos(csum(c2)) from tba1;
print execute sql select cos(mavg(c2,2)) from tba1;
sql_error select cos(mavg(c2,2)) from tba1;
print execute sql select cos(sample(c2,2)) from tba1;
sql_error select cos(sample(c2,2)) from tba1;
print execute sql select cos(_block_dist()) from tba1;
sql_error select cos(_block_dist()) from tba1;
tests/script/general/compute/math_sin.sim
0 → 100644
浏览文件 @
ba878b03
此差异已折叠。
点击以展开。
tests/script/general/compute/math_sin2.sim
0 → 100644
浏览文件 @
ba878b03
sleep 100
sql connect
sql use db
print execute sql select sin(stb1.c4),sin(stba.c5) from stb1,stba where stb1.t1=stba.t1 and stb1.ts=stba.ts;
sql select sin(stb1.c4),sin(stba.c5) from stb1,stba where stb1.t1=stba.t1 and stb1.ts=stba.ts;
if $data00 != @0.841470985@ then
return -1
endi
if $data01 != @0.841470985@ then
return -1
endi
if $data10 != @NULL@ then
return -1
endi
if $data11 != @0.909297427@ then
return -1
endi
if $data20 != @0.909297427@ then
return -1
endi
if $data21 != @0.141120008@ then
return -1
endi
if $data30 != @NULL@ then
return -1
endi
if $data31 != @-0.756802495@ then
return -1
endi
if $data40 != @-0.756802495@ then
return -1
endi
if $data41 != @-0.958924275@ then
return -1
endi
if $data50 != @-0.724916555@ then
return -1
endi
if $data51 != @-0.279415498@ then
return -1
endi
if $data60 != @0.724916555@ then
return -1
endi
if $data61 != @0.656986599@ then
return -1
endi
print execute sql select sin(c4) as a from stb1 union all select sin(c5) as a from stba;
sql select sin(c4) as a from stb1 union all select sin(c5) as a from stba;
if $data00 != @0.841470985@ then
return -1
endi
if $data10 != @NULL@ then
return -1
endi
if $data20 != @0.909297427@ then
return -1
endi
if $data30 != @NULL@ then
return -1
endi
if $data40 != @-0.756802495@ then
return -1
endi
if $data50 != @-0.724916555@ then
return -1
endi
if $data60 != @0.724916555@ then
return -1
endi
if $data70 != @0.841470985@ then
return -1
endi
if $data80 != @0.909297427@ then
return -1
endi
if $data90 != @0.909297427@ then
return -1
endi
print execute sql select sin(c2) from stba;
sql select sin(c2) from stba;
if $data00 != @0.841470985@ then
return -1
endi
if $data10 != @0.909297427@ then
return -1
endi
if $data20 != @0.141120008@ then
return -1
endi
if $data30 != @-0.756802495@ then
return -1
endi
if $data40 != @-0.958924275@ then
return -1
endi
if $data50 != @-0.279415498@ then
return -1
endi
if $data60 != @0.656986599@ then
return -1
endi
if $data70 != @0.989358247@ then
return -1
endi
if $data80 != @0.412118485@ then
return -1
endi
if $data90 != @0.000000000@ then
return -1
endi
print execute sql select sin(min(c2)) from tba1;
sql select sin(min(c2)) from tba1;
if $data00 != @0.000000000@ then
return -1
endi
print execute sql select sin(max(c2)) from tba1;
sql select sin(max(c2)) from tba1;
if $data00 != @0.412118485@ then
return -1
endi
print execute sql select sin(count(c2)) from tba1;
sql select sin(count(c2)) from tba1;
if $data00 != @-0.988031624@ then
return -1
endi
print execute sql select sin(sum(c2)) from tba1;
sql select sin(sum(c2)) from tba1;
if $data00 != @0.088368686@ then
return -1
endi
print execute sql select sin(avg(c2)) from tba1;
sql select sin(avg(c2)) from tba1;
if $data00 != @-0.977530118@ then
return -1
endi
print execute sql select sin(percentile(c2, 10)) from tba1;
sql select sin(percentile(c2, 10)) from tba1;
if $data00 != @0.783326910@ then
return -1
endi
print execute sql select sin(apercentile(c2, 10)) from tba1;
sql select sin(apercentile(c2, 10)) from tba1;
if $data00 != @0.000000000@ then
return -1
endi
print execute sql select sin(stddev(c2)) from tba1;
sql select sin(stddev(c2)) from tba1;
if $data00 != @0.266067654@ then
return -1
endi
print execute sql select sin(spread(c2)) from tba1;
sql select sin(spread(c2)) from tba1;
if $data00 != @0.412118485@ then
return -1
endi
print execute sql select sin(twa(c2)) from tba1;
sql select sin(twa(c2)) from tba1;
if $data00 != @-0.997229288@ then
return -1
endi
print execute sql select sin(leastsquares(c2, 1, 1)) from tba1;
sql_error select sin(leastsquares(c2, 1, 1)) from tba1;
print execute sql select sin(interp(c2)) from tba1 every(1s)
sql select sin(interp(c2)) from tba1 every(1s)
if $data00 != @21-11-11 09:00:00.000@ then
return -1
endi
if $data01 != @0.841470985@ then
return -1
endi
if $data10 != @21-11-11 09:00:01.000@ then
return -1
endi
if $data11 != @0.909297427@ then
return -1
endi
if $data20 != @21-11-11 09:00:02.000@ then
return -1
endi
if $data21 != @0.141120008@ then
return -1
endi
if $data30 != @21-11-11 09:00:03.000@ then
return -1
endi
if $data31 != @-0.756802495@ then
return -1
endi
if $data40 != @21-11-11 09:00:04.000@ then
return -1
endi
if $data41 != @-0.958924275@ then
return -1
endi
if $data50 != @21-11-11 09:00:05.000@ then
return -1
endi
if $data51 != @-0.279415498@ then
return -1
endi
if $data60 != @21-11-11 09:00:06.000@ then
return -1
endi
if $data61 != @0.656986599@ then
return -1
endi
if $data70 != @21-11-11 09:00:07.000@ then
return -1
endi
if $data71 != @0.989358247@ then
return -1
endi
if $data80 != @21-11-11 09:00:08.000@ then
return -1
endi
if $data81 != @0.412118485@ 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 sin(interp(c2)) from stba every(1s) group by tbname;
sql select sin(interp(c2)) from stba every(1s) group by tbname;
if $data00 != @21-11-11 09:00:00.000@ then
return -1
endi
if $data01 != @0.841470985@ 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 != @0.909297427@ 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 != @0.141120008@ 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 != @-0.756802495@ 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 != @-0.958924275@ 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 != @-0.279415498@ 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 != @0.656986599@ 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 != @0.989358247@ 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 != @0.412118485@ 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 sin(elapsed(ts)) from tba1;
sql select sin(elapsed(ts)) from tba1;
if $data00 != @0.041773129@ then
return -1
endi
print execute sql select sin(rate(c2)) from tba1;
sql select sin(rate(c2)) from tba1;
if $data00 != @0.781178774@ then
return -1
endi
print execute sql select sin(irate(c2)) from tba1;
sql select sin(irate(c2)) from tba1;
if $data00 != @0.000000000@ then
return -1
endi
print execute sql select sin(first(c2)) from tba1;
sql select sin(first(c2)) from tba1;
if $data00 != @0.841470985@ then
return -1
endi
print execute sql select sin(last(c2)) from tba1;
sql select sin(last(c2)) from tba1;
if $data00 != @0.000000000@ then
return -1
endi
print execute sql select sin(last_row(c2)) from tba1;
sql select sin(last_row(c2)) from tba1;
if $data00 != @0.000000000@ then
return -1
endi
print execute sql select sin(top(c2, 1)) from tba1;
sql_error select sin(top(c2, 1)) from tba1;
print execute sql select sin(bottom(c2, 1)) from tba1;
sql_error select sin(bottom(c2, 1)) from tba1;
print execute sql select sin(leastsquares(c2, 1, 1)) from tba1;
sql_error select sin(leastsquares(c2, 1, 1)) from tba1;
print execute sql select sin(derivative(c2, 1s, 0)) from tba1;
sql_error select sin(derivative(c2, 1s, 0)) from tba1;
print execute sql select sin(diff(c2)) from tba1;
sql_error select sin(diff(c2)) from tba1;
print execute sql select sin(csum(c2)) from tba1;
sql_error select sin(csum(c2)) from tba1;
print execute sql select sin(mavg(c2,2)) from tba1;
sql_error select sin(mavg(c2,2)) from tba1;
print execute sql select sin(sample(c2,2)) from tba1;
sql_error select sin(sample(c2,2)) from tba1;
print execute sql select sin(_block_dist()) from tba1;
sql_error select sin(_block_dist()) from tba1;
tests/script/general/compute/math_str_func.sim
浏览文件 @
ba878b03
...
...
@@ -48,6 +48,11 @@ 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
run general/compute/math_acos.sim
run general/compute/math_atan.sim
run general/compute/math_sin.sim
run general/compute/math_cos.sim
run general/compute/math_tan.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);
...
...
@@ -105,6 +110,16 @@ run general/compute/math_abs.sim
run general/compute/math_abs2.sim
run general/compute/math_asin.sim
run general/compute/math_asin2.sim
run general/compute/math_acos.sim
run general/compute/math_acos2.sim
run general/compute/math_atan.sim
run general/compute/math_atan2.sim
run general/compute/math_sin.sim
run general/compute/math_sin2.sim
run general/compute/math_cos.sim
run general/compute/math_cos2.sim
run general/compute/math_tan.sim
run general/compute/math_tan2.sim
#system sh/exec.sh -n dnode1 -s stop -x SIGINT
tests/script/general/compute/math_tan.sim
0 → 100644
浏览文件 @
ba878b03
此差异已折叠。
点击以展开。
tests/script/general/compute/math_tan2.sim
0 → 100644
浏览文件 @
ba878b03
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录