Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
4da75f91
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
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看板
未验证
提交
4da75f91
编写于
8月 18, 2021
作者:
H
Hui Li
提交者:
GitHub
8月 18, 2021
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #7412 from taosdata/test/TD-5798
[TD-5798] <test> add case for td5798
上级
46b44c32
82905510
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
183 addition
and
31 deletion
+183
-31
tests/pytest/functions/queryTestCases.py
tests/pytest/functions/queryTestCases.py
+183
-31
未找到文件。
tests/pytest/functions/queryTestCases.py
浏览文件 @
4da75f91
...
@@ -58,7 +58,7 @@ class TDTestCase:
...
@@ -58,7 +58,7 @@ class TDTestCase:
def
td3690
(
self
):
def
td3690
(
self
):
tdLog
.
printNoPrefix
(
"==========TD-3690=========="
)
tdLog
.
printNoPrefix
(
"==========TD-3690=========="
)
tdSql
.
query
(
"show variables"
)
tdSql
.
query
(
"show variables"
)
tdSql
.
checkData
(
5
1
,
1
,
864000
)
tdSql
.
checkData
(
5
3
,
1
,
864000
)
def
td4082
(
self
):
def
td4082
(
self
):
tdLog
.
printNoPrefix
(
"==========TD-4082=========="
)
tdLog
.
printNoPrefix
(
"==========TD-4082=========="
)
...
@@ -268,7 +268,7 @@ class TDTestCase:
...
@@ -268,7 +268,7 @@ class TDTestCase:
tdSql
.
execute
(
"drop database if exists db"
)
tdSql
.
execute
(
"drop database if exists db"
)
tdSql
.
execute
(
"create database if not exists db"
)
tdSql
.
execute
(
"create database if not exists db"
)
tdSql
.
query
(
"show variables"
)
tdSql
.
query
(
"show variables"
)
tdSql
.
checkData
(
3
6
,
1
,
3650
)
tdSql
.
checkData
(
3
8
,
1
,
3650
)
tdSql
.
query
(
"show databases"
)
tdSql
.
query
(
"show databases"
)
tdSql
.
checkData
(
0
,
7
,
"3650,3650,3650"
)
tdSql
.
checkData
(
0
,
7
,
"3650,3650,3650"
)
...
@@ -296,7 +296,7 @@ class TDTestCase:
...
@@ -296,7 +296,7 @@ class TDTestCase:
tdSql
.
query
(
"show databases"
)
tdSql
.
query
(
"show databases"
)
tdSql
.
checkData
(
0
,
7
,
"3650,3650,3650"
)
tdSql
.
checkData
(
0
,
7
,
"3650,3650,3650"
)
tdSql
.
query
(
"show variables"
)
tdSql
.
query
(
"show variables"
)
tdSql
.
checkData
(
3
6
,
1
,
3650
)
tdSql
.
checkData
(
3
8
,
1
,
3650
)
tdSql
.
execute
(
"alter database db1 keep 365"
)
tdSql
.
execute
(
"alter database db1 keep 365"
)
tdSql
.
execute
(
"drop database if exists db1"
)
tdSql
.
execute
(
"drop database if exists db1"
)
...
@@ -613,45 +613,189 @@ class TDTestCase:
...
@@ -613,45 +613,189 @@ class TDTestCase:
pass
pass
def
td5798
(
self
):
def
td5798
(
self
):
tdLog
.
printNoPrefix
(
"==========TD-5798=========="
)
tdLog
.
printNoPrefix
(
"==========TD-5798
+ TD-5810
=========="
)
tdSql
.
execute
(
"drop database if exists db"
)
tdSql
.
execute
(
"drop database if exists db"
)
tdSql
.
execute
(
"create database if not exists db keep 3650"
)
tdSql
.
execute
(
"create database if not exists db keep 3650"
)
tdSql
.
execute
(
"use db"
)
tdSql
.
execute
(
"use db"
)
tdSql
.
execute
(
"create stable db.stb1 (ts timestamp, c1 int, c2 int) tags(t0 tinyint, t1 int, t2 int)"
)
tdSql
.
execute
(
"create stable db.stb1 (ts timestamp, c1 int, c2 int) tags(t0 tinyint, t1 int, t2 int)"
)
tdSql
.
execute
(
"create stable db.stb2 (ts timestamp, c2 int, c3 int) tags(t2 binary(16), t3 binary(16), t4 int)"
)
tdSql
.
execute
(
"create stable db.stb2 (ts timestamp, c2 int, c3 binary(16)) tags(t2 binary(16), t3 binary(16), t4 int)"
)
for
i
in
range
(
100
):
maxRemainderNum
=
7
sql
=
f
"create table db.t
{
i
}
using db.stb1 tags(
{
i
%
7
}
,
{
(
i
-
1
)
%
7
}
,
{
i
%
2
}
)"
tbnum
=
101
for
i
in
range
(
tbnum
-
1
):
sql
=
f
"create table db.t
{
i
}
using db.stb1 tags(
{
i
%
maxRemainderNum
}
,
{
(
i
-
1
)
%
maxRemainderNum
}
,
{
i
%
2
}
)"
tdSql
.
execute
(
sql
)
tdSql
.
execute
(
sql
)
tdSql
.
execute
(
f
"insert into db.t
{
i
}
values (now-10d,
{
i
}
,
{
i
%
3
}
)"
)
tdSql
.
execute
(
f
"insert into db.t
{
i
}
values (now-10d,
{
i
}
,
{
i
%
3
}
)"
)
tdSql
.
execute
(
f
"insert into db.t
{
i
}
values (now-9d,
{
i
*
2
}
,
{
(
i
-
1
)
%
3
}
)"
)
tdSql
.
execute
(
f
"insert into db.t
{
i
}
values (now-9d,
{
i
}
,
{
(
i
-
1
)
%
3
}
)"
)
tdSql
.
execute
(
f
"insert into db.t
{
i
}
values (now-8d,
{
i
*
3
}
,
{
(
i
-
2
)
%
3
}
)"
)
tdSql
.
execute
(
f
"insert into db.t
{
i
}
values (now-8d,
{
i
}
,
{
(
i
-
2
)
%
3
}
)"
)
tdSql
.
execute
(
f
"insert into db.t
{
i
}
(ts )values (now-7d)"
)
tdSql
.
execute
(
f
"create table db.t0
{
i
}
using db.stb2 tags('
{
i
%
maxRemainderNum
}
', '
{
(
i
-
1
)
%
maxRemainderNum
}
',
{
i
%
3
}
)"
)
tdSql
.
execute
(
f
"insert into db.t0
{
i
}
values (now-10d,
{
i
}
, '
{
(
i
+
1
)
%
3
}
')"
)
tdSql
.
execute
(
f
"insert into db.t0
{
i
}
values (now-9d,
{
i
}
, '
{
(
i
+
2
)
%
3
}
')"
)
tdSql
.
execute
(
f
"insert into db.t0
{
i
}
values (now-8d,
{
i
}
, '
{
(
i
)
%
3
}
')"
)
tdSql
.
execute
(
f
"insert into db.t0
{
i
}
(ts )values (now-7d)"
)
tdSql
.
execute
(
"create table db.t100num using db.stb1 tags(null, null, null)"
)
tdSql
.
execute
(
"create table db.t0100num using db.stb2 tags(null, null, null)"
)
tdSql
.
execute
(
f
"insert into db.t100num values (now-10d,
{
tbnum
-
1
}
, 1)"
)
tdSql
.
execute
(
f
"insert into db.t100num values (now-9d,
{
tbnum
-
1
}
, 0)"
)
tdSql
.
execute
(
f
"insert into db.t100num values (now-8d,
{
tbnum
-
1
}
, 2)"
)
tdSql
.
execute
(
f
"insert into db.t100num (ts )values (now-7d)"
)
tdSql
.
execute
(
f
"insert into db.t0100num values (now-10d,
{
tbnum
-
1
}
, 1)"
)
tdSql
.
execute
(
f
"insert into db.t0100num values (now-9d,
{
tbnum
-
1
}
, 0)"
)
tdSql
.
execute
(
f
"insert into db.t0100num values (now-8d,
{
tbnum
-
1
}
, 2)"
)
tdSql
.
execute
(
f
"insert into db.t0100num (ts )values (now-7d)"
)
#========== TD-5810 suport distinct multi-data-coloumn ==========
tdSql
.
query
(
f
"select distinct c1 from stb1 where c1 <
{
tbnum
}
"
)
tdSql
.
checkRows
(
tbnum
)
tdSql
.
query
(
f
"select distinct c2 from stb1"
)
tdSql
.
checkRows
(
4
)
tdSql
.
query
(
f
"select distinct c1,c2 from stb1 where c1 <
{
tbnum
}
"
)
tdSql
.
checkRows
(
tbnum
*
3
)
tdSql
.
query
(
f
"select distinct c1,c1 from stb1 where c1 <
{
tbnum
}
"
)
tdSql
.
checkRows
(
tbnum
)
tdSql
.
query
(
f
"select distinct c1,c2 from stb1 where c1 <
{
tbnum
}
limit 3"
)
tdSql
.
checkRows
(
3
)
tdSql
.
query
(
f
"select distinct c1,c2 from stb1 where c1 <
{
tbnum
}
limit 3 offset
{
tbnum
*
3
-
2
}
"
)
tdSql
.
checkRows
(
2
)
tdSql
.
query
(
f
"select distinct c1 from t1 where c1 <
{
tbnum
}
"
)
tdSql
.
checkRows
(
1
)
tdSql
.
query
(
f
"select distinct c2 from t1"
)
tdSql
.
checkRows
(
4
)
tdSql
.
query
(
f
"select distinct c1,c2 from t1 where c1 <
{
tbnum
}
"
)
tdSql
.
checkRows
(
3
)
tdSql
.
query
(
f
"select distinct c1,c1 from t1 "
)
tdSql
.
checkRows
(
2
)
tdSql
.
query
(
f
"select distinct c1,c1 from t1 where c1 <
{
tbnum
}
"
)
tdSql
.
checkRows
(
1
)
tdSql
.
query
(
f
"select distinct c1,c2 from t1 where c1 <
{
tbnum
}
limit 3"
)
tdSql
.
checkRows
(
3
)
tdSql
.
query
(
f
"select distinct c1,c2 from t1 where c1 <
{
tbnum
}
limit 3 offset 2"
)
tdSql
.
checkRows
(
1
)
tdSql
.
query
(
f
"select distinct c3 from stb2 where c2 <
{
tbnum
}
"
)
tdSql
.
checkRows
(
3
)
tdSql
.
query
(
f
"select distinct c3, c2 from stb2 where c2 <
{
tbnum
}
limit 2"
)
tdSql
.
checkRows
(
2
)
tdSql
.
error
(
"select distinct c5 from stb1"
)
tdSql
.
error
(
"select distinct c5 from t1"
)
tdSql
.
error
(
"select distinct c1 from db.*"
)
tdSql
.
error
(
"select c2, distinct c1 from stb1"
)
tdSql
.
error
(
"select c2, distinct c1 from t1"
)
tdSql
.
error
(
"select distinct c2 from "
)
tdSql
.
error
(
"distinct c2 from stb1"
)
tdSql
.
error
(
"distinct c2 from t1"
)
tdSql
.
error
(
"select distinct c1, c2, c3 from stb1"
)
tdSql
.
error
(
"select distinct c1, c2, c3 from t1"
)
tdSql
.
error
(
"select distinct stb1.c1, stb1.c2, stb2.c2, stb2.c3 from stb1"
)
tdSql
.
error
(
"select distinct stb1.c1, stb1.c2, stb2.c2, stb2.c3 from t1"
)
tdSql
.
error
(
"select distinct t1.c1, t1.c2, t2.c1, t2.c2 from t1"
)
tdSql
.
query
(
f
"select distinct c1 c2, c2 c3 from stb1 where c1 <
{
tbnum
}
"
)
tdSql
.
checkRows
(
tbnum
*
3
)
tdSql
.
query
(
f
"select distinct c1 c2, c2 c3 from t1 where c1 <
{
tbnum
}
"
)
tdSql
.
checkRows
(
3
)
tdSql
.
query
(
"select distinct c1, c2 from stb1 order by ts"
)
tdSql
.
checkRows
(
tbnum
*
3
+
1
)
tdSql
.
query
(
"select distinct c1, c2 from t1 order by ts"
)
tdSql
.
checkRows
(
4
)
tdSql
.
error
(
"select distinct c1, ts from stb1 group by c2"
)
tdSql
.
error
(
"select distinct c1, ts from t1 group by c2"
)
tdSql
.
error
(
"select distinct c1, max(c2) from stb1 "
)
tdSql
.
error
(
"select distinct c1, max(c2) from t1 "
)
tdSql
.
error
(
"select max(c2), distinct c1 from stb1 "
)
tdSql
.
error
(
"select max(c2), distinct c1 from t1 "
)
tdSql
.
error
(
"select distinct c1, c2 from stb1 where c1 > 3 group by t0"
)
tdSql
.
error
(
"select distinct c1, c2 from t1 where c1 > 3 group by t0"
)
tdSql
.
error
(
"select distinct c1, c2 from stb1 where c1 > 3 interval(1d) "
)
tdSql
.
error
(
"select distinct c1, c2 from t1 where c1 > 3 interval(1d) "
)
tdSql
.
error
(
"select distinct c1, c2 from stb1 where c1 > 3 interval(1d) fill(next)"
)
tdSql
.
error
(
"select distinct c1, c2 from t1 where c1 > 3 interval(1d) fill(next)"
)
tdSql
.
error
(
"select distinct c1, c2 from stb1 where ts > now-10d and ts < now interval(1d) fill(next)"
)
tdSql
.
error
(
"select distinct c1, c2 from t1 where ts > now-10d and ts < now interval(1d) fill(next)"
)
tdSql
.
error
(
"select distinct c1, c2 from stb1 where c1 > 3 slimit 1"
)
tdSql
.
error
(
"select distinct c1, c2 from t1 where c1 > 3 slimit 1"
)
tdSql
.
query
(
f
"select distinct c1, c2 from stb1 where c1 between
{
tbnum
-
2
}
and
{
tbnum
}
"
)
tdSql
.
checkRows
(
6
)
tdSql
.
query
(
"select distinct c1, c2 from stb1 where c1 in (1,2,3,4,5)"
)
tdSql
.
checkRows
(
15
)
tdSql
.
query
(
"select distinct c1, c2 from stb1 where c1 in (100,1000,10000)"
)
tdSql
.
checkRows
(
3
)
tdSql
.
query
(
f
"select distinct c1,c2 from (select * from stb1 where c1 >
{
tbnum
-
2
}
) "
)
tdSql
.
checkRows
(
3
)
tdSql
.
query
(
f
"select distinct c1,c2 from (select * from t1 where c1 <
{
tbnum
}
) "
)
tdSql
.
checkRows
(
3
)
tdSql
.
query
(
f
"select distinct c1,c2 from (select * from stb1 where t2 !=0 and t2 != 1) "
)
tdSql
.
checkRows
(
4
)
tdSql
.
error
(
"select distinct c1, c2 from (select distinct c1, c2 from stb1 where t0 > 2 and t1 < 3) "
)
tdSql
.
error
(
"select c1, c2 from (select distinct c1, c2 from stb1 where t0 > 2 and t1 < 3) "
)
tdSql
.
query
(
"select distinct c1, c2 from (select c2, c1 from stb1 where c1 > 2 ) where c1 < 4"
)
tdSql
.
checkRows
(
3
)
tdSql
.
error
(
"select distinct c1, c2 from (select c1 from stb1 where t0 > 2 ) where t1 < 3"
)
tdSql
.
error
(
"select distinct c1, c2 from (select c2, c1 from stb1 where c1 > 2 order by ts)"
)
# tdSql.error("select distinct c1, c2 from (select c2, c1 from t1 where c1 > 2 order by ts)")
tdSql
.
error
(
"select distinct c1, c2 from (select c2, c1 from stb1 where c1 > 2 group by c1)"
)
# tdSql.error("select distinct c1, c2 from (select max(c1) c1, max(c2) c2 from stb1 group by c1)")
# tdSql.error("select distinct c1, c2 from (select max(c1) c1, max(c2) c2 from t1 group by c1)")
tdSql
.
query
(
"select distinct c1, c2 from (select max(c1) c1, max(c2) c2 from stb1 )"
)
tdSql
.
checkRows
(
1
)
tdSql
.
query
(
"select distinct c1, c2 from (select max(c1) c1, max(c2) c2 from t1 )"
)
tdSql
.
checkRows
(
1
)
tdSql
.
error
(
"select distinct stb1.c1, stb1.c2 from stb1 , stb2 where stb1.ts=stb2.ts and stb1.t2=stb2.t4"
)
tdSql
.
error
(
"select distinct t1.c1, t1.c2 from t1 , t2 where t1.ts=t2.ts "
)
# tdSql.error("select distinct c1, c2 from (select count(c1) c1, count(c2) c2 from stb1 group by ts)")
# tdSql.error("select distinct c1, c2 from (select count(c1) c1, count(c2) c2 from t1 group by ts)")
tdSql
.
execute
(
f
"create table db.t0
{
i
}
using db.stb2 tags('
{
i
}
', '
{
100
-
i
}
',
{
i
%
3
}
)"
)
tdSql
.
execute
(
f
"insert into db.t0
{
i
}
values (now-10d,
{
i
}
,
{
(
i
+
1
)
%
3
}
)"
)
tdSql
.
execute
(
f
"insert into db.t0
{
i
}
values (now-9d,
{
i
*
2
}
,
{
(
i
+
2
)
%
3
}
)"
)
tdSql
.
execute
(
f
"insert into db.t0
{
i
}
values (now-8d,
{
i
*
3
}
,
{
(
i
)
%
3
}
)"
)
#========== TD-5798 suport distinct multi-tags-coloumn ==========
tdSql
.
query
(
"select distinct t1 from stb1"
)
tdSql
.
query
(
"select distinct t1 from stb1"
)
tdSql
.
checkRows
(
7
)
tdSql
.
checkRows
(
maxRemainderNum
+
1
)
tdSql
.
query
(
"select distinct t0, t1 from stb1"
)
tdSql
.
query
(
"select distinct t0, t1 from stb1"
)
tdSql
.
checkRows
(
7
)
tdSql
.
checkRows
(
maxRemainderNum
+
1
)
tdSql
.
query
(
"select distinct t1, t0 from stb1"
)
tdSql
.
query
(
"select distinct t1, t0 from stb1"
)
tdSql
.
checkRows
(
7
)
tdSql
.
checkRows
(
maxRemainderNum
+
1
)
tdSql
.
query
(
"select distinct t1, t2 from stb1"
)
tdSql
.
query
(
"select distinct t1, t2 from stb1"
)
tdSql
.
checkRows
(
14
)
tdSql
.
checkRows
(
maxRemainderNum
*
2
+
1
)
tdSql
.
query
(
"select distinct t0, t1, t2 from stb1"
)
tdSql
.
query
(
"select distinct t0, t1, t2 from stb1"
)
tdSql
.
checkRows
(
14
)
tdSql
.
checkRows
(
maxRemainderNum
*
2
+
1
)
tdSql
.
query
(
"select distinct t0 t1, t1 t2 from stb1"
)
tdSql
.
query
(
"select distinct t0 t1, t1 t2 from stb1"
)
tdSql
.
checkRows
(
7
)
tdSql
.
checkRows
(
maxRemainderNum
+
1
)
tdSql
.
query
(
"select distinct t0, t0, t0 from stb1"
)
tdSql
.
query
(
"select distinct t0, t0, t0 from stb1"
)
tdSql
.
checkRows
(
7
)
tdSql
.
checkRows
(
maxRemainderNum
+
1
)
tdSql
.
query
(
"select distinct t0, t1 from t1"
)
tdSql
.
query
(
"select distinct t0, t1 from t1"
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkRows
(
1
)
tdSql
.
query
(
"select distinct t0, t1 from t100num"
)
tdSql
.
checkRows
(
1
)
tdSql
.
query
(
"select distinct t3 from stb2"
)
tdSql
.
checkRows
(
maxRemainderNum
+
1
)
tdSql
.
query
(
"select distinct t2, t3 from stb2"
)
tdSql
.
checkRows
(
maxRemainderNum
+
1
)
tdSql
.
query
(
"select distinct t3, t2 from stb2"
)
tdSql
.
checkRows
(
maxRemainderNum
+
1
)
tdSql
.
query
(
"select distinct t4, t2 from stb2"
)
tdSql
.
checkRows
(
maxRemainderNum
*
3
+
1
)
tdSql
.
query
(
"select distinct t2, t3, t4 from stb2"
)
tdSql
.
checkRows
(
maxRemainderNum
*
3
+
1
)
tdSql
.
query
(
"select distinct t2 t1, t3 t2 from stb2"
)
tdSql
.
checkRows
(
maxRemainderNum
+
1
)
tdSql
.
query
(
"select distinct t3, t3, t3 from stb2"
)
tdSql
.
checkRows
(
maxRemainderNum
+
1
)
tdSql
.
query
(
"select distinct t2, t3 from t01"
)
tdSql
.
checkRows
(
1
)
tdSql
.
query
(
"select distinct t3, t4 from t0100num"
)
tdSql
.
checkRows
(
1
)
########## should be error #########
########## should be error #########
tdSql
.
error
(
"select distinct from stb1"
)
tdSql
.
error
(
"select distinct from stb1"
)
tdSql
.
error
(
"select distinct t3 from stb1"
)
tdSql
.
error
(
"select distinct t1 from db.*"
)
tdSql
.
error
(
"select distinct t2 from "
)
tdSql
.
error
(
"select distinct t2 from "
)
tdSql
.
error
(
"distinct t2 from stb1"
)
tdSql
.
error
(
"distinct t2 from stb1"
)
tdSql
.
error
(
"select distinct stb1"
)
tdSql
.
error
(
"select distinct stb1"
)
...
@@ -678,29 +822,37 @@ class TDTestCase:
...
@@ -678,29 +822,37 @@ class TDTestCase:
tdSql
.
checkRows
(
1
)
tdSql
.
checkRows
(
1
)
tdSql
.
error
(
"select distinct stb1.t0, stb1.t1 from stb1, stb2 where stb1.t2=stb2.t4"
)
tdSql
.
error
(
"select distinct stb1.t0, stb1.t1 from stb1, stb2 where stb1.t2=stb2.t4"
)
tdSql
.
error
(
"select distinct t0, t1 from stb1 where stb2.t4 > 2"
)
tdSql
.
error
(
"select distinct t0, t1 from stb1 where stb2.t4 > 2"
)
# tdSql.error("select max(c1), distinct t0 from stb1 where t0 > 2")
tdSql
.
error
(
"select distinct t0, t1 from stb1 where t1 > 3 group by t0"
)
tdSql
.
error
(
"select distinct t0, t1 from stb1 where t1 > 3 interval(1d) "
)
tdSql
.
error
(
"select distinct t0, t1 from stb1 where t1 > 3 interval(1d) fill(next)"
)
tdSql
.
error
(
"select distinct t0, t1 from stb1 where ts > now-10d and ts < now interval(1d) fill(next)"
)
tdSql
.
error
(
"select max(c1), distinct t0 from stb1 where t0 > 2"
)
tdSql
.
error
(
"select distinct t0, max(c1) from stb1 where t0 > 2"
)
tdSql
.
error
(
"select distinct t0 from stb1 where t0 in (select t0 from stb1 where t0 > 2)"
)
tdSql
.
error
(
"select distinct t0 from stb1 where t0 in (select t0 from stb1 where t0 > 2)"
)
tdSql
.
query
(
"select distinct t0, t1 from stb1 where t0 in (1,2,3,4,5)"
)
tdSql
.
query
(
"select distinct t0, t1 from stb1 where t0 in (1,2,3,4,5)"
)
tdSql
.
checkRows
(
5
)
tdSql
.
checkRows
(
5
)
tdSql
.
query
(
"select distinct t1 from (select t0, t1 from stb1 where t0 > 2) "
)
tdSql
.
query
(
"select distinct t1 from (select t0, t1 from stb1 where t0 > 2) "
)
tdSql
.
checkRows
(
4
)
tdSql
.
checkRows
(
4
)
tdSql
.
query
(
"select distinct t1 from (select distinct t0, t1 from stb1 where t0 > 2 and t1 < 3) "
)
tdSql
.
error
(
"select distinct t1 from (select distinct t0, t1 from stb1 where t0 > 2 and t1 < 3) "
)
tdSql
.
checkRows
(
1
)
tdSql
.
error
(
"select distinct t1 from (select distinct t0, t1 from stb1 where t0 > 2 ) where t1 < 3"
)
tdSql
.
query
(
"select distinct t1 from (select distinct t0, t1 from stb1 where t0 > 2 ) where t1 < 3"
)
tdSql
.
checkRows
(
1
)
tdSql
.
query
(
"select distinct t1 from (select t0, t1 from stb1 where t0 > 2 ) where t1 < 3"
)
tdSql
.
query
(
"select distinct t1 from (select t0, t1 from stb1 where t0 > 2 ) where t1 < 3"
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkRows
(
1
)
tdSql
.
error
(
"select distinct t1, t0 from (select t1 from stb1 where t0 > 2 ) where t1 < 3"
)
tdSql
.
error
(
"select distinct t1, t0 from (select t1 from stb1 where t0 > 2 ) where t1 < 3"
)
tdSql
.
error
(
"select distinct t1, t0 from (select max(t1) t1, max(t0) t0 from stb1 group by t1)"
)
tdSql
.
error
(
"select distinct t1, t0 from (select max(t1) t1, max(t0) t0 from stb1)"
)
tdSql
.
query
(
"select distinct t1, t0 from (select t1,t0 from stb1 where t0 > 2 ) where t1 < 3"
)
tdSql
.
query
(
"select distinct t1, t0 from (select t1,t0 from stb1 where t0 > 2 ) where t1 < 3"
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkRows
(
1
)
# tdSql.error(" select distinct t1, t0 from (select t1,t0 from stb1 where t0 > 2 order by ts) where t1 < 3")
tdSql
.
error
(
" select distinct t1, t0 from (select t1,t0 from stb1 where t0 > 2 order by ts) where t1 < 3"
)
tdSql
.
query
(
"select t1, t0 from (select distinct t1,t0 from stb1 where t0 > 2 ) where t1 < 3"
)
tdSql
.
error
(
"select t1, t0 from (select distinct t1,t0 from stb1 where t0 > 2 ) where t1 < 3"
)
tdSql
.
error
(
" select distinct t1, t0 from (select t1,t0 from stb1 where t0 > 2 group by ts) where t1 < 3"
)
tdSql
.
error
(
"select distinct stb1.t1, stb1.t2 from stb1 , stb2 where stb1.ts=stb2.ts and stb1.t2=stb2.t4"
)
tdSql
.
error
(
"select distinct t1.t1, t1.t2 from t1 , t2 where t1.ts=t2.ts "
)
pass
pass
def
td5935
(
self
):
def
td5935
(
self
):
tdLog
.
printNoPrefix
(
"==========TD-5
798
=========="
)
tdLog
.
printNoPrefix
(
"==========TD-5
935
=========="
)
tdSql
.
execute
(
"drop database if exists db"
)
tdSql
.
execute
(
"drop database if exists db"
)
tdSql
.
execute
(
"create database if not exists db keep 3650"
)
tdSql
.
execute
(
"create database if not exists db keep 3650"
)
...
@@ -739,8 +891,8 @@ class TDTestCase:
...
@@ -739,8 +891,8 @@ class TDTestCase:
# self.td4082()
# self.td4082()
# self.td4288()
# self.td4288()
# self.td4724()
# self.td4724()
#
self.td5798()
self
.
td5798
()
self
.
td5935
()
#
self.td5935()
# develop branch
# develop branch
# self.td4097()
# self.td4097()
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录