Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
a2cc0814
T
TDengine
项目概览
taosdata
/
TDengine
大约 1 年 前同步成功
通知
1184
Star
22015
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
a2cc0814
编写于
1月 05, 2023
作者:
G
Ganlin Zhao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: fix coverity issues
上级
a986d70b
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
25 addition
and
11 deletion
+25
-11
source/common/src/tdatablock.c
source/common/src/tdatablock.c
+4
-4
source/common/src/tdataformat.c
source/common/src/tdataformat.c
+1
-3
source/common/src/trow.c
source/common/src/trow.c
+1
-1
source/libs/function/src/tpercentile.c
source/libs/function/src/tpercentile.c
+19
-3
未找到文件。
source/common/src/tdatablock.c
浏览文件 @
a2cc0814
...
@@ -359,14 +359,14 @@ size_t blockDataGetNumOfCols(const SSDataBlock* pBlock) { return taosArrayGetSiz
...
@@ -359,14 +359,14 @@ size_t blockDataGetNumOfCols(const SSDataBlock* pBlock) { return taosArrayGetSiz
size_t
blockDataGetNumOfRows
(
const
SSDataBlock
*
pBlock
)
{
return
pBlock
->
info
.
rows
;
}
size_t
blockDataGetNumOfRows
(
const
SSDataBlock
*
pBlock
)
{
return
pBlock
->
info
.
rows
;
}
int32_t
blockDataUpdateTsWindow
(
SSDataBlock
*
pDataBlock
,
int32_t
tsColumnIndex
)
{
int32_t
blockDataUpdateTsWindow
(
SSDataBlock
*
pDataBlock
,
int32_t
tsColumnIndex
)
{
if
(
pDataBlock
->
info
.
rows
>
0
)
{
// ASSERT(pDataBlock->info.dataLoad == 1);
}
if
(
pDataBlock
==
NULL
||
pDataBlock
->
info
.
rows
<=
0
||
pDataBlock
->
info
.
dataLoad
==
0
)
{
if
(
pDataBlock
==
NULL
||
pDataBlock
->
info
.
rows
<=
0
||
pDataBlock
->
info
.
dataLoad
==
0
)
{
return
0
;
return
0
;
}
}
if
(
pDataBlock
->
info
.
rows
>
0
)
{
// ASSERT(pDataBlock->info.dataLoad == 1);
}
size_t
numOfCols
=
taosArrayGetSize
(
pDataBlock
->
pDataBlock
);
size_t
numOfCols
=
taosArrayGetSize
(
pDataBlock
->
pDataBlock
);
if
(
numOfCols
<=
0
)
{
if
(
numOfCols
<=
0
)
{
return
-
1
;
return
-
1
;
...
...
source/common/src/tdataformat.c
浏览文件 @
a2cc0814
...
@@ -903,9 +903,7 @@ static int32_t tRowAppendTupleToColData(SRow *pRow, STSchema *pTSchema, SColData
...
@@ -903,9 +903,7 @@ static int32_t tRowAppendTupleToColData(SRow *pRow, STSchema *pTSchema, SColData
int32_t
iTColumn
=
1
;
int32_t
iTColumn
=
1
;
STColumn
*
pTColumn
=
&
pTSchema
->
columns
[
iTColumn
];
STColumn
*
pTColumn
=
&
pTSchema
->
columns
[
iTColumn
];
uint8_t
*
pb
=
NULL
;
uint8_t
*
pb
=
NULL
,
*
pf
=
NULL
,
*
pv
=
NULL
;
uint8_t
*
pf
;
uint8_t
*
pv
;
switch
(
pRow
->
flag
)
{
switch
(
pRow
->
flag
)
{
case
HAS_VALUE
:
case
HAS_VALUE
:
...
...
source/common/src/trow.c
浏览文件 @
a2cc0814
...
@@ -342,7 +342,7 @@ int32_t tdSTSRowNew(SArray *pArray, STSchema *pTSchema, STSRow **ppRow) {
...
@@ -342,7 +342,7 @@ int32_t tdSTSRowNew(SArray *pArray, STSchema *pTSchema, STSRow **ppRow) {
}
}
if
(
iColumn
==
0
)
{
if
(
iColumn
==
0
)
{
ASSERT
(
pColVal
->
cid
==
pTColumn
->
colId
);
ASSERT
(
pColVal
&&
pColVal
->
cid
==
pTColumn
->
colId
);
ASSERT
(
pTColumn
->
type
==
TSDB_DATA_TYPE_TIMESTAMP
);
ASSERT
(
pTColumn
->
type
==
TSDB_DATA_TYPE_TIMESTAMP
);
ASSERT
(
pTColumn
->
colId
==
PRIMARYKEY_TIMESTAMP_COL_ID
);
ASSERT
(
pTColumn
->
colId
==
PRIMARYKEY_TIMESTAMP_COL_ID
);
}
else
{
}
else
{
...
...
source/libs/function/src/tpercentile.c
浏览文件 @
a2cc0814
...
@@ -33,7 +33,14 @@ static SFilePage *loadDataFromFilePage(tMemBucket *pMemBucket, int32_t slotIdx)
...
@@ -33,7 +33,14 @@ static SFilePage *loadDataFromFilePage(tMemBucket *pMemBucket, int32_t slotIdx)
(
SFilePage
*
)
taosMemoryCalloc
(
1
,
pMemBucket
->
bytes
*
pMemBucket
->
pSlots
[
slotIdx
].
info
.
size
+
sizeof
(
SFilePage
));
(
SFilePage
*
)
taosMemoryCalloc
(
1
,
pMemBucket
->
bytes
*
pMemBucket
->
pSlots
[
slotIdx
].
info
.
size
+
sizeof
(
SFilePage
));
int32_t
groupId
=
getGroupId
(
pMemBucket
->
numOfSlots
,
slotIdx
,
pMemBucket
->
times
);
int32_t
groupId
=
getGroupId
(
pMemBucket
->
numOfSlots
,
slotIdx
,
pMemBucket
->
times
);
SArray
*
pIdList
=
*
(
SArray
**
)
taosHashGet
(
pMemBucket
->
groupPagesMap
,
&
groupId
,
sizeof
(
groupId
));
SArray
*
pIdList
;
void
*
p
=
taosHashGet
(
pMemBucket
->
groupPagesMap
,
&
groupId
,
sizeof
(
groupId
));
if
(
p
!=
NULL
)
{
pIdList
=
*
(
SArray
**
)
p
;
}
else
{
return
NULL
;
}
int32_t
offset
=
0
;
int32_t
offset
=
0
;
for
(
int32_t
i
=
0
;
i
<
taosArrayGetSize
(
pIdList
);
++
i
)
{
for
(
int32_t
i
=
0
;
i
<
taosArrayGetSize
(
pIdList
);
++
i
)
{
...
@@ -498,8 +505,17 @@ double getPercentileImpl(tMemBucket *pMemBucket, int32_t count, double fraction)
...
@@ -498,8 +505,17 @@ double getPercentileImpl(tMemBucket *pMemBucket, int32_t count, double fraction)
resetSlotInfo
(
pMemBucket
);
resetSlotInfo
(
pMemBucket
);
int32_t
groupId
=
getGroupId
(
pMemBucket
->
numOfSlots
,
i
,
pMemBucket
->
times
-
1
);
int32_t
groupId
=
getGroupId
(
pMemBucket
->
numOfSlots
,
i
,
pMemBucket
->
times
-
1
);
SArray
*
list
=
*
(
SArray
**
)
taosHashGet
(
pMemBucket
->
groupPagesMap
,
&
groupId
,
sizeof
(
groupId
));
ASSERT
(
list
!=
NULL
&&
list
->
size
>
0
);
SArray
*
list
;
void
*
p
=
taosHashGet
(
pMemBucket
->
groupPagesMap
,
&
groupId
,
sizeof
(
groupId
));
if
(
p
!=
NULL
)
{
list
=
*
(
SArray
**
)
p
;
if
(
list
==
NULL
||
list
->
size
<=
0
)
{
return
-
1
;
}
}
else
{
return
-
1
;
}
for
(
int32_t
f
=
0
;
f
<
list
->
size
;
++
f
)
{
for
(
int32_t
f
=
0
;
f
<
list
->
size
;
++
f
)
{
int32_t
*
pageId
=
taosArrayGet
(
list
,
f
);
int32_t
*
pageId
=
taosArrayGet
(
list
,
f
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录