Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
3cbbc55e
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看板
提交
3cbbc55e
编写于
11月 19, 2020
作者:
H
Haojun Liao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[TD-225]
上级
d0afbae3
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
33 addition
and
40 deletion
+33
-40
src/client/inc/tsclient.h
src/client/inc/tsclient.h
+25
-26
src/client/src/tscServer.c
src/client/src/tscServer.c
+2
-3
src/client/src/tscSubquery.c
src/client/src/tscSubquery.c
+4
-4
src/client/src/tscUtil.c
src/client/src/tscUtil.c
+0
-5
src/query/src/qExecutor.c
src/query/src/qExecutor.c
+2
-2
未找到文件。
src/client/inc/tsclient.h
浏览文件 @
3cbbc55e
...
...
@@ -293,33 +293,32 @@ typedef struct SResRec {
}
SResRec
;
typedef
struct
{
int
64_t
numOfRows
;
// num of results in current retrieved
int64_t
numOfRowsGroup
;
// num of results of current group
int64_t
numOfTotal
;
// num of total results
int64_t
numOfClauseTotal
;
// num of total result in current subclause
char
*
pRsp
;
int32_t
rspType
;
int32_t
rspLen
;
uint64_t
qhandle
;
int64_t
uid
;
int64_t
useconds
;
int
64_t
offset
;
// offset value from vnode during projection query of stable
int
32_t
row
;
int16_t
numOfCols
;
int16_t
precision
;
bool
completed
;
int32_t
code
;
int32_t
numOfGroups
;
SResRec
*
pGroupRec
;
char
*
data
;
TAOS_ROW
ts
row
;
TAOS_ROW
urow
;
int32_t
*
length
;
// length for each field for current row
char
**
buffer
;
// Buffer used to put multibytes encoded using unicode (wchar_t)
SColumnIndex
*
pColumnIndex
;
int
32_t
numOfRows
;
// num of results in current retrieval
int64_t
numOfRowsGroup
;
// num of results of current group
int64_t
numOfTotal
;
// num of total results
int64_t
numOfClauseTotal
;
// num of total result in current subclause
char
*
pRsp
;
int32_t
rspType
;
int32_t
rspLen
;
uint64_t
qhandle
;
int64_t
useconds
;
int64_t
offset
;
// offset value from vnode during projection query of stable
int
32_t
row
;
int
16_t
numOfCols
;
int16_t
precision
;
bool
completed
;
int32_t
code
;
int32_t
numOfGroups
;
SResRec
*
pGroupRec
;
char
*
data
;
TAOS_ROW
tsrow
;
TAOS_ROW
u
row
;
int32_t
*
length
;
// length for each field for current row
char
**
buffer
;
// Buffer used to put multibytes encoded using unicode (wchar_t)
SColumnIndex
*
pColumnIndex
;
SArithmeticSupport
*
pArithSup
;
// support the arithmetic expression calculation on agg functions
struct
SLocalReducer
*
pLocalReducer
;
struct
SLocalReducer
*
pLocalReducer
;
}
SSqlRes
;
typedef
struct
STscObj
{
...
...
src/client/src/tscServer.c
浏览文件 @
3cbbc55e
...
...
@@ -789,8 +789,7 @@ int tscBuildQueryMsg(SSqlObj *pSql, SSqlInfo *pInfo) {
size_t
output
=
tscNumOfFields
(
pQueryInfo
);
if
((
tscIsSecondStageQuery
(
pQueryInfo
)
||
UTIL_TABLE_IS_NORMAL_TABLE
(
pTableMetaInfo
)
||
UTIL_TABLE_IS_CHILD_TABLE
(
pTableMetaInfo
)))
{
if
(
tscIsSecondStageQuery
(
pQueryInfo
))
{
pQueryMsg
->
secondStageOutput
=
htonl
((
int32_t
)
output
);
SSqlFuncMsg
*
pSqlFuncExpr1
=
(
SSqlFuncMsg
*
)
pMsg
;
...
...
@@ -2219,7 +2218,7 @@ int tscProcessRetrieveRspFromNode(SSqlObj *pSql) {
}
pRes
->
row
=
0
;
tscDebug
(
"%p numOfRows:%
"
PRId64
"
, offset:%"
PRId64
", complete:%d"
,
pSql
,
pRes
->
numOfRows
,
pRes
->
offset
,
pRes
->
completed
);
tscDebug
(
"%p numOfRows:%
d
, offset:%"
PRId64
", complete:%d"
,
pSql
,
pRes
->
numOfRows
,
pRes
->
offset
,
pRes
->
completed
);
return
0
;
}
...
...
src/client/src/tscSubquery.c
浏览文件 @
3cbbc55e
...
...
@@ -1085,7 +1085,7 @@ static void joinRetrieveFinalResCallback(void* param, TAOS_RES* tres, int numOfR
SSqlRes
*
pRes1
=
&
pParentSql
->
pSubs
[
i
]
->
res
;
if
(
pRes1
->
row
>
0
&&
pRes1
->
numOfRows
>
0
)
{
tscDebug
(
"%p sub:%p index:%d numOfRows:%
"
PRId64
"
total:%"
PRId64
" (not retrieve)"
,
pParentSql
,
pParentSql
->
pSubs
[
i
],
i
,
tscDebug
(
"%p sub:%p index:%d numOfRows:%
d
total:%"
PRId64
" (not retrieve)"
,
pParentSql
,
pParentSql
->
pSubs
[
i
],
i
,
pRes1
->
numOfRows
,
pRes1
->
numOfTotal
);
assert
(
pRes1
->
row
<
pRes1
->
numOfRows
);
}
else
{
...
...
@@ -1093,7 +1093,7 @@ static void joinRetrieveFinalResCallback(void* param, TAOS_RES* tres, int numOfR
pRes1
->
numOfClauseTotal
+=
pRes1
->
numOfRows
;
}
tscDebug
(
"%p sub:%p index:%d numOfRows:%
"
PRId64
"
total:%"
PRId64
,
pParentSql
,
pParentSql
->
pSubs
[
i
],
i
,
tscDebug
(
"%p sub:%p index:%d numOfRows:%
d
total:%"
PRId64
,
pParentSql
,
pParentSql
->
pSubs
[
i
],
i
,
pRes1
->
numOfRows
,
pRes1
->
numOfTotal
);
}
}
...
...
@@ -2032,7 +2032,7 @@ static void tscRetrieveFromDnodeCallBack(void *param, TAOS_RES *tres, int numOfR
assert
(
pRes
->
numOfRows
==
numOfRows
);
int64_t
num
=
atomic_add_fetch_64
(
&
pState
->
numOfRetrievedRows
,
numOfRows
);
tscDebug
(
"%p sub:%p retrieve numOfRows:%
"
PRId64
"
totalNumOfRows:%"
PRIu64
" from ep:%s, orderOfSub:%d"
,
pParentSql
,
pSql
,
tscDebug
(
"%p sub:%p retrieve numOfRows:%
d
totalNumOfRows:%"
PRIu64
" from ep:%s, orderOfSub:%d"
,
pParentSql
,
pSql
,
pRes
->
numOfRows
,
pState
->
numOfRetrievedRows
,
pSql
->
epSet
.
fqdn
[
pSql
->
epSet
.
inUse
],
idx
);
if
(
num
>
tsMaxNumOfOrderedResults
&&
tscIsProjectionQueryOnSTable
(
pQueryInfo
,
0
))
{
...
...
@@ -2171,7 +2171,7 @@ static void multiVnodeInsertFinalize(void* param, TAOS_RES* tres, int numOfRows)
return
;
}
tscDebug
(
"%p Async insertion completed, total inserted:%
"
PRId64
,
pParentObj
,
pParentObj
->
res
.
numOfRows
);
tscDebug
(
"%p Async insertion completed, total inserted:%
d"
,
pParentObj
,
pParentObj
->
res
.
numOfRows
);
// restore user defined fp
pParentObj
->
fp
=
pParentObj
->
fetchFp
;
...
...
src/client/src/tscUtil.c
浏览文件 @
3cbbc55e
...
...
@@ -220,11 +220,6 @@ bool tscIsPointInterpQuery(SQueryInfo* pQueryInfo) {
}
bool
tscIsSecondStageQuery
(
SQueryInfo
*
pQueryInfo
)
{
STableMetaInfo
*
pTableMetaInfo
=
pQueryInfo
->
pTableMetaInfo
[
0
];
if
(
UTIL_TABLE_IS_SUPER_TABLE
(
pTableMetaInfo
))
{
return
false
;
}
if
(
tscIsProjectionQuery
(
pQueryInfo
))
{
return
false
;
}
...
...
src/query/src/qExecutor.c
浏览文件 @
3cbbc55e
...
...
@@ -853,9 +853,9 @@ static int32_t getNextQualifiedWindow(SQueryRuntimeEnv *pRuntimeEnv, STimeWindow
int32_t
factor
=
GET_FORWARD_DIRECTION_FACTOR
(
pQuery
->
order
.
order
);
startPos
=
prevPosition
+
factor
;
}
else
{
if
(
startKey
<
pDataBlockInfo
->
window
.
skey
&&
QUERY_IS_ASC_QUERY
(
pQuery
))
{
if
(
startKey
<
=
pDataBlockInfo
->
window
.
skey
&&
QUERY_IS_ASC_QUERY
(
pQuery
))
{
startPos
=
0
;
}
else
if
(
startKey
>
pDataBlockInfo
->
window
.
ekey
&&
!
QUERY_IS_ASC_QUERY
(
pQuery
))
{
}
else
if
(
startKey
>
=
pDataBlockInfo
->
window
.
ekey
&&
!
QUERY_IS_ASC_QUERY
(
pQuery
))
{
startPos
=
pDataBlockInfo
->
rows
-
1
;
}
else
{
startPos
=
searchFn
((
char
*
)
primaryKeys
,
pDataBlockInfo
->
rows
,
startKey
,
pQuery
->
order
.
order
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录