Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
weixin_40195168达庆意
TDengine
提交
106bbc7e
TDengine
项目概览
weixin_40195168达庆意
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
106bbc7e
编写于
6月 22, 2021
作者:
haoranc
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[TD-4314]<test>: add testcase of nested query with top/bottom function
上级
28f9d2ff
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
8 addition
and
4 deletion
+8
-4
tests/pytest/fulltest.sh
tests/pytest/fulltest.sh
+2
-0
tests/pytest/query/nestedQuery/queryInterval.py
tests/pytest/query/nestedQuery/queryInterval.py
+6
-4
未找到文件。
tests/pytest/fulltest.sh
浏览文件 @
106bbc7e
...
...
@@ -235,6 +235,8 @@ python3 ./test.py -f query/queryTscomputWithNow.py
python3 ./test.py
-f
query/computeErrorinWhere.py
python3 ./test.py
-f
query/queryTsisNull.py
python3 ./test.py
-f
query/subqueryFilter.py
python3 ./test.py
-f
query/nestedQuery/queryInterval.py
python3 ./test.py
-f
query/queryStateWindow.py
#stream
...
...
tests/pytest/query/nestedQuery/queryInterval.py
浏览文件 @
106bbc7e
...
...
@@ -83,14 +83,16 @@ class TDTestCase:
tdSql
.
checkData
(
29
,
0
,
"2020-07-01 05:10:00.000"
)
# subquery and parent query with top and bottom
tdSql
.
query
(
"select top(avg_val,2) from(select avg(value) as avg_val,num from st where loc!='beijing0' group by num);"
)
tdSql
.
checkData
(
0
,
1
,
11
5
)
tdSql
.
query
(
"select bottom(avg_val,3) from(select avg(value) as avg_val,num from st where loc!='beijing0' group by num);"
)
tdSql
.
checkData
(
0
,
1
,
1
25
)
tdSql
.
query
(
"select top(avg_val,2) from(select avg(value) as avg_val,num from st where loc!='beijing0' group by num)
order by avg_val desc
;"
)
tdSql
.
checkData
(
0
,
1
,
11
7
)
tdSql
.
query
(
"select bottom(avg_val,3) from(select avg(value) as avg_val,num from st where loc!='beijing0' group by num)
order by avg_val asc
;"
)
tdSql
.
checkData
(
0
,
1
,
1
11
)
#
tdSql
.
query
(
"select top(avg_val,2) from(select avg(value) as avg_val from st where loc='beijing1' interval(8m) sliding(3m));"
)
tdSql
.
checkData
(
0
,
1
,
120
)
# clear env
testcaseFilename
=
os
.
path
.
split
(
__file__
)[
-
1
]
os
.
system
(
"rm -rf ./insert_res.txt"
)
os
.
system
(
"rm -rf wal/%s.sql"
%
testcaseFilename
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录