Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
ed76cad0
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,发现更多精彩内容 >>
提交
ed76cad0
编写于
5月 16, 2022
作者:
C
cpwu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add union case
上级
507318f4
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
39 addition
and
32 deletion
+39
-32
tests/system-test/2-query/union.py
tests/system-test/2-query/union.py
+39
-32
未找到文件。
tests/system-test/2-query/union.py
浏览文件 @
ed76cad0
...
...
@@ -36,40 +36,40 @@ class TDTestCase:
query_condition
.
extend
(
(
f
"
{
tbname
}
.
{
char_col
}
"
,
f
"upper(
{
tbname
}
.
{
char_col
}
)"
,
f
"char_length(
{
tbname
}
.
{
char_col
}
)"
,
f
"concat(
{
tbname
}
.
{
char_col
}
,
{
tbname
}
.
{
char_col
}
)"
,
f
"concat_ws( '_',
{
tbname
}
.
{
char_col
}
,
{
tbname
}
.
{
char_col
}
)"
,
f
"length(
{
tbname
}
.
{
char_col
}
)"
,
f
"lower(
{
tbname
}
.
{
char_col
}
)"
,
f
"ltrim(
{
tbname
}
.
{
char_col
}
)"
,
f
"rtrim(
{
tbname
}
.
{
char_col
}
)"
,
f
"substr(
{
tbname
}
.
{
char_col
}
, 1 )"
,
f
"count(
{
tbname
}
.
{
char_col
}
)"
,
#
f"upper( {tbname}.{char_col} )",
#
f"char_length( {tbname}.{char_col} )",
#
f"concat( {tbname}.{char_col}, {tbname}.{char_col} )",
#
f"concat_ws( '_', {tbname}.{char_col}, {tbname}.{char_col} )",
#
f"length( {tbname}.{char_col} )",
#
f"lower( {tbname}.{char_col} )",
#
f"ltrim( {tbname}.{char_col} )",
#
f"rtrim( {tbname}.{char_col} )",
#
f"substr( {tbname}.{char_col}, 1 )",
#
f"count( {tbname}.{char_col} )",
f
"cast(
{
tbname
}
.
{
char_col
}
as nchar(3) )"
,
f
"cast(
{
tbname
}
.
{
char_col
}
as nchar(8) )"
,
)
)
query_condition
.
extend
(
f
"cast(
{
tbname
}
.
{
un_char_col
}
as binary(16) ) "
for
un_char_col
in
NUM_COL
)
query_condition
.
extend
(
f
"cast(
{
tbname
}
.
{
char_col
}
+
{
tbname
}
.
{
char_col_2
}
as binary(32) ) "
for
char_col_2
in
CHAR_COL
)
query_condition
.
extend
(
f
"cast(
{
tbname
}
.
{
char_col
}
+
{
tbname
}
.
{
un_char_col
}
as binary(32) ) "
for
un_char_col
in
NUM_COL
)
#
query_condition.extend( f"cast( {tbname}.{un_char_col} as binary(16) ) " for un_char_col in NUM_COL)
#
query_condition.extend( f"cast( {tbname}.{char_col} + {tbname}.{char_col_2} as binary(32) ) " for char_col_2 in CHAR_COL )
#
query_condition.extend( f"cast( {tbname}.{char_col} + {tbname}.{un_char_col} as binary(32) ) " for un_char_col in NUM_COL )
for
num_col
in
NUM_COL
:
query_condition
.
extend
(
(
f
"
{
tbname
}
.
{
num_col
}
"
,
f
"ceil(
{
tbname
}
.
{
num_col
}
)"
,
f
"abs(
{
tbname
}
.
{
num_col
}
)"
,
f
"acos(
{
tbname
}
.
{
num_col
}
)"
,
f
"asin(
{
tbname
}
.
{
num_col
}
)"
,
f
"atan(
{
tbname
}
.
{
num_col
}
)"
,
f
"cos(
{
tbname
}
.
{
num_col
}
)"
,
f
"floor(
{
tbname
}
.
{
num_col
}
)"
,
f
"log(
{
tbname
}
.
{
num_col
}
,
{
tbname
}
.
{
num_col
}
)"
,
f
"sin(
{
tbname
}
.
{
num_col
}
)"
,
f
"sqrt(
{
tbname
}
.
{
num_col
}
)"
,
f
"tan(
{
tbname
}
.
{
num_col
}
)"
,
f
"round(
{
tbname
}
.
{
num_col
}
)"
,
#
f"ceil( {tbname}.{num_col} )",
#
f"abs( {tbname}.{num_col} )",
#
f"acos( {tbname}.{num_col} )",
#
f"asin( {tbname}.{num_col} )",
#
f"atan( {tbname}.{num_col} )",
#
f"cos( {tbname}.{num_col} )",
#
f"floor( {tbname}.{num_col} )",
#
f"log( {tbname}.{num_col}, {tbname}.{num_col})",
#
f"sin( {tbname}.{num_col} )",
#
f"sqrt( {tbname}.{num_col} )",
#
f"tan( {tbname}.{num_col} )",
#
f"round( {tbname}.{num_col} )",
f
"max(
{
tbname
}
.
{
num_col
}
)"
,
f
"sum(
{
tbname
}
.
{
num_col
}
)"
,
f
"count(
{
tbname
}
.
{
num_col
}
)"
,
...
...
@@ -79,7 +79,13 @@ class TDTestCase:
query_condition
.
extend
(
f
"
{
tbname
}
.
{
num_col
}
+
{
tbname
}
.
{
num_col_2
}
"
for
num_col_2
in
NUM_COL
)
query_condition
.
extend
(
f
"
{
tbname
}
.
{
num_col
}
+
{
tbname
}
.
{
char_col
}
"
for
char_col
in
CHAR_COL
)
query_condition
.
append
(
''' "test1234!@#$%^&*():'><?/.,][}{" '''
)
query_condition
.
extend
(
(
# ''' "test1234!@#$%^&*():'><?/.,][}{" ''',
''' "test12" '''
,
1010
)
)
return
query_condition
...
...
@@ -144,11 +150,11 @@ class TDTestCase:
[
"ct2"
,
"ct4"
],
[
"ct2"
,
"t1"
],
[
"ct4"
,
"t1"
],
[
"ct1"
,
"ct2"
,
"ct4"
],
[
"ct1"
,
"ct2"
,
"t1"
],
[
"ct1"
,
"ct4"
,
"t1"
],
[
"ct2"
,
"ct4"
,
"t1"
],
[
"ct1"
,
"ct2"
,
"ct4"
,
"t1"
],
#
["ct1", "ct2", "ct4"],
#
["ct1", "ct2", "t1"],
#
["ct1", "ct4", "t1"],
#
["ct2", "ct4", "t1"],
#
["ct1", "ct2", "ct4", "t1"],
]
@
property
...
...
@@ -201,7 +207,8 @@ class TDTestCase:
)
)
return
filter
(
None
,
sqls
)
# return filter(None, sqls)
return
list
(
filter
(
None
,
sqls
))
def
__get_type
(
self
,
col
):
if
tdSql
.
cursor
.
istype
(
col
,
"BOOL"
):
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录