Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
1c4f8621
T
TDengine
项目概览
taosdata
/
TDengine
大约 2 年 前同步成功
通知
1192
Star
22018
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看板
提交
1c4f8621
编写于
8月 17, 2022
作者:
C
cpwu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix case
上级
40e2dc1f
变更
6
展开全部
显示空白变更内容
内联
并排
Showing
6 changed file
with
271 addition
and
278 deletion
+271
-278
tests/system-test/2-query/ltrim.py
tests/system-test/2-query/ltrim.py
+1
-2
tests/system-test/2-query/smaTest.py
tests/system-test/2-query/smaTest.py
+15
-22
tests/system-test/2-query/sml.py
tests/system-test/2-query/sml.py
+12
-12
tests/system-test/2-query/spread.py
tests/system-test/2-query/spread.py
+50
-46
tests/system-test/2-query/sqrt.py
tests/system-test/2-query/sqrt.py
+183
-192
tests/system-test/fulltest.sh
tests/system-test/fulltest.sh
+10
-4
未找到文件。
tests/system-test/2-query/ltrim.py
浏览文件 @
1c4f8621
...
@@ -251,8 +251,7 @@ class TDTestCase:
...
@@ -251,8 +251,7 @@ class TDTestCase:
tdLog
.
printNoPrefix
(
"==========step3:all check"
)
tdLog
.
printNoPrefix
(
"==========step3:all check"
)
self
.
all_test
()
self
.
all_test
()
tdDnodes
.
stop
(
1
)
tdSql
.
execute
(
"flush database db"
)
tdDnodes
.
start
(
1
)
tdSql
.
execute
(
"use db"
)
tdSql
.
execute
(
"use db"
)
...
...
tests/system-test/2-query/smaTest.py
浏览文件 @
1c4f8621
...
@@ -30,14 +30,6 @@ class TDTestCase:
...
@@ -30,14 +30,6 @@ class TDTestCase:
# updatecfgDict = {'debugFlag': 135}
# updatecfgDict = {'debugFlag': 135}
# updatecfgDict = {'fqdn': 135}
# updatecfgDict = {'fqdn': 135}
def
caseDescription
(
self
):
'''
limit and offset keyword function test cases;
case1: limit offset base function test
case2: offset return valid
'''
return
# init
# init
def
init
(
self
,
conn
,
logSql
):
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
...
@@ -50,8 +42,9 @@ class TDTestCase:
...
@@ -50,8 +42,9 @@ class TDTestCase:
# run case
# run case
def
run
(
self
):
def
run
(
self
):
# insert data
# insert data
self
.
insert_data1
(
"t1"
,
self
.
ts
,
1000
*
10000
)
dbname
=
"db"
self
.
insert_data1
(
"t4"
,
self
.
ts
,
1000
*
10000
)
self
.
insert_data1
(
f
"
{
dbname
}
.t1"
,
self
.
ts
,
1000
*
10000
)
self
.
insert_data1
(
f
"
{
dbname
}
.t4"
,
self
.
ts
,
1000
*
10000
)
# test base case
# test base case
# self.test_case1()
# self.test_case1()
tdLog
.
debug
(
" LIMIT test_case1 ............ [OK]"
)
tdLog
.
debug
(
" LIMIT test_case1 ............ [OK]"
)
...
@@ -70,14 +63,14 @@ class TDTestCase:
...
@@ -70,14 +63,14 @@ class TDTestCase:
#
#
# create table
# create table
def
create_tables
(
self
):
def
create_tables
(
self
,
dbname
=
"db"
):
# super table
# super table
tdSql
.
execute
(
"create table st(ts timestamp, i1 int,i2 int) tags(area int)"
);
tdSql
.
execute
(
f
"create table
{
dbname
}
.st(ts timestamp, i1 int,i2 int) tags(area int)"
)
# child table
# child table
tdSql
.
execute
(
"create table t1 using st tags(1)"
);
tdSql
.
execute
(
f
"create table
{
dbname
}
.t1 using
{
dbname
}
.st tags(1)"
)
tdSql
.
execute
(
"create table st1(ts timestamp, i1 int ,i2 int) tags(area int) sma(i2) "
);
tdSql
.
execute
(
f
"create table
{
dbname
}
.st1(ts timestamp, i1 int ,i2 int) tags(area int) sma(i2) "
)
tdSql
.
execute
(
"create table t4 using st1 tags(1)"
);
tdSql
.
execute
(
f
"create table
{
dbname
}
.t4 using
{
dbname
}
.st1 tags(1)"
)
return
return
...
...
tests/system-test/2-query/sml.py
浏览文件 @
1c4f8621
...
@@ -20,7 +20,7 @@ class TDTestCase:
...
@@ -20,7 +20,7 @@ class TDTestCase:
tdSql
.
init
(
conn
.
cursor
())
tdSql
.
init
(
conn
.
cursor
())
#tdSql.init(conn.cursor(), logSql) # output sql.txt file
#tdSql.init(conn.cursor(), logSql) # output sql.txt file
def
checkFileContent
(
self
):
def
checkFileContent
(
self
,
dbname
=
"sml_db"
):
buildPath
=
tdCom
.
getBuildPath
()
buildPath
=
tdCom
.
getBuildPath
()
cmdStr
=
'%s/build/bin/sml_test'
%
(
buildPath
)
cmdStr
=
'%s/build/bin/sml_test'
%
(
buildPath
)
tdLog
.
info
(
cmdStr
)
tdLog
.
info
(
cmdStr
)
...
@@ -28,8 +28,8 @@ class TDTestCase:
...
@@ -28,8 +28,8 @@ class TDTestCase:
if
ret
!=
0
:
if
ret
!=
0
:
tdLog
.
exit
(
"sml_test failed"
)
tdLog
.
exit
(
"sml_test failed"
)
tdSql
.
execute
(
'use sml_db'
)
#
tdSql.execute('use sml_db')
tdSql
.
query
(
"select * from
t_b7d815c9222ca64cdf2614c61de8f211"
)
tdSql
.
query
(
f
"select * from
{
dbname
}
.
t_b7d815c9222ca64cdf2614c61de8f211"
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
0
,
'2016-01-01 08:00:07.000'
)
tdSql
.
checkData
(
0
,
0
,
'2016-01-01 08:00:07.000'
)
...
@@ -44,35 +44,35 @@ class TDTestCase:
...
@@ -44,35 +44,35 @@ class TDTestCase:
tdSql
.
checkData
(
0
,
9
,
0
)
tdSql
.
checkData
(
0
,
9
,
0
)
tdSql
.
checkData
(
0
,
10
,
25
)
tdSql
.
checkData
(
0
,
10
,
25
)
tdSql
.
query
(
"select * from
readings"
)
tdSql
.
query
(
f
"select * from
{
dbname
}
.
readings"
)
tdSql
.
checkRows
(
9
)
tdSql
.
checkRows
(
9
)
tdSql
.
query
(
"select distinct tbname from
readings"
)
tdSql
.
query
(
f
"select distinct tbname from
{
dbname
}
.
readings"
)
tdSql
.
checkRows
(
4
)
tdSql
.
checkRows
(
4
)
tdSql
.
query
(
"select * from
t_0799064f5487946e5d22164a822acfc8 order by _ts"
)
tdSql
.
query
(
f
"select * from
{
dbname
}
.
t_0799064f5487946e5d22164a822acfc8 order by _ts"
)
tdSql
.
checkRows
(
2
)
tdSql
.
checkRows
(
2
)
tdSql
.
checkData
(
0
,
3
,
"kk"
)
tdSql
.
checkData
(
0
,
3
,
"kk"
)
tdSql
.
checkData
(
1
,
3
,
None
)
tdSql
.
checkData
(
1
,
3
,
None
)
tdSql
.
query
(
"select distinct tbname from
`sys.if.bytes.out`"
)
tdSql
.
query
(
f
"select distinct tbname from
{
dbname
}
.
`sys.if.bytes.out`"
)
tdSql
.
checkRows
(
2
)
tdSql
.
checkRows
(
2
)
tdSql
.
query
(
"select * from
t_fc70dec6677d4277c5d9799c4da806da order by _ts"
)
tdSql
.
query
(
f
"select * from
{
dbname
}
.
t_fc70dec6677d4277c5d9799c4da806da order by _ts"
)
tdSql
.
checkRows
(
2
)
tdSql
.
checkRows
(
2
)
tdSql
.
checkData
(
0
,
1
,
1.300000000
)
tdSql
.
checkData
(
0
,
1
,
1.300000000
)
tdSql
.
checkData
(
1
,
1
,
13.000000000
)
tdSql
.
checkData
(
1
,
1
,
13.000000000
)
tdSql
.
query
(
"select * from
`sys.procs.running`"
)
tdSql
.
query
(
f
"select * from
{
dbname
}
.
`sys.procs.running`"
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
1
,
42.000000000
)
tdSql
.
checkData
(
0
,
1
,
42.000000000
)
tdSql
.
checkData
(
0
,
2
,
"web01"
)
tdSql
.
checkData
(
0
,
2
,
"web01"
)
tdSql
.
query
(
"select distinct tbname from
`sys.cpu.nice`"
)
tdSql
.
query
(
f
"select distinct tbname from
{
dbname
}
.
`sys.cpu.nice`"
)
tdSql
.
checkRows
(
2
)
tdSql
.
checkRows
(
2
)
tdSql
.
query
(
"select * from
`sys.cpu.nice` order by _ts"
)
tdSql
.
query
(
f
"select * from
{
dbname
}
.
`sys.cpu.nice` order by _ts"
)
tdSql
.
checkRows
(
2
)
tdSql
.
checkRows
(
2
)
tdSql
.
checkData
(
0
,
1
,
9.000000000
)
tdSql
.
checkData
(
0
,
1
,
9.000000000
)
tdSql
.
checkData
(
0
,
2
,
"lga"
)
tdSql
.
checkData
(
0
,
2
,
"lga"
)
...
@@ -83,7 +83,7 @@ class TDTestCase:
...
@@ -83,7 +83,7 @@ class TDTestCase:
tdSql
.
checkData
(
1
,
3
,
"web01"
)
tdSql
.
checkData
(
1
,
3
,
"web01"
)
tdSql
.
checkData
(
1
,
4
,
"t1"
)
tdSql
.
checkData
(
1
,
4
,
"t1"
)
tdSql
.
query
(
"select * from
macylr"
)
tdSql
.
query
(
f
"select * from
{
dbname
}
.
macylr"
)
tdSql
.
checkRows
(
2
)
tdSql
.
checkRows
(
2
)
return
return
...
...
tests/system-test/2-query/spread.py
浏览文件 @
1c4f8621
...
@@ -26,6 +26,8 @@ TS_TYPE_COL = [ TS_COL, ]
...
@@ -26,6 +26,8 @@ TS_TYPE_COL = [ TS_COL, ]
ALL_COL
=
[
INT_COL
,
BINT_COL
,
SINT_COL
,
TINT_COL
,
FLOAT_COL
,
DOUBLE_COL
,
BOOL_COL
,
BINARY_COL
,
NCHAR_COL
,
TS_COL
]
ALL_COL
=
[
INT_COL
,
BINT_COL
,
SINT_COL
,
TINT_COL
,
FLOAT_COL
,
DOUBLE_COL
,
BOOL_COL
,
BINARY_COL
,
NCHAR_COL
,
TS_COL
]
DBNAME
=
"db"
class
TDTestCase
:
class
TDTestCase
:
def
init
(
self
,
conn
,
logSql
):
def
init
(
self
,
conn
,
logSql
):
...
@@ -88,6 +90,7 @@ class TDTestCase:
...
@@ -88,6 +90,7 @@ class TDTestCase:
return
join_condition
return
join_condition
def
__where_condition
(
self
,
col
=
None
,
tbname
=
None
,
query_conditon
=
None
):
def
__where_condition
(
self
,
col
=
None
,
tbname
=
None
,
query_conditon
=
None
):
# tbname = tbname.split(".")[-1] if tbname else None
if
query_conditon
and
isinstance
(
query_conditon
,
str
):
if
query_conditon
and
isinstance
(
query_conditon
,
str
):
if
query_conditon
.
startswith
(
"count"
):
if
query_conditon
.
startswith
(
"count"
):
query_conditon
=
query_conditon
[
6
:
-
1
]
query_conditon
=
query_conditon
[
6
:
-
1
]
...
@@ -129,20 +132,21 @@ class TDTestCase:
...
@@ -129,20 +132,21 @@ class TDTestCase:
return
f
"select spread(
{
select_clause
}
) from
{
from_clause
}
{
where_condition
}
{
group_condition
}
"
return
f
"select spread(
{
select_clause
}
) from
{
from_clause
}
{
where_condition
}
{
group_condition
}
"
@
property
@
property
def
__tb_list
(
self
):
def
__tb_list
(
self
,
dbname
=
DBNAME
):
return
[
return
[
"
ct1"
,
f
"
{
dbname
}
.
ct1"
,
"
ct4"
,
f
"
{
dbname
}
.
ct4"
,
"
t1"
,
f
"
{
dbname
}
.
t1"
,
"
ct2"
,
f
"
{
dbname
}
.
ct2"
,
"
stb1"
,
f
"
{
dbname
}
.
stb1"
,
]
]
def
sql_list
(
self
):
def
sql_list
(
self
):
sqls
=
[]
sqls
=
[]
__no_join_tblist
=
self
.
__tb_list
__no_join_tblist
=
self
.
__tb_list
for
tb
in
__no_join_tblist
:
for
tb
in
__no_join_tblist
:
select_claus_list
=
self
.
__query_condition
(
tb
)
tbname
=
tb
.
split
(
"."
)[
-
1
]
select_claus_list
=
self
.
__query_condition
(
tbname
)
for
select_claus
in
select_claus_list
:
for
select_claus
in
select_claus_list
:
group_claus
=
self
.
__group_condition
(
col
=
select_claus
)
group_claus
=
self
.
__group_condition
(
col
=
select_claus
)
where_claus
=
self
.
__where_condition
(
query_conditon
=
select_claus
)
where_claus
=
self
.
__where_condition
(
query_conditon
=
select_claus
)
...
@@ -166,28 +170,28 @@ class TDTestCase:
...
@@ -166,28 +170,28 @@ class TDTestCase:
tdLog
.
info
(
f
"sql:
{
sqls
[
i
]
}
"
)
tdLog
.
info
(
f
"sql:
{
sqls
[
i
]
}
"
)
tdSql
.
query
(
sqls
[
i
])
tdSql
.
query
(
sqls
[
i
])
def
__test_current
(
self
):
def
__test_current
(
self
,
dbname
=
DBNAME
):
tdSql
.
query
(
"select spread(ts) from
ct1"
)
tdSql
.
query
(
f
"select spread(ts) from
{
dbname
}
.
ct1"
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkRows
(
1
)
tdSql
.
query
(
"select spread(c1) from
ct2"
)
tdSql
.
query
(
f
"select spread(c1) from
{
dbname
}
.
ct2"
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkRows
(
1
)
tdSql
.
query
(
"select spread(c1) from
ct4 group by c1"
)
tdSql
.
query
(
f
"select spread(c1) from
{
dbname
}
.
ct4 group by c1"
)
tdSql
.
checkRows
(
self
.
rows
+
3
)
tdSql
.
checkRows
(
self
.
rows
+
3
)
tdSql
.
query
(
"select spread(c1) from
ct4 group by c7"
)
tdSql
.
query
(
f
"select spread(c1) from
{
dbname
}
.
ct4 group by c7"
)
tdSql
.
checkRows
(
3
)
tdSql
.
checkRows
(
3
)
tdSql
.
query
(
"select spread(ct2.c1) from ct4 join
ct2 on ct4.ts=ct2.ts"
)
tdSql
.
query
(
f
"select spread(ct2.c1) from
{
dbname
}
.ct4 ct4 join
{
dbname
}
.ct2
ct2 on ct4.ts=ct2.ts"
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkRows
(
1
)
self
.
spread_check
()
self
.
spread_check
()
def
__test_error
(
self
):
def
__test_error
(
self
,
dbname
=
DBNAME
):
tdLog
.
printNoPrefix
(
"===step 0: err case, must return err"
)
tdLog
.
printNoPrefix
(
"===step 0: err case, must return err"
)
tdSql
.
error
(
"select spread() from
ct1"
)
tdSql
.
error
(
f
"select spread() from
{
dbname
}
.
ct1"
)
tdSql
.
error
(
"select spread(1, 2) from
ct2"
)
tdSql
.
error
(
f
"select spread(1, 2) from
{
dbname
}
.
ct2"
)
tdSql
.
error
(
f
"select spread(
{
NUM_COL
[
0
]
}
,
{
NUM_COL
[
1
]
}
) from ct4"
)
tdSql
.
error
(
f
"select spread(
{
NUM_COL
[
0
]
}
,
{
NUM_COL
[
1
]
}
) from
{
dbname
}
.
ct4"
)
tdSql
.
error
(
f
"select spread(
{
BOOLEAN_COL
[
0
]
}
) from t1"
)
tdSql
.
error
(
f
"select spread(
{
BOOLEAN_COL
[
0
]
}
) from
{
dbname
}
.
t1"
)
tdSql
.
error
(
f
"select spread(
{
CHAR_COL
[
0
]
}
) from stb1"
)
tdSql
.
error
(
f
"select spread(
{
CHAR_COL
[
0
]
}
) from
{
dbname
}
.
stb1"
)
# tdSql.error( ''' select spread(['c1 + c1', 'c1 + c2', 'c1 + c3', 'c1 + c4', 'c1 + c5', 'c1 + c6', 'c1 + c7', 'c1 + c8', 'c1 + c9', 'c1 + c10'])
# tdSql.error( ''' select spread(['c1 + c1', 'c1 + c2', 'c1 + c3', 'c1 + c4', 'c1 + c5', 'c1 + c6', 'c1 + c7', 'c1 + c8', 'c1 + c9', 'c1 + c10'])
# from ct1
# from ct1
...
@@ -196,20 +200,20 @@ class TDTestCase:
...
@@ -196,20 +200,20 @@ class TDTestCase:
# having ['c1 + c1', 'c1 + c2', 'c1 + c3', 'c1 + c4', 'c1 + c5', 'c1 + c6', 'c1 + c7', 'c1 + c8', 'c1 + c9', 'c1 + c10'] is not null ''' )
# having ['c1 + c1', 'c1 + c2', 'c1 + c3', 'c1 + c4', 'c1 + c5', 'c1 + c6', 'c1 + c7', 'c1 + c8', 'c1 + c9', 'c1 + c10'] is not null ''' )
# tdSql.error( "select c1 from ct1 union select c1 from ct2 union select c1 from ct4 ")
# tdSql.error( "select c1 from ct1 union select c1 from ct2 union select c1 from ct4 ")
def
all_test
(
self
):
def
all_test
(
self
,
dbname
=
DBNAME
):
self
.
__test_error
()
self
.
__test_error
(
dbname
)
self
.
__test_current
()
self
.
__test_current
(
dbname
)
def
__create_tb
(
self
):
def
__create_tb
(
self
,
dbname
=
DBNAME
):
tdLog
.
printNoPrefix
(
"==========step1:create table"
)
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,
ts timestamp,
{
INT_COL
}
int,
{
BINT_COL
}
bigint,
{
SINT_COL
}
smallint,
{
TINT_COL
}
tinyint,
{
FLOAT_COL
}
float,
{
DOUBLE_COL
}
double,
{
BOOL_COL
}
bool,
{
FLOAT_COL
}
float,
{
DOUBLE_COL
}
double,
{
BOOL_COL
}
bool,
{
BINARY_COL
}
binary(16),
{
NCHAR_COL
}
nchar(32),
{
TS_COL
}
timestamp
{
BINARY_COL
}
binary(16),
{
NCHAR_COL
}
nchar(32),
{
TS_COL
}
timestamp
) tags (t1 int)
) tags (t1 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,
ts timestamp,
{
INT_COL
}
int,
{
BINT_COL
}
bigint,
{
SINT_COL
}
smallint,
{
TINT_COL
}
tinyint,
{
FLOAT_COL
}
float,
{
DOUBLE_COL
}
double,
{
BOOL_COL
}
bool,
{
FLOAT_COL
}
float,
{
DOUBLE_COL
}
double,
{
BOOL_COL
}
bool,
{
BINARY_COL
}
binary(16),
{
NCHAR_COL
}
nchar(32),
{
TS_COL
}
timestamp
{
BINARY_COL
}
binary(16),
{
NCHAR_COL
}
nchar(32),
{
TS_COL
}
timestamp
...
@@ -219,30 +223,30 @@ class TDTestCase:
...
@@ -219,30 +223,30 @@ class TDTestCase:
tdSql
.
execute
(
create_ntb_sql
)
tdSql
.
execute
(
create_ntb_sql
)
for
i
in
range
(
4
):
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
}
)'
)
{
i
%
32767
},
{
i
%
127
},
{
i
*
1.11111
},
{
i
*
1000.1111
},
{
i
%
2
}
{
i
%
32767
},
{
i
%
127
},
{
i
*
1.11111
},
{
i
*
1000.1111
},
{
i
%
2
}
def
__insert_data
(
self
,
rows
):
def
__insert_data
(
self
,
rows
,
dbname
=
DBNAME
):
now_time
=
int
(
datetime
.
datetime
.
timestamp
(
datetime
.
datetime
.
now
())
*
1000
)
now_time
=
int
(
datetime
.
datetime
.
timestamp
(
datetime
.
datetime
.
now
())
*
1000
)
for
i
in
range
(
rows
):
for
i
in
range
(
rows
):
tdSql
.
execute
(
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
(
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
(
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
(
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
-
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
}
)
(
{
now_time
+
10000
}
,
{
rows
}
, -99999, -999, -99, -9.99, -99.99, 1, 'binary9', 'nchar_测试_9',
{
now_time
+
9
}
)
'''
'''
)
)
tdSql
.
execute
(
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
*
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
+
7776000000
}
, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL )
...
@@ -258,7 +262,7 @@ class TDTestCase:
...
@@ -258,7 +262,7 @@ class TDTestCase:
)
)
tdSql
.
execute
(
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
*
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
+
7776000000
}
, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL )
...
@@ -274,13 +278,13 @@ class TDTestCase:
...
@@ -274,13 +278,13 @@ class TDTestCase:
)
)
for
i
in
range
(
rows
):
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
}
,
(
{
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
(
insert_data
)
tdSql
.
execute
(
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
+
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
//
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
-
rows
*
3600000
}
, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL )
...
...
tests/system-test/2-query/sqrt.py
浏览文件 @
1c4f8621
此差异已折叠。
点击以展开。
tests/system-test/fulltest.sh
浏览文件 @
1c4f8621
...
@@ -125,7 +125,7 @@ python3 ./test.py -f 2-query/leastsquares.py -R
...
@@ -125,7 +125,7 @@ python3 ./test.py -f 2-query/leastsquares.py -R
python3 ./test.py
-f
2-query/length.py
python3 ./test.py
-f
2-query/length.py
python3 ./test.py
-f
2-query/length.py
-R
python3 ./test.py
-f
2-query/length.py
-R
python3 ./test.py
-f
2-query/ltrim.py
python3 ./test.py
-f
2-query/ltrim.py
#
python3 ./test.py -f 2-query/ltrim.py -R
python3 ./test.py
-f
2-query/ltrim.py
-R
python3 ./test.py
-f
2-query/max_partition.py
python3 ./test.py
-f
2-query/max_partition.py
python3 ./test.py
-f
2-query/max_partition.py
-R
python3 ./test.py
-f
2-query/max_partition.py
-R
python3 ./test.py
-f
2-query/max.py
python3 ./test.py
-f
2-query/max.py
...
@@ -143,11 +143,19 @@ python3 ./test.py -f 2-query/query_cols_tags_and_or.py -R
...
@@ -143,11 +143,19 @@ python3 ./test.py -f 2-query/query_cols_tags_and_or.py -R
python3 ./test.py
-f
2-query/round.py
python3 ./test.py
-f
2-query/round.py
python3 ./test.py
-f
2-query/round.py
-R
python3 ./test.py
-f
2-query/round.py
-R
python3 ./test.py
-f
2-query/rtrim.py
python3 ./test.py
-f
2-query/rtrim.py
#
python3 ./test.py -f 2-query/rtrim.py -R
python3 ./test.py
-f
2-query/rtrim.py
-R
python3 ./test.py
-f
2-query/sample.py
python3 ./test.py
-f
2-query/sample.py
python3 ./test.py
-f
2-query/sample.py
-R
python3 ./test.py
-f
2-query/sample.py
-R
python3 ./test.py
-f
2-query/sin.py
python3 ./test.py
-f
2-query/sin.py
# python3 ./test.py -f 2-query/sin.py -R
# python3 ./test.py -f 2-query/sin.py -R
python3 ./test.py
-f
2-query/smaTest.py
python3 ./test.py
-f
2-query/smaTest.py
-R
python3 ./test.py
-f
2-query/sml.py
python3 ./test.py
-f
2-query/sml.py
-R
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
1-insert/update_data.py
python3 ./test.py
-f
1-insert/update_data.py
...
@@ -162,7 +170,6 @@ python3 ./test.py -f 2-query/substr.py
...
@@ -162,7 +170,6 @@ python3 ./test.py -f 2-query/substr.py
python3 ./test.py
-f
2-query/union.py
python3 ./test.py
-f
2-query/union.py
python3 ./test.py
-f
2-query/union1.py
python3 ./test.py
-f
2-query/union1.py
python3 ./test.py
-f
2-query/concat2.py
python3 ./test.py
-f
2-query/concat2.py
python3 ./test.py
-f
2-query/spread.py
python3 ./test.py
-f
2-query/timezone.py
python3 ./test.py
-f
2-query/timezone.py
...
@@ -175,7 +182,6 @@ python3 ./test.py -f 2-query/json_tag.py
...
@@ -175,7 +182,6 @@ python3 ./test.py -f 2-query/json_tag.py
python3 ./test.py
-f
2-query/top.py
python3 ./test.py
-f
2-query/top.py
python3 ./test.py
-f
2-query/log.py
python3 ./test.py
-f
2-query/log.py
python3 ./test.py
-f
2-query/sqrt.py
python3 ./test.py
-f
2-query/tan.py
python3 ./test.py
-f
2-query/tan.py
# python3 ./test.py -f 2-query/nestedQuery.py
# python3 ./test.py -f 2-query/nestedQuery.py
# TD-15983 subquery output duplicate name column.
# TD-15983 subquery output duplicate name column.
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录