Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
603cc794
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看板
提交
603cc794
编写于
11月 26, 2021
作者:
C
Cary Xu
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' into hotfix/TS-714
上级
16dca9fd
8ecbd51c
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
79 addition
and
20 deletion
+79
-20
src/query/src/qExecutor.c
src/query/src/qExecutor.c
+0
-3
tests/pytest/functions/function_count_last_stab.py
tests/pytest/functions/function_count_last_stab.py
+12
-12
tests/pytest/query/nestedQuery/nestedQuery.py
tests/pytest/query/nestedQuery/nestedQuery.py
+63
-1
tests/script/general/parser/col_arithmetic_query.sim
tests/script/general/parser/col_arithmetic_query.sim
+4
-4
未找到文件。
src/query/src/qExecutor.c
浏览文件 @
603cc794
...
...
@@ -1713,9 +1713,6 @@ static void doHashGroupbyAgg(SOperatorInfo* pOperator, SGroupbyOperatorInfo *pIn
int32_t
num
=
0
;
for
(
int32_t
j
=
0
;
j
<
pSDataBlock
->
info
.
rows
;
++
j
)
{
char
*
val
=
((
char
*
)
pColInfoData
->
pData
)
+
bytes
*
j
;
if
(
isNull
(
val
,
type
))
{
continue
;
}
// Compare with the previous row of this column, and do not set the output buffer again if they are identical.
if
(
pInfo
->
prevData
==
NULL
)
{
...
...
tests/pytest/functions/function_count_last_stab.py
浏览文件 @
603cc794
...
...
@@ -42,22 +42,22 @@ class TDTestCase:
%
(
self
.
ts
+
i
,
i
+
1
,
1
,
i
+
1
,
i
+
1
,
i
+
0.1
,
i
+
0.1
,
i
%
2
,
i
+
1
,
i
+
1
,
i
+
1
,
i
+
1
,
i
+
1
,
i
+
1
))
tdSql
.
query
(
"select count(*),last(*) from stest group by col1"
)
tdSql
.
checkRows
(
1
0
)
tdSql
.
checkData
(
0
,
0
,
1
)
tdSql
.
checkData
(
1
,
2
,
2
)
tdSql
.
checkData
(
1
,
3
,
1
)
tdSql
.
checkRows
(
1
1
)
tdSql
.
checkData
(
1
,
0
,
1
)
tdSql
.
checkData
(
2
,
2
,
2
)
tdSql
.
checkData
(
2
,
3
,
1
)
tdSql
.
query
(
"select count(*),last(*) from stest group by col2"
)
tdSql
.
checkRows
(
1
)
tdSql
.
checkData
(
0
,
0
,
10
)
tdSql
.
checkData
(
0
,
2
,
10
)
tdSql
.
checkData
(
0
,
3
,
1
)
tdSql
.
checkRows
(
2
)
tdSql
.
checkData
(
1
,
0
,
10
)
tdSql
.
checkData
(
1
,
2
,
10
)
tdSql
.
checkData
(
1
,
3
,
1
)
tdSql
.
query
(
"select count(*),last(ts,stest.*) from stest group by col1"
)
tdSql
.
checkRows
(
1
0
)
tdSql
.
checkData
(
0
,
0
,
1
)
tdSql
.
checkData
(
0
,
2
,
"2018-09-17 09:00:00"
)
tdSql
.
checkData
(
1
,
4
,
1
)
tdSql
.
checkRows
(
1
1
)
tdSql
.
checkData
(
1
,
0
,
1
)
tdSql
.
checkData
(
1
,
2
,
"2018-09-17 09:00:00"
)
tdSql
.
checkData
(
2
,
4
,
1
)
...
...
tests/pytest/query/nestedQuery/nestedQuery.py
浏览文件 @
603cc794
...
...
@@ -488,7 +488,7 @@ class TDTestCase:
tdLog
.
info
(
len
(
sql
))
tdSql
.
query
(
sql
)
#tdSql.checkData(0,0,'2020-09-13 20:26:40.000')
tdSql
.
checkRows
(
6
*
self
.
num
)
tdSql
.
checkRows
(
6
*
self
.
num
)
#1 outer union not support
#dcDB = self.dropandcreateDB(random.randint(1,3))
...
...
@@ -2164,6 +2164,68 @@ class TDTestCase:
tdLog
.
info
(
len
(
sql
))
tdSql
.
query
(
sql
)
tdSql
.
query
(
"select 21-4 from table_0;"
)
for
i
in
range
(
self
.
fornum
):
sql
=
"select avg(res1),min(res2),max(res3) from ( select "
sql
+=
"%s res1, "
%
random
.
choice
(
calc_aggregate_all
)
sql
+=
"%s res2,"
%
random
.
choice
(
calc_aggregate_all
)
sql
+=
"%s res3 "
%
random
.
choice
(
calc_aggregate_all
)
sql
+=
" from regular_table_1 t1 "
sql
+=
" where %s "
%
random
.
choice
(
q_where
)
sql
+=
" %s ) "
%
random
.
choice
(
interval_sliding
)
sql
+=
"group by ts "
sql
+=
"%s ;"
%
random
.
choice
(
limit_where
)
tdLog
.
info
(
sql
)
tdLog
.
info
(
len
(
sql
))
tdSql
.
query
(
sql
)
tdSql
.
query
(
"select 21-5 from table_0;"
)
for
i
in
range
(
self
.
fornum
):
sql
=
"select avg(res1),min(res2),max(res3) from ( select "
sql
+=
"%s res1, "
%
random
.
choice
(
calc_aggregate_all
)
sql
+=
"%s res2,"
%
random
.
choice
(
calc_aggregate_all
)
sql
+=
"%s res3 "
%
random
.
choice
(
calc_aggregate_all
)
sql
+=
" from table_1 t1 "
sql
+=
" where %s "
%
random
.
choice
(
q_where
)
sql
+=
" %s ) "
%
random
.
choice
(
interval_sliding
)
sql
+=
"group by ts "
sql
+=
"%s ;"
%
random
.
choice
([
limit_where
[
2
]
,
limit_where
[
3
]]
)
tdLog
.
info
(
sql
)
tdLog
.
info
(
len
(
sql
))
tdSql
.
query
(
sql
)
tdSql
.
query
(
"select 21-6 from table_0;"
)
for
i
in
range
(
self
.
fornum
):
sql
=
"select avg(res1),min(res2),max(res3) from ( select "
sql
+=
"%s res1, "
%
random
.
choice
(
calc_aggregate_all
)
sql
+=
"%s res2,"
%
random
.
choice
(
calc_aggregate_all
)
sql
+=
"%s res3 "
%
random
.
choice
(
calc_aggregate_all
)
sql
+=
" from stable_1 t1 "
sql
+=
" where %s "
%
random
.
choice
(
q_where
)
sql
+=
" %s ) "
%
random
.
choice
(
interval_sliding
)
sql
+=
"group by ts "
sql
+=
"%s ;"
%
random
.
choice
(
limit_where
)
tdLog
.
info
(
sql
)
tdLog
.
info
(
len
(
sql
))
tdSql
.
query
(
sql
)
tdSql
.
query
(
"select 21-7 from table_0;"
)
for
i
in
range
(
self
.
fornum
):
sql
=
"select avg(res1),min(res2),max(res3) from ( select "
sql
+=
"%s res1, "
%
random
.
choice
(
calc_aggregate_all
)
sql
+=
"%s res2,"
%
random
.
choice
(
calc_aggregate_all
)
sql
+=
"%s res3 "
%
random
.
choice
(
calc_aggregate_all
)
sql
+=
" from stable_1 t1 "
sql
+=
" where %s "
%
random
.
choice
(
q_where
)
sql
+=
" %s "
%
random
.
choice
(
interval_sliding
)
sql
+=
" %s ) "
%
random
.
choice
(
group_where
)
sql
+=
"group by ts "
sql
+=
"%s ;"
%
random
.
choice
(
limit_where
)
tdLog
.
info
(
sql
)
tdLog
.
info
(
len
(
sql
))
tdSql
.
query
(
sql
)
# error
#1 select * from (select * from (select * form regular_table where <\>\in\and\or order by limit ))
tdSql
.
query
(
"select 1-1 from table_1;"
)
...
...
tests/script/general/parser/col_arithmetic_query.sim
浏览文件 @
603cc794
...
...
@@ -553,19 +553,19 @@ endi
sql_error select first(c6) - last(c6) *12 / count(*) from $stb group by c3;
sql select first(c6) - last(c6) *12 / count(*) from $stb group by c5;
if $rows != 1
0
then
if $rows != 1
1
then
return -1
endi
if $data00 !=
0.00000
0000 then
if $data00 !=
-0.00216
0000 then
return -1
endi
if $data10 != 0.
9976
00000 then
if $data10 != 0.
0000
00000 then
return -1
endi
if $data90 !=
8.9784
00000 then
if $data90 !=
7.9808
00000 then
return -1
endi
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录