Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
d86f582a
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看板
提交
d86f582a
编写于
8月 05, 2021
作者:
W
wpan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
improve performance
上级
d6021230
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
21 addition
and
12 deletion
+21
-12
src/query/src/qFilter.c
src/query/src/qFilter.c
+21
-12
未找到文件。
src/query/src/qFilter.c
浏览文件 @
d86f582a
...
...
@@ -2498,20 +2498,27 @@ static FORCE_INLINE bool filterExecuteImplNotNull(void *pinfo, int32_t numOfRows
bool
filterExecuteImplRange
(
void
*
pinfo
,
int32_t
numOfRows
,
int8_t
*
p
)
{
SFilterInfo
*
info
=
(
SFilterInfo
*
)
pinfo
;
bool
all
=
true
;
uint16_t
dataSize
=
info
->
cunits
[
0
].
dataSize
;
char
*
colData
=
(
char
*
)
info
->
cunits
[
0
].
colData
;
rangeCompFunc
rfunc
=
info
->
cunits
[
0
].
rfunc
;
void
*
valData
=
info
->
cunits
[
0
].
valData
;
void
*
valData2
=
info
->
cunits
[
0
].
valData2
;
__compar_fn_t
func
=
info
->
cunits
[
0
].
func
;
for
(
int32_t
i
=
0
;
i
<
numOfRows
;
++
i
)
{
uint16_t
uidx
=
info
->
groups
[
0
].
unitIdxs
[
0
];
void
*
colData
=
(
char
*
)
info
->
cunits
[
uidx
].
colData
+
info
->
cunits
[
uidx
].
dataSize
*
i
;
if
(
isNull
(
colData
,
info
->
cunits
[
uidx
].
dataType
))
{
if
(
isNull
(
colData
,
info
->
cunits
[
0
].
dataType
))
{
all
=
false
;
colData
+=
dataSize
;
continue
;
}
p
[
i
]
=
(
*
info
->
cunits
[
uidx
].
rfunc
)(
colData
,
colData
,
info
->
cunits
[
uidx
].
valData
,
info
->
cunits
[
uidx
].
valData2
,
info
->
cunits
[
uidx
].
func
);
p
[
i
]
=
(
*
rfunc
)(
colData
,
colData
,
valData
,
valData2
,
func
);
if
(
p
[
i
]
==
0
)
{
all
=
false
;
}
colData
+=
dataSize
;
}
return
all
;
...
...
@@ -2548,26 +2555,28 @@ bool filterExecuteImpl(void *pinfo, int32_t numOfRows, int8_t* p) {
//FILTER_UNIT_CLR_F(info);
for
(
uint32_t
g
=
0
;
g
<
info
->
groupNum
;
++
g
)
{
for
(
uint32_t
u
=
0
;
u
<
info
->
groups
[
g
].
unitNum
;
++
u
)
{
uint16_t
uidx
=
info
->
groups
[
g
].
unitIdxs
[
u
];
void
*
colData
=
(
char
*
)
info
->
cunits
[
uidx
].
colData
+
info
->
cunits
[
uidx
].
dataSize
*
i
;
SFilterGroup
*
group
=
&
info
->
groups
[
g
];
for
(
uint32_t
u
=
0
;
u
<
group
->
unitNum
;
++
u
)
{
uint16_t
uidx
=
group
->
unitIdxs
[
u
];
SFilterComUnit
*
cunit
=
&
info
->
cunits
[
uidx
];
void
*
colData
=
(
char
*
)
cunit
->
colData
+
cunit
->
dataSize
*
i
;
//if (FILTER_UNIT_GET_F(info, uidx)) {
// p[i] = FILTER_UNIT_GET_R(info, uidx);
//} else {
uint8_t
optr
=
info
->
cunits
[
uidx
].
optr
;
uint8_t
optr
=
cunit
->
optr
;
if
(
isNull
(
colData
,
info
->
cunits
[
uidx
].
dataType
))
{
if
(
isNull
(
colData
,
cunit
->
dataType
))
{
p
[
i
]
=
optr
==
TSDB_RELATION_ISNULL
?
true
:
false
;
}
else
{
if
(
optr
==
TSDB_RELATION_NOTNULL
)
{
p
[
i
]
=
1
;
}
else
if
(
optr
==
TSDB_RELATION_ISNULL
)
{
p
[
i
]
=
0
;
}
else
if
(
info
->
cunits
[
uidx
].
rfunc
)
{
p
[
i
]
=
(
*
info
->
cunits
[
uidx
].
rfunc
)(
colData
,
colData
,
info
->
cunits
[
uidx
].
valData
,
info
->
cunits
[
uidx
].
valData2
,
info
->
cunits
[
uidx
].
func
);
}
else
if
(
cunit
->
rfunc
)
{
p
[
i
]
=
(
*
cunit
->
rfunc
)(
colData
,
colData
,
cunit
->
valData
,
cunit
->
valData2
,
cunit
->
func
);
}
else
{
p
[
i
]
=
filterDoCompare
(
info
->
cunits
[
uidx
].
func
,
info
->
cunits
[
uidx
].
optr
,
colData
,
info
->
cunits
[
uidx
].
valData
);
p
[
i
]
=
filterDoCompare
(
cunit
->
func
,
cunit
->
optr
,
colData
,
cunit
->
valData
);
}
//FILTER_UNIT_SET_R(info, uidx, p[i]);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录