Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
bc8ac5f0
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1187
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看板
提交
bc8ac5f0
编写于
10月 28, 2022
作者:
5
54liuyao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(executor): last function optimize error
上级
c1c07861
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
21 addition
and
16 deletion
+21
-16
src/query/src/qExecutor.c
src/query/src/qExecutor.c
+21
-16
未找到文件。
src/query/src/qExecutor.c
浏览文件 @
bc8ac5f0
...
...
@@ -2837,6 +2837,10 @@ static bool isCachedLastQuery(SQueryAttr* pQueryAttr) {
return
false
;
}
if
(
pQueryAttr
->
pFilters
!=
NULL
||
pQueryAttr
->
pFilterInfo
!=
NULL
)
{
return
false
;
}
return
true
;
}
...
...
@@ -3165,7 +3169,7 @@ static bool overlapWithTimeWindow(SQueryAttr* pQueryAttr, SDataBlockInfo* pBlock
return
true
;
}
while
(
w
.
skey
<
pBlockInfo
->
window
.
ekey
)
{
while
(
w
.
skey
<
pBlockInfo
->
window
.
ekey
)
{
// add one slding
if
(
pQueryAttr
->
interval
.
slidingUnit
==
'n'
||
pQueryAttr
->
interval
.
slidingUnit
==
'y'
)
ekey
=
taosTimeAdd
(
ekey
,
pQueryAttr
->
interval
.
sliding
,
pQueryAttr
->
interval
.
slidingUnit
,
pQueryAttr
->
precision
);
...
...
@@ -3180,7 +3184,7 @@ static bool overlapWithTimeWindow(SQueryAttr* pQueryAttr, SDataBlockInfo* pBlock
getAlignQueryTimeWindow
(
pQueryAttr
,
ekey
,
sk
,
ek
,
&
w
);
}
while
(
1
)
{
while
(
1
)
{
if
(
w
.
ekey
<
pBlockInfo
->
window
.
skey
)
{
break
;
}
...
...
@@ -6984,7 +6988,7 @@ static bool doEveryInterpolation(SOperatorInfo* pOperatorInfo, SSDataBlock* pBlo
return
false
;
}
int32_t
nRows
=
pBlock
?
pBlock
->
info
.
rows
:
0
;
int32_t
startPos
=
binarySearchForKey
((
char
*
)
tsCols
,
nRows
,
pCtx
->
startTs
,
pQueryAttr
->
order
.
order
);
int32_t
startPos
=
binarySearchForKey
((
char
*
)
tsCols
,
nRows
,
pCtx
->
startTs
,
pQueryAttr
->
order
.
order
);
if
(
ascQuery
&&
pQueryAttr
->
fillType
!=
TSDB_FILL_NEXT
&&
pCtx
->
start
.
key
==
INT64_MIN
)
{
if
(
startPos
<
0
)
{
...
...
@@ -10171,7 +10175,8 @@ SQInfo* createQInfoImpl(SQueryTableMsg* pQueryMsg, SGroupbyExpr* pGroupbyExpr, S
pTableqinfo
->
pGroupList
=
taosArrayInit
(
numOfGroups
,
POINTER_BYTES
);
pTableqinfo
->
numOfTables
=
pTableGroupInfo
->
numOfTables
;
pTableqinfo
->
map
=
taosHashInit
(
pTableGroupInfo
->
numOfTables
,
taosGetDefaultHashFunction
(
TSDB_DATA_TYPE_INT
),
true
,
HASH_ENTRY_LOCK
);
pTableqinfo
->
map
=
taosHashInit
(
pTableGroupInfo
->
numOfTables
,
taosGetDefaultHashFunction
(
TSDB_DATA_TYPE_INT
),
true
,
HASH_ENTRY_LOCK
);
}
pQInfo
->
pBuf
=
calloc
(
pTableGroupInfo
->
numOfTables
,
sizeof
(
STableQueryInfo
));
...
...
@@ -10373,7 +10378,7 @@ static void doDestroyTableQueryInfo(STableGroupInfo* pTableqinfoGroupInfo) {
taosArrayDestroy
(
&
pTableqinfoGroupInfo
->
pGroupList
);
SHashObj
*
pmap
=
pTableqinfoGroupInfo
->
map
;
SHashObj
*
pmap
=
pTableqinfoGroupInfo
->
map
;
if
(
pmap
==
atomic_val_compare_exchange_ptr
(
&
pTableqinfoGroupInfo
->
map
,
pmap
,
NULL
))
{
taosHashCleanup
(
pmap
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录