Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lzh_me
TDengine
提交
10774f58
TDengine
项目概览
lzh_me
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
1
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,发现更多精彩内容 >>
提交
10774f58
编写于
6月 17, 2020
作者:
P
Ping Xiao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[TD-350]: add filter test cases for range
上级
5a6ce277
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
58 addition
and
2 deletion
+58
-2
tests/pytest/query/filterAllIntTypes.py
tests/pytest/query/filterAllIntTypes.py
+30
-0
tests/pytest/query/filterFloatAndDouble.py
tests/pytest/query/filterFloatAndDouble.py
+26
-0
tests/pytest/query/filterOtherTypes.py
tests/pytest/query/filterOtherTypes.py
+2
-2
未找到文件。
tests/pytest/query/filterAllIntTypes.py
浏览文件 @
10774f58
...
@@ -88,6 +88,19 @@ class TDTestCase:
...
@@ -88,6 +88,19 @@ class TDTestCase:
tdSql
.
query
(
"select * from st%s where num != 50"
%
curType
)
tdSql
.
query
(
"select * from st%s where num != 50"
%
curType
)
tdSql
.
checkRows
(
101
)
tdSql
.
checkRows
(
101
)
# range for int type on column
tdSql
.
query
(
"select * from st%s where num > 50 and num < 100"
%
curType
)
tdSql
.
checkRows
(
49
)
tdSql
.
query
(
"select * from st%s where num >= 50 and num < 100"
%
curType
)
tdSql
.
checkRows
(
50
)
tdSql
.
query
(
"select * from st%s where num > 50 and num <= 100"
%
curType
)
tdSql
.
checkRows
(
50
)
tdSql
.
query
(
"select * from st%s where num >= 50 and num <= 100"
%
curType
)
tdSql
.
checkRows
(
51
)
# > for int type on tag
# > for int type on tag
tdSql
.
query
(
"select * from st%s where id > 5"
%
curType
)
tdSql
.
query
(
"select * from st%s where id > 5"
%
curType
)
tdSql
.
checkRows
(
52
)
tdSql
.
checkRows
(
52
)
...
@@ -116,6 +129,23 @@ class TDTestCase:
...
@@ -116,6 +129,23 @@ class TDTestCase:
tdSql
.
query
(
"select * from st%s where id != 5"
%
curType
)
tdSql
.
query
(
"select * from st%s where id != 5"
%
curType
)
tdSql
.
checkRows
(
92
)
tdSql
.
checkRows
(
92
)
# != for int type on tag
tdSql
.
query
(
"select * from st%s where id != 5"
%
curType
)
tdSql
.
checkRows
(
92
)
# range for int type on tag
tdSql
.
query
(
"select * from st%s where id > 5 and id < 7"
%
curType
)
tdSql
.
checkRows
(
10
)
tdSql
.
query
(
"select * from st%s where id >= 5 and id < 7"
%
curType
)
tdSql
.
checkRows
(
20
)
tdSql
.
query
(
"select * from st%s where id > 5 and id <= 7"
%
curType
)
tdSql
.
checkRows
(
20
)
tdSql
.
query
(
"select * from st%s where id >= 5 and id <= 7"
%
curType
)
tdSql
.
checkRows
(
30
)
print
(
print
(
"======= Verify filter for %s type finished ========="
%
"======= Verify filter for %s type finished ========="
%
curType
)
curType
)
...
...
tests/pytest/query/filterFloatAndDouble.py
浏览文件 @
10774f58
...
@@ -67,6 +67,19 @@ class TDTestCase:
...
@@ -67,6 +67,19 @@ class TDTestCase:
tdSql
.
query
(
"select * from st where num < 5.5"
)
tdSql
.
query
(
"select * from st where num < 5.5"
)
tdSql
.
checkRows
(
4
)
tdSql
.
checkRows
(
4
)
# range for float type on column
tdSql
.
query
(
"select * from st where num > 5.5 and num < 11.0"
)
tdSql
.
checkRows
(
4
)
tdSql
.
query
(
"select * from st where num >= 5.5 and num < 11.0"
)
tdSql
.
checkRows
(
5
)
tdSql
.
query
(
"select * from st where num > 5.5 and num <= 11.0"
)
tdSql
.
checkRows
(
5
)
tdSql
.
query
(
"select * from st where num >= 5.5 and num <= 11.0"
)
tdSql
.
checkRows
(
6
)
# > for float type on tag
# > for float type on tag
tdSql
.
query
(
"select * from st where tagcol1 > 1.1"
)
tdSql
.
query
(
"select * from st where tagcol1 > 1.1"
)
tdSql
.
checkRows
(
0
)
tdSql
.
checkRows
(
0
)
...
@@ -123,6 +136,19 @@ class TDTestCase:
...
@@ -123,6 +136,19 @@ class TDTestCase:
tdSql
.
query
(
"select * from st where speed < 11.5"
)
tdSql
.
query
(
"select * from st where speed < 11.5"
)
tdSql
.
checkRows
(
4
)
tdSql
.
checkRows
(
4
)
# range for double type on column
tdSql
.
query
(
"select * from st where speed > 11.5 and speed < 20.7"
)
tdSql
.
checkRows
(
3
)
tdSql
.
query
(
"select * from st where speed >= 11.5 and speed < 20.7"
)
tdSql
.
checkRows
(
4
)
tdSql
.
query
(
"select * from st where speed > 11.5 and speed <= 20.7"
)
tdSql
.
checkRows
(
4
)
tdSql
.
query
(
"select * from st where speed >= 11.5 and speed <= 20.7"
)
tdSql
.
checkRows
(
5
)
# > for double type on tag
# > for double type on tag
tdSql
.
query
(
"select * from st where tagcol2 > 2.3"
)
tdSql
.
query
(
"select * from st where tagcol2 > 2.3"
)
tdSql
.
checkRows
(
0
)
tdSql
.
checkRows
(
0
)
...
...
tests/pytest/query/filterOtherTypes.py
浏览文件 @
10774f58
...
@@ -30,9 +30,9 @@ class TDTestCase:
...
@@ -30,9 +30,9 @@ class TDTestCase:
print
(
"======= Verify filter for bool, nchar and binary type ========="
)
print
(
"======= Verify filter for bool, nchar and binary type ========="
)
tdLog
.
debug
(
tdLog
.
debug
(
"create table st(ts timestamp, tbcol1 bool, tbcol2
nchar(10), tbcol3 binary(20)) tags(tagcol1 bool, tagcol2 nchar(10), tagcol3 binary
(10))"
)
"create table st(ts timestamp, tbcol1 bool, tbcol2
binary(10), tbcol3 nchar(20)) tags(tagcol1 bool, tagcol2 binary(10), tagcol3 nchar
(10))"
)
tdSql
.
execute
(
tdSql
.
execute
(
"create table st(ts timestamp, tbcol1 bool, tbcol2
nchar(10), tbcol3 binary(20)) tags(tagcol1 bool, tagcol2 nchar(10), tagcol3 binary
(10))"
)
"create table st(ts timestamp, tbcol1 bool, tbcol2
binary(10), tbcol3 nchar(20)) tags(tagcol1 bool, tagcol2 binary(10), tagcol3 nchar
(10))"
)
tdSql
.
execute
(
"create table st1 using st tags(true, 'table1', '水表')"
)
tdSql
.
execute
(
"create table st1 using st tags(true, 'table1', '水表')"
)
for
i
in
range
(
1
,
6
):
for
i
in
range
(
1
,
6
):
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录