Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
慢慢CG
TDengine
提交
86329ad1
T
TDengine
项目概览
慢慢CG
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
86329ad1
编写于
8月 03, 2021
作者:
H
Haojun Liao
提交者:
GitHub
8月 03, 2021
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #7110 from taosdata/fix/TD-5650
[TD-5650]<fix> fix long tag filter conditon error
上级
f8b8b9d2
9e6dd466
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
23 addition
and
5 deletion
+23
-5
src/client/inc/tscUtil.h
src/client/inc/tscUtil.h
+1
-0
src/client/src/tscServer.c
src/client/src/tscServer.c
+5
-3
src/client/src/tscUtil.c
src/client/src/tscUtil.c
+15
-0
src/inc/taosmsg.h
src/inc/taosmsg.h
+1
-1
src/query/src/qExecutor.c
src/query/src/qExecutor.c
+1
-1
未找到文件。
src/client/inc/tscUtil.h
浏览文件 @
86329ad1
...
...
@@ -344,6 +344,7 @@ int32_t tscCreateTableMetaFromSTableMeta(STableMeta* pChild, const char* name, v
STableMeta
*
tscTableMetaDup
(
STableMeta
*
pTableMeta
);
SVgroupsInfo
*
tscVgroupsInfoDup
(
SVgroupsInfo
*
pVgroupsInfo
);
int32_t
tscGetTagFilterSerializeLen
(
SQueryInfo
*
pQueryInfo
);
int32_t
tscGetColFilterSerializeLen
(
SQueryInfo
*
pQueryInfo
);
int32_t
tscCreateQueryFromQueryInfo
(
SQueryInfo
*
pQueryInfo
,
SQueryAttr
*
pQueryAttr
,
void
*
addr
);
void
*
createQInfoFromQueryNode
(
SQueryInfo
*
pQueryInfo
,
STableGroupInfo
*
pTableGroupInfo
,
SOperatorInfo
*
pOperator
,
char
*
sql
,
void
*
addr
,
int32_t
stage
,
uint64_t
qId
);
...
...
src/client/src/tscServer.c
浏览文件 @
86329ad1
...
...
@@ -678,6 +678,8 @@ static int32_t tscEstimateQueryMsgSize(SSqlObj *pSql) {
int32_t
srcColListSize
=
(
int32_t
)(
taosArrayGetSize
(
pQueryInfo
->
colList
)
*
sizeof
(
SColumnInfo
));
int32_t
srcColFilterSize
=
tscGetColFilterSerializeLen
(
pQueryInfo
);
int32_t
srcTagFilterSize
=
tscGetTagFilterSerializeLen
(
pQueryInfo
);
size_t
numOfExprs
=
tscNumOfExprs
(
pQueryInfo
);
int32_t
exprSize
=
(
int32_t
)(
sizeof
(
SSqlExpr
)
*
numOfExprs
*
2
);
...
...
@@ -698,8 +700,8 @@ static int32_t tscEstimateQueryMsgSize(SSqlObj *pSql) {
tableSerialize
=
totalTables
*
sizeof
(
STableIdInfo
);
}
return
MIN_QUERY_MSG_PKT_SIZE
+
minMsgSize
()
+
sizeof
(
SQueryTableMsg
)
+
srcColListSize
+
srcColFilterSize
+
exprSize
+
tsBuf
Size
+
tableSerialize
+
sqlLen
+
4096
+
pQueryInfo
->
bufLen
;
return
MIN_QUERY_MSG_PKT_SIZE
+
minMsgSize
()
+
sizeof
(
SQueryTableMsg
)
+
srcColListSize
+
srcColFilterSize
+
srcTagFilter
Size
+
exprSize
+
tsBufSize
+
tableSerialize
+
sqlLen
+
4096
+
pQueryInfo
->
bufLen
;
}
static
char
*
doSerializeTableInfo
(
SQueryTableMsg
*
pQueryMsg
,
SSqlObj
*
pSql
,
STableMetaInfo
*
pTableMetaInfo
,
char
*
pMsg
,
...
...
@@ -1035,7 +1037,7 @@ int tscBuildQueryMsg(SSqlObj *pSql, SSqlInfo *pInfo) {
SCond
*
pCond
=
tsGetSTableQueryCond
(
pTagCond
,
pTableMeta
->
id
.
uid
);
if
(
pCond
!=
NULL
&&
pCond
->
cond
!=
NULL
)
{
pQueryMsg
->
tagCondLen
=
hton
s
(
pCond
->
len
);
pQueryMsg
->
tagCondLen
=
hton
l
(
pCond
->
len
);
memcpy
(
pMsg
,
pCond
->
cond
,
pCond
->
len
);
pMsg
+=
pCond
->
len
;
...
...
src/client/src/tscUtil.c
浏览文件 @
86329ad1
...
...
@@ -4685,6 +4685,21 @@ int32_t tscGetColFilterSerializeLen(SQueryInfo* pQueryInfo) {
return
len
;
}
int32_t
tscGetTagFilterSerializeLen
(
SQueryInfo
*
pQueryInfo
)
{
// serialize tag column query condition
if
(
pQueryInfo
->
tagCond
.
pCond
!=
NULL
&&
taosArrayGetSize
(
pQueryInfo
->
tagCond
.
pCond
)
>
0
)
{
STagCond
*
pTagCond
=
&
pQueryInfo
->
tagCond
;
STableMetaInfo
*
pTableMetaInfo
=
tscGetMetaInfo
(
pQueryInfo
,
0
);
STableMeta
*
pTableMeta
=
pTableMetaInfo
->
pTableMeta
;
SCond
*
pCond
=
tsGetSTableQueryCond
(
pTagCond
,
pTableMeta
->
id
.
uid
);
if
(
pCond
!=
NULL
&&
pCond
->
cond
!=
NULL
)
{
return
pCond
->
len
;
}
}
return
0
;
}
int32_t
tscCreateQueryFromQueryInfo
(
SQueryInfo
*
pQueryInfo
,
SQueryAttr
*
pQueryAttr
,
void
*
addr
)
{
memset
(
pQueryAttr
,
0
,
sizeof
(
SQueryAttr
));
...
...
src/inc/taosmsg.h
浏览文件 @
86329ad1
...
...
@@ -489,7 +489,7 @@ typedef struct {
int16_t
numOfCols
;
// the number of columns will be load from vnode
SInterval
interval
;
SSessionWindow
sw
;
// session window
uint
16
_t
tagCondLen
;
// tag length in current query
uint
32
_t
tagCondLen
;
// tag length in current query
uint32_t
tbnameCondLen
;
// table name filter condition string length
int16_t
numOfGroupCols
;
// num of group by columns
int16_t
orderByIdx
;
...
...
src/query/src/qExecutor.c
浏览文件 @
86329ad1
...
...
@@ -6898,7 +6898,7 @@ int32_t convertQueryMsg(SQueryTableMsg *pQueryMsg, SQueryParam* param) {
pQueryMsg
->
numOfCols
=
htons
(
pQueryMsg
->
numOfCols
);
pQueryMsg
->
numOfOutput
=
htons
(
pQueryMsg
->
numOfOutput
);
pQueryMsg
->
numOfGroupCols
=
htons
(
pQueryMsg
->
numOfGroupCols
);
pQueryMsg
->
tagCondLen
=
hton
s
(
pQueryMsg
->
tagCondLen
);
pQueryMsg
->
tagCondLen
=
hton
l
(
pQueryMsg
->
tagCondLen
);
pQueryMsg
->
tsBuf
.
tsOffset
=
htonl
(
pQueryMsg
->
tsBuf
.
tsOffset
);
pQueryMsg
->
tsBuf
.
tsLen
=
htonl
(
pQueryMsg
->
tsBuf
.
tsLen
);
pQueryMsg
->
tsBuf
.
tsNumOfBlocks
=
htonl
(
pQueryMsg
->
tsBuf
.
tsNumOfBlocks
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录