Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
86e6e9ec
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看板
提交
86e6e9ec
编写于
2月 22, 2021
作者:
L
liuyq-617
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
modify test case for unsigned datetype
上级
0b4f0680
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
116 addition
and
5 deletion
+116
-5
tests/pytest/functions/function_min_restart.py
tests/pytest/functions/function_min_restart.py
+12
-0
tests/pytest/functions/function_operations_restart.py
tests/pytest/functions/function_operations_restart.py
+4
-4
tests/pytest/functions/function_percentile_restart.py
tests/pytest/functions/function_percentile_restart.py
+52
-0
tests/pytest/functions/function_spread_restart.py
tests/pytest/functions/function_spread_restart.py
+9
-1
tests/pytest/functions/function_stddev_restart.py
tests/pytest/functions/function_stddev_restart.py
+12
-0
tests/pytest/functions/function_sum_restart.py
tests/pytest/functions/function_sum_restart.py
+7
-0
tests/pytest/functions/function_top_restart.py
tests/pytest/functions/function_top_restart.py
+20
-0
未找到文件。
tests/pytest/functions/function_min_restart.py
浏览文件 @
86e6e9ec
...
...
@@ -58,6 +58,18 @@ class TDTestCase:
tdSql
.
query
(
"select min(col4) from test1"
)
tdSql
.
checkData
(
0
,
0
,
np
.
min
(
intData
))
tdSql
.
query
(
"select min(col11) from test1"
)
tdSql
.
checkData
(
0
,
0
,
np
.
min
(
intData
))
tdSql
.
query
(
"select min(col12) from test1"
)
tdSql
.
checkData
(
0
,
0
,
np
.
min
(
intData
))
tdSql
.
query
(
"select min(col13) from test1"
)
tdSql
.
checkData
(
0
,
0
,
np
.
min
(
intData
))
tdSql
.
query
(
"select min(col14) from test1"
)
tdSql
.
checkData
(
0
,
0
,
np
.
min
(
intData
))
tdSql
.
query
(
"select min(col5) from test1"
)
tdSql
.
checkData
(
0
,
0
,
np
.
min
(
floatData
))
...
...
tests/pytest/functions/function_operations_restart.py
浏览文件 @
86e6e9ec
...
...
@@ -44,9 +44,9 @@ class TDTestCase:
tdSql
.
checkRows
(
11
)
tdSql
.
checkData
(
0
,
0
,
2.0
)
tdSql
.
query
(
"select col1 + col2 * col3 + col3 / col4 + col5 + col6 from test1"
)
tdSql
.
checkRows
(
1
1
)
tdSql
.
checkData
(
0
,
0
,
3
.2
)
tdSql
.
query
(
"select col1 + col2 * col3 + col3 / col4 + col5 + col6
+ col11 + col12 + col13 + col14
from test1"
)
tdSql
.
checkRows
(
1
0
)
tdSql
.
checkData
(
0
,
0
,
7
.2
)
#tdSql.execute("insert into test1(ts, col1) values(%d, 11)" % (self.ts + 11))
tdSql
.
query
(
"select col1 + col2 from test1"
)
...
...
@@ -57,7 +57,7 @@ class TDTestCase:
tdSql
.
checkRows
(
11
)
tdSql
.
checkData
(
10
,
0
,
None
)
tdSql
.
query
(
"select col1 + col2 * col3 + col3 / col4 + col5 + col6 from test1"
)
tdSql
.
query
(
"select col1 + col2 * col3 + col3 / col4 + col5 + col6
+ col11 + col12 + col13 + col14
from test1"
)
tdSql
.
checkRows
(
11
)
tdSql
.
checkData
(
10
,
0
,
None
)
...
...
tests/pytest/functions/function_percentile_restart.py
浏览文件 @
86e6e9ec
...
...
@@ -99,6 +99,58 @@ class TDTestCase:
tdSql
.
query
(
"select apercentile(col4, 100) from test"
)
print
(
"apercentile result: %s"
%
tdSql
.
getData
(
0
,
0
))
tdSql
.
query
(
"select percentile(col11, 0) from test"
)
tdSql
.
checkData
(
0
,
0
,
np
.
percentile
(
intData
,
0
))
tdSql
.
query
(
"select apercentile(col11, 0) from test"
)
print
(
"apercentile result: %s"
%
tdSql
.
getData
(
0
,
0
))
tdSql
.
query
(
"select percentile(col11, 50) from test"
)
tdSql
.
checkData
(
0
,
0
,
np
.
percentile
(
intData
,
50
))
tdSql
.
query
(
"select apercentile(col11, 50) from test"
)
print
(
"apercentile result: %s"
%
tdSql
.
getData
(
0
,
0
))
tdSql
.
query
(
"select percentile(col11, 100) from test"
)
tdSql
.
checkData
(
0
,
0
,
np
.
percentile
(
intData
,
100
))
tdSql
.
query
(
"select apercentile(col11, 100) from test"
)
print
(
"apercentile result: %s"
%
tdSql
.
getData
(
0
,
0
))
tdSql
.
query
(
"select percentile(col12, 0) from test"
)
tdSql
.
checkData
(
0
,
0
,
np
.
percentile
(
intData
,
0
))
tdSql
.
query
(
"select apercentile(col12, 0) from test"
)
print
(
"apercentile result: %s"
%
tdSql
.
getData
(
0
,
0
))
tdSql
.
query
(
"select percentile(col12, 50) from test"
)
tdSql
.
checkData
(
0
,
0
,
np
.
percentile
(
intData
,
50
))
tdSql
.
query
(
"select apercentile(col12, 50) from test"
)
print
(
"apercentile result: %s"
%
tdSql
.
getData
(
0
,
0
))
tdSql
.
query
(
"select percentile(col12, 100) from test"
)
tdSql
.
checkData
(
0
,
0
,
np
.
percentile
(
intData
,
100
))
tdSql
.
query
(
"select apercentile(col12, 100) from test"
)
print
(
"apercentile result: %s"
%
tdSql
.
getData
(
0
,
0
))
tdSql
.
query
(
"select percentile(col13, 0) from test"
)
tdSql
.
checkData
(
0
,
0
,
np
.
percentile
(
intData
,
0
))
tdSql
.
query
(
"select apercentile(col13, 0) from test"
)
print
(
"apercentile result: %s"
%
tdSql
.
getData
(
0
,
0
))
tdSql
.
query
(
"select percentile(col13, 50) from test"
)
tdSql
.
checkData
(
0
,
0
,
np
.
percentile
(
intData
,
50
))
tdSql
.
query
(
"select apercentile(col13, 50) from test"
)
print
(
"apercentile result: %s"
%
tdSql
.
getData
(
0
,
0
))
tdSql
.
query
(
"select percentile(col13, 100) from test"
)
tdSql
.
checkData
(
0
,
0
,
np
.
percentile
(
intData
,
100
))
tdSql
.
query
(
"select apercentile(col13, 100) from test"
)
print
(
"apercentile result: %s"
%
tdSql
.
getData
(
0
,
0
))
tdSql
.
query
(
"select percentile(col14, 0) from test"
)
tdSql
.
checkData
(
0
,
0
,
np
.
percentile
(
intData
,
0
))
tdSql
.
query
(
"select apercentile(col14, 0) from test"
)
print
(
"apercentile result: %s"
%
tdSql
.
getData
(
0
,
0
))
tdSql
.
query
(
"select percentile(col14, 50) from test"
)
tdSql
.
checkData
(
0
,
0
,
np
.
percentile
(
intData
,
50
))
tdSql
.
query
(
"select apercentile(col14, 50) from test"
)
print
(
"apercentile result: %s"
%
tdSql
.
getData
(
0
,
0
))
tdSql
.
query
(
"select percentile(col14, 100) from test"
)
tdSql
.
checkData
(
0
,
0
,
np
.
percentile
(
intData
,
100
))
tdSql
.
query
(
"select apercentile(col14, 100) from test"
)
print
(
"apercentile result: %s"
%
tdSql
.
getData
(
0
,
0
))
tdSql
.
query
(
"select percentile(col5, 0) from test"
)
print
(
"query result: %s"
%
tdSql
.
getData
(
0
,
0
))
print
(
"array result: %s"
%
np
.
percentile
(
floatData
,
0
))
...
...
tests/pytest/functions/function_spread_restart.py
浏览文件 @
86e6e9ec
...
...
@@ -36,8 +36,16 @@ class TDTestCase:
tdSql
.
error
(
"select spread(col8) from test1"
)
tdSql
.
error
(
"select spread(col9) from test"
)
tdSql
.
error
(
"select spread(col9) from test1"
)
tdSql
.
error
(
"select spread(col11) from test"
)
tdSql
.
error
(
"select spread(col11) from test1"
)
tdSql
.
error
(
"select spread(col12) from test"
)
tdSql
.
error
(
"select spread(col12) from test1"
)
tdSql
.
error
(
"select spread(col13) from test"
)
tdSql
.
error
(
"select spread(col13) from test1"
)
tdSql
.
error
(
"select spread(col14) from test"
)
tdSql
.
error
(
"select spread(col14) from test1"
)
tdSql
.
query
(
"select spread(col1) from test1"
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
0
,
10
)
...
...
tests/pytest/functions/function_stddev_restart.py
浏览文件 @
86e6e9ec
...
...
@@ -55,6 +55,18 @@ class TDTestCase:
tdSql
.
query
(
"select stddev(col4) from test1"
)
tdSql
.
checkData
(
0
,
0
,
np
.
std
(
intData
))
tdSql
.
query
(
"select stddev(col11) from test1"
)
tdSql
.
checkData
(
0
,
0
,
np
.
std
(
intData
))
tdSql
.
query
(
"select stddev(col12) from test1"
)
tdSql
.
checkData
(
0
,
0
,
np
.
std
(
intData
))
tdSql
.
query
(
"select stddev(col13) from test1"
)
tdSql
.
checkData
(
0
,
0
,
np
.
std
(
intData
))
tdSql
.
query
(
"select stddev(col14) from test1"
)
tdSql
.
checkData
(
0
,
0
,
np
.
std
(
intData
))
tdSql
.
query
(
"select stddev(col5) from test1"
)
tdSql
.
checkData
(
0
,
0
,
np
.
std
(
floatData
))
...
...
tests/pytest/functions/function_sum_restart.py
浏览文件 @
86e6e9ec
...
...
@@ -51,6 +51,13 @@ class TDTestCase:
tdSql
.
checkData
(
0
,
0
,
np
.
sum
(
intData
))
tdSql
.
query
(
"select sum(col4) from test"
)
tdSql
.
checkData
(
0
,
0
,
np
.
sum
(
intData
))
tdSql
.
query
(
"select sum(col11) from test"
)
tdSql
.
checkData
(
0
,
0
,
np
.
sum
(
intData
))
tdSql
.
query
(
"select sum(col12) from test"
)
tdSql
.
checkData
(
0
,
0
,
np
.
sum
(
intData
))
tdSql
.
query
(
"select sum(col13) from test"
)
tdSql
.
checkData
(
0
,
0
,
np
.
sum
(
intData
))
tdSql
.
query
(
"select sum(col14) from test"
)
tdSql
.
query
(
"select sum(col5) from test"
)
tdSql
.
checkData
(
0
,
0
,
np
.
sum
(
floatData
))
tdSql
.
query
(
"select sum(col6) from test"
)
...
...
tests/pytest/functions/function_top_restart.py
浏览文件 @
86e6e9ec
...
...
@@ -75,6 +75,26 @@ class TDTestCase:
tdSql
.
checkData
(
0
,
1
,
9
)
tdSql
.
checkData
(
1
,
1
,
10
)
tdSql
.
query
(
"select top(col11, 2) from test"
)
tdSql
.
checkRows
(
2
)
tdSql
.
checkData
(
0
,
1
,
9
)
tdSql
.
checkData
(
1
,
1
,
10
)
tdSql
.
query
(
"select top(col12, 2) from test"
)
tdSql
.
checkRows
(
2
)
tdSql
.
checkData
(
0
,
1
,
9
)
tdSql
.
checkData
(
1
,
1
,
10
)
tdSql
.
query
(
"select top(col13, 2) from test"
)
tdSql
.
checkRows
(
2
)
tdSql
.
checkData
(
0
,
1
,
9
)
tdSql
.
checkData
(
1
,
1
,
10
)
tdSql
.
query
(
"select top(col14, 2) from test"
)
tdSql
.
checkRows
(
2
)
tdSql
.
checkData
(
0
,
1
,
9
)
tdSql
.
checkData
(
1
,
1
,
10
)
tdSql
.
query
(
"select top(col5, 2) from test"
)
tdSql
.
checkRows
(
2
)
tdSql
.
checkData
(
0
,
1
,
8.1
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录