Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
74ca7abf
T
TDengine
项目概览
taosdata
/
TDengine
大约 1 年 前同步成功
通知
1181
Star
22014
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看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
74ca7abf
编写于
9月 23, 2022
作者:
H
Haojun Liao
提交者:
GitHub
9月 23, 2022
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #17027 from taosdata/feature/3_liaohj
fix(query): update remove check condition.
上级
0a077da6
be3459d8
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
24 addition
and
17 deletion
+24
-17
source/dnode/vnode/src/tsdb/tsdbRead.c
source/dnode/vnode/src/tsdb/tsdbRead.c
+6
-6
source/libs/scalar/inc/filterInt.h
source/libs/scalar/inc/filterInt.h
+1
-1
source/libs/scalar/src/filter.c
source/libs/scalar/src/filter.c
+17
-10
未找到文件。
source/dnode/vnode/src/tsdb/tsdbRead.c
浏览文件 @
74ca7abf
...
...
@@ -1287,14 +1287,14 @@ static bool doCheckforDatablockOverlap(STableBlockScanInfo* pBlockScanInfo, cons
if
(
p
->
version
>=
pBlock
->
minVer
)
{
if
(
i
<
num
-
1
)
{
TSDBKEY
*
pnext
=
taosArrayGet
(
pBlockScanInfo
->
delSkyline
,
i
+
1
);
if
(
i
+
1
==
num
-
1
)
{
// pnext is the last point
//
if (i + 1 == num - 1) { // pnext is the last point
if
(
pnext
->
ts
>=
pBlock
->
minKey
.
ts
)
{
return
true
;
}
}
else
{
if
(
pnext
->
ts
>=
pBlock
->
minKey
.
ts
&&
pnext
->
version
>=
pBlock
->
minVer
)
{
return
true
;
}
//
}
//
} else {
// if (pnext->ts >= pBlock->minKey.ts
) {
//
return true;
//
}
}
}
else
{
// it must be the last point
ASSERT
(
p
->
version
==
0
);
...
...
source/libs/scalar/inc/filterInt.h
浏览文件 @
74ca7abf
...
...
@@ -99,7 +99,7 @@ typedef struct SFilterRange {
typedef
bool
(
*
rangeCompFunc
)
(
const
void
*
,
const
void
*
,
const
void
*
,
const
void
*
,
__compar_fn_t
);
typedef
int32_t
(
*
filter_desc_compare_func
)(
const
void
*
,
const
void
*
);
typedef
bool
(
*
filter_exec_func
)(
void
*
info
,
int32_t
numOfRows
,
SColumnInfoData
*
p
,
SColumnDataAgg
*
statis
,
int16_t
numOfCols
);
typedef
bool
(
*
filter_exec_func
)(
void
*
,
int32_t
,
SColumnInfoData
*
,
SColumnDataAgg
*
,
int16_t
,
int32_t
*
);
typedef
int32_t
(
*
filer_get_col_from_name
)(
void
*
,
int32_t
,
char
*
,
void
**
);
typedef
struct
SFilterRangeCompare
{
...
...
source/libs/scalar/src/filter.c
浏览文件 @
74ca7abf
...
...
@@ -3067,15 +3067,16 @@ _return:
return
TSDB_CODE_SUCCESS
;
}
static
FORCE_INLINE
bool
filterExecuteImplAll
(
void
*
info
,
int32_t
numOfRows
,
SColumnInfoData
*
p
,
SColumnDataAgg
*
statis
,
int16_t
numOfCols
)
{
static
FORCE_INLINE
bool
filterExecuteImplAll
(
void
*
info
,
int32_t
numOfRows
,
SColumnInfoData
*
p
,
SColumnDataAgg
*
statis
,
int16_t
numOfCols
,
int32_t
*
numOfQualified
)
{
return
true
;
}
static
FORCE_INLINE
bool
filterExecuteImplEmpty
(
void
*
info
,
int32_t
numOfRows
,
SColumnInfoData
*
p
,
SColumnDataAgg
*
statis
,
int16_t
numOfCols
)
{
static
FORCE_INLINE
bool
filterExecuteImplEmpty
(
void
*
info
,
int32_t
numOfRows
,
SColumnInfoData
*
p
,
SColumnDataAgg
*
statis
,
int16_t
numOfCols
,
int32_t
*
numOfQualified
)
{
return
false
;
}
static
FORCE_INLINE
bool
filterExecuteImplIsNull
(
void
*
pinfo
,
int32_t
numOfRows
,
SColumnInfoData
*
pRes
,
SColumnDataAgg
*
statis
,
int16_t
numOfCols
)
{
static
FORCE_INLINE
bool
filterExecuteImplIsNull
(
void
*
pinfo
,
int32_t
numOfRows
,
SColumnInfoData
*
pRes
,
SColumnDataAgg
*
statis
,
int16_t
numOfCols
,
int32_t
*
numOfQualified
)
{
SFilterInfo
*
info
=
(
SFilterInfo
*
)
pinfo
;
bool
all
=
true
;
...
...
@@ -3097,7 +3098,9 @@ static FORCE_INLINE bool filterExecuteImplIsNull(void *pinfo, int32_t numOfRows,
return
all
;
}
static
FORCE_INLINE
bool
filterExecuteImplNotNull
(
void
*
pinfo
,
int32_t
numOfRows
,
SColumnInfoData
*
pRes
,
SColumnDataAgg
*
statis
,
int16_t
numOfCols
)
{
static
FORCE_INLINE
bool
filterExecuteImplNotNull
(
void
*
pinfo
,
int32_t
numOfRows
,
SColumnInfoData
*
pRes
,
SColumnDataAgg
*
statis
,
int16_t
numOfCols
,
int32_t
*
numOfQualified
)
{
SFilterInfo
*
info
=
(
SFilterInfo
*
)
pinfo
;
bool
all
=
true
;
...
...
@@ -3120,7 +3123,7 @@ static FORCE_INLINE bool filterExecuteImplNotNull(void *pinfo, int32_t numOfRows
return
all
;
}
bool
filterExecuteImplRange
(
void
*
pinfo
,
int32_t
numOfRows
,
SColumnInfoData
*
pRes
,
SColumnDataAgg
*
statis
,
int16_t
numOfCols
)
{
bool
filterExecuteImplRange
(
void
*
pinfo
,
int32_t
numOfRows
,
SColumnInfoData
*
pRes
,
SColumnDataAgg
*
statis
,
int16_t
numOfCols
,
int32_t
*
numOfQualified
)
{
SFilterInfo
*
info
=
(
SFilterInfo
*
)
pinfo
;
bool
all
=
true
;
uint16_t
dataSize
=
info
->
cunits
[
0
].
dataSize
;
...
...
@@ -3136,8 +3139,9 @@ bool filterExecuteImplRange(void *pinfo, int32_t numOfRows, SColumnInfoData* pRe
int8_t
*
p
=
(
int8_t
*
)
pRes
->
pData
;
for
(
int32_t
i
=
0
;
i
<
numOfRows
;
++
i
)
{
void
*
colData
=
colDataGetData
((
SColumnInfoData
*
)
info
->
cunits
[
0
].
colData
,
i
);
SColumnInfoData
*
pData
=
info
->
cunits
[
0
].
colData
;
void
*
colData
=
colDataGetData
(
pData
,
i
);
if
(
colData
==
NULL
||
colDataIsNull_s
(
pData
,
i
))
{
all
=
false
;
continue
;
...
...
@@ -3147,13 +3151,16 @@ bool filterExecuteImplRange(void *pinfo, int32_t numOfRows, SColumnInfoData* pRe
if
(
p
[
i
]
==
0
)
{
all
=
false
;
}
else
{
(
*
numOfQualified
)
++
;
}
}
return
all
;
}
bool
filterExecuteImplMisc
(
void
*
pinfo
,
int32_t
numOfRows
,
SColumnInfoData
*
pRes
,
SColumnDataAgg
*
statis
,
int16_t
numOfCols
)
{
bool
filterExecuteImplMisc
(
void
*
pinfo
,
int32_t
numOfRows
,
SColumnInfoData
*
pRes
,
SColumnDataAgg
*
statis
,
int16_t
numOfCols
,
int32_t
*
numOfQualified
)
{
SFilterInfo
*
info
=
(
SFilterInfo
*
)
pinfo
;
bool
all
=
true
;
...
...
@@ -3195,8 +3202,8 @@ bool filterExecuteImplMisc(void *pinfo, int32_t numOfRows, SColumnInfoData* pRes
return
all
;
}
bool
filterExecuteImpl
(
void
*
pinfo
,
int32_t
numOfRows
,
SColumnInfoData
*
pRes
,
SColumnDataAgg
*
statis
,
int16_t
numOfCols
)
{
bool
filterExecuteImpl
(
void
*
pinfo
,
int32_t
numOfRows
,
SColumnInfoData
*
pRes
,
SColumnDataAgg
*
statis
,
int16_t
numOfCols
,
int32_t
*
numOfQualified
)
{
SFilterInfo
*
info
=
(
SFilterInfo
*
)
pinfo
;
bool
all
=
true
;
...
...
@@ -4048,7 +4055,7 @@ bool filterExecute(SFilterInfo *info, SSDataBlock *pSrc, SColumnInfoData** p, SC
*
p
=
output
.
columnData
;
output
.
numOfRows
=
pSrc
->
info
.
rows
;
bool
keep
=
(
*
info
->
func
)(
info
,
pSrc
->
info
.
rows
,
*
p
,
statis
,
numOfCols
);
bool
keep
=
(
*
info
->
func
)(
info
,
pSrc
->
info
.
rows
,
*
p
,
statis
,
numOfCols
,
&
output
.
numOfQualified
);
// todo this should be return during filter procedure
int32_t
num
=
0
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录