Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
8f82baa7
T
TDengine
项目概览
taosdata
/
TDengine
接近 2 年 前同步成功
通知
1192
Star
22018
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看板
提交
8f82baa7
编写于
12月 10, 2021
作者:
S
shenglian zhou
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add string concat test cases
上级
c9744fce
变更
3
展开全部
隐藏空白更改
内联
并排
Showing
3 changed file
with
1805 addition
and
0 deletion
+1805
-0
tests/script/general/compute/str_concat.sim
tests/script/general/compute/str_concat.sim
+1588
-0
tests/script/general/compute/str_concat2.sim
tests/script/general/compute/str_concat2.sim
+214
-0
tests/script/general/compute/string_funcs.sim
tests/script/general/compute/string_funcs.sim
+3
-0
未找到文件。
tests/script/general/compute/str_concat.sim
0 → 100644
浏览文件 @
8f82baa7
此差异已折叠。
点击以展开。
tests/script/general/compute/str_concat2.sim
0 → 100644
浏览文件 @
8f82baa7
sleep 100
sql connect
sql use db
print execute sql select concat(stb1.c8,stb1.c14),pow(stba.c2,stba.c5) from stb1,stba where stb1.t1=stba.t1 and stb1.ts=stba.ts;
sql select concat(stb1.c8,stb1.c14),pow(stba.c2,stba.c5) from stb1,stba where stb1.t1=stba.t1 and stb1.ts=stba.ts;
if $data00 != @1231@ then
return -1
endi
if $data01 != @1.000000000@ then
return -1
endi
if $data10 != @NULL@ then
return -1
endi
if $data11 != @4.000000000@ then
return -1
endi
if $data20 != @2342@ then
return -1
endi
if $data21 != @27.000000000@ then
return -1
endi
if $data30 != @NULL@ then
return -1
endi
if $data31 != @256.000000000@ then
return -1
endi
if $data40 != @4564@ then
return -1
endi
if $data41 != @3125.000000000@ then
return -1
endi
if $data50 != @56727@ then
return -1
endi
if $data51 != @46656.000000000@ then
return -1
endi
if $data60 != @678@ then
return -1
endi
if $data61 != @823543.000000000@ then
return -1
endi
print execute sql select concat(c8,c14) as a from stb1 union all select concat(c8,c14) as a from stba;
sql select concat(c8,c14) as a from stb1 union all select concat(c8,c14) as a from stba;
if $data00 != @1231@ then
return -1
endi
if $data10 != @NULL@ then
return -1
endi
if $data20 != @2342@ then
return -1
endi
if $data30 != @NULL@ then
return -1
endi
if $data40 != @4564@ then
return -1
endi
if $data50 != @56727@ then
return -1
endi
if $data60 != @678@ then
return -1
endi
if $data70 != @1111@ then
return -1
endi
if $data80 != @2222@ then
return -1
endi
if $data90 != @3333@ then
return -1
endi
print execute sql select concat(c8,c14) from stba;
sql select concat(c8,c14) from stba;
if $data00 != @1111@ then
return -1
endi
if $data10 != @2222@ then
return -1
endi
if $data20 != @3333@ then
return -1
endi
if $data30 != @4444@ then
return -1
endi
if $data40 != @5555@ then
return -1
endi
if $data50 != @6666@ then
return -1
endi
if $data60 != @7777@ then
return -1
endi
if $data70 != @8888@ then
return -1
endi
if $data80 != @9999@ then
return -1
endi
if $data90 != @0000@ then
return -1
endi
print execute sql select concat('c8',cast(min(c2) as binary(10))) from tba1;
sql select concat('c8',cast(min(c2) as binary(10))) from tba1;
if $data00 != @c80@ then
return -1
endi
print execute sql select concat('c8',cast(max(c2) as binary(10))) from tba1;
sql select concat('c8',cast(max(c2) as binary(10))) from tba1;
if $data00 != @c89@ then
return -1
endi
print execute sql select concat('c8',cast(count(c2) as binary(10))) from tba1;
sql select concat('c8',cast(count(c2) as binary(10))) from tba1;
if $data00 != @c830@ then
return -1
endi
print execute sql select concat('c8',cast(sum(c2) as binary(10))) from tba1;
sql select concat('c8',cast(sum(c2) as binary(10))) from tba1;
if $data00 != @c8135@ then
return -1
endi
print execute sql select concat('c8',cast(avg(c2) as binary(10))) from tba1;
sql select concat('c8',cast(avg(c2) as binary(10))) from tba1;
if $data00 != @c84.50@ then
return -1
endi
print execute sql select concat('c8',cast(percentile(c2, 10) as binary(10))) from tba1;
sql select concat('c8',cast(percentile(c2, 10) as binary(10))) from tba1;
if $data00 != @c80.90@ then
return -1
endi
print execute sql select concat('c8',cast(apercentile(c2, 10) as binary(10))) from tba1;
sql select concat('c8',cast(apercentile(c2, 10) as binary(10))) from tba1;
if $data00 != @c80.00@ then
return -1
endi
print execute sql select concat('c8',cast(stddev(c2) as binary(10))) from tba1;
sql select concat('c8',cast(stddev(c2) as binary(10))) from tba1;
if $data00 != @c82.87@ then
return -1
endi
print execute sql select concat('c8',cast(spread(c2) as binary(10))) from tba1;
sql select concat('c8',cast(spread(c2) as binary(10))) from tba1;
if $data00 != @c89.00@ then
return -1
endi
print execute sql select concat('c8',cast(twa(c2) as binary(10))) from tba1;
sql select concat('c8',cast(twa(c2) as binary(10))) from tba1;
if $data00 != @c84.63@ then
return -1
endi
print execute sql #select concat('c8',cast(interp(c2) as binary(10))) from tba1 every(1s)
sql_error #select concat('c8',cast(interp(c2) as binary(10))) from tba1 every(1s)
print execute sql #select concat('c8',cast(interp(c2) as binary(10))) from stba every(1s) group by tbname;
sql_error #select concat('c8',cast(interp(c2) as binary(10))) from stba every(1s) group by tbname;
print execute sql select concat('c8',cast(elapsed(ts) as binary(10))) from tba1;
sql select concat('c8',cast(elapsed(ts) as binary(10))) from tba1;
if $data00 != @c82900@ then
return -1
endi
print execute sql select concat('c8',cast(rate(c2) as binary(10))) from tba1;
sql select concat('c8',cast(rate(c2) as binary(10))) from tba1;
if $data00 != @c80.89@ then
return -1
endi
print execute sql select concat('c8',cast(irate(c2) as binary(10))) from tba1;
sql select concat('c8',cast(irate(c2) as binary(10))) from tba1;
if $data00 != @c80.00@ then
return -1
endi
print execute sql select concat('c8',cast(first(c2) as binary(10))) from tba1;
sql select concat('c8',cast(first(c2) as binary(10))) from tba1;
if $data00 != @c81@ then
return -1
endi
print execute sql select concat('c8',cast(last(c2) as binary(10))) from tba1;
sql select concat('c8',cast(last(c2) as binary(10))) from tba1;
if $data00 != @c80@ then
return -1
endi
print execute sql select concat('c8',cast(last_row(c2) as binary(10))) from tba1;
sql select concat('c8',cast(last_row(c2) as binary(10))) from tba1;
if $data00 != @c80@ then
return -1
endi
print execute sql select concat('c8',cast(top(c2, 1) as binary(10))) from tba1;
sql_error select concat('c8',cast(top(c2, 1) as binary(10))) from tba1;
print execute sql select concat('c8',cast(bottom(c2, 1) as binary(10))) from tba1;
sql_error select concat('c8',cast(bottom(c2, 1) as binary(10))) from tba1;
print execute sql select concat('c8',cast(leastsquares(c2, 1, 1) as binary(10))) from tba1;
sql_error select concat('c8',cast(leastsquares(c2, 1, 1) as binary(10))) from tba1;
print execute sql select concat('c8',cast(derivative(c2, 1s, 0) as binary(10))) from tba1;
sql_error select concat('c8',cast(derivative(c2, 1s, 0) as binary(10))) from tba1;
print execute sql select concat('c8',cast(diff(c2) as binary(10))) from tba1;
sql_error select concat('c8',cast(diff(c2) as binary(10))) from tba1;
print execute sql select concat('c8',cast(csum(c2) as binary(10))) from tba1;
sql_error select concat('c8',cast(csum(c2) as binary(10))) from tba1;
print execute sql select concat('c8',cast(mavg(c2,2) as binary(10))) from tba1;
sql_error select concat('c8',cast(mavg(c2,2) as binary(10))) from tba1;
print execute sql select concat('c8',cast(sample(c2,2) as binary(10))) from tba1;
sql_error select concat('c8',cast(sample(c2,2) as binary(10))) from tba1;
print execute sql select concat('c8',cast(_block_dist() as binary(10))) from tba1;
sql_error select concat('c8',cast(_block_dist() as binary(10))) from tba1;
tests/script/general/compute/string_funcs.sim
浏览文件 @
8f82baa7
...
@@ -45,6 +45,7 @@ sql insert into tbn values ('2021-11-11 09:00:04',true,5,5,5,5,5,5,"555","5555",
...
@@ -45,6 +45,7 @@ sql insert into tbn values ('2021-11-11 09:00:04',true,5,5,5,5,5,5,"555","5555",
sql insert into tbn values ('2021-11-11 09:00:05',true,6,6,6,6,6,6,"666","6666",6,6,6,6,'6','6');
sql insert into tbn values ('2021-11-11 09:00:05',true,6,6,6,6,6,6,"666","6666",6,6,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,'7','7');
sql insert into tbn values ('2021-11-11 09:00:06',true,7,7,7,7,7,7,"777","7777",7,7,7,7,'7','7');
run general/compute/str_concat.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, c14 binary(2), c15 nchar(3)) TAGS(t1 int, t2 binary(10), t3 double);
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, c14 binary(2), c15 nchar(3)) TAGS(t1 int, t2 binary(10), t3 double);
...
@@ -95,5 +96,7 @@ sql insert into tba1 values ('2021-11-11 09:00:27',true, 8,8,8,8,8,8,"888","8888
...
@@ -95,5 +96,7 @@ sql insert into tba1 values ('2021-11-11 09:00:27',true, 8,8,8,8,8,8,"888","8888
sql insert into tba1 values ('2021-11-11 09:00:28',true, 9,9,9,9,9,9,"999","9999",9,9,9,9,'9','9');
sql insert into tba1 values ('2021-11-11 09:00:28',true, 9,9,9,9,9,9,"999","9999",9,9,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,'0','0');
sql insert into tba1 values ('2021-11-11 09:00:29',true, 0,0,0,0,0,0,"000","0000",0,0,0,0,'0','0');
run general/compute/str_concat.sim
run general/compute/str_concat2.sim
#system sh/exec.sh -n dnode1 -s stop -x SIGINT
#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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录