Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
ca51b863
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
ca51b863
编写于
11月 29, 2022
作者:
G
Ganlin Zhao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix test cases
上级
900fe01f
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
24 addition
and
31 deletion
+24
-31
tests/script/tsim/parser/union.sim
tests/script/tsim/parser/union.sim
+4
-4
tests/system-test/1-insert/delete_childtable.py
tests/system-test/1-insert/delete_childtable.py
+2
-2
tests/system-test/2-query/count.py
tests/system-test/2-query/count.py
+18
-25
未找到文件。
tests/script/tsim/parser/union.sim
浏览文件 @
ca51b863
...
...
@@ -245,12 +245,12 @@ endi
# first subclause are empty
sql (select count(*) as c from union_tb0 where ts > now + 3650d) union all (select sum(c1) as c from union_tb1);
if $rows != 1 then
return -1
endi
if $data00 != 495000 then
if $rows != 2 then
return -1
endi
#if $data00 != 495000 then
# return -1
#endi
# all subclause are empty
sql (select c1 from union_tb0 limit 0) union all (select c1 from union_tb1 where ts>'2021-1-1 0:0:0')
...
...
tests/system-test/1-insert/delete_childtable.py
浏览文件 @
ca51b863
...
...
@@ -121,7 +121,7 @@ class TDTestCase:
tdSql
.
checkRows
(
0
)
tdSql
.
query
(
f
'select count(*) from
{
stbname
}
'
)
if
tb_num
<=
1
:
if
len
(
tdSql
.
queryResult
)
!=
0
:
if
len
(
tdSql
.
queryResult
)
!=
1
and
tdSql
.
queryResult
[
0
][
0
]
!=
0
:
tdLog
.
exit
(
'delete case failure!'
)
else
:
tdSql
.
checkEqual
(
tdSql
.
queryResult
[
0
][
0
],(
tb_num
-
1
)
*
row_num
)
...
...
@@ -229,4 +229,4 @@ class TDTestCase:
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
\ No newline at end of file
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tests/system-test/2-query/count.py
浏览文件 @
ca51b863
...
...
@@ -93,13 +93,17 @@ class TDTestCase:
tdSql
.
query
(
f
'select sum(1),max(c2),min(1),leastsquares(c1,1,1) from
{
self
.
stbname
}
'
)
tdSql
.
checkRows
(
0
)
tdSql
.
query
(
f
'select
{
function_name
}
(c1),sum(c1) from
{
self
.
stbname
}
group by tbname'
)
tdSql
.
checkRows
(
2
)
tdSql
.
checkData
(
0
,
0
,
0
)
tdSql
.
checkData
(
1
,
0
,
0
)
tdSql
.
checkData
(
0
,
1
,
None
)
tdSql
.
checkData
(
1
,
1
,
None
)
tdSql
.
checkRows
(
0
)
tdSql
.
query
(
f
'select
{
function_name
}
(c1),sum(c1) from
{
self
.
stbname
}
group by c1'
)
tdSql
.
checkRows
(
0
)
tdSql
.
query
(
f
'select
{
function_name
}
(c1),sum(c1) from
{
self
.
stbname
}
group by t0'
)
tdSql
.
checkRows
(
0
)
tdSql
.
query
(
f
'select
{
function_name
}
(c1),sum(c1) from
{
self
.
stbname
}
partition by tbname'
)
tdSql
.
checkRows
(
0
)
tdSql
.
query
(
f
'select
{
function_name
}
(c1),sum(c1) from
{
self
.
stbname
}
partition by c1'
)
tdSql
.
checkRows
(
0
)
tdSql
.
query
(
f
'select
{
function_name
}
(c1),sum(c1) from
{
self
.
stbname
}
partition by t0'
)
tdSql
.
checkRows
(
0
)
tdSql
.
query
(
f
'select
{
function_name
}
(1) from (select
{
function_name
}
(c1),sum(c1) from
{
self
.
stbname
}
group by c1)'
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
0
,
0
)
...
...
@@ -109,15 +113,11 @@ class TDTestCase:
tdSql
.
checkRows
(
0
)
tdSql
.
query
(
f
'select
{
function_name
}
(c1),sum(c1) from
{
self
.
stbname
}
partition by c1 interval(1s)'
)
tdSql
.
checkRows
(
0
)
tdSql
.
query
(
f
'select
{
function_name
}
(1),sum(1) from (select
{
function_name
}
(1) from
{
self
.
stbname
}
group by tbname)'
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
0
,
0
)
tdSql
.
checkData
(
0
,
1
,
None
)
tdSql
.
query
(
f
'select count(1),sum(1) from (select count(1) from
{
self
.
stbname
}
group by tbname)'
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
0
,
2
)
tdSql
.
checkData
(
0
,
1
,
2
)
tdSql
.
query
(
f
'select hyperloglog(1),sum(1) from (select hyperloglog(1) from
{
self
.
stbname
}
group by tbname)'
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
0
,
1
)
tdSql
.
checkData
(
0
,
1
,
2
)
def
query_empty_ntb
(
self
):
tdSql
.
query
(
f
'select count(*) from
{
self
.
ntbname
}
'
)
tdSql
.
checkRows
(
1
)
...
...
@@ -158,9 +158,7 @@ class TDTestCase:
tdSql
.
query
(
f
'select sum(1),max(c2),min(1),leastsquares(c1,1,1) from
{
self
.
ntbname
}
'
)
tdSql
.
checkRows
(
0
)
tdSql
.
query
(
f
'select
{
function_name
}
(c1),sum(c1) from
{
self
.
ntbname
}
group by tbname'
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
0
,
0
)
tdSql
.
checkData
(
0
,
1
,
None
)
tdSql
.
checkRows
(
0
)
tdSql
.
query
(
f
'select
{
function_name
}
(c1),sum(c1) from
{
self
.
ntbname
}
group by c1'
)
tdSql
.
checkRows
(
0
)
tdSql
.
query
(
f
'select
{
function_name
}
(1) from (select
{
function_name
}
(c1),sum(c1) from
{
self
.
ntbname
}
group by c1)'
)
...
...
@@ -172,15 +170,10 @@ class TDTestCase:
tdSql
.
checkRows
(
0
)
tdSql
.
query
(
f
'select
{
function_name
}
(c1),sum(c1) from
{
self
.
ntbname
}
partition by c1 interval(1s)'
)
tdSql
.
checkRows
(
0
)
tdSql
.
query
(
f
'select count(1),sum(1) from (select count(1) from
{
self
.
ntbname
}
group by tbname)'
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
0
,
1
)
tdSql
.
checkData
(
0
,
1
,
1
)
tdSql
.
query
(
f
'select hyperloglog(1),sum(1) from (select hyperloglog(1) from
{
self
.
ntbname
}
group by tbname)'
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
0
,
1
)
tdSql
.
checkData
(
0
,
1
,
1
)
tdSql
.
query
(
f
'select count(1),sum(1) from (select count(1) from
{
self
.
ntbname
}
group by tbname)'
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
0
,
0
)
tdSql
.
checkData
(
0
,
1
,
None
)
def
count_query_stb
(
self
,
column_dict
,
tag_dict
,
stbname
,
tbnum
,
rownum
):
tdSql
.
query
(
f
'select count(tbname) from
{
stbname
}
'
)
tdSql
.
checkEqual
(
tdSql
.
queryResult
[
0
][
0
],
tbnum
*
rownum
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录