Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
2d5d645b
T
TDengine
项目概览
taosdata
/
TDengine
接近 2 年 前同步成功
通知
1192
Star
22018
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看板
未验证
提交
2d5d645b
编写于
11月 15, 2021
作者:
wmmhello
提交者:
GitHub
11月 15, 2021
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #8432 from taosdata/fix/TD-5939
Fix/td 5939 fix long time cost in long RELATION_IN operation
上级
db5da446
7f25a397
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
17 addition
and
2 deletion
+17
-2
src/client/src/tscSQLParser.c
src/client/src/tscSQLParser.c
+2
-2
src/query/inc/qFilter.h
src/query/inc/qFilter.h
+2
-0
src/query/src/qFilter.c
src/query/src/qFilter.c
+13
-0
未找到文件。
src/client/src/tscSQLParser.c
浏览文件 @
2d5d645b
...
...
@@ -4023,7 +4023,7 @@ static int32_t getColQueryCondExpr(SSqlCmd* pCmd, SQueryInfo* pQueryInfo, tSqlEx
UNUSED
(
code
);
// TODO: more error handling
}
END_TRY
// add to required table column list
STableMetaInfo
*
pTableMetaInfo
=
tscGetMetaInfo
(
pQueryInfo
,
i
);
int64_t
uid
=
pTableMetaInfo
->
pTableMeta
->
id
.
uid
;
...
...
@@ -5208,7 +5208,7 @@ static int32_t getTagQueryCondExpr(SSqlCmd* pCmd, SQueryInfo* pQueryInfo, SCondE
UNUSED
(
code
);
// TODO: more error handling
}
END_TRY
// add to required table column list
STableMetaInfo
*
pTableMetaInfo
=
tscGetMetaInfo
(
pQueryInfo
,
i
);
int64_t
uid
=
pTableMetaInfo
->
pTableMeta
->
id
.
uid
;
...
...
src/query/inc/qFilter.h
浏览文件 @
2d5d645b
...
...
@@ -180,6 +180,8 @@ typedef struct SFilterGroup {
typedef
struct
SFilterColInfo
{
uint8_t
type
;
int32_t
dataType
;
uint8_t
optr
;
// for equal operation in the relation of RELATION_IN
int64_t
value
;
// for equal operation in the relation of RELATION_IN
void
*
info
;
}
SFilterColInfo
;
...
...
src/query/src/qFilter.c
浏览文件 @
2d5d645b
...
...
@@ -1997,6 +1997,10 @@ int32_t filterMergeUnits(SFilterInfo *info, SFilterGroupCtx* gRes, uint16_t colI
filterAddUnitRange
(
info
,
u
,
ctx
,
TSDB_RELATION_AND
);
CHK_JMP
(
MR_EMPTY_RES
(
ctx
));
}
if
(
FILTER_UNIT_OPTR
(
u
)
==
TSDB_RELATION_EQUAL
&&
!
FILTER_NO_MERGE_DATA_TYPE
(
FILTER_UNIT_DATA_TYPE
(
u
))){
gRes
->
colInfo
[
colIdx
].
optr
=
TSDB_RELATION_EQUAL
;
SIMPLE_COPY_VALUES
(
&
gRes
->
colInfo
[
colIdx
].
value
,
FILTER_UNIT_VAL_DATA
(
info
,
u
));
}
}
taosArrayDestroy
(
colArray
);
...
...
@@ -2112,6 +2116,15 @@ void filterCheckColConflict(SFilterGroupCtx* gRes1, SFilterGroupCtx* gRes2, bool
*
conflict
=
true
;
return
;
}
// for long in operation
if
(
gRes1
->
colInfo
[
idx1
].
optr
==
TSDB_RELATION_EQUAL
&&
gRes2
->
colInfo
[
idx2
].
optr
==
TSDB_RELATION_EQUAL
)
{
SFilterRangeCtx
*
ctx
=
gRes1
->
colInfo
[
idx1
].
info
;
if
(
ctx
->
pCompareFunc
(
&
gRes1
->
colInfo
[
idx1
].
value
,
&
gRes2
->
colInfo
[
idx2
].
value
)){
*
conflict
=
true
;
return
;
}
}
++
n
;
equal
=
true
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录