Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
37c1971c
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看板
未验证
提交
37c1971c
编写于
11月 21, 2022
作者:
H
Hui Li
提交者:
GitHub
11月 21, 2022
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #18268 from taosdata/test/update_case
test/update case
上级
9ffcef81
d07dc944
变更
21
隐藏空白更改
内联
并排
Showing
21 changed file
with
163 addition
and
193 deletion
+163
-193
tests/system-test/2-query/abs.py
tests/system-test/2-query/abs.py
+8
-14
tests/system-test/2-query/and_or_for_byte.py
tests/system-test/2-query/and_or_for_byte.py
+4
-4
tests/system-test/2-query/arccos.py
tests/system-test/2-query/arccos.py
+8
-17
tests/system-test/2-query/arcsin.py
tests/system-test/2-query/arcsin.py
+9
-17
tests/system-test/2-query/arctan.py
tests/system-test/2-query/arctan.py
+7
-17
tests/system-test/2-query/avg.py
tests/system-test/2-query/avg.py
+9
-15
tests/system-test/2-query/ceil.py
tests/system-test/2-query/ceil.py
+8
-13
tests/system-test/2-query/cos.py
tests/system-test/2-query/cos.py
+5
-21
tests/system-test/2-query/floor.py
tests/system-test/2-query/floor.py
+8
-13
tests/system-test/2-query/function_stateduration.py
tests/system-test/2-query/function_stateduration.py
+5
-5
tests/system-test/2-query/last_row.py
tests/system-test/2-query/last_row.py
+4
-4
tests/system-test/2-query/log.py
tests/system-test/2-query/log.py
+4
-5
tests/system-test/2-query/pow.py
tests/system-test/2-query/pow.py
+4
-4
tests/system-test/2-query/round.py
tests/system-test/2-query/round.py
+9
-13
tests/system-test/2-query/sin.py
tests/system-test/2-query/sin.py
+4
-4
tests/system-test/2-query/sqrt.py
tests/system-test/2-query/sqrt.py
+4
-4
tests/system-test/2-query/statecount.py
tests/system-test/2-query/statecount.py
+5
-5
tests/system-test/2-query/tail.py
tests/system-test/2-query/tail.py
+8
-8
tests/system-test/2-query/tan.py
tests/system-test/2-query/tan.py
+4
-4
tests/system-test/2-query/txt.txt
tests/system-test/2-query/txt.txt
+40
-0
tests/system-test/2-query/unique.py
tests/system-test/2-query/unique.py
+6
-6
未找到文件。
tests/system-test/2-query/abs.py
浏览文件 @
37c1971c
...
...
@@ -204,18 +204,12 @@ class TDTestCase:
row_check
.
append
(
elem
)
auto_result
.
append
(
row_check
)
check_status
=
True
tdSql
.
query
(
abs_query
)
for
row_index
,
row
in
enumerate
(
abs_result
):
for
col_index
,
elem
in
enumerate
(
row
):
if
auto_result
[
row_index
][
col_index
]
!=
elem
:
check_status
=
False
if
not
check_status
:
tdLog
.
notice
(
"abs function value has not as expected , sql is
\"
%s
\"
"
%
abs_query
)
sys
.
exit
(
1
)
else
:
tdLog
.
info
(
"abs value check pass , it work as expected ,sql is
\"
%s
\"
"
%
abs_query
)
tdSql
.
checkData
(
row_index
,
col_index
,
auto_result
[
row_index
][
col_index
])
def
test_errors
(
self
):
dbname
=
"testdb"
...
...
@@ -466,19 +460,19 @@ class TDTestCase:
)
tdSql
.
execute
(
f
'create table
{
dbname
}
.sub1_bound using
{
dbname
}
.stb_bound tags ( 1 )'
)
tdSql
.
execute
(
f
"insert into
{
dbname
}
.sub1_bound values ( now()-1s, 2147483647, 9223372036854775807, 32767, 127, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
f
"insert into
{
dbname
}
.sub1_bound values ( now()-1
0
s, 2147483647, 9223372036854775807, 32767, 127, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
)
tdSql
.
execute
(
f
"insert into
{
dbname
}
.sub1_bound values ( now()-
1
s, -2147483647, -9223372036854775807, -32767, -127, -3.40E+38, -1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
f
"insert into
{
dbname
}
.sub1_bound values ( now()-
5
s, -2147483647, -9223372036854775807, -32767, -127, -3.40E+38, -1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
)
tdSql
.
execute
(
f
"insert into
{
dbname
}
.sub1_bound values ( now(), 2147483646, 9223372036854775806, 32766, 126, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
)
tdSql
.
execute
(
f
"insert into
{
dbname
}
.sub1_bound values ( now(), -2147483646, -9223372036854775806, -32766, -126, -3.40E+38, -1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
f
"insert into
{
dbname
}
.sub1_bound values ( now()
+5s
, -2147483646, -9223372036854775806, -32766, -126, -3.40E+38, -1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
)
tdSql
.
error
(
f
"insert into
{
dbname
}
.sub1_bound values ( now()+1s, 2147483648, 9223372036854775808, 32768, 128, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
f
"insert into
{
dbname
}
.sub1_bound values ( now()+1
0
s, 2147483648, 9223372036854775808, 32768, 128, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
)
self
.
check_result_auto
(
f
"select c1, c2, c3 , c4, c5 ,c6 from
{
dbname
}
.sub1_bound "
,
f
"select abs(c1), abs(c2) ,abs(c3), abs(c4), abs(c5) ,abs(c6) from
{
dbname
}
.sub1_bound"
)
...
...
tests/system-test/2-query/and_or_for_byte.py
浏览文件 @
37c1971c
...
...
@@ -426,19 +426,19 @@ class TDTestCase:
)
tdSql
.
execute
(
f
'create table
{
dbname
}
.sub1_bound using
{
dbname
}
.stb_bound tags ( 1 )'
)
tdSql
.
execute
(
f
"insert into
{
dbname
}
.sub1_bound values ( now()-1s, 2147483647, 9223372036854775807, 32767, 127, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
f
"insert into
{
dbname
}
.sub1_bound values ( now()-1
0
s, 2147483647, 9223372036854775807, 32767, 127, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
)
tdSql
.
execute
(
f
"insert into
{
dbname
}
.sub1_bound values ( now()-
1
s, -2147483647, -9223372036854775807, -32767, -127, -3.40E+38, -1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
f
"insert into
{
dbname
}
.sub1_bound values ( now()-
5
s, -2147483647, -9223372036854775807, -32767, -127, -3.40E+38, -1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
)
tdSql
.
execute
(
f
"insert into
{
dbname
}
.sub1_bound values ( now(), 2147483646, 9223372036854775806, 32766, 126, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
)
tdSql
.
execute
(
f
"insert into
{
dbname
}
.sub1_bound values ( now(), -2147483646, -9223372036854775806, -32766, -126, -3.40E+38, -1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
f
"insert into
{
dbname
}
.sub1_bound values ( now()
+5s
, -2147483646, -9223372036854775806, -32766, -126, -3.40E+38, -1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
)
tdSql
.
error
(
f
"insert into
{
dbname
}
.sub1_bound values ( now()+1s, 2147483648, 9223372036854775808, 32768, 128, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
f
"insert into
{
dbname
}
.sub1_bound values ( now()+1
0
s, 2147483648, 9223372036854775808, 32768, 128, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
)
self
.
check_function
(
"&"
,
False
,
f
"
{
dbname
}
.sub1_bound"
,
"c1"
,
"c2"
,
"c3"
,
"c4"
,
"c5"
,
"c6"
)
self
.
check_function
(
"&"
,
False
,
f
"
{
dbname
}
.sub1_bound"
,
"abs(c1)"
,
"abs(c2)"
,
"abs(c3)"
,
"abs(c4)"
,
"abs(c5)"
,
"abs(c6)"
)
...
...
tests/system-test/2-query/arccos.py
浏览文件 @
37c1971c
...
...
@@ -86,21 +86,12 @@ class TDTestCase:
row_check
.
append
(
elem
)
auto_result
.
append
(
row_check
)
check_status
=
True
tdSql
.
query
(
pow_query
)
for
row_index
,
row
in
enumerate
(
pow_result
):
for
col_index
,
elem
in
enumerate
(
row
):
if
auto_result
[
row_index
][
col_index
]
==
None
and
not
(
auto_result
[
row_index
][
col_index
]
==
None
and
elem
==
None
):
check_status
=
False
elif
auto_result
[
row_index
][
col_index
]
!=
None
and
(
auto_result
[
row_index
][
col_index
]
-
elem
>
0.00000001
):
check_status
=
False
else
:
pass
if
not
check_status
:
tdLog
.
notice
(
"acos function value has not as expected , sql is
\"
%s
\"
"
%
pow_query
)
sys
.
exit
(
1
)
else
:
tdLog
.
info
(
"acos value check pass , it work as expected ,sql is
\"
%s
\"
"
%
pow_query
)
tdSql
.
checkData
(
row_index
,
col_index
,
auto_result
[
row_index
][
col_index
])
def
test_errors
(
self
,
dbname
=
"db"
):
error_sql_lists
=
[
...
...
@@ -414,19 +405,19 @@ class TDTestCase:
)
tdSql
.
execute
(
f
'create table
{
dbname
}
.sub1_bound using
{
dbname
}
.stb_bound tags ( 1 )'
)
tdSql
.
execute
(
f
"insert into
{
dbname
}
.sub1_bound values ( now()-1s, 2147483647, 9223372036854775807, 32767, 127, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
f
"insert into
{
dbname
}
.sub1_bound values ( now()-1
0
s, 2147483647, 9223372036854775807, 32767, 127, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
)
tdSql
.
execute
(
f
"insert into
{
dbname
}
.sub1_bound values ( now()-
1
s, -2147483647, -9223372036854775807, -32767, -127, -3.40E+38, -1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
f
"insert into
{
dbname
}
.sub1_bound values ( now()-
5
s, -2147483647, -9223372036854775807, -32767, -127, -3.40E+38, -1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
)
tdSql
.
execute
(
f
"insert into
{
dbname
}
.sub1_bound values ( now(), 2147483646, 9223372036854775806, 32766, 126, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
)
tdSql
.
execute
(
f
"insert into
{
dbname
}
.sub1_bound values ( now(), -2147483646, -9223372036854775806, -32766, -126, -3.40E+38, -1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
f
"insert into
{
dbname
}
.sub1_bound values ( now()
+5s
, -2147483646, -9223372036854775806, -32766, -126, -3.40E+38, -1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
)
tdSql
.
error
(
f
"insert into
{
dbname
}
.sub1_bound values ( now()+1s, 2147483648, 9223372036854775808, 32768, 128, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
f
"insert into
{
dbname
}
.sub1_bound values ( now()+1
0
s, 2147483648, 9223372036854775808, 32768, 128, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
)
self
.
check_result_auto_acos
(
f
"select abs(c1), abs(c2), abs(c3) , abs(c4), abs(c5) from
{
dbname
}
.sub1_bound "
,
f
"select acos(abs(c1)), acos(abs(c2)) ,acos(abs(c3)), acos(abs(c4)), acos(abs(c5)) from
{
dbname
}
.sub1_bound"
)
...
...
tests/system-test/2-query/arcsin.py
浏览文件 @
37c1971c
...
...
@@ -86,21 +86,13 @@ class TDTestCase:
row_check
.
append
(
elem
)
auto_result
.
append
(
row_check
)
check_status
=
True
tdSql
.
query
(
pow_query
)
for
row_index
,
row
in
enumerate
(
pow_result
):
for
col_index
,
elem
in
enumerate
(
row
):
if
auto_result
[
row_index
][
col_index
]
==
None
and
not
(
auto_result
[
row_index
][
col_index
]
==
None
and
elem
==
None
):
check_status
=
False
elif
auto_result
[
row_index
][
col_index
]
!=
None
and
(
auto_result
[
row_index
][
col_index
]
-
elem
>
0.00000001
):
check_status
=
False
else
:
pass
if
not
check_status
:
tdLog
.
notice
(
"asin function value has not as expected , sql is
\"
%s
\"
"
%
pow_query
)
sys
.
exit
(
1
)
else
:
tdLog
.
info
(
"asin value check pass , it work as expected ,sql is
\"
%s
\"
"
%
pow_query
)
tdSql
.
checkData
(
row_index
,
col_index
,
auto_result
[
row_index
][
col_index
])
def
test_errors
(
self
,
dbname
=
"db"
):
error_sql_lists
=
[
...
...
@@ -414,19 +406,19 @@ class TDTestCase:
)
tdSql
.
execute
(
f
'create table
{
dbname
}
.sub1_bound using
{
dbname
}
.stb_bound tags ( 1 )'
)
tdSql
.
execute
(
f
"insert into
{
dbname
}
.sub1_bound values ( now()-1s, 2147483647, 9223372036854775807, 32767, 127, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
f
"insert into
{
dbname
}
.sub1_bound values ( now()-1
0
s, 2147483647, 9223372036854775807, 32767, 127, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
)
tdSql
.
execute
(
f
"insert into
{
dbname
}
.sub1_bound values ( now()-
1
s, -2147483647, -9223372036854775807, -32767, -127, -3.40E+38, -1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
f
"insert into
{
dbname
}
.sub1_bound values ( now()-
5
s, -2147483647, -9223372036854775807, -32767, -127, -3.40E+38, -1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
)
tdSql
.
execute
(
f
"insert into
{
dbname
}
.sub1_bound values ( now(), 2147483646, 9223372036854775806, 32766, 126, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
)
tdSql
.
execute
(
f
"insert into
{
dbname
}
.sub1_bound values ( now(), -2147483646, -9223372036854775806, -32766, -126, -3.40E+38, -1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
f
"insert into
{
dbname
}
.sub1_bound values ( now()
+5s
, -2147483646, -9223372036854775806, -32766, -126, -3.40E+38, -1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
)
tdSql
.
error
(
f
"insert into
{
dbname
}
.sub1_bound values ( now()+1s, 2147483648, 9223372036854775808, 32768, 128, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
f
"insert into
{
dbname
}
.sub1_bound values ( now()+1
0
s, 2147483648, 9223372036854775808, 32768, 128, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
)
self
.
check_result_auto_asin
(
f
"select abs(c1), abs(c2), abs(c3) , abs(c4), abs(c5) from
{
dbname
}
.sub1_bound "
,
f
"select asin(abs(c1)), asin(abs(c2)) ,asin(abs(c3)), asin(abs(c4)), asin(abs(c5)) from
{
dbname
}
.sub1_bound"
)
...
...
tests/system-test/2-query/arctan.py
浏览文件 @
37c1971c
...
...
@@ -84,22 +84,12 @@ class TDTestCase:
row_check
.
append
(
elem
)
auto_result
.
append
(
row_check
)
check_status
=
True
tdSql
.
query
(
pow_query
)
for
row_index
,
row
in
enumerate
(
pow_result
):
for
col_index
,
elem
in
enumerate
(
row
):
if
auto_result
[
row_index
][
col_index
]
==
None
and
elem
:
check_status
=
False
elif
auto_result
[
row_index
][
col_index
]
!=
None
and
(
auto_result
[
row_index
][
col_index
]
-
elem
>
0.00000001
):
check_status
=
False
else
:
pass
if
not
check_status
:
tdLog
.
notice
(
"atan function value has not as expected , sql is
\"
%s
\"
"
%
pow_query
)
sys
.
exit
(
1
)
else
:
tdLog
.
info
(
"atan value check pass , it work as expected ,sql is
\"
%s
\"
"
%
pow_query
)
tdSql
.
checkData
(
row_index
,
col_index
,
auto_result
[
row_index
][
col_index
])
def
test_errors
(
self
,
dbname
=
"db"
):
error_sql_lists
=
[
f
"select atan from
{
dbname
}
.t1"
,
...
...
@@ -412,19 +402,19 @@ class TDTestCase:
)
tdSql
.
execute
(
f
'create table
{
dbname
}
.sub1_bound using
{
dbname
}
.stb_bound tags ( 1 )'
)
tdSql
.
execute
(
f
"insert into
{
dbname
}
.sub1_bound values ( now()-1s, 2147483647, 9223372036854775807, 32767, 127, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
f
"insert into
{
dbname
}
.sub1_bound values ( now()-1
0
s, 2147483647, 9223372036854775807, 32767, 127, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
)
tdSql
.
execute
(
f
"insert into
{
dbname
}
.sub1_bound values ( now()-
1
s, -2147483647, -9223372036854775807, -32767, -127, -3.40E+38, -1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
f
"insert into
{
dbname
}
.sub1_bound values ( now()-
5
s, -2147483647, -9223372036854775807, -32767, -127, -3.40E+38, -1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
)
tdSql
.
execute
(
f
"insert into
{
dbname
}
.sub1_bound values ( now(), 2147483646, 9223372036854775806, 32766, 126, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
)
tdSql
.
execute
(
f
"insert into
{
dbname
}
.sub1_bound values ( now(), -2147483646, -9223372036854775806, -32766, -126, -3.40E+38, -1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
f
"insert into
{
dbname
}
.sub1_bound values ( now()
+5s
, -2147483646, -9223372036854775806, -32766, -126, -3.40E+38, -1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
)
tdSql
.
error
(
f
"insert into
{
dbname
}
.sub1_bound values ( now()+1s, 2147483648, 9223372036854775808, 32768, 128, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
f
"insert into
{
dbname
}
.sub1_bound values ( now()+1
0
s, 2147483648, 9223372036854775808, 32768, 128, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
)
self
.
check_result_auto_atan
(
f
"select abs(c1), abs(c2), abs(c3) , abs(c4), abs(c5) from
{
dbname
}
.sub1_bound "
,
f
"select atan(abs(c1)), atan(abs(c2)) ,atan(abs(c3)), atan(abs(c4)), atan(abs(c5)) from
{
dbname
}
.sub1_bound"
)
...
...
tests/system-test/2-query/avg.py
浏览文件 @
37c1971c
...
...
@@ -114,16 +114,10 @@ class TDTestCase:
avg_result
=
tdSql
.
getResult
(
origin_query
)
origin_result
=
tdSql
.
getResult
(
check_query
)
check_status
=
True
tdSql
.
query
(
origin_query
)
for
row_index
,
row
in
enumerate
(
avg_result
):
for
col_index
,
elem
in
enumerate
(
row
):
if
avg_result
[
row_index
][
col_index
]
!=
origin_result
[
row_index
][
col_index
]:
check_status
=
False
if
not
check_status
:
tdLog
.
notice
(
"avg function value has not as expected , sql is
\"
%s
\"
"
%
origin_query
)
sys
.
exit
(
1
)
else
:
tdLog
.
info
(
"avg value check pass , it work as expected ,sql is
\"
%s
\"
"
%
check_query
)
tdSql
.
checkData
(
row_index
,
col_index
,
origin_result
[
row_index
][
col_index
])
def
test_errors
(
self
,
dbname
=
"db"
):
error_sql_lists
=
[
...
...
@@ -378,33 +372,33 @@ class TDTestCase:
)
tdSql
.
execute
(
f
'create table
{
dbname
}
.sub1_bound using
{
dbname
}
.stb_bound tags ( 1 )'
)
tdSql
.
execute
(
f
"insert into
{
dbname
}
.sub1_bound values ( now()-1s, 2147483647, 9223372036854775807, 32767, 127, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
f
"insert into
{
dbname
}
.sub1_bound values ( now()-1
0
s, 2147483647, 9223372036854775807, 32767, 127, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
)
tdSql
.
execute
(
f
"insert into
{
dbname
}
.sub1_bound values ( now()-
1
s, -2147483647, -9223372036854775807, -32767, -127, -3.40E+38, -1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
f
"insert into
{
dbname
}
.sub1_bound values ( now()-
5
s, -2147483647, -9223372036854775807, -32767, -127, -3.40E+38, -1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
)
tdSql
.
execute
(
f
"insert into
{
dbname
}
.sub1_bound values ( now(), 2147483646, 9223372036854775806, 32766, 126, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
)
tdSql
.
execute
(
f
"insert into
{
dbname
}
.sub1_bound values ( now(), 2147483645, 9223372036854775805, 32765, 125, 3.40E+37, 1.7e+307, True, 'binary_tb1', 'nchar_tb1', now() )"
f
"insert into
{
dbname
}
.sub1_bound values ( now()
+5s
, 2147483645, 9223372036854775805, 32765, 125, 3.40E+37, 1.7e+307, True, 'binary_tb1', 'nchar_tb1', now() )"
)
tdSql
.
execute
(
f
"insert into
{
dbname
}
.sub1_bound values ( now(), 2147483644, 9223372036854775804, 32764, 124, 3.40E+37, 1.7e+307, True, 'binary_tb1', 'nchar_tb1', now() )"
f
"insert into
{
dbname
}
.sub1_bound values ( now()
+10s
, 2147483644, 9223372036854775804, 32764, 124, 3.40E+37, 1.7e+307, True, 'binary_tb1', 'nchar_tb1', now() )"
)
tdSql
.
execute
(
f
"insert into
{
dbname
}
.sub1_bound values ( now(), -2147483646, -9223372036854775806, -32766, -126, -3.40E+38, -1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
f
"insert into
{
dbname
}
.sub1_bound values ( now()
+15s
, -2147483646, -9223372036854775806, -32766, -126, -3.40E+38, -1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
)
tdSql
.
execute
(
f
"insert into
{
dbname
}
.sub1_bound values ( now(), 2147483646, 9223372036854775806, 32766, 126, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
f
"insert into
{
dbname
}
.sub1_bound values ( now()
+20s
, 2147483646, 9223372036854775806, 32766, 126, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
)
tdSql
.
error
(
f
"insert into
{
dbname
}
.sub1_bound values ( now()+
1
s, 2147483648, 9223372036854775808, 32768, 128, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
f
"insert into
{
dbname
}
.sub1_bound values ( now()+
5
s, 2147483648, 9223372036854775808, 32768, 128, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
)
#self.check_avg(f"select avg(c1), avg(c2), avg(c3) , avg(c4), avg(c5) ,avg(c6) from {dbname}.sub1_bound " , f" select sum(c1)/count(c1), sum(c2)/count(c2) ,sum(c3)/count(c3), sum(c4)/count(c4), sum(c5)/count(c5) ,sum(c6)/count(c6) from {dbname}.sub1_bound ")
...
...
tests/system-test/2-query/ceil.py
浏览文件 @
37c1971c
...
...
@@ -85,16 +85,11 @@ class TDTestCase:
row_check
.
append
(
elem
)
auto_result
.
append
(
row_check
)
check_status
=
True
tdSql
.
query
(
ceil_query
)
for
row_index
,
row
in
enumerate
(
ceil_result
):
for
col_index
,
elem
in
enumerate
(
row
):
if
auto_result
[
row_index
][
col_index
]
!=
elem
:
check_status
=
False
if
not
check_status
:
tdLog
.
notice
(
"ceil function value has not as expected , sql is
\"
%s
\"
"
%
ceil_query
)
sys
.
exit
(
1
)
else
:
tdLog
.
info
(
"ceil value check pass , it work as expected ,sql is
\"
%s
\"
"
%
ceil_query
)
tdSql
.
checkData
(
row_index
,
col_index
,
auto_result
[
row_index
][
col_index
])
def
test_errors
(
self
,
dbname
=
"db"
):
error_sql_lists
=
[
...
...
@@ -377,10 +372,10 @@ class TDTestCase:
)
tdSql
.
execute
(
f
'create table
{
dbname
}
.sub1_bound using
{
dbname
}
.stb_bound tags ( 1 )'
)
tdSql
.
execute
(
f
"insert into
{
dbname
}
.sub1_bound values ( now()-1s, 2147483647, 9223372036854775807, 32767, 127, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
f
"insert into
{
dbname
}
.sub1_bound values ( now()-1
0
s, 2147483647, 9223372036854775807, 32767, 127, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
)
tdSql
.
execute
(
f
"insert into
{
dbname
}
.sub1_bound values ( now(), 2147483646, 9223372036854775806, 32766, 126, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
f
"insert into
{
dbname
}
.sub1_bound values ( now()
-5s
, 2147483646, 9223372036854775806, 32766, 126, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
)
tdSql
.
execute
(
...
...
@@ -388,15 +383,15 @@ class TDTestCase:
)
tdSql
.
execute
(
f
"insert into
{
dbname
}
.sub1_bound values ( now(), 2147483643, 9223372036854775803, 32763, 123, 3.39E+38, 1.69e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
f
"insert into
{
dbname
}
.sub1_bound values ( now()
+5s
, 2147483643, 9223372036854775803, 32763, 123, 3.39E+38, 1.69e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
)
tdSql
.
execute
(
f
"insert into
{
dbname
}
.sub1_bound values ( now(), -2147483643, -9223372036854775803, -32763, -123, -3.39E+38, -1.69e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
f
"insert into
{
dbname
}
.sub1_bound values ( now()
+10s
, -2147483643, -9223372036854775803, -32763, -123, -3.39E+38, -1.69e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
)
tdSql
.
error
(
f
"insert into
{
dbname
}
.sub1_bound values ( now()+1s, 2147483648, 9223372036854775808, 32768, 128, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
f
"insert into
{
dbname
}
.sub1_bound values ( now()+1
5
s, 2147483648, 9223372036854775808, 32768, 128, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
)
self
.
check_result_auto
(
f
"select c1, c2, c3 , c4, c5 ,c6 from
{
dbname
}
.sub1_bound "
,
f
"select ceil(c1), ceil(c2) ,ceil(c3), ceil(c4), ceil(c5) ,ceil(c6) from
{
dbname
}
.sub1_bound"
)
self
.
check_result_auto
(
f
"select c1, c2, c3 , c3, c2 ,c1 from
{
dbname
}
.sub1_bound "
,
f
"select ceil(c1), ceil(c2) ,ceil(c3), ceil(c3), ceil(c2) ,ceil(c1) from
{
dbname
}
.sub1_bound"
)
...
...
tests/system-test/2-query/cos.py
浏览文件 @
37c1971c
...
...
@@ -84,26 +84,10 @@ class TDTestCase:
row_check
.
append
(
elem
)
auto_result
.
append
(
row_check
)
check_status
=
True
print
(
"========"
,
pow_query
,
origin_query
)
tdSql
.
query
(
pow_query
)
for
row_index
,
row
in
enumerate
(
pow_result
):
for
col_index
,
elem
in
enumerate
(
row
):
if
auto_result
[
row_index
][
col_index
]
==
None
and
elem
:
check_status
=
False
elif
auto_result
[
row_index
][
col_index
]
!=
None
and
((
auto_result
[
row_index
][
col_index
]
!=
elem
)
and
(
str
(
auto_result
[
row_index
][
col_index
])[:
6
]
!=
str
(
elem
)[:
6
]
)):
# elif auto_result[row_index][col_index] != None and (abs(auto_result[row_index][col_index] - elem) > 0.000001):
print
(
"====="
)
print
(
row_index
,
col_index
)
print
(
auto_result
[
row_index
][
col_index
],
elem
,
origin_result
[
row_index
][
col_index
])
check_status
=
False
else
:
pass
if
not
check_status
:
tdLog
.
notice
(
"cos function value has not as expected , sql is
\"
%s
\"
"
%
pow_query
)
sys
.
exit
(
1
)
else
:
tdLog
.
info
(
"cos value check pass , it work as expected ,sql is
\"
%s
\"
"
%
pow_query
)
tdSql
.
checkData
(
row_index
,
col_index
,
auto_result
[
row_index
][
col_index
])
def
test_errors
(
self
,
dbname
=
"db"
):
error_sql_lists
=
[
...
...
@@ -413,16 +397,16 @@ class TDTestCase:
)
tdSql
.
execute
(
f
'create table
{
dbname
}
.sub1_bound using
{
dbname
}
.stb_bound tags ( 1 )'
)
tdSql
.
execute
(
f
"insert into
{
dbname
}
.sub1_bound values ( now()-1s, 2147483647, 9223372036854775807, 32767, 127, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
f
"insert into
{
dbname
}
.sub1_bound values ( now()-1
0
s, 2147483647, 9223372036854775807, 32767, 127, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
)
tdSql
.
execute
(
f
"insert into
{
dbname
}
.sub1_bound values ( now()-
1
s, -2147483647, -9223372036854775807, -32767, -127, -3.40E+38, -1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
f
"insert into
{
dbname
}
.sub1_bound values ( now()-
5
s, -2147483647, -9223372036854775807, -32767, -127, -3.40E+38, -1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
)
tdSql
.
execute
(
f
"insert into
{
dbname
}
.sub1_bound values ( now(), 2147483646, 9223372036854775806, 32766, 126, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
)
tdSql
.
execute
(
f
"insert into
{
dbname
}
.sub1_bound values ( now(), -2147483646, -9223372036854775806, -32766, -126, -3.40E+38, -1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
f
"insert into
{
dbname
}
.sub1_bound values ( now()
+5s
, -2147483646, -9223372036854775806, -32766, -126, -3.40E+38, -1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
)
# self.check_result_auto_cos( f"select abs(c1), abs(c2), abs(c3) , abs(c4), abs(c5) from {dbname}.sub1_bound ", f"select cos(abs(c1)), cos(abs(c2)) ,cos(abs(c3)), cos(abs(c4)), cos(abs(c5)) from {dbname}.sub1_bound")
...
...
tests/system-test/2-query/floor.py
浏览文件 @
37c1971c
...
...
@@ -85,16 +85,11 @@ class TDTestCase:
row_check
.
append
(
elem
)
auto_result
.
append
(
row_check
)
check_status
=
True
tdSql
.
query
(
floor_query
)
for
row_index
,
row
in
enumerate
(
floor_result
):
for
col_index
,
elem
in
enumerate
(
row
):
if
auto_result
[
row_index
][
col_index
]
!=
elem
:
check_status
=
False
if
not
check_status
:
tdLog
.
notice
(
"floor function value has not as expected , sql is
\"
%s
\"
"
%
floor_query
)
sys
.
exit
(
1
)
else
:
tdLog
.
info
(
"floor value check pass , it work as expected ,sql is
\"
%s
\"
"
%
floor_query
)
tdSql
.
checkData
(
row_index
,
col_index
,
auto_result
[
row_index
][
col_index
])
def
test_errors
(
self
,
dbname
=
DBNAME
):
error_sql_lists
=
[
...
...
@@ -388,10 +383,10 @@ class TDTestCase:
)
tdSql
.
execute
(
f
'create table
{
dbname
}
.sub1_bound using
{
dbname
}
.stb_bound tags ( 1 )'
)
tdSql
.
execute
(
f
"insert into
{
dbname
}
.sub1_bound values ( now()-1s, 2147483647, 9223372036854775807, 32767, 127, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
f
"insert into
{
dbname
}
.sub1_bound values ( now()-1
0
s, 2147483647, 9223372036854775807, 32767, 127, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
)
tdSql
.
execute
(
f
"insert into
{
dbname
}
.sub1_bound values ( now(), 2147483646, 9223372036854775806, 32766, 126, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
f
"insert into
{
dbname
}
.sub1_bound values ( now()
-5s
, 2147483646, 9223372036854775806, 32766, 126, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
)
tdSql
.
execute
(
...
...
@@ -399,15 +394,15 @@ class TDTestCase:
)
tdSql
.
execute
(
f
"insert into
{
dbname
}
.sub1_bound values ( now(), 2147483643, 9223372036854775803, 32763, 123, 3.39E+38, 1.69e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
f
"insert into
{
dbname
}
.sub1_bound values ( now()
+5s
, 2147483643, 9223372036854775803, 32763, 123, 3.39E+38, 1.69e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
)
tdSql
.
execute
(
f
"insert into
{
dbname
}
.sub1_bound values ( now(), -2147483643, -9223372036854775803, -32763, -123, -3.39E+38, -1.69e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
f
"insert into
{
dbname
}
.sub1_bound values ( now()
+10s
, -2147483643, -9223372036854775803, -32763, -123, -3.39E+38, -1.69e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
)
tdSql
.
error
(
f
"insert into
{
dbname
}
.sub1_bound values ( now()+1s, 2147483648, 9223372036854775808, 32768, 128, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
f
"insert into
{
dbname
}
.sub1_bound values ( now()+1
5
s, 2147483648, 9223372036854775808, 32768, 128, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
)
self
.
check_result_auto
(
f
"select c1, c2, c3 , c4, c5 ,c6 from
{
dbname
}
.sub1_bound "
,
f
"select floor(c1), floor(c2) ,floor(c3), floor(c4), floor(c5) ,floor(c6) from
{
dbname
}
.sub1_bound"
)
self
.
check_result_auto
(
f
"select c1, c2, c3 , c3, c2 ,c1 from
{
dbname
}
.sub1_bound "
,
f
"select floor(c1), floor(c2) ,floor(c3), floor(c3), floor(c2) ,floor(c1) from
{
dbname
}
.sub1_bound"
)
...
...
tests/system-test/2-query/function_stateduration.py
浏览文件 @
37c1971c
...
...
@@ -364,10 +364,10 @@ class TDTestCase:
)
tdSql
.
execute
(
f
'create table
{
dbname
}
.sub1_bound using
{
dbname
}
.stb_bound tags ( 1 )'
)
tdSql
.
execute
(
f
"insert into
{
dbname
}
.sub1_bound values ( now()-1s, 2147483647, 9223372036854775807, 32767, 127, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
f
"insert into
{
dbname
}
.sub1_bound values ( now()-1
0
s, 2147483647, 9223372036854775807, 32767, 127, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
)
tdSql
.
execute
(
f
"insert into
{
dbname
}
.sub1_bound values ( now(), 2147483646, 9223372036854775806, 32766, 126, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
f
"insert into
{
dbname
}
.sub1_bound values ( now()
-5s
, 2147483646, 9223372036854775806, 32766, 126, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
)
tdSql
.
execute
(
...
...
@@ -375,15 +375,15 @@ class TDTestCase:
)
tdSql
.
execute
(
f
"insert into
{
dbname
}
.sub1_bound values ( now(), 2147483643, 9223372036854775803, 32763, 123, 3.39E+38, 1.69e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
f
"insert into
{
dbname
}
.sub1_bound values ( now()
+5s
, 2147483643, 9223372036854775803, 32763, 123, 3.39E+38, 1.69e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
)
tdSql
.
execute
(
f
"insert into
{
dbname
}
.sub1_bound values ( now(), -2147483643, -9223372036854775803, -32763, -123, -3.39E+38, -1.69e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
f
"insert into
{
dbname
}
.sub1_bound values ( now()
+10s
, -2147483643, -9223372036854775803, -32763, -123, -3.39E+38, -1.69e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
)
tdSql
.
error
(
f
"insert into
{
dbname
}
.sub1_bound values ( now()+1s, 2147483648, 9223372036854775808, 32768, 128, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
f
"insert into
{
dbname
}
.sub1_bound values ( now()+1
5
s, 2147483648, 9223372036854775808, 32768, 128, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
)
tdSql
.
query
(
f
"select stateduration(c1,'GT',1,1s) from
{
dbname
}
.sub1_bound"
)
...
...
tests/system-test/2-query/last_row.py
浏览文件 @
37c1971c
...
...
@@ -572,19 +572,19 @@ class TDTestCase:
)
tdSql
.
execute
(
f
'create table
{
dbname
}
.sub1_bound using
{
dbname
}
.stb_bound tags ( 1 )'
)
tdSql
.
execute
(
f
"insert into
{
dbname
}
.sub1_bound values ( now()-1s, 2147483647, 9223372036854775807, 32767, 127, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
f
"insert into
{
dbname
}
.sub1_bound values ( now()-1
0
s, 2147483647, 9223372036854775807, 32767, 127, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
)
tdSql
.
execute
(
f
"insert into
{
dbname
}
.sub1_bound values ( now()-
1
s, -2147483647, -9223372036854775807, -32767, -127, -3.40E+38, -1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
f
"insert into
{
dbname
}
.sub1_bound values ( now()-
5
s, -2147483647, -9223372036854775807, -32767, -127, -3.40E+38, -1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
)
tdSql
.
execute
(
f
"insert into
{
dbname
}
.sub1_bound values ( now(), 2147483646, 9223372036854775806, 32766, 126, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
)
tdSql
.
execute
(
f
"insert into
{
dbname
}
.sub1_bound values ( now(), -2147483646, -9223372036854775806, -32766, -126, -3.40E+38, -1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
f
"insert into
{
dbname
}
.sub1_bound values ( now()
+5s
, -2147483646, -9223372036854775806, -32766, -126, -3.40E+38, -1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
)
tdSql
.
error
(
f
"insert into
{
dbname
}
.sub1_bound values ( now()+1s, 2147483648, 9223372036854775808, 32768, 128, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
f
"insert into
{
dbname
}
.sub1_bound values ( now()+1
0
s, 2147483648, 9223372036854775808, 32768, 128, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
)
# check basic elem for table per row
...
...
tests/system-test/2-query/log.py
浏览文件 @
37c1971c
...
...
@@ -91,7 +91,6 @@ class TDTestCase:
elem
=
math
.
log
(
elem
,
base
)
elif
elem
<=
0
:
elem
=
None
row_check
.
append
(
elem
)
auto_result
.
append
(
row_check
)
...
...
@@ -519,19 +518,19 @@ class TDTestCase:
)
tdSql
.
execute
(
f
'create table
{
dbname
}
.sub1_bound using
{
dbname
}
.stb_bound tags ( 1 )'
)
tdSql
.
execute
(
f
"insert into
{
dbname
}
.sub1_bound values ( now()-1s, 2147483647, 9223372036854775807, 32767, 127, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
f
"insert into
{
dbname
}
.sub1_bound values ( now()-1
0
s, 2147483647, 9223372036854775807, 32767, 127, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
)
tdSql
.
execute
(
f
"insert into
{
dbname
}
.sub1_bound values ( now()-
1
s, -2147483647, -9223372036854775807, -32767, -127, -3.40E+38, -1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
f
"insert into
{
dbname
}
.sub1_bound values ( now()-
5
s, -2147483647, -9223372036854775807, -32767, -127, -3.40E+38, -1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
)
tdSql
.
execute
(
f
"insert into
{
dbname
}
.sub1_bound values ( now(), 2147483646, 9223372036854775806, 32766, 126, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
)
tdSql
.
execute
(
f
"insert into
{
dbname
}
.sub1_bound values ( now(), -2147483646, -9223372036854775806, -32766, -126, -3.40E+38, -1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
f
"insert into
{
dbname
}
.sub1_bound values ( now()
+5s
, -2147483646, -9223372036854775806, -32766, -126, -3.40E+38, -1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
)
tdSql
.
error
(
f
"insert into
{
dbname
}
.sub1_bound values ( now()+1s, 2147483648, 9223372036854775808, 32768, 128, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
f
"insert into
{
dbname
}
.sub1_bound values ( now()+1
0
s, 2147483648, 9223372036854775808, 32768, 128, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
)
self
.
check_result_auto_log
(
None
,
f
"select c1, c2, c3 , c4, c5 ,c6 from
{
dbname
}
.sub1_bound "
,
f
"select log(c1), log(c2) ,log(c3), log(c4), log(c5) ,log(c6) from
{
dbname
}
.sub1_bound"
)
self
.
check_result_auto_log
(
2
,
f
"select c1, c2, c3 , c4, c5 ,c6 from
{
dbname
}
.sub1_bound "
,
f
"select log(c1,2), log(c2,2) ,log(c3,2), log(c4,2), log(c5,2) ,log(c6,2) from
{
dbname
}
.sub1_bound"
)
...
...
tests/system-test/2-query/pow.py
浏览文件 @
37c1971c
...
...
@@ -507,19 +507,19 @@ class TDTestCase:
)
tdSql
.
execute
(
f
'create table
{
dbname
}
.sub1_bound using
{
dbname
}
.stb_bound tags ( 1 )'
)
tdSql
.
execute
(
f
"insert into
{
dbname
}
.sub1_bound values ( now()-1s, 2147483647, 9223372036854775807, 32767, 127, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
f
"insert into
{
dbname
}
.sub1_bound values ( now()-1
0
s, 2147483647, 9223372036854775807, 32767, 127, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
)
tdSql
.
execute
(
f
"insert into
{
dbname
}
.sub1_bound values ( now()-
1
s, -2147483647, -9223372036854775807, -32767, -127, -3.40E+38, -1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
f
"insert into
{
dbname
}
.sub1_bound values ( now()-
5
s, -2147483647, -9223372036854775807, -32767, -127, -3.40E+38, -1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
)
tdSql
.
execute
(
f
"insert into
{
dbname
}
.sub1_bound values ( now(), 2147483646, 9223372036854775806, 32766, 126, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
)
tdSql
.
execute
(
f
"insert into
{
dbname
}
.sub1_bound values ( now(), -2147483646, -9223372036854775806, -32766, -126, -3.40E+38, -1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
f
"insert into
{
dbname
}
.sub1_bound values ( now()
+5s
, -2147483646, -9223372036854775806, -32766, -126, -3.40E+38, -1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
)
tdSql
.
error
(
f
"insert into
{
dbname
}
.sub1_bound values ( now()+1s, 2147483648, 9223372036854775808, 32768, 128, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
f
"insert into
{
dbname
}
.sub1_bound values ( now()+1
0
s, 2147483648, 9223372036854775808, 32768, 128, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
)
self
.
check_result_auto_pow
(
2
,
f
"select c1, c3 , c4, c5 from
{
dbname
}
.sub1_bound "
,
f
"select pow(c1,2), pow(c3,2), pow(c4,2), pow(c5,2) from
{
dbname
}
.sub1_bound"
)
self
.
check_result_auto_pow
(
3
,
f
"select c1, c3 , c4, c5 from
{
dbname
}
.sub1_bound "
,
f
"select pow(c1,3), pow(c3,3), pow(c4,3), pow(c5,3) from
{
dbname
}
.sub1_bound"
)
...
...
tests/system-test/2-query/round.py
浏览文件 @
37c1971c
...
...
@@ -81,16 +81,12 @@ class TDTestCase:
row_check
.
append
(
elem
)
auto_result
.
append
(
row_check
)
check_status
=
True
tdSql
.
query
(
round_query
)
for
row_index
,
row
in
enumerate
(
round_result
):
for
col_index
,
elem
in
enumerate
(
row
):
if
auto_result
[
row_index
][
col_index
]
!=
elem
:
check_status
=
False
if
not
check_status
:
tdLog
.
notice
(
"round function value has not as expected , sql is
\"
%s
\"
"
%
round_query
)
sys
.
exit
(
1
)
else
:
tdLog
.
info
(
"round value check pass , it work as expected ,sql is
\"
%s
\"
"
%
round_query
)
tdSql
.
checkData
(
row_index
,
col_index
,
auto_result
[
row_index
][
col_index
])
def
test_errors
(
self
,
dbname
=
"db"
):
error_sql_lists
=
[
...
...
@@ -388,10 +384,10 @@ class TDTestCase:
)
tdSql
.
execute
(
f
'create table
{
dbname
}
.sub1_bound using
{
dbname
}
.stb_bound tags ( 1 )'
)
tdSql
.
execute
(
f
"insert into
{
dbname
}
.sub1_bound values ( now()-1s, 2147483647, 9223372036854775807, 32767, 127, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
f
"insert into
{
dbname
}
.sub1_bound values ( now()-1
0
s, 2147483647, 9223372036854775807, 32767, 127, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
)
tdSql
.
execute
(
f
"insert into
{
dbname
}
.sub1_bound values ( now(), 2147483646, 9223372036854775806, 32766, 126, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
f
"insert into
{
dbname
}
.sub1_bound values ( now()
-5s
, 2147483646, 9223372036854775806, 32766, 126, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
)
tdSql
.
execute
(
...
...
@@ -399,15 +395,15 @@ class TDTestCase:
)
tdSql
.
execute
(
f
"insert into
{
dbname
}
.sub1_bound values ( now(), 2147483643, 9223372036854775803, 32763, 123, 3.39E+38, 1.69e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
f
"insert into
{
dbname
}
.sub1_bound values ( now()
+5s
, 2147483643, 9223372036854775803, 32763, 123, 3.39E+38, 1.69e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
)
tdSql
.
execute
(
f
"insert into
{
dbname
}
.sub1_bound values ( now(), -2147483643, -9223372036854775803, -32763, -123, -3.39E+38, -1.69e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
f
"insert into
{
dbname
}
.sub1_bound values ( now()
+10s
, -2147483643, -9223372036854775803, -32763, -123, -3.39E+38, -1.69e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
)
tdSql
.
error
(
f
"insert into
{
dbname
}
.sub1_bound values ( now()+1s, 2147483648, 9223372036854775808, 32768, 128, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
f
"insert into
{
dbname
}
.sub1_bound values ( now()+1
5
s, 2147483648, 9223372036854775808, 32768, 128, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
)
self
.
check_result_auto
(
f
"select c1, c2, c3 , c4, c5 ,c6 from
{
dbname
}
.sub1_bound "
,
f
"select round(c1), round(c2) ,round(c3), round(c4), round(c5) ,round(c6) from
{
dbname
}
.sub1_bound"
)
self
.
check_result_auto
(
f
"select c1, c2, c3 , c3, c2 ,c1 from
{
dbname
}
.sub1_bound "
,
f
"select round(c1), round(c2) ,round(c3), round(c3), round(c2) ,round(c1) from
{
dbname
}
.sub1_bound"
)
...
...
tests/system-test/2-query/sin.py
浏览文件 @
37c1971c
...
...
@@ -394,19 +394,19 @@ class TDTestCase:
)
tdSql
.
execute
(
f
'create table
{
dbname
}
.sub1_bound using
{
dbname
}
.stb_bound tags ( 1 )'
)
tdSql
.
execute
(
f
"insert into
{
dbname
}
.sub1_bound values ( now()-1s, 2147483647, 9223372036854775807, 32767, 127, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
f
"insert into
{
dbname
}
.sub1_bound values ( now()-1
0
s, 2147483647, 9223372036854775807, 32767, 127, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
)
tdSql
.
execute
(
f
"insert into
{
dbname
}
.sub1_bound values ( now()-
1
s, -2147483647, -9223372036854775807, -32767, -127, -3.40E+38, -1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
f
"insert into
{
dbname
}
.sub1_bound values ( now()-
5
s, -2147483647, -9223372036854775807, -32767, -127, -3.40E+38, -1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
)
tdSql
.
execute
(
f
"insert into
{
dbname
}
.sub1_bound values ( now(), 2147483646, 9223372036854775806, 32766, 126, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
)
tdSql
.
execute
(
f
"insert into
{
dbname
}
.sub1_bound values ( now(), -2147483646, -9223372036854775806, -32766, -126, -3.40E+38, -1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
f
"insert into
{
dbname
}
.sub1_bound values ( now()
+5s
, -2147483646, -9223372036854775806, -32766, -126, -3.40E+38, -1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
)
tdSql
.
error
(
f
"insert into
{
dbname
}
.sub1_bound values ( now()+1s, 2147483648, 9223372036854775808, 32768, 128, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
f
"insert into
{
dbname
}
.sub1_bound values ( now()+1
0
s, 2147483648, 9223372036854775808, 32768, 128, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
)
self
.
check_result_auto_sin
(
f
"select abs(c1), abs(c2), abs(c3) , abs(c4) from
{
dbname
}
.sub1_bound "
,
f
"select sin(abs(c1)), sin(abs(c2)) ,sin(abs(c3)), sin(abs(c4)) from
{
dbname
}
.sub1_bound"
)
...
...
tests/system-test/2-query/sqrt.py
浏览文件 @
37c1971c
...
...
@@ -443,19 +443,19 @@ class TDTestCase:
)
tdSql
.
execute
(
f
'create table
{
dbname
}
.sub1_bound using
{
dbname
}
.stb_bound tags ( 1 )'
)
tdSql
.
execute
(
f
"insert into
{
dbname
}
.sub1_bound values ( now()-1s, 2147483647, 9223372036854775807, 32767, 127, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
f
"insert into
{
dbname
}
.sub1_bound values ( now()-1
0
s, 2147483647, 9223372036854775807, 32767, 127, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
)
tdSql
.
execute
(
f
"insert into
{
dbname
}
.sub1_bound values ( now()-
1
s, -2147483647, -9223372036854775807, -32767, -127, -3.40E+38, -1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
f
"insert into
{
dbname
}
.sub1_bound values ( now()-
5
s, -2147483647, -9223372036854775807, -32767, -127, -3.40E+38, -1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
)
tdSql
.
execute
(
f
"insert into
{
dbname
}
.sub1_bound values ( now(), 2147483646, 9223372036854775806, 32766, 126, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
)
tdSql
.
execute
(
f
"insert into
{
dbname
}
.sub1_bound values ( now(), -2147483646, -9223372036854775806, -32766, -126, -3.40E+38, -1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
f
"insert into
{
dbname
}
.sub1_bound values ( now()
+5s
, -2147483646, -9223372036854775806, -32766, -126, -3.40E+38, -1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
)
tdSql
.
error
(
f
"insert into
{
dbname
}
.sub1_bound values ( now()+1s, 2147483648, 9223372036854775808, 32768, 128, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
f
"insert into
{
dbname
}
.sub1_bound values ( now()+1
0
s, 2147483648, 9223372036854775808, 32768, 128, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
)
self
.
check_result_auto_sqrt
(
f
"select abs(c1), abs(c2), abs(c3) , abs(c4), abs(c5) from
{
dbname
}
.sub1_bound "
,
f
"select sqrt(abs(c1)), sqrt(abs(c2)) ,sqrt(abs(c3)), sqrt(abs(c4)), sqrt(abs(c5)) from
{
dbname
}
.sub1_bound"
)
...
...
tests/system-test/2-query/statecount.py
浏览文件 @
37c1971c
...
...
@@ -451,10 +451,10 @@ class TDTestCase:
)
tdSql
.
execute
(
f
'create table
{
dbname
}
.sub1_bound using
{
dbname
}
.stb_bound tags ( 1 )'
)
tdSql
.
execute
(
f
"insert into
{
dbname
}
.sub1_bound values ( now()-1s, 2147483647, 9223372036854775807, 32767, 127, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
f
"insert into
{
dbname
}
.sub1_bound values ( now()-1
0
s, 2147483647, 9223372036854775807, 32767, 127, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
)
tdSql
.
execute
(
f
"insert into
{
dbname
}
.sub1_bound values ( now(), 2147483646, 9223372036854775806, 32766, 126, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
f
"insert into
{
dbname
}
.sub1_bound values ( now()
-5s
, 2147483646, 9223372036854775806, 32766, 126, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
)
tdSql
.
execute
(
...
...
@@ -462,15 +462,15 @@ class TDTestCase:
)
tdSql
.
execute
(
f
"insert into
{
dbname
}
.sub1_bound values ( now(), 2147483643, 9223372036854775803, 32763, 123, 3.39E+38, 1.69e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
f
"insert into
{
dbname
}
.sub1_bound values ( now()
+5s
, 2147483643, 9223372036854775803, 32763, 123, 3.39E+38, 1.69e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
)
tdSql
.
execute
(
f
"insert into
{
dbname
}
.sub1_bound values ( now(), -2147483643, -9223372036854775803, -32763, -123, -3.39E+38, -1.69e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
f
"insert into
{
dbname
}
.sub1_bound values ( now()
+10s
, -2147483643, -9223372036854775803, -32763, -123, -3.39E+38, -1.69e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
)
tdSql
.
error
(
f
"insert into
{
dbname
}
.sub1_bound values ( now()+1s, 2147483648, 9223372036854775808, 32768, 128, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
f
"insert into
{
dbname
}
.sub1_bound values ( now()+1
5
s, 2147483648, 9223372036854775808, 32768, 128, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
)
tdSql
.
query
(
f
"select statecount(c1,'GT',1) from
{
dbname
}
.sub1_bound"
)
...
...
tests/system-test/2-query/tail.py
浏览文件 @
37c1971c
...
...
@@ -421,10 +421,10 @@ class TDTestCase:
)
tdSql
.
execute
(
f
'create table
{
dbname
}
.sub1_bound using
{
dbname
}
.stb_bound tags ( 1 )'
)
tdSql
.
execute
(
f
"insert into
{
dbname
}
.sub1_bound values ( now()-1s, 2147483647, 9223372036854775807, 32767, 127, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
f
"insert into
{
dbname
}
.sub1_bound values ( now()-1
0
s, 2147483647, 9223372036854775807, 32767, 127, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
)
tdSql
.
execute
(
f
"insert into
{
dbname
}
.sub1_bound values ( now(), 2147483646, 9223372036854775806, 32766, 126, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
f
"insert into
{
dbname
}
.sub1_bound values ( now()
-5s
, 2147483646, 9223372036854775806, 32766, 126, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
)
tdSql
.
execute
(
...
...
@@ -432,20 +432,20 @@ class TDTestCase:
)
tdSql
.
execute
(
f
"insert into
{
dbname
}
.sub1_bound values ( now(), 2147483643, 9223372036854775803, 32763, 123, 3.39E+38, 1.69e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
f
"insert into
{
dbname
}
.sub1_bound values ( now()
+5s
, 2147483643, 9223372036854775803, 32763, 123, 3.39E+38, 1.69e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
)
tdSql
.
execute
(
f
"insert into
{
dbname
}
.sub1_bound values ( now(), -2147483643, -9223372036854775803, -32763, -123, -3.39E+38, -1.69e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
f
"insert into
{
dbname
}
.sub1_bound values ( now()
+10s
, -2147483643, -9223372036854775803, -32763, -123, -3.39E+38, -1.69e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
)
tdSql
.
error
(
f
"insert into
{
dbname
}
.sub1_bound values ( now()+1s, 2147483648, 9223372036854775808, 32768, 128, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
f
"insert into
{
dbname
}
.sub1_bound values ( now()+1
5
s, 2147483648, 9223372036854775808, 32768, 128, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
)
tdSql
.
query
(
f
"select tail(c2,
2
) from
{
dbname
}
.sub1_bound order by 1 desc"
)
tdSql
.
checkRows
(
2
)
tdSql
.
checkData
(
0
,
0
,
9223372036854775803
)
tdSql
.
query
(
f
"select tail(c2,
1
) from
{
dbname
}
.sub1_bound order by 1 desc"
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
0
,
-
9223372036854775803
)
def
run
(
self
):
# sourcery skip: extract-duplicate-method, remove-redundant-fstring
tdSql
.
prepare
()
...
...
tests/system-test/2-query/tan.py
浏览文件 @
37c1971c
...
...
@@ -391,19 +391,19 @@ class TDTestCase:
)
tdSql
.
execute
(
f
'create table
{
dbname
}
.sub1_bound using
{
dbname
}
.stb_bound tags ( 1 )'
)
tdSql
.
execute
(
f
"insert into
{
dbname
}
.sub1_bound values ( now()-1s, 2147483647, 9223372036854775807, 32767, 127, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
f
"insert into
{
dbname
}
.sub1_bound values ( now()-1
0
s, 2147483647, 9223372036854775807, 32767, 127, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
)
tdSql
.
execute
(
f
"insert into
{
dbname
}
.sub1_bound values ( now()-
1
s, -2147483647, -9223372036854775807, -32767, -127, -3.40E+38, -1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
f
"insert into
{
dbname
}
.sub1_bound values ( now()-
5
s, -2147483647, -9223372036854775807, -32767, -127, -3.40E+38, -1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
)
tdSql
.
execute
(
f
"insert into
{
dbname
}
.sub1_bound values ( now(), 2147483646, 9223372036854775806, 32766, 126, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
)
tdSql
.
execute
(
f
"insert into
{
dbname
}
.sub1_bound values ( now(), -2147483646, -9223372036854775806, -32766, -126, -3.40E+38, -1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
f
"insert into
{
dbname
}
.sub1_bound values ( now()
+5s
, -2147483646, -9223372036854775806, -32766, -126, -3.40E+38, -1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
)
tdSql
.
error
(
f
"insert into
{
dbname
}
.sub1_bound values ( now()+1s, 2147483648, 9223372036854775808, 32768, 128, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
f
"insert into
{
dbname
}
.sub1_bound values ( now()+1
0
s, 2147483648, 9223372036854775808, 32768, 128, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
)
self
.
check_result_auto_tan
(
f
"select abs(c1), abs(c2), abs(c3) , abs(c4) from
{
dbname
}
.sub1_bound "
,
f
"select tan(abs(c1)), tan(abs(c2)) ,tan(abs(c3)), tan(abs(c4)) from
{
dbname
}
.sub1_bound"
)
...
...
tests/system-test/2-query/txt.txt
0 → 100644
浏览文件 @
37c1971c
abs.py: def check_boundary_values(self):
abs.py: self.check_boundary_values()
and_or_for_byte.py: def check_boundary_values(self, dbname="bound_test"):
and_or_for_byte.py: self.check_boundary_values()
arccos.py: def check_boundary_values(self, dbname="bound_test"):
arccos.py: self.check_boundary_values()
arcsin.py: def check_boundary_values(self, dbname="bound_test"):
arcsin.py: self.check_boundary_values()
arctan.py: def check_boundary_values(self, dbname="bound_test"):
arctan.py: self.check_boundary_values()
avg.py: def check_boundary_values(self, dbname="bound_test"):
avg.py: self.check_boundary_values()
ceil.py: def check_boundary_values(self, dbname="bound_test"):
ceil.py: self.check_boundary_values()
cos.py: def check_boundary_values(self, dbname="bound_test"):
cos.py: self.check_boundary_values()
floor.py: def check_boundary_values(self, dbname="bound_test"):
floor.py: self.check_boundary_values()
function_stateduration.py: def check_boundary_values(self, dbname="bound_test"):
function_stateduration.py: self.check_boundary_values()
last_row.py: def check_boundary_values(self, dbname="bound_test"):
last_row.py: self.check_boundary_values()
log.py: def check_boundary_values(self, dbname="bound_test"):
log.py: self.check_boundary_values()
pow.py: def check_boundary_values(self, dbname="bound_test"):
pow.py: self.check_boundary_values()
round.py: def check_boundary_values(self, dbname="bound_test"):
round.py: self.check_boundary_values()
sin.py: def check_boundary_values(self, dbname="testdb"):
sin.py: self.check_boundary_values()
sqrt.py: def check_boundary_values(self, dbname="bound_test"):
sqrt.py: self.check_boundary_values()
statecount.py: def check_boundary_values(self, dbname="bound_test"):
statecount.py: self.check_boundary_values()
tail.py: def check_boundary_values(self, dbname="bound_test"):
tail.py: self.check_boundary_values()
tan.py: def check_boundary_values(self, dbname="bound_test"):
tan.py: self.check_boundary_values()
unique.py: def check_boundary_values(self, dbname="bound_test"):
unique.py: self.check_boundary_values()
tests/system-test/2-query/unique.py
浏览文件 @
37c1971c
...
...
@@ -451,26 +451,26 @@ class TDTestCase:
)
tdSql
.
execute
(
f
'create table
{
dbname
}
.sub1_bound using
{
dbname
}
.stb_bound tags ( 1 )'
)
tdSql
.
execute
(
f
"insert into
{
dbname
}
.sub1_bound values ( now()-1s, 2147483647, 9223372036854775807, 32767, 127, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
f
"insert into
{
dbname
}
.sub1_bound values ( now()-1
0
s, 2147483647, 9223372036854775807, 32767, 127, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
)
tdSql
.
execute
(
f
"insert into
{
dbname
}
.sub1_bound values ( now(), 2147483646, 9223372036854775806, 32766, 126, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
f
"insert into
{
dbname
}
.sub1_bound values ( now()
-5s
, 2147483646, 9223372036854775806, 32766, 126, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
)
tdSql
.
execute
(
f
"insert into
{
dbname
}
.sub1_bound values ( now()+
1
s, -2147483646, -9223372036854775806, -32766, -126, -3.40E+38, -1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
f
"insert into
{
dbname
}
.sub1_bound values ( now()+
5
s, -2147483646, -9223372036854775806, -32766, -126, -3.40E+38, -1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
)
tdSql
.
execute
(
f
"insert into
{
dbname
}
.sub1_bound values ( now()+
2
s, 2147483643, 9223372036854775803, 32763, 123, 3.39E+38, 1.69e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
f
"insert into
{
dbname
}
.sub1_bound values ( now()+
10
s, 2147483643, 9223372036854775803, 32763, 123, 3.39E+38, 1.69e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
)
tdSql
.
execute
(
f
"insert into
{
dbname
}
.sub1_bound values ( now()+
3
s, -2147483643, -9223372036854775803, -32763, -123, -3.39E+38, -1.69e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
f
"insert into
{
dbname
}
.sub1_bound values ( now()+
20
s, -2147483643, -9223372036854775803, -32763, -123, -3.39E+38, -1.69e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
)
tdSql
.
error
(
f
"insert into
{
dbname
}
.sub1_bound values ( now()+
1
s, 2147483648, 9223372036854775808, 32768, 128, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
f
"insert into
{
dbname
}
.sub1_bound values ( now()+
30
s, 2147483648, 9223372036854775808, 32768, 128, 3.40E+38, 1.7e+308, True, 'binary_tb1', 'nchar_tb1', now() )"
)
tdSql
.
query
(
f
"select unique(c2) from
{
dbname
}
.sub1_bound order by 1 desc"
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录