Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
125944ce
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看板
提交
125944ce
编写于
6月 24, 2022
作者:
W
wenzhouwww@live.cn
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add case for compute null value
上级
a533f349
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
29 addition
and
0 deletion
+29
-0
tests/system-test/2-query/function_null.py
tests/system-test/2-query/function_null.py
+29
-0
未找到文件。
tests/system-test/2-query/function_null.py
浏览文件 @
125944ce
...
@@ -92,6 +92,7 @@ class TDTestCase:
...
@@ -92,6 +92,7 @@ class TDTestCase:
scalar_sql_1
=
f
"select
{
function_name
}
(c1)/0 from t1 group by c1 order by c1"
scalar_sql_1
=
f
"select
{
function_name
}
(c1)/0 from t1 group by c1 order by c1"
scalar_sql_2
=
f
"select
{
function_name
}
(c1/0) from t1 group by c1 order by c1"
scalar_sql_2
=
f
"select
{
function_name
}
(c1/0) from t1 group by c1 order by c1"
scalar_sql_3
=
f
"select
{
function_name
}
(NULL) from t1 group by c1 order by c1"
tdSql
.
query
(
scalar_sql_1
)
tdSql
.
query
(
scalar_sql_1
)
tdSql
.
checkRows
(
10
)
tdSql
.
checkRows
(
10
)
tdSql
.
checkData
(
0
,
0
,
None
)
tdSql
.
checkData
(
0
,
0
,
None
)
...
@@ -100,6 +101,10 @@ class TDTestCase:
...
@@ -100,6 +101,10 @@ class TDTestCase:
tdSql
.
checkRows
(
10
)
tdSql
.
checkRows
(
10
)
tdSql
.
checkData
(
0
,
0
,
None
)
tdSql
.
checkData
(
0
,
0
,
None
)
tdSql
.
checkData
(
9
,
0
,
None
)
tdSql
.
checkData
(
9
,
0
,
None
)
tdSql
.
query
(
scalar_sql_3
)
tdSql
.
checkRows
(
10
)
tdSql
.
checkData
(
0
,
0
,
None
)
tdSql
.
checkData
(
9
,
0
,
None
)
function_names
=
[
"sin"
,
"cos"
,
"tan"
,
"asin"
,
"acos"
,
"atan"
]
function_names
=
[
"sin"
,
"cos"
,
"tan"
,
"asin"
,
"acos"
,
"atan"
]
...
@@ -109,6 +114,9 @@ class TDTestCase:
...
@@ -109,6 +114,9 @@ class TDTestCase:
tdSql
.
query
(
" select sin(c1/0) from t1 group by c1 order by c1"
)
tdSql
.
query
(
" select sin(c1/0) from t1 group by c1 order by c1"
)
tdSql
.
checkData
(
9
,
0
,
None
)
tdSql
.
checkData
(
9
,
0
,
None
)
tdSql
.
query
(
" select sin(NULL) from t1 group by c1 order by c1"
)
tdSql
.
checkData
(
9
,
0
,
None
)
tdSql
.
query
(
" select sin(0.00) from t1 group by c1 order by c1"
)
tdSql
.
query
(
" select sin(0.00) from t1 group by c1 order by c1"
)
tdSql
.
checkData
(
9
,
0
,
0.000000000
)
tdSql
.
checkData
(
9
,
0
,
0.000000000
)
...
@@ -122,6 +130,9 @@ class TDTestCase:
...
@@ -122,6 +130,9 @@ class TDTestCase:
tdSql
.
query
(
" select cos(c1/0) from t1 group by c1 order by c1"
)
tdSql
.
query
(
" select cos(c1/0) from t1 group by c1 order by c1"
)
tdSql
.
checkData
(
9
,
0
,
None
)
tdSql
.
checkData
(
9
,
0
,
None
)
tdSql
.
query
(
" select cos(NULL) from t1 group by c1 order by c1"
)
tdSql
.
checkData
(
9
,
0
,
None
)
tdSql
.
query
(
" select cos(0.00) from t1 group by c1 order by c1"
)
tdSql
.
query
(
" select cos(0.00) from t1 group by c1 order by c1"
)
tdSql
.
checkData
(
9
,
0
,
1.000000000
)
tdSql
.
checkData
(
9
,
0
,
1.000000000
)
...
@@ -135,6 +146,9 @@ class TDTestCase:
...
@@ -135,6 +146,9 @@ class TDTestCase:
tdSql
.
query
(
" select tan(c1/0) from t1 group by c1 order by c1"
)
tdSql
.
query
(
" select tan(c1/0) from t1 group by c1 order by c1"
)
tdSql
.
checkData
(
9
,
0
,
None
)
tdSql
.
checkData
(
9
,
0
,
None
)
tdSql
.
query
(
" select tan(NULL) from t1 group by c1 order by c1"
)
tdSql
.
checkData
(
9
,
0
,
None
)
tdSql
.
query
(
" select tan(0.00) from t1 group by c1 order by c1"
)
tdSql
.
query
(
" select tan(0.00) from t1 group by c1 order by c1"
)
tdSql
.
checkData
(
9
,
0
,
0.000000000
)
tdSql
.
checkData
(
9
,
0
,
0.000000000
)
...
@@ -147,6 +161,9 @@ class TDTestCase:
...
@@ -147,6 +161,9 @@ class TDTestCase:
tdSql
.
query
(
" select atan(c1/0) from t1 group by c1 order by c1"
)
tdSql
.
query
(
" select atan(c1/0) from t1 group by c1 order by c1"
)
tdSql
.
checkData
(
9
,
0
,
None
)
tdSql
.
checkData
(
9
,
0
,
None
)
tdSql
.
query
(
" select atan(NULL) from t1 group by c1 order by c1"
)
tdSql
.
checkData
(
9
,
0
,
None
)
tdSql
.
query
(
" select atan(0.00) from t1 group by c1 order by c1"
)
tdSql
.
query
(
" select atan(0.00) from t1 group by c1 order by c1"
)
tdSql
.
checkData
(
9
,
0
,
0.000000000
)
tdSql
.
checkData
(
9
,
0
,
0.000000000
)
...
@@ -160,6 +177,9 @@ class TDTestCase:
...
@@ -160,6 +177,9 @@ class TDTestCase:
tdSql
.
query
(
" select asin(c1/0) from t1 group by c1 order by c1"
)
tdSql
.
query
(
" select asin(c1/0) from t1 group by c1 order by c1"
)
tdSql
.
checkData
(
9
,
0
,
None
)
tdSql
.
checkData
(
9
,
0
,
None
)
tdSql
.
query
(
" select asin(NULL) from t1 group by c1 order by c1"
)
tdSql
.
checkData
(
9
,
0
,
None
)
tdSql
.
query
(
" select asin(0.00) from t1 group by c1 order by c1"
)
tdSql
.
query
(
" select asin(0.00) from t1 group by c1 order by c1"
)
tdSql
.
checkData
(
9
,
0
,
0.000000000
)
tdSql
.
checkData
(
9
,
0
,
0.000000000
)
...
@@ -173,6 +193,9 @@ class TDTestCase:
...
@@ -173,6 +193,9 @@ class TDTestCase:
tdSql
.
query
(
" select acos(c1/0) from t1 group by c1 order by c1"
)
tdSql
.
query
(
" select acos(c1/0) from t1 group by c1 order by c1"
)
tdSql
.
checkData
(
9
,
0
,
None
)
tdSql
.
checkData
(
9
,
0
,
None
)
tdSql
.
query
(
" select acos(NULL) from t1 group by c1 order by c1"
)
tdSql
.
checkData
(
9
,
0
,
None
)
tdSql
.
query
(
" select acos(0.00) from t1 group by c1 order by c1"
)
tdSql
.
query
(
" select acos(0.00) from t1 group by c1 order by c1"
)
tdSql
.
checkData
(
9
,
0
,
1.570796327
)
tdSql
.
checkData
(
9
,
0
,
1.570796327
)
...
@@ -188,6 +211,9 @@ class TDTestCase:
...
@@ -188,6 +211,9 @@ class TDTestCase:
tdSql
.
query
(
" select log(-10) from t1 group by c1 order by c1"
)
tdSql
.
query
(
" select log(-10) from t1 group by c1 order by c1"
)
tdSql
.
checkData
(
9
,
0
,
None
)
tdSql
.
checkData
(
9
,
0
,
None
)
tdSql
.
query
(
" select log(NULL ,2) from t1 group by c1 order by c1"
)
tdSql
.
checkData
(
9
,
0
,
None
)
tdSql
.
query
(
" select log(c1)/0 from t1 group by c1 order by c1"
)
tdSql
.
query
(
" select log(c1)/0 from t1 group by c1 order by c1"
)
tdSql
.
checkData
(
9
,
0
,
None
)
tdSql
.
checkData
(
9
,
0
,
None
)
...
@@ -201,6 +227,9 @@ class TDTestCase:
...
@@ -201,6 +227,9 @@ class TDTestCase:
tdSql
.
query
(
" select pow(c1,2)/0 from t1 group by c1 order by c1"
)
tdSql
.
query
(
" select pow(c1,2)/0 from t1 group by c1 order by c1"
)
tdSql
.
checkData
(
9
,
0
,
None
)
tdSql
.
checkData
(
9
,
0
,
None
)
tdSql
.
query
(
" select pow(NULL,2) from t1 group by c1 order by c1"
)
tdSql
.
checkData
(
9
,
0
,
None
)
tdSql
.
query
(
f
" select pow(c1/0 ,1 ) from t1 group by c1 order by c1"
)
tdSql
.
query
(
f
" select pow(c1/0 ,1 ) from t1 group by c1 order by c1"
)
tdSql
.
checkData
(
9
,
0
,
None
)
tdSql
.
checkData
(
9
,
0
,
None
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录