Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
82c5e538
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看板
提交
82c5e538
编写于
2月 18, 2022
作者:
wmmhello
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'feature/TD-11208-new' of github.com:taosdata/TDengine into feature/TD-11208-new
上级
b747ed95
d2707137
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
11 addition
and
6 deletion
+11
-6
src/tsdb/src/tsdbRead.c
src/tsdb/src/tsdbRead.c
+11
-6
未找到文件。
src/tsdb/src/tsdbRead.c
浏览文件 @
82c5e538
...
@@ -1749,7 +1749,6 @@ static int32_t doCopyRowsFromFileBlock(STsdbQueryHandle* pQueryHandle, int32_t c
...
@@ -1749,7 +1749,6 @@ static int32_t doCopyRowsFromFileBlock(STsdbQueryHandle* pQueryHandle, int32_t c
}
else
{
}
else
{
pData
=
(
char
*
)
pColInfo
->
pData
+
(
capacity
-
numOfRows
-
num
)
*
pColInfo
->
info
.
bytes
;
pData
=
(
char
*
)
pColInfo
->
pData
+
(
capacity
-
numOfRows
-
num
)
*
pColInfo
->
info
.
bytes
;
}
}
memset
(
pData
,
0
,
pColInfo
->
info
.
bytes
);
if
(
!
isAllRowsNull
(
src
)
&&
pColInfo
->
info
.
colId
==
src
->
colId
)
{
if
(
!
isAllRowsNull
(
src
)
&&
pColInfo
->
info
.
colId
==
src
->
colId
)
{
if
(
pColInfo
->
info
.
type
!=
TSDB_DATA_TYPE_BINARY
&&
pColInfo
->
info
.
type
!=
TSDB_DATA_TYPE_NCHAR
)
{
if
(
pColInfo
->
info
.
type
!=
TSDB_DATA_TYPE_BINARY
&&
pColInfo
->
info
.
type
!=
TSDB_DATA_TYPE_NCHAR
)
{
...
@@ -1760,6 +1759,7 @@ static int32_t doCopyRowsFromFileBlock(STsdbQueryHandle* pQueryHandle, int32_t c
...
@@ -1760,6 +1759,7 @@ static int32_t doCopyRowsFromFileBlock(STsdbQueryHandle* pQueryHandle, int32_t c
// todo refactor, only copy one-by-one
// todo refactor, only copy one-by-one
for
(
int32_t
k
=
start
;
k
<
num
+
start
;
++
k
)
{
for
(
int32_t
k
=
start
;
k
<
num
+
start
;
++
k
)
{
const
char
*
p
=
tdGetColDataOfRow
(
src
,
k
);
const
char
*
p
=
tdGetColDataOfRow
(
src
,
k
);
memset
(
dst
,
0
,
bytes
);
memcpy
(
dst
,
p
,
varDataTLen
(
p
));
memcpy
(
dst
,
p
,
varDataTLen
(
p
));
dst
+=
bytes
;
dst
+=
bytes
;
}
}
...
@@ -1772,6 +1772,7 @@ static int32_t doCopyRowsFromFileBlock(STsdbQueryHandle* pQueryHandle, int32_t c
...
@@ -1772,6 +1772,7 @@ static int32_t doCopyRowsFromFileBlock(STsdbQueryHandle* pQueryHandle, int32_t c
char
*
dst
=
pData
;
char
*
dst
=
pData
;
for
(
int32_t
k
=
start
;
k
<
num
+
start
;
++
k
)
{
for
(
int32_t
k
=
start
;
k
<
num
+
start
;
++
k
)
{
memset
(
dst
,
0
,
bytes
);
setVardataNull
(
dst
,
pColInfo
->
info
.
type
);
setVardataNull
(
dst
,
pColInfo
->
info
.
type
);
dst
+=
bytes
;
dst
+=
bytes
;
}
}
...
@@ -1789,12 +1790,12 @@ static int32_t doCopyRowsFromFileBlock(STsdbQueryHandle* pQueryHandle, int32_t c
...
@@ -1789,12 +1790,12 @@ static int32_t doCopyRowsFromFileBlock(STsdbQueryHandle* pQueryHandle, int32_t c
}
else
{
}
else
{
pData
=
(
char
*
)
pColInfo
->
pData
+
(
capacity
-
numOfRows
-
num
)
*
pColInfo
->
info
.
bytes
;
pData
=
(
char
*
)
pColInfo
->
pData
+
(
capacity
-
numOfRows
-
num
)
*
pColInfo
->
info
.
bytes
;
}
}
memset
(
pData
,
0
,
pColInfo
->
info
.
bytes
);
if
(
pColInfo
->
info
.
type
==
TSDB_DATA_TYPE_BINARY
||
pColInfo
->
info
.
type
==
TSDB_DATA_TYPE_NCHAR
)
{
if
(
pColInfo
->
info
.
type
==
TSDB_DATA_TYPE_BINARY
||
pColInfo
->
info
.
type
==
TSDB_DATA_TYPE_NCHAR
)
{
char
*
dst
=
pData
;
char
*
dst
=
pData
;
for
(
int32_t
k
=
start
;
k
<
num
+
start
;
++
k
)
{
for
(
int32_t
k
=
start
;
k
<
num
+
start
;
++
k
)
{
memset
(
pData
,
0
,
pColInfo
->
info
.
bytes
);
setVardataNull
(
dst
,
pColInfo
->
info
.
type
);
setVardataNull
(
dst
,
pColInfo
->
info
.
type
);
dst
+=
pColInfo
->
info
.
bytes
;
dst
+=
pColInfo
->
info
.
bytes
;
}
}
...
@@ -1862,6 +1863,7 @@ static void mergeTwoRowFromMem(STsdbQueryHandle* pQueryHandle, int32_t capacity,
...
@@ -1862,6 +1863,7 @@ static void mergeTwoRowFromMem(STsdbQueryHandle* pQueryHandle, int32_t capacity,
}
else
{
}
else
{
pData
=
(
char
*
)
pColInfo
->
pData
+
(
capacity
-
numOfRows
-
1
)
*
pColInfo
->
info
.
bytes
;
pData
=
(
char
*
)
pColInfo
->
pData
+
(
capacity
-
numOfRows
-
1
)
*
pColInfo
->
info
.
bytes
;
}
}
memset
(
pData
,
0
,
pColInfo
->
info
.
bytes
);
int32_t
colIdOfRow1
;
int32_t
colIdOfRow1
;
if
(
j
>=
numOfColsOfRow1
)
{
if
(
j
>=
numOfColsOfRow1
)
{
...
@@ -1997,6 +1999,7 @@ static void mergeTwoRowFromMem(STsdbQueryHandle* pQueryHandle, int32_t capacity,
...
@@ -1997,6 +1999,7 @@ static void mergeTwoRowFromMem(STsdbQueryHandle* pQueryHandle, int32_t capacity,
}
else
{
}
else
{
pData
=
(
char
*
)
pColInfo
->
pData
+
(
capacity
-
numOfRows
-
1
)
*
pColInfo
->
info
.
bytes
;
pData
=
(
char
*
)
pColInfo
->
pData
+
(
capacity
-
numOfRows
-
1
)
*
pColInfo
->
info
.
bytes
;
}
}
memset
(
pData
,
0
,
pColInfo
->
info
.
bytes
);
if
(
pColInfo
->
info
.
type
==
TSDB_DATA_TYPE_BINARY
||
pColInfo
->
info
.
type
==
TSDB_DATA_TYPE_NCHAR
)
{
if
(
pColInfo
->
info
.
type
==
TSDB_DATA_TYPE_BINARY
||
pColInfo
->
info
.
type
==
TSDB_DATA_TYPE_NCHAR
)
{
setVardataNull
(
pData
,
pColInfo
->
info
.
type
);
setVardataNull
(
pData
,
pColInfo
->
info
.
type
);
...
@@ -3152,7 +3155,7 @@ static bool loadCachedLast(STsdbQueryHandle* pQueryHandle) {
...
@@ -3152,7 +3155,7 @@ static bool loadCachedLast(STsdbQueryHandle* pQueryHandle) {
}
}
pData
=
(
char
*
)
pColInfo
->
pData
+
numOfRows
*
pColInfo
->
info
.
bytes
;
pData
=
(
char
*
)
pColInfo
->
pData
+
numOfRows
*
pColInfo
->
info
.
bytes
;
memset
(
pData
,
0
,
pColInfo
->
info
.
bytes
);
if
(
pTable
->
lastCols
[
j
].
bytes
>
0
)
{
if
(
pTable
->
lastCols
[
j
].
bytes
>
0
)
{
void
*
value
=
pTable
->
lastCols
[
j
].
pData
;
void
*
value
=
pTable
->
lastCols
[
j
].
pData
;
switch
(
pColInfo
->
info
.
type
)
{
switch
(
pColInfo
->
info
.
type
)
{
...
@@ -3207,7 +3210,7 @@ static bool loadCachedLast(STsdbQueryHandle* pQueryHandle) {
...
@@ -3207,7 +3210,7 @@ static bool loadCachedLast(STsdbQueryHandle* pQueryHandle) {
pColInfo
=
taosArrayGet
(
pQueryHandle
->
pColumns
,
n
);
pColInfo
=
taosArrayGet
(
pQueryHandle
->
pColumns
,
n
);
pData
=
(
char
*
)
pColInfo
->
pData
+
numOfRows
*
pColInfo
->
info
.
bytes
;;
pData
=
(
char
*
)
pColInfo
->
pData
+
numOfRows
*
pColInfo
->
info
.
bytes
;;
memset
(
pData
,
0
,
pColInfo
->
info
.
bytes
);
if
(
pColInfo
->
info
.
colId
==
PRIMARYKEY_TIMESTAMP_COL_INDEX
)
{
if
(
pColInfo
->
info
.
colId
==
PRIMARYKEY_TIMESTAMP_COL_INDEX
)
{
*
(
TSKEY
*
)
pData
=
pTable
->
lastCols
[
j
].
ts
;
*
(
TSKEY
*
)
pData
=
pTable
->
lastCols
[
j
].
ts
;
continue
;
continue
;
...
@@ -3233,7 +3236,8 @@ static bool loadCachedLast(STsdbQueryHandle* pQueryHandle) {
...
@@ -3233,7 +3236,8 @@ static bool loadCachedLast(STsdbQueryHandle* pQueryHandle) {
if
(
priKey
!=
TSKEY_INITIAL_VAL
)
{
if
(
priKey
!=
TSKEY_INITIAL_VAL
)
{
pColInfo
=
taosArrayGet
(
pQueryHandle
->
pColumns
,
priIdx
);
pColInfo
=
taosArrayGet
(
pQueryHandle
->
pColumns
,
priIdx
);
pData
=
(
char
*
)
pColInfo
->
pData
+
numOfRows
*
pColInfo
->
info
.
bytes
;
pData
=
(
char
*
)
pColInfo
->
pData
+
numOfRows
*
pColInfo
->
info
.
bytes
;
memset
(
pData
,
0
,
pColInfo
->
info
.
bytes
);
*
(
TSKEY
*
)
pData
=
priKey
;
*
(
TSKEY
*
)
pData
=
priKey
;
for
(
int32_t
n
=
0
;
n
<
tgNumOfCols
;
++
n
)
{
for
(
int32_t
n
=
0
;
n
<
tgNumOfCols
;
++
n
)
{
...
@@ -3243,7 +3247,8 @@ static bool loadCachedLast(STsdbQueryHandle* pQueryHandle) {
...
@@ -3243,7 +3247,8 @@ static bool loadCachedLast(STsdbQueryHandle* pQueryHandle) {
pColInfo
=
taosArrayGet
(
pQueryHandle
->
pColumns
,
n
);
pColInfo
=
taosArrayGet
(
pQueryHandle
->
pColumns
,
n
);
pData
=
(
char
*
)
pColInfo
->
pData
+
numOfRows
*
pColInfo
->
info
.
bytes
;;
pData
=
(
char
*
)
pColInfo
->
pData
+
numOfRows
*
pColInfo
->
info
.
bytes
;;
memset
(
pData
,
0
,
pColInfo
->
info
.
bytes
);
assert
(
pColInfo
->
info
.
colId
!=
PRIMARYKEY_TIMESTAMP_COL_INDEX
);
assert
(
pColInfo
->
info
.
colId
!=
PRIMARYKEY_TIMESTAMP_COL_INDEX
);
if
(
pColInfo
->
info
.
type
==
TSDB_DATA_TYPE_BINARY
||
pColInfo
->
info
.
type
==
TSDB_DATA_TYPE_NCHAR
)
{
if
(
pColInfo
->
info
.
type
==
TSDB_DATA_TYPE_BINARY
||
pColInfo
->
info
.
type
==
TSDB_DATA_TYPE_NCHAR
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录