Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
5fc0e234
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看板
提交
5fc0e234
编写于
10月 28, 2022
作者:
haoranc
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
test:supplement muti-branch for query fuction testcase
上级
86576930
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
50 addition
and
20 deletion
+50
-20
source/libs/function/src/builtins.c
source/libs/function/src/builtins.c
+1
-1
tests/system-test/2-query/diff.py
tests/system-test/2-query/diff.py
+11
-0
tests/system-test/2-query/elapsed.py
tests/system-test/2-query/elapsed.py
+14
-12
tests/system-test/2-query/histogram.py
tests/system-test/2-query/histogram.py
+20
-7
tests/system-test/2-query/unique.py
tests/system-test/2-query/unique.py
+4
-0
未找到文件。
source/libs/function/src/builtins.c
浏览文件 @
5fc0e234
...
...
@@ -1651,7 +1651,7 @@ static int32_t translateMode(SFunctionNode* pFunc, char* pErrBuf, int32_t len) {
static
int32_t
translateDiff
(
SFunctionNode
*
pFunc
,
char
*
pErrBuf
,
int32_t
len
)
{
int32_t
numOfParams
=
LIST_LENGTH
(
pFunc
->
pParameterList
);
if
(
numOfParams
==
0
||
numOfParams
>
2
)
{
if
(
numOfParams
>
2
)
{
return
invaildFuncParaNumErrMsg
(
pErrBuf
,
len
,
pFunc
->
functionName
);
}
...
...
tests/system-test/2-query/diff.py
浏览文件 @
5fc0e234
...
...
@@ -93,8 +93,19 @@ class TDTestCase:
tdSql
.
error
(
f
"select diff(col12) from
{
dbname
}
.stb_1"
)
tdSql
.
error
(
f
"select diff(col13) from
{
dbname
}
.stb_1"
)
tdSql
.
error
(
f
"select diff(col14) from
{
dbname
}
.stb_1"
)
tdSql
.
error
(
f
"select diff(col14) from
{
dbname
}
.stb_1"
)
tdSql
.
error
(
f
"select diff(col1,col1,col1) from
{
dbname
}
.stb_1"
)
tdSql
.
error
(
f
"select diff(col1,1,col1) from
{
dbname
}
.stb_1"
)
tdSql
.
error
(
f
"select diff(col1,col1,col) from
{
dbname
}
.stb_1"
)
tdSql
.
error
(
f
"select diff(col1,col1) from
{
dbname
}
.stb_1"
)
tdSql
.
error
(
f
"select diff(col1,'123') from
{
dbname
}
.stb_1"
)
tdSql
.
error
(
f
"select diff(col1,1.23) from
{
dbname
}
.stb_1"
)
tdSql
.
error
(
f
"select diff(col1,-1) from
{
dbname
}
.stb_1"
)
tdSql
.
query
(
f
"select ts,diff(col1),ts from
{
dbname
}
.stb_1"
)
tdSql
.
query
(
f
"select diff(ts) from
{
dbname
}
.stb_1"
)
tdSql
.
checkRows
(
10
)
tdSql
.
query
(
f
"select diff(col1) from
{
dbname
}
.stb_1"
)
tdSql
.
checkRows
(
10
)
...
...
tests/system-test/2-query/elapsed.py
浏览文件 @
5fc0e234
...
...
@@ -1312,24 +1312,26 @@ class TDTestCase:
# ts can't be used at outer query
tdSql
.
query
(
"select elapsed(ts,1s) from (select ts from
regular_
table_1 );"
)
tdSql
.
query
(
"select elapsed(ts,1s) from (select ts from
s
table_1 );"
)
# case : TD-12164
tdSql
.
error
(
"select elapsed(ts,1s) from (select qint ts from
regular_
table_1 );"
)
tdSql
.
error
(
"select elapsed(tbname ,1s) from (select qint tbname from
regular_
table_1 );"
)
tdSql
.
error
(
"select elapsed(tsc ,1s) from (select q_int tsc from
regular_
table_1) ;"
)
tdSql
.
error
(
"select elapsed(tsv ,1s) from (select elapsed(ts,1s) tsv from
regular_
table_1);"
)
tdSql
.
error
(
"select elapsed(ts ,1s) from (select elapsed(ts,1s) ts from
regular_
table_1);"
)
tdSql
.
error
(
"select elapsed(ts,1s) from (select qint ts from
s
table_1 );"
)
tdSql
.
error
(
"select elapsed(tbname ,1s) from (select qint tbname from
s
table_1 );"
)
tdSql
.
error
(
"select elapsed(tsc ,1s) from (select q_int tsc from
s
table_1) ;"
)
tdSql
.
error
(
"select elapsed(tsv ,1s) from (select elapsed(ts,1s) tsv from
s
table_1);"
)
tdSql
.
error
(
"select elapsed(ts ,1s) from (select elapsed(ts,1s) ts from
s
table_1);"
)
# # bug fix
tdSql
.
error
(
"select elapsed(tsc ,1s) from (select tscol tsc from
regular_
table_1) ;"
)
tdSql
.
error
(
"select elapsed(tsc ,1s) from (select tscol tsc from
s
table_1) ;"
)
#TD-19911
tdSql
.
error
(
"select elapsed(ts,1s,123) from (select ts,tbname from regular_table_1 order by ts asc );"
)
tdSql
.
error
(
"select elapsed() from (select ts,tbname from regular_table_1 order by ts asc );"
)
tdSql
.
error
(
"select elapsed(tscol,1s) from (select ts,tbname from regular_table_1 order by ts asc );"
)
tdSql
.
error
(
"select elapsed(ts,1n) from (select ts,tbname from regular_table_1 order by ts asc );"
)
tdSql
.
error
(
"select elapsed(ts,1y) from (select ts,tbname from regular_table_1 order by ts asc );"
)
tdSql
.
error
(
"select elapsed(ts,1s,123) from (select ts,tbname from stable_1 order by ts asc );"
)
tdSql
.
error
(
"select elapsed() from (select ts,tbname from stable_1 order by ts asc );"
)
tdSql
.
error
(
"select elapsed(tscol,1s) from (select ts,tbname from stable_1 order by ts asc );"
)
tdSql
.
error
(
"select elapsed(ts,1n) from (select ts,tbname from stable_1 order by ts asc );"
)
tdSql
.
error
(
"select elapsed(ts,1y) from (select ts,tbname from stable_1 order by ts asc );"
)
tdSql
.
error
(
"select elapsed(ts,tscol) from (select ts,tbname from stable_1 order by ts asc );"
)
tdSql
.
error
(
"select elapsed(bin_chars,tscol) from (select ts,tbname from stable_1 order by ts asc );"
)
# case TD-12276
tdSql
.
query
(
"select elapsed(ts,1s) from (select ts,tbname from regular_table_1 order by ts asc );"
)
...
...
tests/system-test/2-query/histogram.py
浏览文件 @
5fc0e234
...
...
@@ -454,13 +454,26 @@ class TDTestCase:
tdSql
.
checkData
(
2
,
0
,
'{"lower_bin":6, "upper_bin":9, "count":3}'
)
# if (4 != numOfParams)
# tdSql.error("select HISTOGRAM(c_int, \"linear_bin\", \"{\"start\": -200, \"width\": 100, \"count\": 20, \"infinity\": false}\", 1 , InvalidNumber) from db.nt1 where c_int < 10")
tdSql
.
error
(
'SELECT HISTOGRAM(c_int, "linear_bin", "{"start": -200, "width": 100, "count": 20, "infinity": false}", 0 ,InvalidNumber ) from %s.nt1 '
%
dbname
)
tdSql
.
error
(
'SELECT HISTOGRAM(c_int, "linear_bin", "{"start": -200, "width": 100, "count": 20, "infinity": false}" ) from %s.nt1 '
%
dbname
)
tdSql
.
error
(
'SELECT HISTOGRAM(c_int, 54321, "[0,3,6,9]", 1 ) from %s.nt1 '
%
dbname
)
tdSql
.
error
(
'SELECT HISTOGRAM(c_int, "USER_INPUT", 54321, 0 ) from %s.nt1'
%
dbname
)
tdSql
.
error
(
'SELECT HISTOGRAM(c_int, "USER_INPUT", "[0,3,6,9]", InvalidNumber ) from %s.nt1'
%
dbname
)
tdSql
.
error
(
'SELECT HISTOGRAM(c_int, "USER_INPUT", "[0,3,6,9]", -100 ) from %s.nt1'
%
dbname
)
# tdSql.error("select HISTOGRAM(c_int, \"linear_bin\", \"{\"start\": -200, \"width\": 100, \"count\": 20, \"infinity\": false}\", 1 , InvalidNumber) from db.stb1 where c_int < 10")
tdSql
.
error
(
'SELECT HISTOGRAM(c_int, "linear_bin",
\'
{"start": -200, "width": 100, "count": 20, "infinity": false}
\'
, 0 ,InvalidNumber ) from %s.stb1 '
%
dbname
)
tdSql
.
error
(
'SELECT HISTOGRAM(c_int, "linear_bin",
\'
{"start": -200, "width": 100, "count": 20, "infinity": false}
\'
) from %s.stb1 '
%
dbname
)
tdSql
.
error
(
'SELECT HISTOGRAM(c_int, 54321, "[0,3,6,9]", 1 ) from %s.stb1 '
%
dbname
)
tdSql
.
error
(
'SELECT HISTOGRAM(c_int, "USER_INPUT", 54321, 0 ) from %s.stb1'
%
dbname
)
tdSql
.
error
(
'SELECT HISTOGRAM(c_int, "USER_INPUT", "[0,3,6,9]", InvalidNumber ) from %s.stb1'
%
dbname
)
tdSql
.
error
(
'SELECT HISTOGRAM(c_int, "USER_INPUT", "[0,3,6,9]", -100 ) from %s.stb1'
%
dbname
)
tdSql
.
error
(
'SELECT HISTOGRAM(c_int, c_int, "[0,3,6,9]", 1 ) from %s.stb1'
%
dbname
)
tdSql
.
error
(
'SELECT HISTOGRAM(c_int, "USER_INPUT", c_int, 1 ) from %s.stb1'
%
dbname
)
tdSql
.
error
(
'SELECT HISTOGRAM(c_int, "USER_INPUT", "[0,3,6,9]", c_int ) from %s.stb1'
%
dbname
)
tdSql
.
query
(
'SELECT HISTOGRAM(123, "USER_INPUT", "[0,3,6,9]", 0 ) from %s.stb1'
%
dbname
)
tdSql
.
error
(
'SELECT HISTOGRAM(c_binary, "USER_INPUT", "[0,3,6,9]", 0 ) from %s.stb1'
%
dbname
)
tdSql
.
error
(
'SELECT HISTOGRAM("c_binary", "USER_INPUT", "[0,3,6,9]", 0 ) from %s.stb1'
%
dbname
)
tdSql
.
query
(
'SELECT HISTOGRAM(123, "linear_bin",
\'
{"start": 1, "width": 10, "count": 20, "infinity": false}
\'
,0 ) from %s.stb1 '
%
dbname
)
tdSql
.
error
(
'SELECT HISTOGRAM(c_binary, "linear_bin",
\'
{"start": 1, "width": 10, "count": 20, "infinity": false}
\'
,0 ) from %s.stb1 '
%
dbname
)
tdSql
.
error
(
'SELECT HISTOGRAM("c_binary", "linear_bin",
\'
{"start": 1, "width": 10, "count": 20, "infinity": false}
\'
,0 ) from %s.stb1 '
%
dbname
)
tdSql
.
error
(
'SELECT HISTOGRAM(c_int, "c_int",
\'
{"start": 1, "width": 10, "count": 20, "infinity": false}
\'
,0 ) from %s.stb1 '
%
dbname
)
tdSql
.
error
(
'SELECT HISTOGRAM(c_int, "linear_bin", c_int,0 ) from %s.stb1 '
%
dbname
)
tdSql
.
error
(
'SELECT HISTOGRAM(c_int, "linear_bin",
\'
{"start": 1, "width": 10, "count": 20, "infinity": false}
\'
,c_int ) from %s.stb1 '
%
dbname
)
def
all_test
(
self
,
dbname
=
DBNAME
):
...
...
tests/system-test/2-query/unique.py
浏览文件 @
5fc0e234
...
...
@@ -437,6 +437,10 @@ class TDTestCase:
tdSql
.
checkData
(
0
,
0
,
4
)
tdSql
.
checkData
(
1
,
0
,
1
)
# TD-19911
tdSql
.
error
(
"select unique(mode(12)) from (select _rowts , t1 , tbname from db.stb1 );"
)
tdSql
.
error
(
"select unique(mode(t1,1)) from (select _rowts , t1 , tbname from db.stb1 );"
)
def
check_boundary_values
(
self
,
dbname
=
"bound_test"
):
tdSql
.
execute
(
f
"drop database if exists
{
dbname
}
"
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录