Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
67aac85c
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看板
提交
67aac85c
编写于
11月 18, 2021
作者:
C
cpwu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix the csum case
上级
865ee4b0
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
26 addition
and
26 deletion
+26
-26
tests/pytest/functions/function_csum.py
tests/pytest/functions/function_csum.py
+26
-26
未找到文件。
tests/pytest/functions/function_csum.py
浏览文件 @
67aac85c
...
...
@@ -158,13 +158,13 @@ class TDTestCase:
self
.
checkcsum
(
**
case8
)
# case9~10: mix with tbname/ts/tag/col
#
case9 = {"alias": ", tbname"}
#
self.checkcsum(**case9)
case9
=
{
"alias"
:
", tbname"
}
self
.
checkcsum
(
**
case9
)
case10
=
{
"alias"
:
", _c0"
}
self
.
checkcsum
(
**
case10
)
#
case11 = {"alias": ", st1"}
#
self.checkcsum(**case11)
#
case12 = {"alias": ", c1"}
case11
=
{
"alias"
:
", st1"
}
self
.
checkcsum
(
**
case11
)
case12
=
{
"alias"
:
", c1"
}
# self.checkcsum(**case12)
# case13~15: with single condition
...
...
@@ -285,7 +285,7 @@ class TDTestCase:
"table_expr"
:
"t1"
,
"condition"
:
"group by c6"
}
#
tdSql.error(self.csum_query_form(**group_normal_col)) # group by normal col
tdSql
.
error
(
self
.
csum_query_form
(
**
group_normal_col
))
# group by normal col
slimit_soffset_sql
=
{
"table_expr"
:
"stb1"
,
"condition"
:
"group by tbname slimit 1 soffset 1"
...
...
@@ -349,16 +349,16 @@ class TDTestCase:
per_table_rows
=
100
self
.
csum_test_table
(
tbnum
)
#
tdLog.printNoPrefix("######## no data test:")
#
self.csum_current_query()
#
self.csum_error_query()
#
#
tdLog.printNoPrefix("######## insert only NULL test:")
#
for i in range(tbnum):
#
tdSql.execute(f"insert into t{i}(ts) values ({nowtime - 5})")
#
tdSql.execute(f"insert into t{i}(ts) values ({nowtime + 5})")
#
self.csum_current_query()
#
self.csum_error_query()
tdLog
.
printNoPrefix
(
"######## no data test:"
)
self
.
csum_current_query
()
self
.
csum_error_query
()
tdLog
.
printNoPrefix
(
"######## insert only NULL test:"
)
for
i
in
range
(
tbnum
):
tdSql
.
execute
(
f
"insert into t
{
i
}
(ts) values (
{
nowtime
-
5
}
)"
)
tdSql
.
execute
(
f
"insert into t
{
i
}
(ts) values (
{
nowtime
+
5
}
)"
)
self
.
csum_current_query
()
self
.
csum_error_query
()
tdLog
.
printNoPrefix
(
"######## insert data in the range near the max(bigint/double):"
)
self
.
csum_test_table
(
tbnum
)
...
...
@@ -367,16 +367,16 @@ class TDTestCase:
tdSql
.
execute
(
f
"insert into t1(ts, c1,c2,c5,c7) values "
f
"(
{
nowtime
-
(
per_table_rows
+
2
)
*
10
}
,
{
2
**
31
-
1
}
,
{
3.4
*
10
**
38
}
,
{
1.7
*
10
**
308
}
,
{
2
**
63
-
1
}
)"
)
self
.
csum_current_query
()
#
self.csum_error_query()
#
#
tdLog.printNoPrefix("######## insert data in the range near the min(bigint/double):")
#
self.csum_test_table(tbnum)
#
tdSql.execute(f"insert into t1(ts, c1,c2,c5,c7) values "
#
f"({nowtime - (per_table_rows + 1) * 10}, {1-2**31}, {-3.4*10**38}, {-1.7*10**308}, {1-2**63})")
#
tdSql.execute(f"insert into t1(ts, c1,c2,c5,c7) values "
#
f"({nowtime - (per_table_rows + 2) * 10}, {1-2**31}, {-3.4*10**38}, {-1.7*10**308}, {512-2**63})")
#
self.csum_current_query()
#
self.csum_error_query()
self
.
csum_error_query
()
tdLog
.
printNoPrefix
(
"######## insert data in the range near the min(bigint/double):"
)
self
.
csum_test_table
(
tbnum
)
tdSql
.
execute
(
f
"insert into t1(ts, c1,c2,c5,c7) values "
f
"(
{
nowtime
-
(
per_table_rows
+
1
)
*
10
}
,
{
1
-
2
**
31
}
,
{
-
3.4
*
10
**
38
}
,
{
-
1.7
*
10
**
308
}
,
{
1
-
2
**
63
}
)"
)
tdSql
.
execute
(
f
"insert into t1(ts, c1,c2,c5,c7) values "
f
"(
{
nowtime
-
(
per_table_rows
+
2
)
*
10
}
,
{
1
-
2
**
31
}
,
{
-
3.4
*
10
**
38
}
,
{
-
1.7
*
10
**
308
}
,
{
512
-
2
**
63
}
)"
)
self
.
csum_current_query
()
self
.
csum_error_query
()
tdLog
.
printNoPrefix
(
"######## insert data without NULL data test:"
)
self
.
csum_test_table
(
tbnum
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录