Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
4a26a26c
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看板
提交
4a26a26c
编写于
6月 30, 2021
作者:
L
liuyq-617
浏览文件
操作
浏览文件
下载
差异文件
:Merge branch 'feature/TD-4666' of github.com:taosdata/TDengine into feature/TD-4666
上级
655149a9
0d9cf348
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
10 addition
and
11 deletion
+10
-11
src/client/src/tscUtil.c
src/client/src/tscUtil.c
+3
-6
src/common/inc/tdataformat.h
src/common/inc/tdataformat.h
+3
-3
src/common/src/tdataformat.c
src/common/src/tdataformat.c
+2
-1
src/tsdb/src/tsdbRead.c
src/tsdb/src/tsdbRead.c
+2
-1
未找到文件。
src/client/src/tscUtil.c
浏览文件 @
4a26a26c
...
...
@@ -1667,7 +1667,7 @@ int32_t tscGetDataBlockFromList(SHashObj* pHashList, int64_t id, int32_t size, i
// pBuilder->size = 0;
// }
#define KvRowNColsThresh 1 // default value:
32 TODO: for test, restore to 32
after test finished
#define KvRowNColsThresh 1 // default value:
128 TODO: for test, restore to default value
after test finished
static
FORCE_INLINE
uint8_t
tdRowTypeJudger
(
SSchema
*
pSchema
,
void
*
pData
,
int32_t
nCols
,
int32_t
flen
,
uint16_t
*
nColsNotNull
)
{
...
...
@@ -1724,7 +1724,6 @@ SMemRow tdGenMemRowFromBuilder(SMemRowBuilder* pBuilder) {
uint16_t
nColsNotNull
=
0
;
uint8_t
memRowType
=
tdRowTypeJudger
(
pSchema
,
p
,
pBuilder
->
nCols
,
pBuilder
->
flen
,
&
nColsNotNull
);
tscDebug
(
"prop:memType is %d"
,
memRowType
);
memRowType
=
SMEM_ROW_DATA
;
SMemRow
*
memRow
=
(
SMemRow
)
pBuilder
->
pDataBlock
;
memRowSetType
(
memRow
,
memRowType
);
...
...
@@ -1744,12 +1743,10 @@ SMemRow tdGenMemRowFromBuilder(SMemRowBuilder* pBuilder) {
pBuilder
->
buf
=
p
;
}
else
if
(
memRowType
==
SMEM_ROW_KV
)
{
ASSERT
(
nColsNotNull
<
pBuilder
->
nCols
);
uint16_t
tlen
=
TD_KV_ROW_HEAD_SIZE
+
sizeof
(
SColIdx
)
*
nColsNotNull
+
pBuilder
->
size
;
SKVRow
kvRow
=
(
SKVRow
)
memRowBody
(
memRow
);
kvRowSetNCols
(
kvRow
,
nColsNotNull
);
uint16_t
tlen
=
TD_KV_ROW_HEAD_SIZE
+
sizeof
(
SColIdx
)
*
nColsNotNull
;
kvRowSetLen
(
kvRow
,
tlen
);
kvRowSetNCols
(
kvRow
,
nColsNotNull
);
int
toffset
=
0
;
p
=
(
char
*
)
pBuilder
->
buf
;
...
...
src/common/inc/tdataformat.h
浏览文件 @
4a26a26c
...
...
@@ -214,7 +214,7 @@ typedef void *SMemRow;
#define TD_DATA_ROW_HEAD_SIZE (sizeof(uint16_t) + sizeof(int16_t))
#define dataRowLen(r) (*(uint16_t *)(r))
#define dataRowVersion(r)
*(int16_t *)POINTER_SHIFT(r, sizeof(int16_t
))
#define dataRowVersion(r)
(*(int16_t *)POINTER_SHIFT(r, sizeof(int16_t)
))
#define dataRowTuple(r) POINTER_SHIFT(r, TD_DATA_ROW_HEAD_SIZE)
#define dataRowTKey(r) (*(TKEY *)(dataRowTuple(r)))
#define dataRowKey(r) tdGetKey(dataRowTKey(r))
...
...
@@ -425,7 +425,7 @@ typedef struct {
#define kvRowNCols(r) (*(int16_t *)POINTER_SHIFT(r, sizeof(uint16_t)))
#define kvRowSetLen(r, len) kvRowLen(r) = (len)
#define kvRowSetNCols(r, n) kvRowNCols(r) = (n)
#define kvRowColIdx(r) (
SColIdx *)POINTER_SHIFT(r, TD_KV_ROW_HEAD_SIZE
)
#define kvRowColIdx(r) (
(SColIdx *)POINTER_SHIFT(r, TD_KV_ROW_HEAD_SIZE)
)
#define kvRowValues(r) POINTER_SHIFT(r, TD_KV_ROW_HEAD_SIZE + sizeof(SColIdx) * kvRowNCols(r))
#define kvRowCpy(dst, r) memcpy((dst), (r), kvRowLen(r))
#define kvRowColVal(r, colIdx) POINTER_SHIFT(kvRowValues(r), (colIdx)->offset)
...
...
@@ -468,7 +468,7 @@ static FORCE_INLINE int tdAppendKvColVal(SKVRow row, const void *value, int16_t
char
*
ptr
=
(
char
*
)
POINTER_SHIFT
(
row
,
kvRowLen
(
row
));
pColIdx
->
colId
=
colId
;
pColIdx
->
offset
=
kvRowLen
(
row
);
pColIdx
->
offset
=
kvRowLen
(
row
);
// offset of pColIdx including the TD_KV_ROW_HEAD_SIZE
if
(
IS_VAR_DATA_TYPE
(
type
))
{
memcpy
(
ptr
,
value
,
varDataTLen
(
value
));
...
...
src/common/src/tdataformat.c
浏览文件 @
4a26a26c
...
...
@@ -527,7 +527,8 @@ static void tdAppendKvRowToDataCol(SKVRow row, STSchema *pSchema, SDataCols *pCo
int
nRowColsMatched
=
0
;
STColumn
stColumn
[
nRowCols
];
tdGetKVRowColInfo
(
pSchema
,
kvRowColIdx
(
row
),
nRowCols
,
stColumn
,
&
nRowColsMatched
);
uDebug
(
"kvRow: nRowCols=%d, nRowColsMatched=%d, nSchemaCols=%d"
,
nRowCols
,
nRowColsMatched
,
schemaNCols
(
pSchema
));
uDebug
(
"prop:kvRow: nRowCols=%d, nRowColsMatched=%d, nSchemaCols=%d"
,
nRowCols
,
nRowColsMatched
,
schemaNCols
(
pSchema
));
while
(
dcol
<
pCols
->
numOfCols
)
{
SDataCol
*
pDataCol
=
&
(
pCols
->
cols
[
dcol
]);
...
...
src/tsdb/src/tsdbRead.c
浏览文件 @
4a26a26c
...
...
@@ -1550,7 +1550,8 @@ static void copyOneRowFromMem(STsdbQueryHandle* pQueryHandle, int32_t capacity,
if
(
pColIdx
->
colId
==
pColInfo
->
info
.
colId
)
{
STColumn
*
pSTColumn
=
tdGetColOfID
(
pSchema
,
pColIdx
->
colId
);
if
(
pSTColumn
!=
NULL
)
{
void
*
value
=
tdGetKvRowDataOfCol
(
row
,
pSTColumn
->
type
,
TD_MEM_ROW_HEAD_SIZE
+
pColIdx
->
offset
);
// offset of pColIdx including the TD_KV_ROW_HEAD_SIZE
void
*
value
=
tdGetKvRowDataOfCol
(
kvRow
,
pSTColumn
->
type
,
pColIdx
->
offset
);
switch
(
pColInfo
->
info
.
type
)
{
case
TSDB_DATA_TYPE_BINARY
:
case
TSDB_DATA_TYPE_NCHAR
:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录