Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
139ed7de
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看板
提交
139ed7de
编写于
3月 22, 2021
作者:
D
dapan1121
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add test case
上级
e60179df
变更
2
展开全部
隐藏空白更改
内联
并排
Showing
2 changed file
with
2335 addition
and
7 deletion
+2335
-7
src/client/src/tscSubquery.c
src/client/src/tscSubquery.c
+9
-7
tests/script/general/parser/join_multitables.sim
tests/script/general/parser/join_multitables.sim
+2326
-0
未找到文件。
src/client/src/tscSubquery.c
浏览文件 @
139ed7de
...
@@ -169,6 +169,8 @@ static int64_t doTSBlockIntersect(SSqlObj* pSql, STimeWindow * win) {
...
@@ -169,6 +169,8 @@ static int64_t doTSBlockIntersect(SSqlObj* pSql, STimeWindow * win) {
return
0
;
return
0
;
}
}
tscDebug
(
"%p sub:%p table idx:%d, input group number:%d"
,
pSql
,
pSql
->
pSubs
[
i
],
i
,
pSupporter
->
pTSBuf
->
numOfGroups
);
ctxlist
[
i
].
p
=
pSupporter
;
ctxlist
[
i
].
p
=
pSupporter
;
ctxlist
[
i
].
res
=
output
;
ctxlist
[
i
].
res
=
output
;
}
}
...
@@ -291,7 +293,7 @@ static int64_t doTSBlockIntersect(SSqlObj* pSql, STimeWindow * win) {
...
@@ -291,7 +293,7 @@ static int64_t doTSBlockIntersect(SSqlObj* pSql, STimeWindow * win) {
for
(
int32_t
i
=
0
;
i
<
stackidx
;
++
i
)
{
for
(
int32_t
i
=
0
;
i
<
stackidx
;
++
i
)
{
SMergeTsCtx
*
tctx
=
ctxStack
[
i
];
SMergeTsCtx
*
tctx
=
ctxStack
[
i
];
if
(
!
tsBufNextPos
(
tctx
->
p
->
pTSBuf
))
{
if
(
!
tsBufNextPos
(
tctx
->
p
->
pTSBuf
)
&&
tctx
==
mainCtx
)
{
mergeDone
=
1
;
mergeDone
=
1
;
}
}
tctx
->
numOfInput
++
;
tctx
->
numOfInput
++
;
...
@@ -306,7 +308,7 @@ static int64_t doTSBlockIntersect(SSqlObj* pSql, STimeWindow * win) {
...
@@ -306,7 +308,7 @@ static int64_t doTSBlockIntersect(SSqlObj* pSql, STimeWindow * win) {
ctxStack
[
stackidx
++
]
=
pctx
;
ctxStack
[
stackidx
++
]
=
pctx
;
}
else
if
(
ret
>
0
)
{
}
else
if
(
ret
>
0
)
{
if
(
!
tsBufNextPos
(
ctx
->
p
->
pTSBuf
))
{
if
(
!
tsBufNextPos
(
ctx
->
p
->
pTSBuf
)
&&
ctx
==
mainCtx
)
{
mergeDone
=
1
;
mergeDone
=
1
;
break
;
break
;
}
}
...
@@ -319,7 +321,7 @@ static int64_t doTSBlockIntersect(SSqlObj* pSql, STimeWindow * win) {
...
@@ -319,7 +321,7 @@ static int64_t doTSBlockIntersect(SSqlObj* pSql, STimeWindow * win) {
for
(
int32_t
i
=
0
;
i
<
stackidx
;
++
i
)
{
for
(
int32_t
i
=
0
;
i
<
stackidx
;
++
i
)
{
SMergeTsCtx
*
tctx
=
ctxStack
[
i
];
SMergeTsCtx
*
tctx
=
ctxStack
[
i
];
if
(
!
tsBufNextPos
(
tctx
->
p
->
pTSBuf
))
{
if
(
!
tsBufNextPos
(
tctx
->
p
->
pTSBuf
)
&&
tctx
==
mainCtx
)
{
mergeDone
=
1
;
mergeDone
=
1
;
}
}
tctx
->
numOfInput
++
;
tctx
->
numOfInput
++
;
...
@@ -373,11 +375,9 @@ static int64_t doTSBlockIntersect(SSqlObj* pSql, STimeWindow * win) {
...
@@ -373,11 +375,9 @@ static int64_t doTSBlockIntersect(SSqlObj* pSql, STimeWindow * win) {
TSKEY
et
=
taosGetTimestampUs
();
TSKEY
et
=
taosGetTimestampUs
();
for
(
int32_t
i
=
0
;
i
<
joinNum
;
++
i
)
{
for
(
int32_t
i
=
0
;
i
<
joinNum
;
++
i
)
{
tsBufFlush
(
ctxlist
[
i
].
res
);
tscDebug
(
"%p sub:%p tblidx:%d, input:%"
PRId64
", final:%"
PRId64
" in %d vnodes for secondary query after ts blocks "
tscDebug
(
"%p tblidx:%d, input:%"
PRId64
", final:%"
PRId64
" in %d vnodes for secondary query after ts blocks "
"intersecting, skey:%"
PRId64
", ekey:%"
PRId64
", numOfVnode:%d, elapsed time:%"
PRId64
" us"
,
"intersecting, skey:%"
PRId64
", ekey:%"
PRId64
", numOfVnode:%d, elapsed time:%"
PRId64
" us"
,
pSql
,
i
,
ctxlist
[
i
].
numOfInput
,
ctxlist
[
i
].
res
->
numOfTotal
,
ctxlist
[
i
].
res
->
numOfGroups
,
win
->
skey
,
win
->
ekey
,
pSql
,
pSql
->
pSubs
[
i
],
i
,
ctxlist
[
i
].
numOfInput
,
ctxlist
[
i
].
res
->
numOfTotal
,
ctxlist
[
i
].
res
->
numOfGroups
,
win
->
skey
,
win
->
ekey
,
tsBufGetNumOfGroup
(
ctxlist
[
i
].
res
),
et
-
st
);
tsBufGetNumOfGroup
(
ctxlist
[
i
].
res
),
et
-
st
);
}
}
...
@@ -1881,6 +1881,8 @@ int32_t tscCreateJoinSubquery(SSqlObj *pSql, int16_t tableIndex, SJoinSupporter
...
@@ -1881,6 +1881,8 @@ int32_t tscCreateJoinSubquery(SSqlObj *pSql, int16_t tableIndex, SJoinSupporter
pNewQueryInfo
->
limit
.
limit
=
-
1
;
pNewQueryInfo
->
limit
.
limit
=
-
1
;
pNewQueryInfo
->
limit
.
offset
=
0
;
pNewQueryInfo
->
limit
.
offset
=
0
;
pNewQueryInfo
->
order
.
orderColId
=
INT32_MIN
;
// backup the data and clear it in the sqlcmd object
// backup the data and clear it in the sqlcmd object
memset
(
&
pNewQueryInfo
->
groupbyExpr
,
0
,
sizeof
(
SSqlGroupbyExpr
));
memset
(
&
pNewQueryInfo
->
groupbyExpr
,
0
,
sizeof
(
SSqlGroupbyExpr
));
...
...
tests/script/general/parser/join_multitables.sim
0 → 100644
浏览文件 @
139ed7de
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录