Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
b163983e
TDengine
项目概览
taosdata
/
TDengine
大约 2 年 前同步成功
通知
1193
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看板
提交
b163983e
编写于
12月 24, 2021
作者:
A
Alex Duan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
order by desc case submit
上级
8e3d9475
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
25 addition
and
0 deletion
+25
-0
tests/pytest/query/queryLimit.py
tests/pytest/query/queryLimit.py
+25
-0
未找到文件。
tests/pytest/query/queryLimit.py
浏览文件 @
b163983e
...
@@ -103,12 +103,20 @@ class TDTestCase:
...
@@ -103,12 +103,20 @@ class TDTestCase:
tdSql
.
waitedQuery
(
sql
,
10
,
WAITS
)
tdSql
.
waitedQuery
(
sql
,
10
,
WAITS
)
tdSql
.
checkData
(
0
,
1
,
0
)
tdSql
.
checkData
(
0
,
1
,
0
)
tdSql
.
checkData
(
9
,
1
,
9
)
tdSql
.
checkData
(
9
,
1
,
9
)
sql
=
"select * from t1 order by ts desc limit 10"
# desc
tdSql
.
waitedQuery
(
sql
,
10
,
WAITS
)
tdSql
.
checkData
(
0
,
1
,
2999999
)
tdSql
.
checkData
(
9
,
1
,
2999990
)
# have where
# have where
sql
=
"select * from t1 where ts>='2017-07-14 10:40:01' and ts<'2017-07-14 10:40:06' limit 10"
sql
=
"select * from t1 where ts>='2017-07-14 10:40:01' and ts<'2017-07-14 10:40:06' limit 10"
tdSql
.
waitedQuery
(
sql
,
5
,
WAITS
)
tdSql
.
waitedQuery
(
sql
,
5
,
WAITS
)
tdSql
.
checkData
(
0
,
1
,
1
)
tdSql
.
checkData
(
0
,
1
,
1
)
tdSql
.
checkData
(
4
,
1
,
5
)
tdSql
.
checkData
(
4
,
1
,
5
)
sql
=
"select * from t1 where ts>='2017-08-18 03:59:52' and ts<'2017-08-18 03:59:57' order by ts desc limit 10"
# desc
tdSql
.
waitedQuery
(
sql
,
5
,
WAITS
)
tdSql
.
checkData
(
0
,
1
,
2999996
)
tdSql
.
checkData
(
4
,
1
,
2999992
)
#
#
# offset base function
# offset base function
...
@@ -118,18 +126,29 @@ class TDTestCase:
...
@@ -118,18 +126,29 @@ class TDTestCase:
tdSql
.
waitedQuery
(
sql
,
10
,
WAITS
)
tdSql
.
waitedQuery
(
sql
,
10
,
WAITS
)
tdSql
.
checkData
(
0
,
1
,
5
)
tdSql
.
checkData
(
0
,
1
,
5
)
tdSql
.
checkData
(
9
,
1
,
14
)
tdSql
.
checkData
(
9
,
1
,
14
)
sql
=
"select * from t1 order by ts desc limit 10 offset 5"
# desc
tdSql
.
waitedQuery
(
sql
,
10
,
WAITS
)
tdSql
.
checkData
(
0
,
1
,
2999994
)
tdSql
.
checkData
(
9
,
1
,
2999985
)
# have where only ts
# have where only ts
sql
=
"select * from t1 where ts>='2017-07-14 10:40:10' and ts<'2017-07-14 10:40:20' limit 10 offset 5"
sql
=
"select * from t1 where ts>='2017-07-14 10:40:10' and ts<'2017-07-14 10:40:20' limit 10 offset 5"
tdSql
.
waitedQuery
(
sql
,
5
,
WAITS
)
tdSql
.
waitedQuery
(
sql
,
5
,
WAITS
)
tdSql
.
checkData
(
0
,
1
,
15
)
tdSql
.
checkData
(
0
,
1
,
15
)
tdSql
.
checkData
(
4
,
1
,
19
)
tdSql
.
checkData
(
4
,
1
,
19
)
sql
=
"select * from t1 where ts>='2017-08-18 03:59:52' and ts<'2017-08-18 03:59:57' order by ts desc limit 10 offset 4"
# desc
tdSql
.
waitedQuery
(
sql
,
1
,
WAITS
)
tdSql
.
checkData
(
0
,
1
,
2999992
)
# have where with other column condition
# have where with other column condition
sql
=
"select * from t1 where i1>=1 and i1<11 limit 10 offset 5"
sql
=
"select * from t1 where i1>=1 and i1<11 limit 10 offset 5"
tdSql
.
waitedQuery
(
sql
,
5
,
WAITS
)
tdSql
.
waitedQuery
(
sql
,
5
,
WAITS
)
tdSql
.
checkData
(
0
,
1
,
6
)
tdSql
.
checkData
(
0
,
1
,
6
)
tdSql
.
checkData
(
4
,
1
,
10
)
tdSql
.
checkData
(
4
,
1
,
10
)
sql
=
"select * from t1 where i1>=300000 and i1<=500000 order by ts desc limit 10 offset 100000"
# desc
tdSql
.
waitedQuery
(
sql
,
10
,
WAITS
)
tdSql
.
checkData
(
0
,
1
,
400000
)
tdSql
.
checkData
(
9
,
1
,
399991
)
# have where with ts and other column condition
# have where with ts and other column condition
sql
=
"select * from t1 where ts>='2017-07-14 10:40:10' and ts<'2017-07-14 10:40:50' and i1>=20 and i1<=25 limit 10 offset 5"
sql
=
"select * from t1 where ts>='2017-07-14 10:40:10' and ts<'2017-07-14 10:40:50' and i1>=20 and i1<=25 limit 10 offset 5"
...
@@ -162,6 +181,12 @@ class TDTestCase:
...
@@ -162,6 +181,12 @@ class TDTestCase:
tdSql
.
waitedQuery
(
sql
,
10
,
WAITS
)
tdSql
.
waitedQuery
(
sql
,
10
,
WAITS
)
tdSql
.
checkData
(
0
,
1
,
72000
-
3
+
10
+
1
)
tdSql
.
checkData
(
0
,
1
,
72000
-
3
+
10
+
1
)
# have where desc
sql
=
"select * from t1 where ts<'2017-07-14 20:40:00' order by ts desc limit 15 offset 36000"
tdSql
.
waitedQuery
(
sql
,
3
,
WAITS
)
tdSql
.
checkData
(
0
,
1
,
1
)
#
#
# add case with filename
# add case with filename
#
#
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录