Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
c9959b5b
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
c9959b5b
编写于
4月 21, 2023
作者:
M
Minglei Jin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
dst slot for last_row
上级
373a5428
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
18 addition
and
48 deletion
+18
-48
contrib/CMakeLists.txt
contrib/CMakeLists.txt
+4
-4
source/dnode/vnode/src/tsdb/tsdbCacheRead.c
source/dnode/vnode/src/tsdb/tsdbCacheRead.c
+14
-44
未找到文件。
contrib/CMakeLists.txt
浏览文件 @
c9959b5b
...
...
@@ -79,8 +79,8 @@ endif(${BUILD_WITH_LEVELDB})
# rocksdb
#if(${BUILD_WITH_ROCKSDB})
cat
(
"
${
TD_SUPPORT_DIR
}
/rocksdb_CMakeLists.txt.in"
${
CONTRIB_TMP_FILE
}
)
add_definitions
(
-DUSE_ROCKSDB
)
cat
(
"
${
TD_SUPPORT_DIR
}
/rocksdb_CMakeLists.txt.in"
${
CONTRIB_TMP_FILE
}
)
add_definitions
(
-DUSE_ROCKSDB
)
#endif(${BUILD_WITH_ROCKSDB})
# canonical-raft
...
...
@@ -222,7 +222,7 @@ endif(${BUILD_WITH_LEVELDB})
# rocksdb
# To support rocksdb build on ubuntu: sudo apt-get install libgflags-dev
if
(
${
BUILD_WITH_ROCKSDB
}
)
#
if(${BUILD_WITH_ROCKSDB})
SET
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-Wno-error=maybe-uninitialized"
)
option
(
WITH_TESTS
""
OFF
)
option
(
WITH_BENCHMARK_TOOLS
""
OFF
)
...
...
@@ -234,7 +234,7 @@ if(${BUILD_WITH_ROCKSDB})
rocksdb
PUBLIC $<BUILD_INTERFACE:
${
CMAKE_CURRENT_SOURCE_DIR
}
/rocksdb/include>
)
endif
(
${
BUILD_WITH_ROCKSDB
}
)
#
endif(${BUILD_WITH_ROCKSDB})
# lucene
# To support build on ubuntu: sudo apt-get install libboost-all-dev
...
...
source/dnode/vnode/src/tsdb/tsdbCacheRead.c
浏览文件 @
c9959b5b
...
...
@@ -30,26 +30,7 @@ static int32_t saveOneRow(SArray* pRow, SSDataBlock* pBlock, SCacheRowsReader* p
for
(
int32_t
i
=
0
;
i
<
pReader
->
numOfCols
;
++
i
)
{
SColumnInfoData
*
pColInfoData
=
taosArrayGet
(
pBlock
->
pDataBlock
,
dstSlotIds
[
i
]);
SFirstLastRes
*
p
=
(
SFirstLastRes
*
)
varDataVal
(
pRes
[
dstSlotIds
[
i
]]);
/*
if (slotIds[i] == -1) { // the primary timestamp
SLastCol* pColVal = (SLastCol*)taosArrayGet(pRow, 0);
p->ts = pColVal->ts;
p->bytes = TSDB_KEYSIZE;
*(int64_t*)p->buf = pColVal->ts;
allNullRow = false;
} else {
*/
int32_t
slotId
=
slotIds
[
i
];
// add check for null value, caused by the modification of table schema (new column added).
/*
if (slotId >= taosArrayGetSize(pRow)) {
p->ts = 0;
p->isNull = true;
colDataSetNULL(pColInfoData, numOfRows);
continue;
}
*/
// SLastCol* pColVal = (SLastCol*)taosArrayGet(pRow, slotId);
SLastCol
*
pColVal
=
(
SLastCol
*
)
taosArrayGet
(
pRow
,
i
);
p
->
ts
=
pColVal
->
ts
;
...
...
@@ -66,7 +47,6 @@ static int32_t saveOneRow(SArray* pRow, SSDataBlock* pBlock, SCacheRowsReader* p
p
->
bytes
=
pReader
->
pSchema
->
columns
[
slotId
].
bytes
;
}
}
//}
// pColInfoData->info.bytes includes the VARSTR_HEADER_SIZE, need to substruct it
p
->
hasResult
=
true
;
...
...
@@ -77,34 +57,24 @@ static int32_t saveOneRow(SArray* pRow, SSDataBlock* pBlock, SCacheRowsReader* p
pBlock
->
info
.
rows
+=
allNullRow
?
0
:
1
;
}
else
if
(
HASTYPE
(
pReader
->
type
,
CACHESCAN_RETRIEVE_LAST_ROW
))
{
for
(
int32_t
i
=
0
;
i
<
pReader
->
numOfCols
;
++
i
)
{
SColumnInfoData
*
pColInfoData
=
taosArrayGet
(
pBlock
->
pDataBlock
,
i
);
SColumnInfoData
*
pColInfoData
=
taosArrayGet
(
pBlock
->
pDataBlock
,
dstSlotIds
[
i
]
);
if
(
slotIds
[
i
]
==
-
1
)
{
SLastCol
*
pColVal
=
(
SLastCol
*
)
taosArrayGet
(
pRow
,
0
);
colDataSetVal
(
pColInfoData
,
numOfRows
,
(
const
char
*
)
&
pColVal
->
ts
,
false
);
}
else
{
int32_t
slotId
=
slotIds
[
i
];
// add check for null value, caused by the modification of table schema (new column added).
if
(
slotId
>=
taosArrayGetSize
(
pRow
))
{
colDataSetNULL
(
pColInfoData
,
numOfRows
);
continue
;
}
SLastCol
*
pColVal
=
(
SLastCol
*
)
taosArrayGet
(
pRow
,
slotId
);
SLastCol
*
pColVal
=
(
SLastCol
*
)
taosArrayGet
(
pRow
,
i
);
SColVal
*
pVal
=
&
pColVal
->
colVal
;
if
(
IS_VAR_DATA_TYPE
(
pColVal
->
colVal
.
type
))
{
if
(
!
COL_VAL_IS_VALUE
(
&
pColVal
->
colVal
))
{
colDataSetNULL
(
pColInfoData
,
numOfRows
);
}
else
{
varDataSetLen
(
pReader
->
transferBuf
[
slotId
],
pVal
->
value
.
nData
);
memcpy
(
varDataVal
(
pReader
->
transferBuf
[
slotId
]),
pVal
->
value
.
pData
,
pVal
->
value
.
nData
);
colDataSetVal
(
pColInfoData
,
numOfRows
,
pReader
->
transferBuf
[
slotId
],
false
);
varDataSetLen
(
pReader
->
transferBuf
[
dstSlotIds
[
i
]
],
pVal
->
value
.
nData
);
memcpy
(
varDataVal
(
pReader
->
transferBuf
[
dstSlotIds
[
i
]
]),
pVal
->
value
.
pData
,
pVal
->
value
.
nData
);
colDataSetVal
(
pColInfoData
,
numOfRows
,
pReader
->
transferBuf
[
dstSlotIds
[
i
]
],
false
);
}
}
else
{
colDataSetVal
(
pColInfoData
,
numOfRows
,
(
const
char
*
)
&
pVal
->
value
.
val
,
!
COL_VAL_IS_VALUE
(
pVal
));
}
}
}
pBlock
->
info
.
rows
+=
1
;
}
else
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录