Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
8959e443
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看板
提交
8959e443
编写于
4月 19, 2022
作者:
C
Cary Xu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
trow refactor
上级
5c9e8159
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
28 addition
and
26 deletion
+28
-26
include/common/trow.h
include/common/trow.h
+26
-24
source/libs/parser/inc/parInsertData.h
source/libs/parser/inc/parInsertData.h
+2
-2
未找到文件。
include/common/trow.h
浏览文件 @
8959e443
...
...
@@ -308,21 +308,21 @@ static FORCE_INLINE int32_t tdSetBitmapValTypeII(void *pBitmap, int16_t colIdx,
// use literal value directly and not use formula to simplify the codes
switch
(
nOffset
)
{
case
0
:
//
*pDestByte = ((*pDestByte) & 0x3F) | (valType << 6);
*
pDestByte
=
((
*
pDestByte
)
&
0x3F
)
|
(
valType
<<
6
);
// set the value and clear other partitions for offset 0
*
pDestByte
=
(
valType
<<
6
);
// *pDestByte |
= (valType << 6);
break
;
case
1
:
//
*pDestByte = ((*pDestByte) & 0xCF) | (valType << 4);
*
pDestByte
|=
(
valType
<<
4
);
*
pDestByte
=
((
*
pDestByte
)
&
0xCF
)
|
(
valType
<<
4
);
//
*pDestByte |= (valType << 4);
break
;
case
2
:
//
*pDestByte = ((*pDestByte) & 0xF3) | (valType << 2);
*
pDestByte
|=
(
valType
<<
2
);
*
pDestByte
=
((
*
pDestByte
)
&
0xF3
)
|
(
valType
<<
2
);
//
*pDestByte |= (valType << 2);
break
;
case
3
:
//
*pDestByte = ((*pDestByte) & 0xFC) | valType;
*
pDestByte
|=
(
valType
);
*
pDestByte
=
((
*
pDestByte
)
&
0xFC
)
|
valType
;
//
*pDestByte |= (valType);
break
;
default:
TASSERT
(
0
);
...
...
@@ -417,37 +417,37 @@ static FORCE_INLINE int32_t tdSetBitmapValTypeI(void *pBitmap, int16_t colIdx, T
// use literal value directly and not use formula to simplify the codes
switch
(
nOffset
)
{
case
0
:
//
*pDestByte = ((*pDestByte) & 0x7F) | (valType << 7);
*
pDestByte
=
((
*
pDestByte
)
&
0x7F
)
|
(
valType
<<
7
);
// set the value and clear other partitions for offset 0
*
pDestByte
=
(
valType
<<
7
);
// *pDestByte |
= (valType << 7);
break
;
case
1
:
//
*pDestByte = ((*pDestByte) & 0xBF) | (valType << 6);
*
pDestByte
|=
(
valType
<<
6
);
*
pDestByte
=
((
*
pDestByte
)
&
0xBF
)
|
(
valType
<<
6
);
//
*pDestByte |= (valType << 6);
break
;
case
2
:
//
*pDestByte = ((*pDestByte) & 0xDF) | (valType << 5);
*
pDestByte
|=
(
valType
<<
5
);
*
pDestByte
=
((
*
pDestByte
)
&
0xDF
)
|
(
valType
<<
5
);
//
*pDestByte |= (valType << 5);
break
;
case
3
:
//
*pDestByte = ((*pDestByte) & 0xEF) | (valType << 4);
*
pDestByte
|=
(
valType
<<
4
);
*
pDestByte
=
((
*
pDestByte
)
&
0xEF
)
|
(
valType
<<
4
);
//
*pDestByte |= (valType << 4);
break
;
case
4
:
//
*pDestByte = ((*pDestByte) & 0xF7) | (valType << 3);
*
pDestByte
|=
(
valType
<<
3
);
*
pDestByte
=
((
*
pDestByte
)
&
0xF7
)
|
(
valType
<<
3
);
//
*pDestByte |= (valType << 3);
break
;
case
5
:
//
*pDestByte = ((*pDestByte) & 0xFB) | (valType << 2);
*
pDestByte
|=
(
valType
<<
2
);
*
pDestByte
=
((
*
pDestByte
)
&
0xFB
)
|
(
valType
<<
2
);
//
*pDestByte |= (valType << 2);
break
;
case
6
:
//
*pDestByte = ((*pDestByte) & 0xFD) | (valType << 1);
*
pDestByte
|=
(
valType
<<
1
);
*
pDestByte
=
((
*
pDestByte
)
&
0xFD
)
|
(
valType
<<
1
);
//
*pDestByte |= (valType << 1);
break
;
case
7
:
//
*pDestByte = ((*pDestByte) & 0xFE) | valType;
*
pDestByte
|=
(
valType
);
*
pDestByte
=
((
*
pDestByte
)
&
0xFE
)
|
valType
;
//
*pDestByte |= (valType);
break
;
default:
TASSERT
(
0
);
...
...
@@ -656,6 +656,7 @@ static int32_t tdSRowResetBuf(SRowBuilder *pBuilder, void *pBuf) {
case
TD_ROW_TP
:
#ifdef TD_SUPPORT_BITMAP
pBuilder
->
pBitmap
=
tdGetBitmapAddrTp
(
pBuilder
->
pBuf
,
pBuilder
->
flen
);
memset
(
pBuilder
->
pBitmap
,
TD_VTYPE_NONE_BYTE_II
,
pBuilder
->
nBitmaps
);
#endif
// the primary TS key is stored separatedly
len
=
TD_ROW_HEAD_LEN
+
pBuilder
->
flen
-
sizeof
(
TSKEY
)
+
pBuilder
->
nBitmaps
;
...
...
@@ -665,6 +666,7 @@ static int32_t tdSRowResetBuf(SRowBuilder *pBuilder, void *pBuf) {
case
TD_ROW_KV
:
#ifdef TD_SUPPORT_BITMAP
pBuilder
->
pBitmap
=
tdGetBitmapAddrKv
(
pBuilder
->
pBuf
,
pBuilder
->
nBoundCols
);
memset
(
pBuilder
->
pBitmap
,
TD_VTYPE_NONE_BYTE_II
,
pBuilder
->
nBitmaps
);
#endif
len
=
TD_ROW_HEAD_LEN
+
TD_ROW_NCOLS_LEN
+
(
pBuilder
->
nBoundCols
-
1
)
*
sizeof
(
SKvRowIdx
)
+
pBuilder
->
nBoundBitmaps
;
// add
...
...
source/libs/parser/inc/parInsertData.h
浏览文件 @
8959e443
...
...
@@ -98,7 +98,7 @@ static FORCE_INLINE void getSTSRowAppendInfo(SSchema *pSchema, uint8_t rowType,
*
toffset
=
(
spd
->
cols
+
schemaIdx
)
->
toffset
;
// the offset of firstPart
*
colIdx
=
schemaIdx
;
}
else
{
*
toffset
=
idx
*
sizeof
(
S
ColIdx
);
// the offset of SCol
Idx
*
toffset
=
idx
*
sizeof
(
S
KvRowIdx
);
// the offset of SKvRow
Idx
*
colIdx
=
idx
;
}
}
else
{
...
...
@@ -108,7 +108,7 @@ static FORCE_INLINE void getSTSRowAppendInfo(SSchema *pSchema, uint8_t rowType,
*
toffset
=
(
spd
->
cols
+
schemaIdx
)
->
toffset
;
*
colIdx
=
schemaIdx
;
}
else
{
*
toffset
=
((
spd
->
colIdxInfo
+
idx
)
->
finalIdx
)
*
sizeof
(
S
Col
Idx
);
*
toffset
=
((
spd
->
colIdxInfo
+
idx
)
->
finalIdx
)
*
sizeof
(
S
KvRow
Idx
);
*
colIdx
=
(
spd
->
colIdxInfo
+
idx
)
->
finalIdx
;
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录