Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
53e3b2e5
T
TDengine
项目概览
taosdata
/
TDengine
大约 1 年 前同步成功
通知
1184
Star
22015
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
53e3b2e5
编写于
8月 18, 2022
作者:
C
cpwu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix case, add case support rest api
上级
1c4f8621
变更
7
展开全部
显示空白变更内容
内联
并排
Showing
7 changed file
with
733 addition
and
774 deletion
+733
-774
tests/pytest/util/sql.py
tests/pytest/util/sql.py
+3
-17
tests/system-test/2-query/statecount.py
tests/system-test/2-query/statecount.py
+203
-211
tests/system-test/2-query/substr.py
tests/system-test/2-query/substr.py
+21
-25
tests/system-test/2-query/sum.py
tests/system-test/2-query/sum.py
+30
-35
tests/system-test/2-query/tail.py
tests/system-test/2-query/tail.py
+240
-246
tests/system-test/2-query/tan.py
tests/system-test/2-query/tan.py
+224
-235
tests/system-test/fulltest.sh
tests/system-test/fulltest.sh
+12
-5
未找到文件。
tests/pytest/util/sql.py
浏览文件 @
53e3b2e5
...
...
@@ -254,21 +254,7 @@ class TDSql:
args
=
(
caller
.
filename
,
caller
.
lineno
,
self
.
sql
,
row
,
col
,
self
.
queryResult
[
row
][
col
],
data
)
tdLog
.
exit
(
"%s(%d) failed: sql:%s row:%d col:%d data:%s != expect:%s"
%
args
)
if
data
is
None
:
tdLog
.
info
(
"sql:%s, row:%d col:%d data:%s == expect:%s"
%
(
self
.
sql
,
row
,
col
,
self
.
queryResult
[
row
][
col
],
data
))
elif
isinstance
(
data
,
str
):
tdLog
.
info
(
"sql:%s, row:%d col:%d data:%s == expect:%s"
%
(
self
.
sql
,
row
,
col
,
self
.
queryResult
[
row
][
col
],
data
))
elif
isinstance
(
data
,
datetime
.
date
):
tdLog
.
info
(
"sql:%s, row:%d col:%d data:%s == expect:%s"
%
(
self
.
sql
,
row
,
col
,
self
.
queryResult
[
row
][
col
],
data
))
elif
isinstance
(
data
,
float
):
tdLog
.
info
(
"sql:%s, row:%d col:%d data:%s == expect:%s"
%
(
self
.
sql
,
row
,
col
,
self
.
queryResult
[
row
][
col
],
data
))
else
:
tdLog
.
info
(
"sql:%s, row:%d col:%d data:%s == expect:%d"
%
(
self
.
sql
,
row
,
col
,
self
.
queryResult
[
row
][
col
],
data
))
tdLog
.
info
(
f
"sql:
{
self
.
sql
}
, row:
{
row
}
col:
{
col
}
data:
{
self
.
queryResult
[
row
][
col
]
}
== expect:
{
data
}
"
)
def
getData
(
self
,
row
,
col
):
self
.
checkRowCol
(
row
,
col
)
...
...
tests/system-test/2-query/statecount.py
浏览文件 @
53e3b2e5
此差异已折叠。
点击以展开。
tests/system-test/2-query/substr.py
浏览文件 @
53e3b2e5
...
...
@@ -127,16 +127,16 @@ class TDTestCase:
return
sqls
def
__test_current
(
self
):
# sourcery skip: use-itertools-product
def
__test_current
(
self
,
dbname
=
"db"
):
# sourcery skip: use-itertools-product
tdLog
.
printNoPrefix
(
"==========current sql condition check , must return query ok=========="
)
tbname
=
[
"ct1"
,
"ct2"
,
"ct4"
,
"t1"
,
"
stb1"
]
tbname
=
[
f
"
{
dbname
}
.ct1"
,
f
"
{
dbname
}
.ct2"
,
f
"
{
dbname
}
.ct4"
,
f
"
{
dbname
}
.t1"
,
f
"
{
dbname
}
.
stb1"
]
for
tb
in
tbname
:
self
.
__substr_check
(
tb
,
CURRENT_POS
,
LENS
)
tdLog
.
printNoPrefix
(
f
"==========current sql condition check in
{
tb
}
over=========="
)
def
__test_error
(
self
):
def
__test_error
(
self
,
dbname
=
"db"
):
tdLog
.
printNoPrefix
(
"==========err sql condition check , must return error=========="
)
tbname
=
[
"ct1"
,
"ct2"
,
"ct4"
,
"t1"
,
"
stb1"
]
tbname
=
[
f
"
{
dbname
}
.ct1"
,
f
"
{
dbname
}
.ct2"
,
f
"
{
dbname
}
.ct4"
,
f
"
{
dbname
}
.t1"
,
f
"
{
dbname
}
.
stb1"
]
for
tb
in
tbname
:
for
errsql
in
self
.
__substr_err_check
(
tb
):
...
...
@@ -145,22 +145,21 @@ class TDTestCase:
tdLog
.
printNoPrefix
(
f
"==========err sql condition check in
{
tb
}
over=========="
)
def
all_test
(
self
):
self
.
__test_current
()
self
.
__test_error
()
def
all_test
(
self
,
dbname
=
"db"
):
self
.
__test_current
(
dbname
)
self
.
__test_error
(
dbname
)
def
__create_tb
(
self
):
tdSql
.
prepare
()
def
__create_tb
(
self
,
dbname
=
"db"
):
tdLog
.
printNoPrefix
(
"==========step1:create table"
)
create_stb_sql
=
f
'''create table stb1(
create_stb_sql
=
f
'''create table
{
dbname
}
.
stb1(
ts timestamp,
{
INT_COL
}
int,
{
BINT_COL
}
bigint,
{
SINT_COL
}
smallint,
{
TINT_COL
}
tinyint,
{
FLOAT_COL
}
float,
{
DOUBLE_COL
}
double,
{
BOOL_COL
}
bool,
{
BINARY_COL
}
binary(16),
{
NCHAR_COL
}
nchar(32),
{
TS_COL
}
timestamp
) tags (tag1 int)
'''
create_ntb_sql
=
f
'''create table t1(
create_ntb_sql
=
f
'''create table
{
dbname
}
.
t1(
ts timestamp,
{
INT_COL
}
int,
{
BINT_COL
}
bigint,
{
SINT_COL
}
smallint,
{
TINT_COL
}
tinyint,
{
FLOAT_COL
}
float,
{
DOUBLE_COL
}
double,
{
BOOL_COL
}
bool,
{
BINARY_COL
}
binary(16),
{
NCHAR_COL
}
nchar(32),
{
TS_COL
}
timestamp
...
...
@@ -170,29 +169,29 @@ class TDTestCase:
tdSql
.
execute
(
create_ntb_sql
)
for
i
in
range
(
4
):
tdSql
.
execute
(
f
'create table
ct
{
i
+
1
}
using
stb1 tags (
{
i
+
1
}
)'
)
tdSql
.
execute
(
f
'create table
{
dbname
}
.ct
{
i
+
1
}
using
{
dbname
}
.
stb1 tags (
{
i
+
1
}
)'
)
def
__insert_data
(
self
,
rows
):
def
__insert_data
(
self
,
rows
,
dbname
=
"db"
):
now_time
=
int
(
datetime
.
datetime
.
timestamp
(
datetime
.
datetime
.
now
())
*
1000
)
for
i
in
range
(
rows
):
tdSql
.
execute
(
f
"insert into ct1 values (
{
now_time
-
i
*
1000
}
,
{
i
}
,
{
11111
*
i
}
,
{
111
*
i
%
32767
}
,
{
11
*
i
%
127
}
,
{
1.11
*
i
}
,
{
1100.0011
*
i
}
,
{
i
%
2
}
, 'binary
{
i
}
', 'nchar_测试_
{
i
}
',
{
now_time
+
1
*
i
}
)"
f
"insert into
{
dbname
}
.
ct1 values (
{
now_time
-
i
*
1000
}
,
{
i
}
,
{
11111
*
i
}
,
{
111
*
i
%
32767
}
,
{
11
*
i
%
127
}
,
{
1.11
*
i
}
,
{
1100.0011
*
i
}
,
{
i
%
2
}
, 'binary
{
i
}
', 'nchar_测试_
{
i
}
',
{
now_time
+
1
*
i
}
)"
)
tdSql
.
execute
(
f
"insert into ct4 values (
{
now_time
-
i
*
7776000000
}
,
{
i
}
,
{
11111
*
i
}
,
{
111
*
i
%
32767
}
,
{
11
*
i
%
127
}
,
{
1.11
*
i
}
,
{
1100.0011
*
i
}
,
{
i
%
2
}
, 'binary
{
i
}
', 'nchar_测试_
{
i
}
',
{
now_time
+
1
*
i
}
)"
f
"insert into
{
dbname
}
.
ct4 values (
{
now_time
-
i
*
7776000000
}
,
{
i
}
,
{
11111
*
i
}
,
{
111
*
i
%
32767
}
,
{
11
*
i
%
127
}
,
{
1.11
*
i
}
,
{
1100.0011
*
i
}
,
{
i
%
2
}
, 'binary
{
i
}
', 'nchar_测试_
{
i
}
',
{
now_time
+
1
*
i
}
)"
)
tdSql
.
execute
(
f
"insert into ct2 values (
{
now_time
-
i
*
7776000000
}
,
{
-
i
}
,
{
-
11111
*
i
}
,
{
-
111
*
i
%
32767
}
,
{
-
11
*
i
%
127
}
,
{
-
1.11
*
i
}
,
{
-
1100.0011
*
i
}
,
{
i
%
2
}
, 'binary
{
i
}
', 'nchar_测试_
{
i
}
',
{
now_time
+
1
*
i
}
)"
f
"insert into
{
dbname
}
.
ct2 values (
{
now_time
-
i
*
7776000000
}
,
{
-
i
}
,
{
-
11111
*
i
}
,
{
-
111
*
i
%
32767
}
,
{
-
11
*
i
%
127
}
,
{
-
1.11
*
i
}
,
{
-
1100.0011
*
i
}
,
{
i
%
2
}
, 'binary
{
i
}
', 'nchar_测试_
{
i
}
',
{
now_time
+
1
*
i
}
)"
)
tdSql
.
execute
(
f
'''insert into ct1 values
f
'''insert into
{
dbname
}
.
ct1 values
(
{
now_time
-
rows
*
5
}
, 0, 0, 0, 0, 0, 0, 0, 'binary0', 'nchar_测试_0',
{
now_time
+
8
}
)
(
{
now_time
+
10000
}
,
{
rows
}
, -99999, -999, -99, -9.99, -99.99, 1, 'binary9', 'nchar_测试_9',
{
now_time
+
9
}
)
'''
)
tdSql
.
execute
(
f
'''insert into ct4 values
f
'''insert into
{
dbname
}
.
ct4 values
(
{
now_time
-
rows
*
7776000000
}
, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL )
(
{
now_time
-
rows
*
3888000000
+
10800000
}
, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL )
(
{
now_time
+
7776000000
}
, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL )
...
...
@@ -208,7 +207,7 @@ class TDTestCase:
)
tdSql
.
execute
(
f
'''insert into ct2 values
f
'''insert into
{
dbname
}
.
ct2 values
(
{
now_time
-
rows
*
7776000000
}
, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL )
(
{
now_time
-
rows
*
3888000000
+
10800000
}
, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL )
(
{
now_time
+
7776000000
}
, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL )
...
...
@@ -224,13 +223,13 @@ class TDTestCase:
)
for
i
in
range
(
rows
):
insert_data
=
f
'''insert into t1 values
insert_data
=
f
'''insert into
{
dbname
}
.
t1 values
(
{
now_time
-
i
*
3600000
}
,
{
i
}
,
{
i
*
11111
}
,
{
i
%
32767
}
,
{
i
%
127
}
,
{
i
*
1.11111
}
,
{
i
*
1000.1111
}
,
{
i
%
2
}
,
"binary_
{
i
}
", "nchar_测试_
{
i
}
",
{
now_time
-
1000
*
i
}
)
'''
tdSql
.
execute
(
insert_data
)
tdSql
.
execute
(
f
'''insert into t1 values
f
'''insert into
{
dbname
}
.
t1 values
(
{
now_time
+
10800000
}
, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL )
(
{
now_time
-
((
rows
//
2
)
*
60
+
30
)
*
60000
}
, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL )
(
{
now_time
-
rows
*
3600000
}
, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL )
...
...
@@ -259,10 +258,7 @@ class TDTestCase:
tdLog
.
printNoPrefix
(
"==========step3:all check"
)
self
.
all_test
()
tdDnodes
.
stop
(
1
)
tdDnodes
.
start
(
1
)
tdSql
.
execute
(
"use db"
)
tdSql
.
execute
(
"flush database db"
)
tdLog
.
printNoPrefix
(
"==========step4:after wal, all check again "
)
self
.
all_test
()
...
...
tests/system-test/2-query/sum.py
浏览文件 @
53e3b2e5
...
...
@@ -89,14 +89,14 @@ class TDTestCase:
return
sqls
def
__test_current
(
self
):
def
__test_current
(
self
,
dbname
=
"db"
):
tdLog
.
printNoPrefix
(
"==========current sql condition check , must return query ok=========="
)
tbname
=
[
"ct1"
,
"ct2"
,
"ct4"
,
"t1"
]
for
tb
in
tbname
:
self
.
__sum_current_check
(
tb
)
tdLog
.
printNoPrefix
(
f
"==========current sql condition check in
{
tb
}
over=========="
)
def
__test_error
(
self
):
def
__test_error
(
self
,
dbname
=
"db"
):
tdLog
.
printNoPrefix
(
"==========err sql condition check , must return error=========="
)
tbname
=
[
"ct1"
,
"ct2"
,
"ct4"
,
"t1"
]
...
...
@@ -106,21 +106,21 @@ class TDTestCase:
tdLog
.
printNoPrefix
(
f
"==========err sql condition check in
{
tb
}
over=========="
)
def
all_test
(
self
):
self
.
__test_current
()
self
.
__test_error
()
def
all_test
(
self
,
dbname
=
"db"
):
self
.
__test_current
(
dbname
)
self
.
__test_error
(
dbname
)
def
__create_tb
(
self
):
def
__create_tb
(
self
,
dbname
=
"db"
):
tdLog
.
printNoPrefix
(
"==========step1:create table"
)
create_stb_sql
=
f
'''create table
{
DBNAME
}
.stb1(
create_stb_sql
=
f
'''create table
{
dbname
}
.stb1(
ts timestamp,
{
INT_COL
}
int,
{
BINT_COL
}
bigint,
{
SINT_COL
}
smallint,
{
TINT_COL
}
tinyint,
{
FLOAT_COL
}
float,
{
DOUBLE_COL
}
double,
{
BOOL_COL
}
bool,
{
BINARY_COL
}
binary(16),
{
NCHAR_COL
}
nchar(32),
{
TS_COL
}
timestamp
) tags (t1 int)
) tags (t
ag
1 int)
'''
create_ntb_sql
=
f
'''create table
{
DBNAME
}
.t1(
create_ntb_sql
=
f
'''create table
{
dbname
}
.t1(
ts timestamp,
{
INT_COL
}
int,
{
BINT_COL
}
bigint,
{
SINT_COL
}
smallint,
{
TINT_COL
}
tinyint,
{
FLOAT_COL
}
float,
{
DOUBLE_COL
}
double,
{
BOOL_COL
}
bool,
{
BINARY_COL
}
binary(16),
{
NCHAR_COL
}
nchar(32),
{
TS_COL
}
timestamp
...
...
@@ -130,83 +130,82 @@ class TDTestCase:
tdSql
.
execute
(
create_ntb_sql
)
for
i
in
range
(
4
):
tdSql
.
execute
(
f
'create table
{
DBNAME
}
.ct
{
i
+
1
}
using
{
DBNAME
}
.stb1 tags (
{
i
+
1
}
)'
)
tdSql
.
execute
(
f
'create table
{
dbname
}
.ct
{
i
+
1
}
using
{
dbname
}
.stb1 tags (
{
i
+
1
}
)'
)
def
__insert_data
(
self
,
rows
):
def
__insert_data
(
self
,
rows
,
dbname
=
"db"
):
now_time
=
int
(
datetime
.
datetime
.
timestamp
(
datetime
.
datetime
.
now
())
*
1000
)
for
i
in
range
(
rows
):
tdSql
.
execute
(
f
"insert into
{
DBNAME
}
.ct1 values (
{
now_time
-
i
*
1000
}
,
{
i
}
,
{
11111
*
i
}
,
{
111
*
i
%
32767
}
,
{
11
*
i
%
127
}
,
{
1.11
*
i
}
,
{
1100.0011
*
i
}
,
{
i
%
2
}
, 'binary
{
i
}
', 'nchar
{
i
}
',
{
now_time
+
1
*
i
}
)"
f
"insert into
{
dbname
}
.ct1 values (
{
now_time
-
i
*
1000
}
,
{
i
}
,
{
11111
*
i
}
,
{
111
*
i
%
32767
}
,
{
11
*
i
%
127
}
,
{
1.11
*
i
}
,
{
1100.0011
*
i
}
,
{
i
%
2
}
, 'binary
{
i
}
', 'nchar_测试_
{
i
}
',
{
now_time
+
1
*
i
}
)"
)
tdSql
.
execute
(
f
"insert into
{
DBNAME
}
.ct4 values (
{
now_time
-
i
*
7776000000
}
,
{
i
}
,
{
11111
*
i
}
,
{
111
*
i
%
32767
}
,
{
11
*
i
%
127
}
,
{
1.11
*
i
}
,
{
1100.0011
*
i
}
,
{
i
%
2
}
, 'binary
{
i
}
', 'nchar
{
i
}
',
{
now_time
+
1
*
i
}
)"
f
"insert into
{
dbname
}
.ct4 values (
{
now_time
-
i
*
7776000000
}
,
{
i
}
,
{
11111
*
i
}
,
{
111
*
i
%
32767
}
,
{
11
*
i
%
127
}
,
{
1.11
*
i
}
,
{
1100.0011
*
i
}
,
{
i
%
2
}
, 'binary
{
i
}
', 'nchar_测试_
{
i
}
',
{
now_time
+
1
*
i
}
)"
)
tdSql
.
execute
(
f
"insert into
{
DBNAME
}
.ct2 values (
{
now_time
-
i
*
7776000000
}
,
{
-
i
}
,
{
-
11111
*
i
}
,
{
-
111
*
i
%
32767
}
,
{
-
11
*
i
%
127
}
,
{
-
1.11
*
i
}
,
{
-
1100.0011
*
i
}
,
{
i
%
2
}
, 'binary
{
i
}
', 'nchar
{
i
}
',
{
now_time
+
1
*
i
}
)"
f
"insert into
{
dbname
}
.ct2 values (
{
now_time
-
i
*
7776000000
}
,
{
-
i
}
,
{
-
11111
*
i
}
,
{
-
111
*
i
%
32767
}
,
{
-
11
*
i
%
127
}
,
{
-
1.11
*
i
}
,
{
-
1100.0011
*
i
}
,
{
i
%
2
}
, 'binary
{
i
}
', 'nchar_测试_
{
i
}
',
{
now_time
+
1
*
i
}
)"
)
tdSql
.
execute
(
f
'''insert into
{
DBNAME
}
.ct1 values
(
{
now_time
-
rows
*
5
}
, 0, 0, 0, 0, 0, 0, 0, 'binary0', 'nchar0',
{
now_time
+
8
}
)
(
{
now_time
+
10000
}
,
{
rows
}
, -99999, -999, -99, -9.99, -99.99, 1, 'binary9', 'nchar9',
{
now_time
+
9
}
)
f
'''insert into
{
dbname
}
.ct1 values
(
{
now_time
-
rows
*
5
}
, 0, 0, 0, 0, 0, 0, 0, 'binary0', 'nchar
_测试_
0',
{
now_time
+
8
}
)
(
{
now_time
+
10000
}
,
{
rows
}
, -99999, -999, -99, -9.99, -99.99, 1, 'binary9', 'nchar
_测试_
9',
{
now_time
+
9
}
)
'''
)
tdSql
.
execute
(
f
'''insert into
{
DBNAME
}
.ct4 values
f
'''insert into
{
dbname
}
.ct4 values
(
{
now_time
-
rows
*
7776000000
}
, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL )
(
{
now_time
-
rows
*
3888000000
+
10800000
}
, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL )
(
{
now_time
-
rows
*
3888000000
+
10800000
}
, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL )
(
{
now_time
+
7776000000
}
, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL )
(
{
now_time
+
5184000000
}
,
{
pow
(
2
,
31
)
-
pow
(
2
,
15
)
}
,
{
pow
(
2
,
63
)
-
pow
(
2
,
30
)
}
, 32767, 127,
{
3.3
*
pow
(
10
,
38
)
}
,
{
1.3
*
pow
(
10
,
308
)
}
,
{
rows
%
2
}
, "binary_limit-1", "nchar_limit-1",
{
now_time
-
86400000
}
{
3.3
*
pow
(
10
,
38
)
}
,
{
1.3
*
pow
(
10
,
308
)
}
,
{
rows
%
2
}
, "binary_limit-1", "nchar_
测试_
limit-1",
{
now_time
-
86400000
}
)
(
{
now_time
+
2592000000
}
,
{
pow
(
2
,
31
)
-
pow
(
2
,
16
)
}
,
{
pow
(
2
,
63
)
-
pow
(
2
,
31
)
}
, 32766, 126,
{
3.2
*
pow
(
10
,
38
)
}
,
{
1.2
*
pow
(
10
,
308
)
}
,
{
(
rows
-
1
)
%
2
}
, "binary_limit-2", "nchar_limit-2",
{
now_time
-
172800000
}
{
3.2
*
pow
(
10
,
38
)
}
,
{
1.2
*
pow
(
10
,
308
)
}
,
{
(
rows
-
1
)
%
2
}
, "binary_limit-2", "nchar_
测试_
limit-2",
{
now_time
-
172800000
}
)
'''
)
tdSql
.
execute
(
f
'''insert into
{
DBNAME
}
.ct2 values
f
'''insert into
{
dbname
}
.ct2 values
(
{
now_time
-
rows
*
7776000000
}
, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL )
(
{
now_time
-
rows
*
3888000000
+
10800000
}
, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL )
(
{
now_time
-
rows
*
3888000000
+
10800000
}
, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL )
(
{
now_time
+
7776000000
}
, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL )
(
{
now_time
+
5184000000
}
,
{
-
1
*
pow
(
2
,
31
)
+
pow
(
2
,
15
)
}
,
{
-
1
*
pow
(
2
,
63
)
+
pow
(
2
,
30
)
}
, -32766, -126,
{
-
1
*
3.2
*
pow
(
10
,
38
)
}
,
{
-
1.2
*
pow
(
10
,
308
)
}
,
{
rows
%
2
}
, "binary_limit-1", "nchar_limit-1",
{
now_time
-
86400000
}
{
-
1
*
3.2
*
pow
(
10
,
38
)
}
,
{
-
1.2
*
pow
(
10
,
308
)
}
,
{
rows
%
2
}
, "binary_limit-1", "nchar_
测试_
limit-1",
{
now_time
-
86400000
}
)
(
{
now_time
+
2592000000
}
,
{
-
1
*
pow
(
2
,
31
)
+
pow
(
2
,
16
)
}
,
{
-
1
*
pow
(
2
,
63
)
+
pow
(
2
,
31
)
}
, -32767, -127,
{
-
3.3
*
pow
(
10
,
38
)
}
,
{
-
1.3
*
pow
(
10
,
308
)
}
,
{
(
rows
-
1
)
%
2
}
, "binary_limit-2", "nchar_limit-2",
{
now_time
-
172800000
}
{
-
3.3
*
pow
(
10
,
38
)
}
,
{
-
1.3
*
pow
(
10
,
308
)
}
,
{
(
rows
-
1
)
%
2
}
, "binary_limit-2", "nchar_
测试_
limit-2",
{
now_time
-
172800000
}
)
'''
)
for
i
in
range
(
rows
):
insert_data
=
f
'''insert into
{
DBNAME
}
.t1 values
insert_data
=
f
'''insert into
{
dbname
}
.t1 values
(
{
now_time
-
i
*
3600000
}
,
{
i
}
,
{
i
*
11111
}
,
{
i
%
32767
}
,
{
i
%
127
}
,
{
i
*
1.11111
}
,
{
i
*
1000.1111
}
,
{
i
%
2
}
,
"binary_
{
i
}
", "nchar_
{
i
}
",
{
now_time
-
1000
*
i
}
)
"binary_
{
i
}
", "nchar_
测试_
{
i
}
",
{
now_time
-
1000
*
i
}
)
'''
tdSql
.
execute
(
insert_data
)
tdSql
.
execute
(
f
'''insert into
{
DBNAME
}
.t1 values
f
'''insert into
{
dbname
}
.t1 values
(
{
now_time
+
10800000
}
, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL )
(
{
now_time
-
((
rows
//
2
)
*
60
+
30
)
*
60000
}
, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL )
(
{
now_time
-
rows
*
3600000
}
, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL )
(
{
now_time
+
7200000
}
,
{
pow
(
2
,
31
)
-
pow
(
2
,
15
)
}
,
{
pow
(
2
,
63
)
-
pow
(
2
,
30
)
}
, 32767, 127,
{
3.3
*
pow
(
10
,
38
)
}
,
{
1.3
*
pow
(
10
,
308
)
}
,
{
rows
%
2
}
,
"binary_limit-1", "nchar_limit-1",
{
now_time
-
86400000
}
"binary_limit-1", "nchar_
测试_
limit-1",
{
now_time
-
86400000
}
)
(
{
now_time
+
3600000
}
,
{
pow
(
2
,
31
)
-
pow
(
2
,
16
)
}
,
{
pow
(
2
,
63
)
-
pow
(
2
,
31
)
}
, 32766, 126,
{
3.2
*
pow
(
10
,
38
)
}
,
{
1.2
*
pow
(
10
,
308
)
}
,
{
(
rows
-
1
)
%
2
}
,
"binary_limit-2", "nchar_limit-2",
{
now_time
-
172800000
}
"binary_limit-2", "nchar_
测试_
limit-2",
{
now_time
-
172800000
}
)
'''
)
def
run
(
self
):
tdSql
.
prepare
()
...
...
@@ -219,12 +218,8 @@ class TDTestCase:
tdLog
.
printNoPrefix
(
"==========step3:all check"
)
self
.
all_test
()
# tdDnodes.stop(1)
# tdDnodes.start(1)
tdSql
.
execute
(
"flush database db"
)
tdSql
.
execute
(
"use db"
)
tdLog
.
printNoPrefix
(
"==========step4:after wal, all check again "
)
...
...
tests/system-test/2-query/tail.py
浏览文件 @
53e3b2e5
此差异已折叠。
点击以展开。
tests/system-test/2-query/tan.py
浏览文件 @
53e3b2e5
此差异已折叠。
点击以展开。
tests/system-test/fulltest.sh
浏览文件 @
53e3b2e5
...
...
@@ -156,6 +156,18 @@ python3 ./test.py -f 2-query/spread.py
python3 ./test.py
-f
2-query/spread.py
-R
python3 ./test.py
-f
2-query/sqrt.py
# python3 ./test.py -f 2-query/sqrt.py -R
python3 ./test.py
-f
2-query/statecount.py
python3 ./test.py
-f
2-query/statecount.py
-R
python3 ./test.py
-f
2-query/stateduration.py
python3 ./test.py
-f
2-query/stateduration.py
-R
python3 ./test.py
-f
2-query/substr.py
python3 ./test.py
-f
2-query/substr.py
-R
python3 ./test.py
-f
2-query/sum.py
python3 ./test.py
-f
2-query/sum.py
-R
python3 ./test.py
-f
2-query/tail.py
python3 ./test.py
-f
2-query/tail.py
-R
python3 ./test.py
-f
2-query/tan.py
python3 ./test.py
-f
2-query/tan.py
-R
python3 ./test.py
-f
1-insert/update_data.py
...
...
@@ -166,7 +178,6 @@ python3 ./test.py -f 2-query/varchar.py
python3 ./test.py
-f
2-query/upper.py
python3 ./test.py
-f
2-query/lower.py
python3 ./test.py
-f
2-query/join2.py
python3 ./test.py
-f
2-query/substr.py
python3 ./test.py
-f
2-query/union.py
python3 ./test.py
-f
2-query/union1.py
python3 ./test.py
-f
2-query/concat2.py
...
...
@@ -182,7 +193,6 @@ python3 ./test.py -f 2-query/json_tag.py
python3 ./test.py
-f
2-query/top.py
python3 ./test.py
-f
2-query/log.py
python3 ./test.py
-f
2-query/tan.py
# python3 ./test.py -f 2-query/nestedQuery.py
# TD-15983 subquery output duplicate name column.
# Please Xiangyang Guo modify the following script
...
...
@@ -193,9 +203,6 @@ python3 ./test.py -f 2-query/csum.py
python3 ./test.py
-f
2-query/mavg.py
python3 ./test.py
-f
2-query/function_diff.py
python3 ./test.py
-f
2-query/unique.py
python3 ./test.py
-f
2-query/stateduration.py
python3 ./test.py
-f
2-query/statecount.py
python3 ./test.py
-f
2-query/tail.py
python3 ./test.py
-f
2-query/ttl_comment.py
python3 ./test.py
-f
2-query/twa.py
python3 ./test.py
-f
2-query/queryQnode.py
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录