Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
92524ca0
TDengine
项目概览
taosdata
/
TDengine
大约 2 年 前同步成功
通知
1192
Star
22018
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看板
提交
92524ca0
编写于
8月 17, 2023
作者:
S
slzhou
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feature: select tags - add test case
上级
28ca3efe
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
82 addition
and
0 deletion
+82
-0
tests/script/tsim/query/tag_scan.sim
tests/script/tsim/query/tag_scan.sim
+82
-0
未找到文件。
tests/script/tsim/query/tag_scan.sim
浏览文件 @
92524ca0
...
@@ -45,4 +45,86 @@ if $rows != 4 then
...
@@ -45,4 +45,86 @@ if $rows != 4 then
return -1
return -1
endi
endi
sql create table stt1(ts timestamp, f int) tags (t int, b varchar(10));
sql insert into ctt11 using stt1 tags(1, '1aa') values(now, 1);
sql insert into ctt12 using stt1 tags(2, '1bb') values(now, 2);
sql insert into ctt13 using stt1 tags(3, '1cc') values(now, 3);
sql insert into ctt14 using stt1 tags(4, '1dd') values(now, 4);
sql insert into ctt14 values(now, 5);
sql create table stt2(ts timestamp, f int) tags (t int, b varchar(10));
sql insert into ctt21 using stt2 tags(1, '2aa') values(now, 1);
sql insert into ctt22 using stt2 tags(2, '2bb') values(now, 2);
sql insert into ctt23 using stt2 tags(3, '2cc') values(now, 3);
sql insert into ctt24 using stt2 tags(4, '2dd') values(now, 4);
sql select tags t, b from stt1 order by t
print $rows
print $data00 $data01 $data10 $data11 $data20 $data21 $data30 $data31
if $rows != 4 then
return -1
endi
if $data31 != @1dd@ then
return -1
endi
sql select tags t, b from stt2 order by t
print $rows
print $data00 $data01 $data10 $data11 $data20 $data21 $data30 $data31
if $rows != 4 then
return -1
endi
if $data31 != @2dd@ then
return -1
endi
sql select tags t,b,f from stt1 order by t
print $rows
print $data00 $data01 $data02 $data10 $data11 $data12 $data20 $data21 $data22 $data30 $data31 $data32 $data40 $data41 $data42
if $rows != 5 then
return -1
endi
if $data42 != 5 then
return -1
endi
sql select tags tbname,t,b from stt1 order by t
print $rows
print $data00 $data01 $data02 $data10 $data11 $data12 $data20 $data21 $data22 $data30 $data31 $data32
if $rows != 4 then
return -1
endi
if $data30 != @ctt14@ then
return -1
endi
if $data32 != @1dd@ then
return -1
endi
sql select tags t,b from stt1 where t=1
print $rows
print $data00 $data01
if $rows != 1 then
return -1
endi
if $data00 != @1@ then
return -1
endi
if $data01 != @1aa@ then
return -1
endi
sql select tags t,b from stt1 where tbname='ctt11'
print $rows
print $data00 $data01
if $rows != 1 then
return -1
endi
if $data00 != @1@ then
return -1
endi
if $data01 != @1aa@ then
return -1
endi
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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录