Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
慢慢CG
TDengine
提交
11868563
T
TDengine
项目概览
慢慢CG
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
11868563
编写于
6月 17, 2020
作者:
S
Shengliang Guan
提交者:
GitHub
6月 17, 2020
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #2316 from taosdata/rangefiltercases
[TD-350]: add filter test cases for range
上级
96cc0d38
10774f58
变更
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
浏览文件 @
11868563
...
...
@@ -88,6 +88,19 @@ class TDTestCase:
tdSql
.
query
(
"select * from st%s where num != 50"
%
curType
)
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
tdSql
.
query
(
"select * from st%s where id > 5"
%
curType
)
tdSql
.
checkRows
(
52
)
...
...
@@ -116,6 +129,23 @@ class TDTestCase:
tdSql
.
query
(
"select * from st%s where id != 5"
%
curType
)
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
(
"======= Verify filter for %s type finished ========="
%
curType
)
...
...
tests/pytest/query/filterFloatAndDouble.py
浏览文件 @
11868563
...
...
@@ -67,6 +67,19 @@ class TDTestCase:
tdSql
.
query
(
"select * from st where num < 5.5"
)
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
tdSql
.
query
(
"select * from st where tagcol1 > 1.1"
)
tdSql
.
checkRows
(
0
)
...
...
@@ -123,6 +136,19 @@ class TDTestCase:
tdSql
.
query
(
"select * from st where speed < 11.5"
)
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
tdSql
.
query
(
"select * from st where tagcol2 > 2.3"
)
tdSql
.
checkRows
(
0
)
...
...
tests/pytest/query/filterOtherTypes.py
浏览文件 @
11868563
...
...
@@ -30,9 +30,9 @@ class TDTestCase:
print
(
"======= Verify filter for bool, nchar and binary type ========="
)
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
(
"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', '水表')"
)
for
i
in
range
(
1
,
6
):
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录