Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
c52ca4cc
T
TDengine
项目概览
taosdata
/
TDengine
大约 2 年 前同步成功
通知
1192
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看板
提交
c52ca4cc
编写于
4月 30, 2022
作者:
H
Haojun Liao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refactor: do some internal refactor.
上级
2bbeeb5c
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
4 addition
and
16 deletion
+4
-16
source/common/src/tdatablock.c
source/common/src/tdatablock.c
+4
-16
未找到文件。
source/common/src/tdatablock.c
浏览文件 @
c52ca4cc
...
@@ -359,31 +359,19 @@ int32_t blockDataUpdateTsWindow(SSDataBlock* pDataBlock) {
...
@@ -359,31 +359,19 @@ int32_t blockDataUpdateTsWindow(SSDataBlock* pDataBlock) {
// if pIndexMap = NULL, merger one column by on column
// if pIndexMap = NULL, merger one column by on column
int32_t
blockDataMerge
(
SSDataBlock
*
pDest
,
const
SSDataBlock
*
pSrc
,
SArray
*
pIndexMap
)
{
int32_t
blockDataMerge
(
SSDataBlock
*
pDest
,
const
SSDataBlock
*
pSrc
,
SArray
*
pIndexMap
)
{
assert
(
pSrc
!=
NULL
&&
pDest
!=
NULL
);
assert
(
pSrc
!=
NULL
&&
pDest
!=
NULL
);
int32_t
numOfCols
=
pDest
->
info
.
numOfCols
;
int32_t
capacity
=
pDest
->
info
.
capacity
;
int32_t
capacity
=
pDest
->
info
.
capacity
;
for
(
int32_t
i
=
0
;
i
<
numOfCols
;
++
i
)
{
for
(
int32_t
i
=
0
;
i
<
pDest
->
info
.
numOfCols
;
++
i
)
{
int32_t
mapIndex
=
i
;
int32_t
mapIndex
=
i
;
if
(
pIndexMap
)
{
if
(
pIndexMap
)
{
mapIndex
=
*
(
int32_t
*
)
taosArrayGet
(
pIndexMap
,
i
);
mapIndex
=
*
(
int32_t
*
)
taosArrayGet
(
pIndexMap
,
i
);
}
}
SColumnInfoData
*
pCol2
=
taosArrayGet
(
pDest
->
pDataBlock
,
i
);
SColumnInfoData
*
pCol2
=
taosArrayGet
(
pDest
->
pDataBlock
,
i
);
SColumnInfoData
*
pCol1
=
taosArrayGet
(
pSrc
->
pDataBlock
,
mapIndex
);
SColumnInfoData
*
pCol1
=
taosArrayGet
(
pSrc
->
pDataBlock
,
mapIndex
);
// uint32_t oldLen = colDataGetLength(pCol2, pDest->info.rows);
// uint32_t newLen = colDataGetLength(pCol1, pSrc->info.rows);
// int32_t newSize = oldLen + newLen;
// char* tmp = taosMemoryRealloc(pCol2->pData, newSize);
// if (tmp != NULL) {
// pCol2->pData = tmp;
capacity
=
pDest
->
info
.
capacity
;
capacity
=
pDest
->
info
.
capacity
;
colDataMergeCol
(
pCol2
,
pDest
->
info
.
rows
,
&
capacity
,
pCol1
,
pSrc
->
info
.
rows
);
colDataMergeCol
(
pCol2
,
pDest
->
info
.
rows
,
&
capacity
,
pCol1
,
pSrc
->
info
.
rows
);
// } else {
// return TSDB_CODE_VND_OUT_OF_MEMORY;
// }
}
}
pDest
->
info
.
capacity
=
capacity
;
pDest
->
info
.
capacity
=
capacity
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录