Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
547a6bae
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看板
提交
547a6bae
编写于
7月 12, 2022
作者:
G
Ganlin Zhao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix test cases
上级
fbca5565
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
11 addition
and
11 deletion
+11
-11
tests/system-test/2-query/and_or_for_byte.py
tests/system-test/2-query/and_or_for_byte.py
+11
-11
未找到文件。
tests/system-test/2-query/and_or_for_byte.py
浏览文件 @
547a6bae
...
...
@@ -47,7 +47,7 @@ class TDTestCase:
c9
=
"'nchar_val'"
c10
=
ts
tdSql
.
execute
(
f
" insert into
{
tbname
}
values (
{
ts
}
,
{
c1
}
,
{
c2
}
,
{
c3
}
,
{
c4
}
,
{
c5
}
,
{
c6
}
,
{
c7
}
,
{
c8
}
,
{
c9
}
,
{
c10
}
)"
)
tdSql
.
execute
(
"use test"
)
tbnames
=
[
"stb"
,
"sub_tb_1"
]
support_types
=
[
"BIGINT"
,
"SMALLINT"
,
"TINYINT"
,
"FLOAT"
,
"DOUBLE"
,
"INT"
]
...
...
@@ -62,7 +62,7 @@ class TDTestCase:
cols
=
random
.
sample
(
colnames
,
3
)
self
.
check_function
(
"&"
,
False
,
tbname
,
cols
[
0
],
cols
[
1
],
cols
[
2
])
self
.
check_function
(
"|"
,
False
,
tbname
,
cols
[
0
],
cols
[
1
],
cols
[
2
])
def
prepare_datas
(
self
):
tdSql
.
execute
(
...
...
@@ -215,14 +215,14 @@ class TDTestCase:
"abs value check pass , it work as expected ,sql is
\"
%s
\"
"
%
abs_query
)
def
check_function
(
self
,
opera
,
agg
,
tbname
,
*
args
):
if
opera
==
"&"
:
pass
elif
opera
==
"|"
:
pass
else
:
pass
work_sql
=
" select "
work_sql
=
" select "
for
ind
,
arg
in
enumerate
(
args
):
if
ind
==
len
(
args
)
-
1
:
work_sql
+=
f
"cast(
{
arg
}
as bigint) "
...
...
@@ -235,7 +235,7 @@ class TDTestCase:
work_sql
+=
f
" from
{
tbname
}
"
tdSql
.
query
(
work_sql
)
work_result
=
tdSql
.
queryResult
origin_sql
=
" select "
for
ind
,
arg
in
enumerate
(
args
):
if
ind
==
len
(
args
)
-
1
:
...
...
@@ -323,7 +323,7 @@ class TDTestCase:
tdSql
.
checkData
(
0
,
0
,
None
)
tdSql
.
checkData
(
1
,
0
,
640
)
tdSql
.
checkData
(
10
,
0
,
0
)
# used for regular table
tdSql
.
query
(
"select abs(c1)&c3&c3 from t1"
)
tdSql
.
checkData
(
0
,
0
,
None
)
...
...
@@ -349,7 +349,7 @@ class TDTestCase:
self
.
check_function
(
"&"
,
False
,
"stb1"
,
"c1"
,
"floor(t1)"
,
"abs(c1+c2)"
,
"t1+1"
)
self
.
check_function
(
"&"
,
True
,
"stb1"
,
"max(c1)"
,
"min(floor(t1))"
,
"sum(abs(c1+c2))"
,
"last(t1)+1"
)
self
.
check_function
(
"&"
,
False
,
"stb1"
,
"abs(abs(abs(abs(abs(abs(abs(abs(abs(abs(c1))))))))))"
,
"floor(t1)"
,
"abs(c1+c2)"
,
"t1+1"
)
# mix with common col
tdSql
.
query
(
"select c1&abs(c1)&c2&c3 ,c1,c2, t1 from ct1"
)
tdSql
.
checkData
(
0
,
0
,
8
)
...
...
@@ -388,7 +388,7 @@ class TDTestCase:
# agg functions mix with agg functions
tdSql
.
query
(
"select sum(c1&abs(c1)&c2&c3) ,max(c5), count(c5) from stb1"
)
tdSql
.
query
(
"select max(c1)&max(c2)|first(ts), count(c5) from ct1"
)
# bug fix for compute
...
...
@@ -409,7 +409,7 @@ class TDTestCase:
tdSql
.
checkData
(
1
,
2
,
894.900000000
)
def
check_boundary_values
(
self
):
...
...
@@ -490,7 +490,7 @@ class TDTestCase:
self
.
check_function
(
"&"
,
False
,
"ct4"
,
"123"
,
"abs(c1)"
,
"t1"
,
"abs(t2)"
,
"abs(t3)"
,
"abs(t4)"
,
"t5"
)
self
.
check_function
(
"&"
,
False
,
"ct4"
,
"c1+2"
,
"abs(t2+2)"
,
"t3"
,
"abs(t4)"
,
"abs(t5)"
,
"abs(c1)"
,
"t5"
)
tdSql
.
query
(
" select sum(c1) from stb1 where t1+10 >1; "
)
tdSql
.
query
(
" select sum(c1) from stb1 where t1+10 >1; "
)
tdSql
.
query
(
"select c1 ,t1 from stb1 where t1 =0 "
)
tdSql
.
checkRows
(
13
)
self
.
check_function
(
"&"
,
False
,
"t1"
,
"c1+2"
,
"abs(c2)"
)
...
...
@@ -534,7 +534,7 @@ class TDTestCase:
self
.
support_super_table_test
()
self
.
insert_datas_and_check_abs
(
self
.
tb_nums
,
self
.
row_nums
,
self
.
time_step
)
def
stop
(
self
):
tdSql
.
close
()
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录