Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
3d560da2
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看板
提交
3d560da2
编写于
2月 27, 2020
作者:
H
hjxilinx
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix bugs founded in regression test(reverse scan failed).
上级
a7fc925f
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
18 addition
and
4 deletion
+18
-4
src/system/detail/inc/vnodeRead.h
src/system/detail/inc/vnodeRead.h
+1
-1
src/system/detail/src/vnodeQueryImpl.c
src/system/detail/src/vnodeQueryImpl.c
+17
-3
未找到文件。
src/system/detail/inc/vnodeRead.h
浏览文件 @
3d560da2
...
...
@@ -146,7 +146,7 @@ typedef struct SQueryRuntimeEnv {
SPositionInfo
endPos
;
/* the last access position in query, served as the start pos of reversed order query */
SPositionInfo
nextPos
;
/* start position of the next scan */
SData
*
colDataBuffer
[
TSDB_MAX_COLUMNS
];
SResultInfo
*
resultInfo
;
SResultInfo
*
resultInfo
;
// todo refactor to merge with SWindowResInfo
uint8_t
blockStatus
;
// Indicate if data block is loaded, the block is first/last/internal block
int32_t
unzipBufSize
;
SData
*
primaryColBuffer
;
...
...
src/system/detail/src/vnodeQueryImpl.c
浏览文件 @
3d560da2
...
...
@@ -3945,9 +3945,9 @@ static void changeExecuteScanOrder(SQuery *pQuery, bool metricQuery) {
// in case of point-interpolation query, use asc order scan
char
msg
[]
=
"QInfo:%p scan order changed for %s query, old:%d, new:%d, qrange exchanged, old qrange:%"
PRId64
"-%"
PRId64
", "
"new qrange:%"
PRId64
"-%"
PRId64
;
", new qrange:%"
PRId64
"-%"
PRId64
;
// todo handle the case the the order irrelevant query type mixed up with order critical query type
// descending order query for last_row query
if
(
isFirstLastRowQuery
(
pQuery
))
{
dTrace
(
"QInfo:%p scan order changed for last_row query, old:%d, new:%d"
,
GET_QINFO_ADDR
(
pQuery
),
...
...
@@ -5881,7 +5881,21 @@ void disableFunctForTableSuppleScan(SQueryRuntimeEnv *pRuntimeEnv, int32_t order
}
SWindowResInfo
*
pWindowResInfo
=
&
pRuntimeEnv
->
windowResInfo
;
doDisableFunctsForSupplementaryScan
(
pQuery
,
pWindowResInfo
,
order
);
if
(
isGroupbyNormalCol
(
pQuery
->
pGroupbyExpr
)
||
isIntervalQuery
(
pQuery
))
{
doDisableFunctsForSupplementaryScan
(
pQuery
,
pWindowResInfo
,
order
);
}
else
{
// for simple result of table query,
for
(
int32_t
j
=
0
;
j
<
pQuery
->
numOfOutputCols
;
++
j
)
{
int32_t
functId
=
pQuery
->
pSelectExpr
[
j
].
pBase
.
functionId
;
SQLFunctionCtx
*
pCtx
=
&
pRuntimeEnv
->
pCtx
[
j
];
if
(((
functId
==
TSDB_FUNC_FIRST
||
functId
==
TSDB_FUNC_FIRST_DST
)
&&
order
==
TSQL_SO_DESC
)
||
((
functId
==
TSDB_FUNC_LAST
||
functId
==
TSDB_FUNC_LAST_DST
)
&&
order
==
TSQL_SO_ASC
))
{
pCtx
->
resultInfo
->
complete
=
false
;
}
else
if
(
functId
!=
TSDB_FUNC_TS
&&
functId
!=
TSDB_FUNC_TAG
)
{
pCtx
->
resultInfo
->
complete
=
true
;
}
}
}
pQuery
->
order
.
order
=
pQuery
->
order
.
order
^
1u
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录