Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
83495ed5
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看板
提交
83495ed5
编写于
11月 01, 2022
作者:
H
Haojun Liao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(query): set the correct buffer to accommodate the tag values.
上级
e533794c
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
17 addition
and
9 deletion
+17
-9
source/common/src/tdatablock.c
source/common/src/tdatablock.c
+4
-0
source/dnode/vnode/src/tsdb/tsdbRead.c
source/dnode/vnode/src/tsdb/tsdbRead.c
+2
-6
source/libs/executor/src/executorimpl.c
source/libs/executor/src/executorimpl.c
+4
-0
source/libs/executor/src/scanoperator.c
source/libs/executor/src/scanoperator.c
+7
-3
未找到文件。
source/common/src/tdatablock.c
浏览文件 @
83495ed5
...
...
@@ -1132,6 +1132,10 @@ void blockDataCleanup(SSDataBlock* pDataBlock) {
pDataBlock
->
info
.
window
.
ekey
=
0
;
pDataBlock
->
info
.
window
.
skey
=
0
;
if
(
pDataBlock
->
info
.
capacity
==
0
)
{
return
;
}
size_t
numOfCols
=
taosArrayGetSize
(
pDataBlock
->
pDataBlock
);
for
(
int32_t
i
=
0
;
i
<
numOfCols
;
++
i
)
{
SColumnInfoData
*
p
=
taosArrayGet
(
pDataBlock
->
pDataBlock
,
i
);
...
...
source/dnode/vnode/src/tsdb/tsdbRead.c
浏览文件 @
83495ed5
...
...
@@ -3837,7 +3837,7 @@ int32_t tsdbRetrieveDatablockSMA(STsdbReader* pReader, SColumnDataAgg*** pBlockS
SFileDataBlockInfo
*
pFBlock
=
getCurrentBlockInfo
(
&
pReader
->
status
.
blockIter
);
SDataBlk
*
pBlock
=
getCurrentBlock
(
&
pReader
->
status
.
blockIter
);
int64_t
stime
=
taosGetTimestampUs
();
//
int64_t stime = taosGetTimestampUs();
SBlockLoadSuppInfo
*
pSup
=
&
pReader
->
suppInfo
;
...
...
@@ -3887,14 +3887,10 @@ int32_t tsdbRetrieveDatablockSMA(STsdbReader* pReader, SColumnDataAgg*** pBlockS
}
}
double
elapsed
=
(
taosGetTimestampUs
()
-
stime
)
/
1000
.
0
;
pReader
->
cost
.
smaLoadTime
+=
elapsed
;
pReader
->
cost
.
smaDataLoad
+=
1
;
*
pBlockStatis
=
pSup
->
plist
;
tsdbDebug
(
"vgId:%d, succeed to load block SMA for uid %"
PRIu64
", elapsed time:%.2f ms, %s"
,
0
,
pFBlock
->
uid
,
elapsed
,
pReader
->
idStr
);
tsdbDebug
(
"vgId:%d, succeed to load block SMA for uid %"
PRIu64
", %s"
,
0
,
pFBlock
->
uid
,
pReader
->
idStr
);
return
code
;
}
...
...
source/libs/executor/src/executorimpl.c
浏览文件 @
83495ed5
...
...
@@ -574,6 +574,9 @@ int32_t projectApplyFunctions(SExprInfo* pExpr, SSDataBlock* pResult, SSDataBloc
// if the source equals to the destination, it is to create a new column as the result of scalar
// function or some operators.
bool
createNewColModel
=
(
pResult
==
pSrcBlock
);
if
(
createNewColModel
)
{
blockDataEnsureCapacity
(
pResult
,
pResult
->
info
.
rows
);
}
int32_t
numOfRows
=
0
;
...
...
@@ -623,6 +626,7 @@ int32_t projectApplyFunctions(SExprInfo* pExpr, SSDataBlock* pResult, SSDataBloc
int32_t
startOffset
=
createNewColModel
?
0
:
pResult
->
info
.
rows
;
ASSERT
(
pResult
->
info
.
capacity
>
0
);
colDataMergeCol
(
pResColData
,
startOffset
,
(
int32_t
*
)
&
pResult
->
info
.
capacity
,
&
idata
,
dest
.
numOfRows
);
colDataDestroy
(
&
idata
);
...
...
source/libs/executor/src/scanoperator.c
浏览文件 @
83495ed5
...
...
@@ -424,8 +424,9 @@ static int32_t loadDataBlock(SOperatorInfo* pOperator, STableScanInfo* pTableSca
qDebug
(
"%s data block skipped, brange:%"
PRId64
"-%"
PRId64
", rows:%d"
,
GET_TASKID
(
pTaskInfo
),
pBlockInfo
->
window
.
skey
,
pBlockInfo
->
window
.
ekey
,
pBlockInfo
->
rows
);
// NOTE: here the tag value only load for one row
ensureBlockCapacity
(
pBlock
,
1
);
if
(
pTableScanInfo
->
pseudoSup
.
numOfExprs
>
0
)
{
ensureBlockCapacity
(
pBlock
,
pBlock
->
info
.
rows
);
}
doSetTagColumnData
(
pTableScanInfo
,
pBlock
,
pTaskInfo
,
1
);
pCost
->
skipBlocks
+=
1
;
return
TSDB_CODE_SUCCESS
;
...
...
@@ -436,7 +437,10 @@ static int32_t loadDataBlock(SOperatorInfo* pOperator, STableScanInfo* pTableSca
if
(
success
)
{
// failed to load the block sma data, data block statistics does not exist, load data block instead
qDebug
(
"%s data block SMA loaded, brange:%"
PRId64
"-%"
PRId64
", rows:%d"
,
GET_TASKID
(
pTaskInfo
),
pBlockInfo
->
window
.
skey
,
pBlockInfo
->
window
.
ekey
,
pBlockInfo
->
rows
);
ensureBlockCapacity
(
pBlock
,
1
);
if
(
pTableScanInfo
->
pseudoSup
.
numOfExprs
>
0
)
{
ensureBlockCapacity
(
pBlock
,
pBlock
->
info
.
rows
);
}
doSetTagColumnData
(
pTableScanInfo
,
pBlock
,
pTaskInfo
,
1
);
return
TSDB_CODE_SUCCESS
;
}
else
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录