Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
b0b119
TDengine
提交
66221096
TDengine
项目概览
b0b119
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
66221096
编写于
5月 11, 2020
作者:
H
hjxilinx
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[td-225]
上级
d3ce1290
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
16 addition
and
14 deletion
+16
-14
src/client/src/tscServer.c
src/client/src/tscServer.c
+7
-5
src/client/src/tscSubquery.c
src/client/src/tscSubquery.c
+1
-1
src/client/src/tscUtil.c
src/client/src/tscUtil.c
+0
-3
src/query/src/queryExecutor.c
src/query/src/queryExecutor.c
+8
-5
未找到文件。
src/client/src/tscServer.c
浏览文件 @
66221096
...
@@ -492,13 +492,15 @@ int tscBuildFetchMsg(SSqlObj *pSql, SSqlInfo *pInfo) {
...
@@ -492,13 +492,15 @@ int tscBuildFetchMsg(SSqlObj *pSql, SSqlInfo *pInfo) {
pMsg
+=
sizeof
(
pQueryInfo
->
type
);
pMsg
+=
sizeof
(
pQueryInfo
->
type
);
// todo valid the vgroupId at the client side
// todo valid the vgroupId at the client side
if
(
UTIL_TABLE_IS_SUPERTABLE
(
pQueryInfo
->
pTableMetaInfo
[
0
]))
{
STableMetaInfo
*
pTableMetaInfo
=
tscGetMetaInfo
(
pQueryInfo
,
0
);
SVgroupsInfo
*
pVgroupInfo
=
pQueryInfo
->
pTableMetaInfo
[
0
]
->
vgroupList
;
assert
(
pVgroupInfo
->
numOfVgroups
==
1
);
// todo fix me
if
(
UTIL_TABLE_IS_SUPERTABLE
(
pTableMetaInfo
))
{
int32_t
vgIndex
=
pTableMetaInfo
->
vgroupIndex
;
pRetrieveMsg
->
header
.
vgId
=
htonl
(
pVgroupInfo
->
vgroups
[
0
].
vgId
);
SVgroupsInfo
*
pVgroupInfo
=
pTableMetaInfo
->
vgroupList
;
pRetrieveMsg
->
header
.
vgId
=
htonl
(
pVgroupInfo
->
vgroups
[
vgIndex
].
vgId
);
}
else
{
}
else
{
STableMeta
*
pTableMeta
=
p
QueryInfo
->
pTableMetaInfo
[
0
]
->
pTableMeta
;
STableMeta
*
pTableMeta
=
p
TableMetaInfo
->
pTableMeta
;
pRetrieveMsg
->
header
.
vgId
=
htonl
(
pTableMeta
->
vgroupInfo
.
vgId
);
pRetrieveMsg
->
header
.
vgId
=
htonl
(
pTableMeta
->
vgroupInfo
.
vgId
);
}
}
...
...
src/client/src/tscSubquery.c
浏览文件 @
66221096
...
@@ -1450,7 +1450,7 @@ void tscHandleSubqueryError(SRetrieveSupport *trsupport, SSqlObj *pSql, int numO
...
@@ -1450,7 +1450,7 @@ void tscHandleSubqueryError(SRetrieveSupport *trsupport, SSqlObj *pSql, int numO
}
}
// all subqueries are failed
// all subqueries are failed
tscError
(
"%p retrieve from %d vnode(s) completed,code:%
d.FAILED."
,
pPObj
,
pState
->
numOfTotal
,
pState
->
code
);
tscError
(
"%p retrieve from %d vnode(s) completed,code:%
s.FAILED."
,
pPObj
,
pState
->
numOfTotal
,
tstrerror
(
pState
->
code
)
);
pPObj
->
res
.
code
=
pState
->
code
;
pPObj
->
res
.
code
=
pState
->
code
;
// release allocated resource
// release allocated resource
...
...
src/client/src/tscUtil.c
浏览文件 @
66221096
...
@@ -1675,10 +1675,7 @@ STableMetaInfo* tscAddTableMetaInfo(SQueryInfo* pQueryInfo, const char* name, ST
...
@@ -1675,10 +1675,7 @@ STableMetaInfo* tscAddTableMetaInfo(SQueryInfo* pQueryInfo, const char* name, ST
pTableMetaInfo
->
pTableMeta
=
pTableMeta
;
pTableMetaInfo
->
pTableMeta
=
pTableMeta
;
if
(
vgroupList
!=
NULL
)
{
if
(
vgroupList
!=
NULL
)
{
assert
(
vgroupList
->
numOfVgroups
==
1
);
// todo fix me
size_t
size
=
sizeof
(
SVgroupsInfo
)
+
sizeof
(
SCMVgroupInfo
)
*
vgroupList
->
numOfVgroups
;
size_t
size
=
sizeof
(
SVgroupsInfo
)
+
sizeof
(
SCMVgroupInfo
)
*
vgroupList
->
numOfVgroups
;
pTableMetaInfo
->
vgroupList
=
malloc
(
size
);
pTableMetaInfo
->
vgroupList
=
malloc
(
size
);
memcpy
(
pTableMetaInfo
->
vgroupList
,
vgroupList
,
size
);
memcpy
(
pTableMetaInfo
->
vgroupList
,
vgroupList
,
size
);
}
}
...
...
src/query/src/queryExecutor.c
浏览文件 @
66221096
...
@@ -3277,11 +3277,11 @@ static SQueryStatusInfo getQueryStatusInfo(SQueryRuntimeEnv *pRuntimeEnv) {
...
@@ -3277,11 +3277,11 @@ static SQueryStatusInfo getQueryStatusInfo(SQueryRuntimeEnv *pRuntimeEnv) {
STableQueryInfo
*
pTableQueryInfo
=
pQuery
->
current
;
STableQueryInfo
*
pTableQueryInfo
=
pQuery
->
current
;
SQueryStatusInfo
info
=
{
SQueryStatusInfo
info
=
{
.
status
=
pQuery
->
status
,
.
status
=
pQuery
->
status
,
.
windowIndex
=
pRuntimeEnv
->
windowResInfo
.
curIndex
,
.
windowIndex
=
pRuntimeEnv
->
windowResInfo
.
curIndex
,
.
lastKey
=
pTableQueryInfo
->
lastKey
,
.
lastKey
=
pTableQueryInfo
->
lastKey
,
.
w
=
pQuery
->
window
,
.
w
=
pQuery
->
window
,
.
curWindow
=
{.
skey
=
pTableQueryInfo
->
lastKey
,
.
ekey
=
pQuery
->
window
.
ekey
},
.
curWindow
=
{.
skey
=
pTableQueryInfo
->
lastKey
,
.
ekey
=
pTableQueryInfo
->
win
.
ekey
},
};
};
return
info
;
return
info
;
...
@@ -3306,7 +3306,7 @@ static void setEnvBeforeReverseScan(SQueryRuntimeEnv *pRuntimeEnv, SQueryStatusI
...
@@ -3306,7 +3306,7 @@ static void setEnvBeforeReverseScan(SQueryRuntimeEnv *pRuntimeEnv, SQueryStatusI
STsdbQueryCond
cond
=
{
STsdbQueryCond
cond
=
{
.
twindow
=
pQuery
->
window
,
.
twindow
=
pQuery
->
window
,
.
order
=
pQuery
->
order
.
order
,
.
order
=
pQuery
->
order
.
order
,
.
colList
=
pQuery
->
colList
,
.
colList
=
pQuery
->
colList
,
.
numOfCols
=
pQuery
->
numOfCols
,
.
numOfCols
=
pQuery
->
numOfCols
,
};
};
...
@@ -4499,6 +4499,9 @@ static void sequentialTableProcess(SQInfo *pQInfo) {
...
@@ -4499,6 +4499,9 @@ static void sequentialTableProcess(SQInfo *pQInfo) {
initCtxOutputBuf
(
pRuntimeEnv
);
initCtxOutputBuf
(
pRuntimeEnv
);
setTagVal
(
pRuntimeEnv
,
(
STableId
*
)
taosArrayGet
(
tx
,
0
),
pQInfo
->
tsdb
);
setTagVal
(
pRuntimeEnv
,
(
STableId
*
)
taosArrayGet
(
tx
,
0
),
pQInfo
->
tsdb
);
// here we simply set the first table as current table
pRuntimeEnv
->
pQuery
->
current
=
((
SGroupItem
*
)
taosArrayGet
(
group
,
0
))
->
info
;
scanAllDataBlocks
(
pRuntimeEnv
);
scanAllDataBlocks
(
pRuntimeEnv
);
int64_t
numOfRes
=
getNumOfResult
(
pRuntimeEnv
);
int64_t
numOfRes
=
getNumOfResult
(
pRuntimeEnv
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录