Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
98a78b69
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看板
提交
98a78b69
编写于
11月 30, 2021
作者:
S
shenglian zhou
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add more test cases
上级
1710eb5b
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
115 addition
and
1 deletion
+115
-1
tests/script/general/compute/math_str_func.sim
tests/script/general/compute/math_str_func.sim
+106
-0
tests/script/general/compute/scalar_pow.sim
tests/script/general/compute/scalar_pow.sim
+9
-1
未找到文件。
tests/script/general/compute/math_str_func.sim
0 → 100644
浏览文件 @
98a78b69
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 1
system sh/cfg.sh -n dnode1 -c maxtablespervnode -v 6
system sh/cfg.sh -n dnode1 -c cache -v 1
system sh/cfg.sh -n dnode1 -c minRows -v 10
system sh/exec.sh -n dnode1 -s start
sleep 100
sql connect
sql drop database if exists db
sql create database if not exists db
sql use db
sql create table stb1 (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);
sql create table tb1 using stb1 tags(1,'1',1.0);
sql create table tb2 using stb1 tags(2,'2',2.0);
sql create table tb3 using stb1 tags(3,'3',3.0);
sql insert into tb1 values ('2021-11-11 09:00:00',true,1,1,1,1,1,1,"123","1234",1,1,1,1);
sql insert into tb1 values ('2021-11-11 09:00:01',true,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
sql insert into tb1 values ('2021-11-11 09:00:02',true,2,NULL,2,NULL,2,NULL,"234",NULL,2,NULL,2,NULL);
sql insert into tb1 values ('2021-11-11 09:00:03',false,NULL,3,NULL,3,NULL,3,NULL,"3456",NULL,3,NULL,3);
sql insert into tb1 values ('2021-11-11 09:00:04',true,4,4,4,4,4,4,"456","4567",4,4,4,4);
sql insert into tb1 values ('2021-11-11 09:00:05',true,127,32767,2147483647,9223372036854775807,3.402823466e+38,1.79769e+308,"567","5678",254,65534,4294967294,9223372036854775807);
sql insert into tb1 values ('2021-11-11 09:00:06',true,-127,-32767,-2147483647,-9223372036854775807,-3.402823466e+38,-1.79769e+308,"678","6789",0,0,0,0);
sql insert into tb2 values ('2021-11-11 09:00:00',true,1,1,1,1,1,1,"111","1111",1,1,1,1);
sql insert into tb2 values ('2021-11-11 09:00:01',true,2,2,2,2,2,2,"222","2222",2,2,2,2);
sql insert into tb2 values ('2021-11-11 09:00:02',true,3,3,2,3,3,3,"333","3333",3,3,3,3);
sql insert into tb2 values ('2021-11-11 09:00:03',false,4,4,4,4,4,4,"444","4444",4,4,4,4);
sql insert into tb2 values ('2021-11-11 09:00:04',true,5,5,5,5,5,5,"555","5555",5,5,5,5);
sql insert into tb2 values ('2021-11-11 09:00:05',true,6,6,6,6,6,6,"666","6666",6,6,6,6);
sql insert into tb2 values ('2021-11-11 09:00:06',true,7,7,7,7,7,7,"777","7777",7,7,7,7);
sql create table tbn (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);
sql insert into tbn values ('2021-11-11 09:00:00',true,1,1,1,1,1,1,"111","1111",1,1,1,1);
sql insert into tbn values ('2021-11-11 09:00:01',true,2,2,2,2,2,2,"222","2222",2,2,2,2);
sql insert into tbn values ('2021-11-11 09:00:02',true,3,3,2,3,3,3,"333","3333",3,3,3,3);
sql insert into tbn values ('2021-11-11 09:00:03',false,4,4,4,4,4,4,"444","4444",4,4,4,4);
sql insert into tbn values ('2021-11-11 09:00:04',true,5,5,5,5,5,5,"555","5555",5,5,5,5);
sql insert into tbn values ('2021-11-11 09:00:05',true,6,6,6,6,6,6,"666","6666",6,6,6,6);
sql insert into tbn values ('2021-11-11 09:00:06',true,7,7,7,7,7,7,"777","7777",7,7,7,7);
#run general/compute/math_str_query1.sim
#run general/compute/math_str_query2.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);
sql create table tba1 using stba tags(1,'1',1.0);
sql insert into tba1 values ('2021-11-11 09:00:00',true, 1,1,1,1,1,1,"111","1111",1,1,1,1);
sql insert into tba1 values ('2021-11-11 09:00:01',true, 2,2,2,2,2,2,"222","2222",2,2,2,2);
sql insert into tba1 values ('2021-11-11 09:00:02',true, 3,3,2,3,3,3,"333","3333",3,3,3,3);
sql insert into tba1 values ('2021-11-11 09:00:03',false,4,4,4,4,4,4,"444","4444",4,4,4,4);
sql insert into tba1 values ('2021-11-11 09:00:04',true, 5,5,5,5,5,5,"555","5555",5,5,5,5);
sql insert into tba1 values ('2021-11-11 09:00:05',true, 6,6,6,6,6,6,"666","6666",6,6,6,6);
sql insert into tba1 values ('2021-11-11 09:00:06',true, 7,7,7,7,7,7,"777","7777",7,7,7,7);
sql insert into tba1 values ('2021-11-11 09:00:07',true, 8,8,8,8,8,8,"888","8888",8,8,8,8);
sql insert into tba1 values ('2021-11-11 09:00:08',true, 9,9,9,9,9,9,"999","9999",9,9,9,9);
sql insert into tba1 values ('2021-11-11 09:00:09',true, 0,0,0,0,0,0,"000","0000",0,0,0,0);
print ================== restart server to commit data into disk
system sh/exec.sh -n dnode1 -s stop -x SIGINT
sleep 500
system sh/exec.sh -n dnode1 -s start
print ================== server restart completed
sql insert into tba1 values ('2021-11-11 09:00:10',true, 1,1,1,1,1,1,"111","1111",1,1,1,1);
sql insert into tba1 values ('2021-11-11 09:00:11',true, 2,2,2,2,2,2,"222","2222",2,2,2,2);
sql insert into tba1 values ('2021-11-11 09:00:12',true, 3,3,2,3,3,3,"333","3333",3,3,3,3);
sql insert into tba1 values ('2021-11-11 09:00:13',false,4,4,4,4,4,4,"444","4444",4,4,4,4);
sql insert into tba1 values ('2021-11-11 09:00:14',true, 5,5,5,5,5,5,"555","5555",5,5,5,5);
sql insert into tba1 values ('2021-11-11 09:00:15',true, 6,6,6,6,6,6,"666","6666",6,6,6,6);
sql insert into tba1 values ('2021-11-11 09:00:16',true, 7,7,7,7,7,7,"777","7777",7,7,7,7);
sql insert into tba1 values ('2021-11-11 09:00:17',true, 8,8,8,8,8,8,"888","8888",8,8,8,8);
sql insert into tba1 values ('2021-11-11 09:00:18',true, 9,9,9,9,9,9,"999","9999",9,9,9,9);
sql insert into tba1 values ('2021-11-11 09:00:19',true, 0,0,0,0,0,0,"000","0000",0,0,0,0);
print ================== restart server to commit data into disk
system sh/exec.sh -n dnode1 -s stop -x SIGINT
sleep 500
system sh/exec.sh -n dnode1 -s start
print ================== server restart completed
sql insert into tba1 values ('2021-11-11 09:00:20',true, 1,1,1,1,1,1,"111","1111",1,1,1,1);
sql insert into tba1 values ('2021-11-11 09:00:21',true, 2,2,2,2,2,2,"222","2222",2,2,2,2);
sql insert into tba1 values ('2021-11-11 09:00:22',true, 3,3,2,3,3,3,"333","3333",3,3,3,3);
sql insert into tba1 values ('2021-11-11 09:00:23',false,4,4,4,4,4,4,"444","4444",4,4,4,4);
sql insert into tba1 values ('2021-11-11 09:00:24',true, 5,5,5,5,5,5,"555","5555",5,5,5,5);
sql insert into tba1 values ('2021-11-11 09:00:25',true, 6,6,6,6,6,6,"666","6666",6,6,6,6);
sql insert into tba1 values ('2021-11-11 09:00:26',true, 7,7,7,7,7,7,"777","7777",7,7,7,7);
sql insert into tba1 values ('2021-11-11 09:00:27',true, 8,8,8,8,8,8,"888","8888",8,8,8,8);
sql insert into tba1 values ('2021-11-11 09:00:28',true, 9,9,9,9,9,9,"999","9999",9,9,9,9);
sql insert into tba1 values ('2021-11-11 09:00:29',true, 0,0,0,0,0,0,"000","0000",0,0,0,0);
#run general/compute/math_str_query1.sim
#run general/compute/math_str_query2.sim
#run general/compute/math_str_query3.sim
#system sh/exec.sh -n dnode1 -s stop -x SIGINT
tests/script/general/compute/scalar_pow.sim
浏览文件 @
98a78b69
...
...
@@ -212,7 +212,15 @@ endi
if $data15 != 2.000000000 then
return -1
endi
print execute sql select sqrt(abs(log(c1,2)-pow(c1,2)))+2 from $tb order by ts limit 2
sql select sqrt(abs(log(c1,2)-pow(c1,2)))+2 from $tb order by ts limit 2
print $data00 , $ data10
if $data00 != @inf@ then
return -1
endi
if $data10 != 3.000000000 then
return -1
endi
print ===============> step 3 sql_error stable, group by, window
sql_error select log(c2,2) from $stb group by tbname;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录