Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
d3564f3d
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看板
未验证
提交
d3564f3d
编写于
3月 16, 2022
作者:
C
Cary Xu
提交者:
GitHub
3月 16, 2022
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #10780 from taosdata/feature/TD-11463-3.0
Feature/td 11463 3.0
上级
b50ecc4e
cfbd7704
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
18 addition
and
18 deletion
+18
-18
include/common/trow.h
include/common/trow.h
+15
-15
source/libs/parser/src/parInsert.c
source/libs/parser/src/parInsert.c
+3
-3
未找到文件。
include/common/trow.h
浏览文件 @
d3564f3d
...
...
@@ -98,13 +98,13 @@ typedef void *SRow;
typedef
struct
{
TDRowValT
valType
;
void
*
val
;
void
*
val
;
}
SCellVal
;
typedef
struct
{
// TODO
int
tmp
;
// TODO: to avoid compile error
}
STpRow
;
// tuple
int
tmp
;
// TODO: to avoid compile error
}
STpRow
;
// tuple
#pragma pack(push, 1)
typedef
struct
{
...
...
@@ -158,8 +158,8 @@ typedef struct {
int16_t
nBitmaps
;
int16_t
nBoundBitmaps
;
int32_t
offset
;
void
*
pBitmap
;
void
*
pOffset
;
void
*
pBitmap
;
void
*
pOffset
;
int32_t
extendedRowSize
;
}
SRowBuilder
;
...
...
@@ -273,7 +273,7 @@ static FORCE_INLINE int32_t tdSetBitmapValType(void *pBitmap, int16_t colIdx, TD
}
int16_t
nBytes
=
colIdx
/
TD_VTYPE_PARTS
;
int16_t
nOffset
=
colIdx
&
TD_VTYPE_OPTR
;
char
*
pDestByte
=
(
char
*
)
POINTER_SHIFT
(
pBitmap
,
nBytes
);
char
*
pDestByte
=
(
char
*
)
POINTER_SHIFT
(
pBitmap
,
nBytes
);
switch
(
nOffset
)
{
case
0
:
*
pDestByte
=
((
*
pDestByte
)
&
0x3F
)
|
(
valType
<<
6
);
...
...
@@ -311,7 +311,7 @@ static FORCE_INLINE int32_t tdGetBitmapValType(void *pBitmap, int16_t colIdx, TD
}
int16_t
nBytes
=
colIdx
/
TD_VTYPE_PARTS
;
int16_t
nOffset
=
colIdx
&
TD_VTYPE_OPTR
;
char
*
pDestByte
=
(
char
*
)
POINTER_SHIFT
(
pBitmap
,
nBytes
);
char
*
pDestByte
=
(
char
*
)
POINTER_SHIFT
(
pBitmap
,
nBytes
);
switch
(
nOffset
)
{
case
0
:
*
pValType
=
(((
*
pDestByte
)
&
0xC0
)
>>
6
);
...
...
@@ -617,7 +617,7 @@ static FORCE_INLINE int32_t tdAppendColValToKvRow(SRowBuilder *pBuilder, TDRowVa
if
(
tdValIsNorm
(
valType
,
val
,
colType
))
{
// ts key stored in STSRow.ts
SKvRowIdx
*
pColIdx
=
(
SKvRowIdx
*
)
POINTER_SHIFT
(
TD_ROW_COL_IDX
(
row
),
offset
);
char
*
ptr
=
(
char
*
)
POINTER_SHIFT
(
row
,
TD_ROW_LEN
(
row
));
char
*
ptr
=
(
char
*
)
POINTER_SHIFT
(
row
,
TD_ROW_LEN
(
row
));
pColIdx
->
colId
=
colId
;
pColIdx
->
offset
=
TD_ROW_LEN
(
row
);
// the offset include the TD_ROW_HEAD_LEN
...
...
@@ -635,7 +635,7 @@ static FORCE_INLINE int32_t tdAppendColValToKvRow(SRowBuilder *pBuilder, TDRowVa
// NULL/None value
else
{
SKvRowIdx
*
pColIdx
=
(
SKvRowIdx
*
)
POINTER_SHIFT
(
TD_ROW_COL_IDX
(
row
),
offset
);
char
*
ptr
=
(
char
*
)
POINTER_SHIFT
(
row
,
TD_ROW_LEN
(
row
));
char
*
ptr
=
(
char
*
)
POINTER_SHIFT
(
row
,
TD_ROW_LEN
(
row
));
pColIdx
->
colId
=
colId
;
pColIdx
->
offset
=
TD_ROW_LEN
(
row
);
// the offset include the TD_ROW_HEAD_LEN
const
void
*
nullVal
=
getNullValue
(
colType
);
...
...
@@ -697,9 +697,9 @@ static FORCE_INLINE int32_t tdAppendColValToRow(SRowBuilder *pBuilder, int16_t c
}
// TODO: We can avoid the type judegement by FP, but would prevent the inline scheme.
if
(
TD_IS_TP_ROW
(
pRow
))
{
tdAppendColValToTpRow
(
pBuilder
,
valType
,
val
,
true
,
colType
,
colIdx
,
offset
);
tdAppendColValToTpRow
(
pBuilder
,
valType
,
val
,
isCopyVarData
,
colType
,
colIdx
,
offset
);
}
else
{
tdAppendColValToKvRow
(
pBuilder
,
valType
,
val
,
true
,
colType
,
colIdx
,
offset
,
colId
);
tdAppendColValToKvRow
(
pBuilder
,
valType
,
val
,
isCopyVarData
,
colType
,
colIdx
,
offset
,
colId
);
}
return
TSDB_CODE_SUCCESS
;
}
...
...
@@ -771,8 +771,8 @@ static FORCE_INLINE int32_t tdGetKvRowValOfCol(SCellVal *output, STSRow *pRow, v
typedef
struct
{
STSchema
*
pSchema
;
STSRow
*
pRow
;
void
*
pBitmap
;
STSRow
*
pRow
;
void
*
pBitmap
;
uint32_t
offset
;
col_id_t
maxColId
;
col_id_t
colIdx
;
// [PRIMARYKEY_TIMESTAMP_COL_ID, nSchemaCols], PRIMARYKEY_TIMESTAMP_COL_ID equals 1
...
...
@@ -877,7 +877,7 @@ static FORCE_INLINE bool tdGetTpRowDataOfCol(STSRowIter *pIter, col_type_t colTy
// internal
static
FORCE_INLINE
bool
tdGetKvRowValOfColEx
(
STSRowIter
*
pIter
,
col_id_t
colId
,
col_type_t
colType
,
col_id_t
*
nIdx
,
SCellVal
*
pVal
)
{
STSRow
*
pRow
=
pIter
->
pRow
;
STSRow
*
pRow
=
pIter
->
pRow
;
SKvRowIdx
*
pKvIdx
=
NULL
;
bool
colFound
=
false
;
col_id_t
kvNCols
=
tdRowGetNCols
(
pRow
);
...
...
@@ -1068,7 +1068,7 @@ typedef struct {
typedef
struct
{
STSchema
*
pSchema
;
STSRow
*
pRow
;
STSRow
*
pRow
;
}
STSRowReader
;
typedef
struct
{
...
...
source/libs/parser/src/parInsert.c
浏览文件 @
d3564f3d
...
...
@@ -617,7 +617,7 @@ static FORCE_INLINE int32_t MemRowAppend(const void* value, int32_t len, void* p
if
(
TSDB_DATA_TYPE_BINARY
==
pa
->
schema
->
type
)
{
const
char
*
rowEnd
=
tdRowEnd
(
rb
->
pBuf
);
STR_WITH_SIZE_TO_VARSTR
(
rowEnd
,
value
,
len
);
tdAppendColValToRow
(
rb
,
pa
->
schema
->
colId
,
pa
->
schema
->
type
,
TD_VTYPE_NORM
,
rowEnd
,
fals
e
,
pa
->
toffset
,
pa
->
colIdx
);
tdAppendColValToRow
(
rb
,
pa
->
schema
->
colId
,
pa
->
schema
->
type
,
TD_VTYPE_NORM
,
rowEnd
,
tru
e
,
pa
->
toffset
,
pa
->
colIdx
);
}
else
if
(
TSDB_DATA_TYPE_NCHAR
==
pa
->
schema
->
type
)
{
// if the converted output len is over than pColumnModel->bytes, return error: 'Argument list too long'
int32_t
output
=
0
;
...
...
@@ -626,9 +626,9 @@ static FORCE_INLINE int32_t MemRowAppend(const void* value, int32_t len, void* p
return
TSDB_CODE_TSC_SQL_SYNTAX_ERROR
;
}
varDataSetLen
(
rowEnd
,
output
);
tdAppendColValToRow
(
rb
,
pa
->
schema
->
colId
,
pa
->
schema
->
type
,
TD_VTYPE_NORM
,
rowEnd
,
fals
e
,
pa
->
toffset
,
pa
->
colIdx
);
tdAppendColValToRow
(
rb
,
pa
->
schema
->
colId
,
pa
->
schema
->
type
,
TD_VTYPE_NORM
,
rowEnd
,
tru
e
,
pa
->
toffset
,
pa
->
colIdx
);
}
else
{
tdAppendColValToRow
(
rb
,
pa
->
schema
->
colId
,
pa
->
schema
->
type
,
TD_VTYPE_NORM
,
value
,
tru
e
,
pa
->
toffset
,
pa
->
colIdx
);
tdAppendColValToRow
(
rb
,
pa
->
schema
->
colId
,
pa
->
schema
->
type
,
TD_VTYPE_NORM
,
value
,
fals
e
,
pa
->
toffset
,
pa
->
colIdx
);
}
return
TSDB_CODE_SUCCESS
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录