Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
adminstrot
TDengine
提交
c329bb4d
TDengine
项目概览
adminstrot
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
c329bb4d
编写于
7月 11, 2021
作者:
K
kailixu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix compile err
上级
a43b96f8
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
42 addition
and
58 deletion
+42
-58
src/client/src/tscParseInsert.c
src/client/src/tscParseInsert.c
+2
-20
src/common/inc/tdataformat.h
src/common/inc/tdataformat.h
+4
-37
src/common/src/tdataformat.c
src/common/src/tdataformat.c
+35
-0
src/tsdb/src/tsdbMemTable.c
src/tsdb/src/tsdbMemTable.c
+1
-1
未找到文件。
src/client/src/tscParseInsert.c
浏览文件 @
c329bb4d
...
@@ -1163,15 +1163,10 @@ int tscSortRemoveDataBlockDupRows(STableDataBlocks *dataBuf, SBlockKeyInfo *pBlk
...
@@ -1163,15 +1163,10 @@ int tscSortRemoveDataBlockDupRows(STableDataBlocks *dataBuf, SBlockKeyInfo *pBlk
pBlkKeyTuple
->
skey
=
payloadKey
(
pBlockData
);
pBlkKeyTuple
->
skey
=
payloadKey
(
pBlockData
);
pBlkKeyTuple
->
payloadAddr
=
pBlockData
;
pBlkKeyTuple
->
payloadAddr
=
pBlockData
;
payloadTLen
=
payloadTLen
(
pBlockData
);
payloadTLen
=
payloadTLen
(
pBlockData
);
#if 0
ASSERT(payloadNCols(pBlockData) <= 4096);
ASSERT(payloadNCols(pBlockData) <= 4096);
ASSERT(payloadTLen(pBlockData) < 65536);
ASSERT(payloadTLen(pBlockData) < 65536);
ASSERT
(
pBlkKeyTuple
->
payloadAddr
!=
NULL
);
#endif
ASSERT
((
pBlkKeyTuple
->
skey
<
1627747200000000
&&
pBlkKeyTuple
->
skey
>
1498838400000000
)
||
(
pBlkKeyTuple
->
skey
<
1627747200000
&&
pBlkKeyTuple
->
skey
>
1498838400000
)
||
(
pBlkKeyTuple
->
skey
<
1627747200
&&
pBlkKeyTuple
->
skey
>
1498838400
));
totolPayloadTLen
+=
payloadTLen
;
totolPayloadTLen
+=
payloadTLen
;
// next loop
// next loop
pBlockData
+=
payloadTLen
;
pBlockData
+=
payloadTLen
;
...
@@ -1205,19 +1200,6 @@ int tscSortRemoveDataBlockDupRows(STableDataBlocks *dataBuf, SBlockKeyInfo *pBlk
...
@@ -1205,19 +1200,6 @@ int tscSortRemoveDataBlockDupRows(STableDataBlocks *dataBuf, SBlockKeyInfo *pBlk
dataBuf
->
ordered
=
true
;
dataBuf
->
ordered
=
true
;
pBlocks
->
numOfRows
=
i
+
1
;
pBlocks
->
numOfRows
=
i
+
1
;
ASSERT
(
pBlocks
->
numOfRows
<=
nRows
);
int
tt
=
0
;
pBlkKeyTuple
=
pBlkKeyInfo
->
pKeyTuple
;
while
(
tt
<
pBlocks
->
numOfRows
)
{
ASSERT
(
pBlkKeyTuple
->
payloadAddr
!=
NULL
);
ASSERT
((
pBlkKeyTuple
->
skey
<
1627747200000000
&&
pBlkKeyTuple
->
skey
>
1498838400000000
)
||
(
pBlkKeyTuple
->
skey
<
1627747200000
&&
pBlkKeyTuple
->
skey
>
1498838400000
)
||
(
pBlkKeyTuple
->
skey
<
1627747200
&&
pBlkKeyTuple
->
skey
>
1498838400
));
++
pBlkKeyTuple
;
++
tt
;
}
}
}
dataBuf
->
size
=
sizeof
(
SSubmitBlk
)
+
totolPayloadTLen
;
dataBuf
->
size
=
sizeof
(
SSubmitBlk
)
+
totolPayloadTLen
;
...
...
src/common/inc/tdataformat.h
浏览文件 @
c329bb4d
...
@@ -274,41 +274,7 @@ void dataColSetOffset(SDataCol *pCol, int nEle);
...
@@ -274,41 +274,7 @@ void dataColSetOffset(SDataCol *pCol, int nEle);
bool
isNEleNull
(
SDataCol
*
pCol
,
int
nEle
);
bool
isNEleNull
(
SDataCol
*
pCol
,
int
nEle
);
void
dataColSetNEleNull
(
SDataCol
*
pCol
,
int
nEle
,
int
maxPoints
);
void
dataColSetNEleNull
(
SDataCol
*
pCol
,
int
nEle
,
int
maxPoints
);
FORCE_INLINE
const
void
*
tdGetNullVal
(
int8_t
type
)
{
const
void
*
tdGetNullVal
(
int8_t
type
);
switch
(
type
)
{
case
TSDB_DATA_TYPE_BOOL
:
return
&
BoolNull
;
case
TSDB_DATA_TYPE_TINYINT
:
return
&
TinyintNull
;
case
TSDB_DATA_TYPE_SMALLINT
:
return
&
SmallintNull
;
case
TSDB_DATA_TYPE_INT
:
return
&
IntNull
;
case
TSDB_DATA_TYPE_BIGINT
:
return
&
BigintNull
;
case
TSDB_DATA_TYPE_FLOAT
:
return
&
FloatNull
;
case
TSDB_DATA_TYPE_DOUBLE
:
return
&
DoubleNull
;
case
TSDB_DATA_TYPE_BINARY
:
return
&
BinaryNull
;
case
TSDB_DATA_TYPE_TIMESTAMP
:
return
&
TimestampNull
;
case
TSDB_DATA_TYPE_NCHAR
:
return
&
NcharNull
;
case
TSDB_DATA_TYPE_UTINYINT
:
return
&
UTinyintNull
;
case
TSDB_DATA_TYPE_USMALLINT
:
return
&
USmallintNull
;
case
TSDB_DATA_TYPE_UINT
:
return
&
UIntNull
;
case
TSDB_DATA_TYPE_UBIGINT
:
return
&
UBigintNull
;
default:
ASSERT
(
0
);
return
NULL
;
}
}
// Get the data pointer from a column-wised data
// Get the data pointer from a column-wised data
static
FORCE_INLINE
void
*
tdGetColDataOfRow
(
SDataCol
*
pCol
,
int
row
)
{
static
FORCE_INLINE
void
*
tdGetColDataOfRow
(
SDataCol
*
pCol
,
int
row
)
{
...
@@ -562,9 +528,10 @@ typedef void *SMemRow;
...
@@ -562,9 +528,10 @@ typedef void *SMemRow;
#define memRowDataLen(r) (*(TDRowLenT *)memRowDataBody(r)) // 0~65535
#define memRowDataLen(r) (*(TDRowLenT *)memRowDataBody(r)) // 0~65535
#define memRowKvLen(r) (*(TDRowLenT *)memRowKvBody(r)) // 0~65535
#define memRowKvLen(r) (*(TDRowLenT *)memRowKvBody(r)) // 0~65535
#define memRowDataTLen(r) (memRowDataLen(r) + TD_MEM_ROW_TYPE_SIZE) // using uint32_t/int32_t to store the TLen
#define memRowDataTLen(r) \
((TDRowTLenT)(memRowDataLen(r) + TD_MEM_ROW_TYPE_SIZE)) // using uint32_t/int32_t to store the TLen
#define memRowKvTLen(r) (
memRowKvLen(r) + TD_MEM_ROW_KV_TYPE_VER_SIZE
)
#define memRowKvTLen(r) (
(TDRowTLenT)(memRowKvLen(r) + TD_MEM_ROW_KV_TYPE_VER_SIZE)
)
#define memRowLen(r) (isDataRow(r) ? memRowDataLen(r) : memRowKvLen(r))
#define memRowLen(r) (isDataRow(r) ? memRowDataLen(r) : memRowKvLen(r))
#define memRowTLen(r) (isDataRow(r) ? memRowDataTLen(r) : memRowKvTLen(r)) // using uint32_t/int32_t to store the TLen
#define memRowTLen(r) (isDataRow(r) ? memRowDataTLen(r) : memRowKvTLen(r)) // using uint32_t/int32_t to store the TLen
...
...
src/common/src/tdataformat.c
浏览文件 @
c329bb4d
...
@@ -785,3 +785,38 @@ SKVRow tdGetKVRowFromBuilder(SKVRowBuilder *pBuilder) {
...
@@ -785,3 +785,38 @@ SKVRow tdGetKVRowFromBuilder(SKVRowBuilder *pBuilder) {
return
row
;
return
row
;
}
}
const
void
*
tdGetNullVal
(
int8_t
type
)
{
switch
(
type
)
{
case
TSDB_DATA_TYPE_BOOL
:
return
&
BoolNull
;
case
TSDB_DATA_TYPE_TINYINT
:
return
&
TinyintNull
;
case
TSDB_DATA_TYPE_SMALLINT
:
return
&
SmallintNull
;
case
TSDB_DATA_TYPE_INT
:
return
&
IntNull
;
case
TSDB_DATA_TYPE_BIGINT
:
return
&
BigintNull
;
case
TSDB_DATA_TYPE_FLOAT
:
return
&
FloatNull
;
case
TSDB_DATA_TYPE_DOUBLE
:
return
&
DoubleNull
;
case
TSDB_DATA_TYPE_BINARY
:
return
&
BinaryNull
;
case
TSDB_DATA_TYPE_TIMESTAMP
:
return
&
TimestampNull
;
case
TSDB_DATA_TYPE_NCHAR
:
return
&
NcharNull
;
case
TSDB_DATA_TYPE_UTINYINT
:
return
&
UTinyintNull
;
case
TSDB_DATA_TYPE_USMALLINT
:
return
&
USmallintNull
;
case
TSDB_DATA_TYPE_UINT
:
return
&
UIntNull
;
case
TSDB_DATA_TYPE_UBIGINT
:
return
&
UBigintNull
;
default:
ASSERT
(
0
);
return
NULL
;
}
}
src/tsdb/src/tsdbMemTable.c
浏览文件 @
c329bb4d
...
@@ -767,7 +767,7 @@ static int tsdbCopyRowToMem(STsdbRepo *pRepo, SMemRow row, STable *pTable, void
...
@@ -767,7 +767,7 @@ static int tsdbCopyRowToMem(STsdbRepo *pRepo, SMemRow row, STable *pTable, void
void
*
pRow
=
tsdbAllocBytes
(
pRepo
,
memRowTLen
(
row
));
void
*
pRow
=
tsdbAllocBytes
(
pRepo
,
memRowTLen
(
row
));
if
(
pRow
==
NULL
)
{
if
(
pRow
==
NULL
)
{
tsdbError
(
"vgId:%d failed to insert row with key %"
PRId64
" to table %s while allocate %"
PRIu
64
" bytes since %s"
,
tsdbError
(
"vgId:%d failed to insert row with key %"
PRId64
" to table %s while allocate %"
PRIu
32
" bytes since %s"
,
REPO_ID
(
pRepo
),
key
,
TABLE_CHAR_NAME
(
pTable
),
memRowTLen
(
row
),
tstrerror
(
terrno
));
REPO_ID
(
pRepo
),
key
,
TABLE_CHAR_NAME
(
pTable
),
memRowTLen
(
row
),
tstrerror
(
terrno
));
return
-
1
;
return
-
1
;
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录