Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
joec3
TDengine
提交
3c881a1b
TDengine
项目概览
joec3
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
3c881a1b
编写于
9月 07, 2021
作者:
W
wpan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix bug
上级
f5aa8a20
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
19 addition
and
12 deletion
+19
-12
src/client/src/tscSubquery.c
src/client/src/tscSubquery.c
+19
-12
未找到文件。
src/client/src/tscSubquery.c
浏览文件 @
3c881a1b
...
...
@@ -1119,7 +1119,9 @@ bool emptyTagList(SArray* resList, int32_t size) {
static
void
tidTagRetrieveCallback
(
void
*
param
,
TAOS_RES
*
tres
,
int32_t
numOfRows
)
{
SJoinSupporter
*
pSupporter
=
(
SJoinSupporter
*
)
param
;
SSqlObj
*
pParentSql
=
(
SSqlObj
*
)
taosAcquireRef
(
tscObjRef
,
(
int64_t
)
pSupporter
->
pObj
);
int64_t
handle
=
pSupporter
->
pObj
;
SSqlObj
*
pParentSql
=
(
SSqlObj
*
)
taosAcquireRef
(
tscObjRef
,
handle
);
if
(
pParentSql
==
NULL
)
return
;
SSqlObj
*
pSql
=
(
SSqlObj
*
)
tres
;
...
...
@@ -1280,13 +1282,15 @@ static void tidTagRetrieveCallback(void* param, TAOS_RES* tres, int32_t numOfRow
taosArrayDestroy
(
resList
);
_return:
taosReleaseRef
(
tscObjRef
,
(
int64_t
)
pSupporter
->
pObj
);
taosReleaseRef
(
tscObjRef
,
handle
);
}
static
void
tsCompRetrieveCallback
(
void
*
param
,
TAOS_RES
*
tres
,
int32_t
numOfRows
)
{
SJoinSupporter
*
pSupporter
=
(
SJoinSupporter
*
)
param
;
SSqlObj
*
pParentSql
=
(
SSqlObj
*
)
taosAcquireRef
(
tscObjRef
,
(
int64_t
)
pSupporter
->
pObj
);
int64_t
handle
=
pSupporter
->
pObj
;
SSqlObj
*
pParentSql
=
(
SSqlObj
*
)
taosAcquireRef
(
tscObjRef
,
handle
);
if
(
pParentSql
==
NULL
)
return
;
SSqlObj
*
pSql
=
(
SSqlObj
*
)
tres
;
...
...
@@ -1439,13 +1443,14 @@ static void tsCompRetrieveCallback(void* param, TAOS_RES* tres, int32_t numOfRow
tscLaunchRealSubqueries
(
pParentSql
);
_return:
taosReleaseRef
(
tscObjRef
,
(
int64_t
)
pSupporter
->
pObj
);
taosReleaseRef
(
tscObjRef
,
handle
);
}
static
void
joinRetrieveFinalResCallback
(
void
*
param
,
TAOS_RES
*
tres
,
int
numOfRows
)
{
SJoinSupporter
*
pSupporter
=
(
SJoinSupporter
*
)
param
;
int64_t
handle
=
pSupporter
->
pObj
;
SSqlObj
*
pParentSql
=
(
SSqlObj
*
)
taosAcquireRef
(
tscObjRef
,
(
int64_t
)
pSupporter
->
pObj
);
SSqlObj
*
pParentSql
=
(
SSqlObj
*
)
taosAcquireRef
(
tscObjRef
,
handle
);
if
(
pParentSql
==
NULL
)
return
;
SSqlObj
*
pSql
=
(
SSqlObj
*
)
tres
;
...
...
@@ -1550,7 +1555,7 @@ static void joinRetrieveFinalResCallback(void* param, TAOS_RES* tres, int numOfR
tscBuildResFromSubqueries
(
pParentSql
);
_return:
taosReleaseRef
(
tscObjRef
,
(
int64_t
)
pSupporter
->
pObj
);
taosReleaseRef
(
tscObjRef
,
handle
);
}
void
tscFetchDatablockForSubquery
(
SSqlObj
*
pSql
)
{
...
...
@@ -1798,7 +1803,9 @@ void tscJoinQueryCallback(void* param, TAOS_RES* tres, int code) {
SSqlObj
*
pSql
=
(
SSqlObj
*
)
tres
;
SJoinSupporter
*
pSupporter
=
(
SJoinSupporter
*
)
param
;
SSqlObj
*
pParentSql
=
(
SSqlObj
*
)
taosAcquireRef
(
tscObjRef
,
(
int64_t
)
pSupporter
->
pObj
);
int64_t
handle
=
pSupporter
->
pObj
;
SSqlObj
*
pParentSql
=
(
SSqlObj
*
)
taosAcquireRef
(
tscObjRef
,
handle
);
if
(
pParentSql
==
NULL
)
return
;
// There is only one subquery and table for each subquery.
...
...
@@ -1888,7 +1895,7 @@ void tscJoinQueryCallback(void* param, TAOS_RES* tres, int code) {
_return:
taosReleaseRef
(
tscObjRef
,
(
int64_t
)
pSupporter
->
pObj
);
taosReleaseRef
(
tscObjRef
,
handle
);
}
...
...
@@ -1988,9 +1995,9 @@ int32_t tscCreateJoinSubquery(SSqlObj *pSql, int16_t tableIndex, SJoinSupporter
size_t
numOfCols
=
taosArrayGetSize
(
pNewQueryInfo
->
colList
);
tscDebug
(
"
%p subquery:%p
tableIndex:%d, vgroupIndex:%d, type:%d, transfer to tid_tag query to retrieve (tableId, tags), "
"
0x%"
PRIX64
" subquery:0x%"
PRIx64
"
tableIndex:%d, vgroupIndex:%d, type:%d, transfer to tid_tag query to retrieve (tableId, tags), "
"exprInfo:%"
PRIzu
", colList:%"
PRIzu
", fieldsInfo:%d, tagIndex:%d, name:%s"
,
pSql
,
pNew
,
tableIndex
,
pTableMetaInfo
->
vgroupIndex
,
pNewQueryInfo
->
type
,
tscNumOfExprs
(
pNewQueryInfo
),
pSql
->
self
,
pNew
->
self
,
tableIndex
,
pTableMetaInfo
->
vgroupIndex
,
pNewQueryInfo
->
type
,
tscNumOfExprs
(
pNewQueryInfo
),
numOfCols
,
pNewQueryInfo
->
fieldsInfo
.
numOfOutput
,
colIndex
.
columnIndex
,
tNameGetTableName
(
&
pNewQueryInfo
->
pTableMetaInfo
[
0
]
->
name
));
}
else
{
SSchema
colSchema
=
{.
type
=
TSDB_DATA_TYPE_BINARY
,
.
bytes
=
1
};
...
...
@@ -2023,9 +2030,9 @@ int32_t tscCreateJoinSubquery(SSqlObj *pSql, int16_t tableIndex, SJoinSupporter
size_t
numOfCols
=
taosArrayGetSize
(
pNewQueryInfo
->
colList
);
tscDebug
(
"
%p subquery:%p
tableIndex:%d, vgroupIndex:%d, type:%u, transfer to ts_comp query to retrieve timestamps, "
"
0x%"
PRIX64
" subquery:0x%"
PRIx64
"
tableIndex:%d, vgroupIndex:%d, type:%u, transfer to ts_comp query to retrieve timestamps, "
"exprInfo:%"
PRIzu
", colList:%"
PRIzu
", fieldsInfo:%d, name:%s"
,
pSql
,
pNew
,
tableIndex
,
pTableMetaInfo
->
vgroupIndex
,
pNewQueryInfo
->
type
,
tscNumOfExprs
(
pNewQueryInfo
),
pSql
->
self
,
pNew
->
self
,
tableIndex
,
pTableMetaInfo
->
vgroupIndex
,
pNewQueryInfo
->
type
,
tscNumOfExprs
(
pNewQueryInfo
),
numOfCols
,
pNewQueryInfo
->
fieldsInfo
.
numOfOutput
,
tNameGetTableName
(
&
pNewQueryInfo
->
pTableMetaInfo
[
0
]
->
name
));
}
}
else
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录