Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
94ab465b
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
94ab465b
编写于
12月 02, 2022
作者:
D
dapan1121
提交者:
GitHub
12月 02, 2022
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #18621 from taosdata/fix/removeInvalidTab
fix: remove invalid table
上级
84eb77e1
1750b5cc
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
11 addition
and
11 deletion
+11
-11
source/libs/executor/src/executil.c
source/libs/executor/src/executil.c
+9
-9
source/util/src/tarray.c
source/util/src/tarray.c
+2
-2
未找到文件。
source/libs/executor/src/executil.c
浏览文件 @
94ab465b
...
@@ -438,13 +438,12 @@ static SColumnInfoData* getColInfoResult(void* metaHandle, int64_t suid, SArray*
...
@@ -438,13 +438,12 @@ static SColumnInfoData* getColInfoResult(void* metaHandle, int64_t suid, SArray*
goto
end
;
goto
end
;
}
}
}
}
removeInvalidTable
(
uidList
,
tags
);
int32_t
rows
=
taosArrayGetSize
(
uidList
);
int32_t
rows
=
taosArrayGetSize
(
uidList
);
if
(
rows
==
0
)
{
if
(
rows
==
0
)
{
goto
end
;
goto
end
;
}
}
// int64_t stt1 = taosGetTimestampUs();
// qDebug("generate tag meta rows:%d, cost:%ld us", rows, stt1-stt);
code
=
blockDataEnsureCapacity
(
pResBlock
,
rows
);
code
=
blockDataEnsureCapacity
(
pResBlock
,
rows
);
if
(
code
!=
TSDB_CODE_SUCCESS
)
{
if
(
code
!=
TSDB_CODE_SUCCESS
)
{
...
@@ -452,7 +451,6 @@ static SColumnInfoData* getColInfoResult(void* metaHandle, int64_t suid, SArray*
...
@@ -452,7 +451,6 @@ static SColumnInfoData* getColInfoResult(void* metaHandle, int64_t suid, SArray*
goto
end
;
goto
end
;
}
}
// int64_t st = taosGetTimestampUs();
for
(
int32_t
i
=
0
;
i
<
rows
;
i
++
)
{
for
(
int32_t
i
=
0
;
i
<
rows
;
i
++
)
{
int64_t
*
uid
=
taosArrayGet
(
uidList
,
i
);
int64_t
*
uid
=
taosArrayGet
(
uidList
,
i
);
for
(
int32_t
j
=
0
;
j
<
taosArrayGetSize
(
pResBlock
->
pDataBlock
);
j
++
)
{
for
(
int32_t
j
=
0
;
j
<
taosArrayGetSize
(
pResBlock
->
pDataBlock
);
j
++
)
{
...
@@ -467,7 +465,9 @@ static SColumnInfoData* getColInfoResult(void* metaHandle, int64_t suid, SArray*
...
@@ -467,7 +465,9 @@ static SColumnInfoData* getColInfoResult(void* metaHandle, int64_t suid, SArray*
#endif
#endif
}
else
{
}
else
{
void
*
tag
=
taosHashGet
(
tags
,
uid
,
sizeof
(
int64_t
));
void
*
tag
=
taosHashGet
(
tags
,
uid
,
sizeof
(
int64_t
));
ASSERT
(
tag
);
if
(
tag
==
NULL
)
{
continue
;
}
STagVal
tagVal
=
{
0
};
STagVal
tagVal
=
{
0
};
tagVal
.
cid
=
pColInfo
->
info
.
colId
;
tagVal
.
cid
=
pColInfo
->
info
.
colId
;
const
char
*
p
=
metaGetTableTagVal
(
tag
,
pColInfo
->
info
.
type
,
&
tagVal
);
const
char
*
p
=
metaGetTableTagVal
(
tag
,
pColInfo
->
info
.
type
,
&
tagVal
);
...
@@ -923,14 +923,14 @@ static int32_t optimizeTbnameInCondImpl(void* metaHandle, int64_t suid, SArray*
...
@@ -923,14 +923,14 @@ static int32_t optimizeTbnameInCondImpl(void* metaHandle, int64_t suid, SArray*
return
-
1
;
return
-
1
;
}
}
SArray
*
pTbList
=
getTableNameList
(
pList
);
SArray
*
pTbList
=
getTableNameList
(
pList
);
int32_t
numOfTables
=
taosArrayGetSize
(
pTbList
);
int32_t
numOfTables
=
taosArrayGetSize
(
pTbList
);
SHashObj
*
uHash
=
NULL
;
SHashObj
*
uHash
=
NULL
;
size_t
listlen
=
taosArrayGetSize
(
list
);
// len > 0 means there already have uids
size_t
listlen
=
taosArrayGetSize
(
list
);
// len > 0 means there already have uids
if
(
listlen
>
0
)
{
if
(
listlen
>
0
)
{
uHash
=
taosHashInit
(
32
,
taosGetDefaultHashFunction
(
TSDB_DATA_TYPE_BIGINT
),
false
,
HASH_NO_LOCK
);
uHash
=
taosHashInit
(
32
,
taosGetDefaultHashFunction
(
TSDB_DATA_TYPE_BIGINT
),
false
,
HASH_NO_LOCK
);
for
(
int
i
=
0
;
i
<
listlen
;
i
++
)
{
for
(
int
i
=
0
;
i
<
listlen
;
i
++
)
{
int64_t
*
uid
=
taosArrayGet
(
list
,
i
);
int64_t
*
uid
=
taosArrayGet
(
list
,
i
);
taosHashPut
(
uHash
,
uid
,
sizeof
(
int64_t
),
&
i
,
sizeof
(
i
));
taosHashPut
(
uHash
,
uid
,
sizeof
(
int64_t
),
&
i
,
sizeof
(
i
));
}
}
}
}
...
@@ -2018,4 +2018,4 @@ void printDataBlock(SSDataBlock* pBlock, const char* flag) {
...
@@ -2018,4 +2018,4 @@ void printDataBlock(SSDataBlock* pBlock, const char* flag) {
char
*
pBuf
=
NULL
;
char
*
pBuf
=
NULL
;
qDebug
(
"%s"
,
dumpBlockData
(
pBlock
,
flag
,
&
pBuf
));
qDebug
(
"%s"
,
dumpBlockData
(
pBlock
,
flag
,
&
pBuf
));
taosMemoryFree
(
pBuf
);
taosMemoryFree
(
pBuf
);
}
}
\ No newline at end of file
source/util/src/tarray.c
浏览文件 @
94ab465b
...
@@ -319,9 +319,9 @@ SArray* taosArrayDup(const SArray* pSrc, __array_item_dup_fn_t fn) {
...
@@ -319,9 +319,9 @@ SArray* taosArrayDup(const SArray* pSrc, __array_item_dup_fn_t fn) {
}
else
{
}
else
{
ASSERT
(
pSrc
->
elemSize
==
sizeof
(
void
*
));
ASSERT
(
pSrc
->
elemSize
==
sizeof
(
void
*
));
for
(
int32_t
i
=
0
;
i
<
pSrc
->
size
;
++
i
)
{
for
(
int32_t
i
=
0
;
i
<
pSrc
->
size
;
++
i
)
{
void
*
p
=
fn
(
taosArrayGetP
(
pSrc
,
i
));
void
*
p
=
fn
(
taosArrayGetP
(
pSrc
,
i
));
memcpy
(((
char
*
)
dst
->
pData
)
+
i
*
dst
->
elemSize
,
&
p
,
dst
->
elemSize
);
memcpy
(((
char
*
)
dst
->
pData
)
+
i
*
dst
->
elemSize
,
&
p
,
dst
->
elemSize
);
}
}
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录