Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
6fc0e1b6
T
TDengine
项目概览
taosdata
/
TDengine
大约 2 年 前同步成功
通知
1193
Star
22018
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看板
提交
6fc0e1b6
编写于
10月 29, 2022
作者:
H
Haojun Liao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refactor: do some internal refactor.
上级
afdb1467
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
19 addition
and
22 deletion
+19
-22
source/libs/executor/src/executil.c
source/libs/executor/src/executil.c
+19
-22
未找到文件。
source/libs/executor/src/executil.c
浏览文件 @
6fc0e1b6
...
@@ -507,7 +507,7 @@ static SColumnInfoData* getColInfoResult(void* metaHandle, int64_t suid, SArray*
...
@@ -507,7 +507,7 @@ static SColumnInfoData* getColInfoResult(void* metaHandle, int64_t suid, SArray*
// int64_t st2 = taosGetTimestampUs();
// int64_t st2 = taosGetTimestampUs();
// qDebug("calculate tag block rows:%d, cost:%ld us", rows, st2-st1);
// qDebug("calculate tag block rows:%d, cost:%ld us", rows, st2-st1);
end:
end:
taosHashCleanup
(
tags
);
taosHashCleanup
(
tags
);
taosHashCleanup
(
ctx
.
colHash
);
taosHashCleanup
(
ctx
.
colHash
);
taosArrayDestroy
(
ctx
.
cInfoList
);
taosArrayDestroy
(
ctx
.
cInfoList
);
...
@@ -748,7 +748,7 @@ int32_t getColInfoResultForGroupby(void* metaHandle, SNodeList* group, STableLis
...
@@ -748,7 +748,7 @@ int32_t getColInfoResultForGroupby(void* metaHandle, SNodeList* group, STableLis
// int64_t st2 = taosGetTimestampUs();
// int64_t st2 = taosGetTimestampUs();
// qDebug("calculate tag block rows:%d, cost:%ld us", rows, st2-st1);
// qDebug("calculate tag block rows:%d, cost:%ld us", rows, st2-st1);
end:
end:
taosMemoryFreeClear
(
keyBuf
);
taosMemoryFreeClear
(
keyBuf
);
taosHashCleanup
(
tags
);
taosHashCleanup
(
tags
);
taosHashCleanup
(
ctx
.
colHash
);
taosHashCleanup
(
ctx
.
colHash
);
...
@@ -828,14 +828,14 @@ static int32_t removeInvalidTable(SArray* uids, SHashObj* tags) {
...
@@ -828,14 +828,14 @@ static int32_t removeInvalidTable(SArray* uids, SHashObj* tags) {
}
}
static
int32_t
nameComparFn
(
const
void
*
p1
,
const
void
*
p2
)
{
static
int32_t
nameComparFn
(
const
void
*
p1
,
const
void
*
p2
)
{
const
char
*
pName1
=
*
(
const
char
**
)
p1
;
const
char
*
pName1
=
*
(
const
char
**
)
p1
;
const
char
*
pName2
=
*
(
const
char
**
)
p2
;
const
char
*
pName2
=
*
(
const
char
**
)
p2
;
int32_t
ret
=
strcmp
(
pName1
,
pName2
);
int32_t
ret
=
strcmp
(
pName1
,
pName2
);
if
(
ret
==
0
)
{
if
(
ret
==
0
)
{
return
0
;
return
0
;
}
else
{
}
else
{
return
(
ret
>
0
)
?
1
:
-
1
;
return
(
ret
>
0
)
?
1
:
-
1
;
}
}
}
}
...
@@ -845,7 +845,7 @@ static SArray* getTableNameList(const SNodeListNode* pList) {
...
@@ -845,7 +845,7 @@ static SArray* getTableNameList(const SNodeListNode* pList) {
SArray
*
pTbList
=
taosArrayInit
(
len
,
POINTER_BYTES
);
SArray
*
pTbList
=
taosArrayInit
(
len
,
POINTER_BYTES
);
for
(
int
i
=
0
;
i
<
pList
->
pNodeList
->
length
;
i
++
)
{
for
(
int
i
=
0
;
i
<
pList
->
pNodeList
->
length
;
i
++
)
{
SValueNode
*
valueNode
=
(
SValueNode
*
)
cell
->
pNode
;
SValueNode
*
valueNode
=
(
SValueNode
*
)
cell
->
pNode
;
if
(
!
IS_VAR_DATA_TYPE
(
valueNode
->
node
.
resType
.
type
))
{
if
(
!
IS_VAR_DATA_TYPE
(
valueNode
->
node
.
resType
.
type
))
{
terrno
=
TSDB_CODE_INVALID_PARA
;
terrno
=
TSDB_CODE_INVALID_PARA
;
taosArrayDestroy
(
pTbList
);
taosArrayDestroy
(
pTbList
);
...
@@ -1463,7 +1463,7 @@ void relocateColumnData(SSDataBlock* pBlock, const SArray* pColMatchInfo, SArray
...
@@ -1463,7 +1463,7 @@ void relocateColumnData(SSDataBlock* pBlock, const SArray* pColMatchInfo, SArray
while
(
i
<
numOfSrcCols
&&
j
<
taosArrayGetSize
(
pColMatchInfo
))
{
while
(
i
<
numOfSrcCols
&&
j
<
taosArrayGetSize
(
pColMatchInfo
))
{
SColumnInfoData
*
p
=
taosArrayGet
(
pCols
,
i
);
SColumnInfoData
*
p
=
taosArrayGet
(
pCols
,
i
);
SColMatchItem
*
pmInfo
=
taosArrayGet
(
pColMatchInfo
,
j
);
SColMatchItem
*
pmInfo
=
taosArrayGet
(
pColMatchInfo
,
j
);
/* if (!outputEveryColumn && pmInfo->reserved) {
/* if (!outputEveryColumn && pmInfo->reserved) {
j++;
j++;
continue;
continue;
}*/
}*/
...
@@ -1684,11 +1684,12 @@ int32_t addTableIntoTableList(STableListInfo* pTableList, uint64_t uid, uint64_t
...
@@ -1684,11 +1684,12 @@ int32_t addTableIntoTableList(STableListInfo* pTableList, uint64_t uid, uint64_t
int32_t
slot
=
(
int32_t
)
taosArrayGetSize
(
pTableList
->
pTableList
)
-
1
;
int32_t
slot
=
(
int32_t
)
taosArrayGetSize
(
pTableList
->
pTableList
)
-
1
;
taosHashPut
(
pTableList
->
map
,
&
uid
,
sizeof
(
uid
),
&
slot
,
sizeof
(
slot
));
taosHashPut
(
pTableList
->
map
,
&
uid
,
sizeof
(
uid
),
&
slot
,
sizeof
(
slot
));
qDebug
(
"uid:%"
PRIu64
", groupId:%"
PRIu64
" added into table list, slot:%d, total:%d"
,
uid
,
gid
,
slot
,
slot
+
1
);
qDebug
(
"uid:%"
PRIu64
", groupId:%"
PRIu64
" added into table list, slot:%d, total:%d"
,
uid
,
gid
,
slot
,
slot
+
1
);
return
TSDB_CODE_SUCCESS
;
return
TSDB_CODE_SUCCESS
;
}
}
int32_t
getTablesOfGroup
(
const
STableListInfo
*
pTableList
,
int32_t
ordinalGroupIndex
,
STableKeyInfo
**
pKeyInfo
,
int32_t
*
size
)
{
int32_t
getTablesOfGroup
(
const
STableListInfo
*
pTableList
,
int32_t
ordinalGroupIndex
,
STableKeyInfo
**
pKeyInfo
,
int32_t
*
size
)
{
int32_t
total
=
getNumOfOutputGroups
(
pTableList
);
int32_t
total
=
getNumOfOutputGroups
(
pTableList
);
if
(
ordinalGroupIndex
<
0
||
ordinalGroupIndex
>=
total
)
{
if
(
ordinalGroupIndex
<
0
||
ordinalGroupIndex
>=
total
)
{
return
TSDB_CODE_INVALID_PARA
;
return
TSDB_CODE_INVALID_PARA
;
...
@@ -1717,14 +1718,10 @@ int32_t getTablesOfGroup(const STableListInfo* pTableList, int32_t ordinalGroupI
...
@@ -1717,14 +1718,10 @@ int32_t getTablesOfGroup(const STableListInfo* pTableList, int32_t ordinalGroupI
return
TSDB_CODE_SUCCESS
;
return
TSDB_CODE_SUCCESS
;
}
}
int32_t
getNumOfOutputGroups
(
const
STableListInfo
*
pTableList
)
{
int32_t
getNumOfOutputGroups
(
const
STableListInfo
*
pTableList
)
{
return
pTableList
->
numOfOuputGroups
;
}
return
pTableList
->
numOfOuputGroups
;
}
// todo remove it
// todo remove it
bool
oneTableForEachGroup
(
const
STableListInfo
*
pTableList
)
{
bool
oneTableForEachGroup
(
const
STableListInfo
*
pTableList
)
{
return
pTableList
->
oneTableForEachGroup
;
}
return
pTableList
->
oneTableForEachGroup
;
}
void
destroyTableList
(
STableListInfo
*
pTableqinfoList
)
{
void
destroyTableList
(
STableListInfo
*
pTableqinfoList
)
{
pTableqinfoList
->
pTableList
=
taosArrayDestroy
(
pTableqinfoList
->
pTableList
);
pTableqinfoList
->
pTableList
=
taosArrayDestroy
(
pTableqinfoList
->
pTableList
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录