Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
milvus
提交
0d0b8eeb
milvus
项目概览
BaiXuePrincess
/
milvus
与 Fork 源项目一致
从无法访问的项目Fork
通知
7
Star
4
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
milvus
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
0d0b8eeb
编写于
8月 19, 2019
作者:
X
xj.lin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
MS372 fix unittest
Former-commit-id: 78f0c12c86ed19158b982d1f460e4a2497bb0585
上级
c2cd0edb
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
15 addition
and
7 deletion
+15
-7
cpp/src/db/meta/SqliteMetaImpl.cpp
cpp/src/db/meta/SqliteMetaImpl.cpp
+7
-7
cpp/unittest/server/cache_test.cpp
cpp/unittest/server/cache_test.cpp
+8
-0
未找到文件。
cpp/src/db/meta/SqliteMetaImpl.cpp
浏览文件 @
0d0b8eeb
...
@@ -606,9 +606,9 @@ Status SqliteMetaImpl::FilesToSearch(const std::string &table_id,
...
@@ -606,9 +606,9 @@ Status SqliteMetaImpl::FilesToSearch(const std::string &table_id,
&
TableFileSchema
::
engine_type_
);
&
TableFileSchema
::
engine_type_
);
auto
match_tableid
=
c
(
&
TableFileSchema
::
table_id_
)
==
table_id
;
auto
match_tableid
=
c
(
&
TableFileSchema
::
table_id_
)
==
table_id
;
auto
is_raw
=
c
(
&
TableFileSchema
::
file_type_
)
==
(
int
)
TableFileSchema
::
RAW
;
auto
is_toindex
=
c
(
&
TableFileSchema
::
file_type_
)
==
(
int
)
TableFileSchema
::
TO_INDEX
;
std
::
vector
<
int
>
file_type
=
{(
int
)
TableFileSchema
::
RAW
,
(
int
)
TableFileSchema
::
TO_INDEX
,
(
int
)
TableFileSchema
::
INDEX
}
;
auto
is_index
=
c
(
&
TableFileSchema
::
file_type_
)
==
(
int
)
TableFileSchema
::
INDEX
;
auto
match_type
=
in
(
&
TableFileSchema
::
file_type_
,
file_type
)
;
TableSchema
table_schema
;
TableSchema
table_schema
;
table_schema
.
table_id_
=
table_id
;
table_schema
.
table_id_
=
table_id
;
...
@@ -617,23 +617,23 @@ Status SqliteMetaImpl::FilesToSearch(const std::string &table_id,
...
@@ -617,23 +617,23 @@ Status SqliteMetaImpl::FilesToSearch(const std::string &table_id,
decltype
(
ConnectorPtr
->
select
(
select_columns
))
result
;
decltype
(
ConnectorPtr
->
select
(
select_columns
))
result
;
if
(
partition
.
empty
()
&&
ids
.
empty
())
{
if
(
partition
.
empty
()
&&
ids
.
empty
())
{
auto
filter
=
where
(
match_tableid
and
(
is_raw
or
is_toindex
or
is_index
)
);
auto
filter
=
where
(
match_tableid
and
match_type
);
result
=
ConnectorPtr
->
select
(
select_columns
,
filter
);
result
=
ConnectorPtr
->
select
(
select_columns
,
filter
);
}
}
else
if
(
partition
.
empty
()
&&
!
ids
.
empty
())
{
else
if
(
partition
.
empty
()
&&
!
ids
.
empty
())
{
auto
match_fileid
=
in
(
&
TableFileSchema
::
id_
,
ids
);
auto
match_fileid
=
in
(
&
TableFileSchema
::
id_
,
ids
);
auto
filter
=
where
(
match_tableid
and
match_fileid
and
(
is_raw
or
is_toindex
or
is_index
)
);
auto
filter
=
where
(
match_tableid
and
match_fileid
and
match_type
);
result
=
ConnectorPtr
->
select
(
select_columns
,
filter
);
result
=
ConnectorPtr
->
select
(
select_columns
,
filter
);
}
}
else
if
(
!
partition
.
empty
()
&&
ids
.
empty
())
{
else
if
(
!
partition
.
empty
()
&&
ids
.
empty
())
{
auto
match_date
=
in
(
&
TableFileSchema
::
date_
,
partition
);
auto
match_date
=
in
(
&
TableFileSchema
::
date_
,
partition
);
auto
filter
=
where
(
match_tableid
and
match_date
and
(
is_raw
or
is_toindex
or
is_index
)
);
auto
filter
=
where
(
match_tableid
and
match_date
and
match_type
);
result
=
ConnectorPtr
->
select
(
select_columns
,
filter
);
result
=
ConnectorPtr
->
select
(
select_columns
,
filter
);
}
}
else
if
(
!
partition
.
empty
()
&&
!
ids
.
empty
())
{
else
if
(
!
partition
.
empty
()
&&
!
ids
.
empty
())
{
auto
match_fileid
=
in
(
&
TableFileSchema
::
id_
,
ids
);
auto
match_fileid
=
in
(
&
TableFileSchema
::
id_
,
ids
);
auto
match_date
=
in
(
&
TableFileSchema
::
date_
,
partition
);
auto
match_date
=
in
(
&
TableFileSchema
::
date_
,
partition
);
auto
filter
=
where
(
match_tableid
and
match_fileid
and
match_date
and
(
is_raw
or
is_toindex
or
is_index
)
);
auto
filter
=
where
(
match_tableid
and
match_fileid
and
match_date
and
match_type
);
result
=
ConnectorPtr
->
select
(
select_columns
,
filter
);
result
=
ConnectorPtr
->
select
(
select_columns
,
filter
);
}
}
...
...
cpp/unittest/server/cache_test.cpp
浏览文件 @
0d0b8eeb
...
@@ -39,6 +39,14 @@ public:
...
@@ -39,6 +39,14 @@ public:
}
}
engine
::
VecIndexPtr
Clone
()
override
{
return
zilliz
::
milvus
::
engine
::
VecIndexPtr
();
}
int64_t
GetDeviceId
()
override
{
return
0
;
}
engine
::
IndexType
GetType
()
override
{
engine
::
IndexType
GetType
()
override
{
return
engine
::
IndexType
::
INVALID
;
return
engine
::
IndexType
::
INVALID
;
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录