Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
milvus
milvus
提交
68f703f9
M
milvus
项目概览
milvus
/
milvus
10 个月 前同步成功
通知
260
Star
22476
Fork
2472
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
M
milvus
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
未验证
提交
68f703f9
编写于
6月 07, 2021
作者:
X
Xiangyu Wang
提交者:
GitHub
6月 07, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add Query impl in proxynode (#5644)
Signed-off-by:
N
Xiangyu Wang
<
xiangyu.wang@zilliz.com
>
上级
65309749
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
377 addition
and
114 deletion
+377
-114
internal/core/src/pb/plan.pb.cc
internal/core/src/pb/plan.pb.cc
+135
-54
internal/core/src/pb/plan.pb.h
internal/core/src/pb/plan.pb.h
+42
-0
internal/proto/plan.proto
internal/proto/plan.proto
+2
-0
internal/proto/planpb/plan.pb.go
internal/proto/planpb/plan.pb.go
+76
-57
internal/proxynode/impl.go
internal/proxynode/impl.go
+119
-1
internal/proxynode/plan_parser.go
internal/proxynode/plan_parser.go
+3
-2
未找到文件。
internal/core/src/pb/plan.pb.cc
浏览文件 @
68f703f9
...
...
@@ -279,6 +279,8 @@ const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_plan_2eproto::offsets[] PROTOB
~
0u
,
// no _weak_field_map_
PROTOBUF_FIELD_OFFSET
(
::
milvus
::
proto
::
plan
::
ColumnInfo
,
field_id_
),
PROTOBUF_FIELD_OFFSET
(
::
milvus
::
proto
::
plan
::
ColumnInfo
,
data_type_
),
PROTOBUF_FIELD_OFFSET
(
::
milvus
::
proto
::
plan
::
ColumnInfo
,
is_primary_key_
),
PROTOBUF_FIELD_OFFSET
(
::
milvus
::
proto
::
plan
::
ColumnInfo
,
is_autoid_
),
~
0u
,
// no _has_bits_
PROTOBUF_FIELD_OFFSET
(
::
milvus
::
proto
::
plan
::
RangeExpr
,
_internal_metadata_
),
~
0u
,
// no _extensions_
...
...
@@ -355,15 +357,15 @@ static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOB
{
0
,
-
1
,
sizeof
(
::
milvus
::
proto
::
plan
::
GenericValue
)},
{
9
,
-
1
,
sizeof
(
::
milvus
::
proto
::
plan
::
QueryInfo
)},
{
17
,
-
1
,
sizeof
(
::
milvus
::
proto
::
plan
::
ColumnInfo
)},
{
2
4
,
-
1
,
sizeof
(
::
milvus
::
proto
::
plan
::
RangeExpr
)},
{
3
2
,
-
1
,
sizeof
(
::
milvus
::
proto
::
plan
::
TermExpr
)},
{
39
,
-
1
,
sizeof
(
::
milvus
::
proto
::
plan
::
UnaryExpr
)},
{
4
6
,
-
1
,
sizeof
(
::
milvus
::
proto
::
plan
::
BinaryExpr
)},
{
5
4
,
-
1
,
sizeof
(
::
milvus
::
proto
::
plan
::
Expr
)},
{
6
4
,
-
1
,
sizeof
(
::
milvus
::
proto
::
plan
::
VectorANNS
)},
{
7
4
,
-
1
,
sizeof
(
::
milvus
::
proto
::
plan
::
PlanNode
)},
{
8
1
,
-
1
,
sizeof
(
::
milvus
::
proto
::
plan
::
RetrieveRequest
)},
{
88
,
-
1
,
sizeof
(
::
milvus
::
proto
::
plan
::
RetrieveResults
)},
{
2
6
,
-
1
,
sizeof
(
::
milvus
::
proto
::
plan
::
RangeExpr
)},
{
3
4
,
-
1
,
sizeof
(
::
milvus
::
proto
::
plan
::
TermExpr
)},
{
41
,
-
1
,
sizeof
(
::
milvus
::
proto
::
plan
::
UnaryExpr
)},
{
4
8
,
-
1
,
sizeof
(
::
milvus
::
proto
::
plan
::
BinaryExpr
)},
{
5
6
,
-
1
,
sizeof
(
::
milvus
::
proto
::
plan
::
Expr
)},
{
6
6
,
-
1
,
sizeof
(
::
milvus
::
proto
::
plan
::
VectorANNS
)},
{
7
6
,
-
1
,
sizeof
(
::
milvus
::
proto
::
plan
::
PlanNode
)},
{
8
3
,
-
1
,
sizeof
(
::
milvus
::
proto
::
plan
::
RetrieveRequest
)},
{
90
,
-
1
,
sizeof
(
::
milvus
::
proto
::
plan
::
RetrieveResults
)},
};
static
::
PROTOBUF_NAMESPACE_ID
::
Message
const
*
const
file_default_instances
[]
=
{
...
...
@@ -387,45 +389,46 @@ const char descriptor_table_protodef_plan_2eproto[] PROTOBUF_SECTION_VARIABLE(pr
"
\000\022\023\n\t
int64_val
\030\002
\001
(
\003
H
\000\022\023\n\t
float_val
\030\003
\001
("
"
\001
H
\000
B
\005\n\003
val
\"
E
\n\t
QueryInfo
\022\014\n\004
topk
\030\001
\001
(
\003\022\023\n
"
"
\013
metric_type
\030\003
\001
(
\t\022\025\n\r
search_params
\030\004
\001
("
"
\t\"
P
\n\n
ColumnInfo
\022\020\n\010
field_id
\030\001
\001
(
\003\022
0
\n\t
dat"
"
\t\"
{
\n\n
ColumnInfo
\022\020\n\010
field_id
\030\001
\001
(
\003\022
0
\n\t
dat"
"a_type
\030\002
\001
(
\016
2
\035
.milvus.proto.schema.DataT"
"ype
\"\222\002\n\t
RangeExpr
\022
2
\n\013
column_info
\030\001
\001
(
\013
2
\035
"
".milvus.proto.plan.ColumnInfo
\022
0
\n\003
ops
\030\002
\003
"
"(
\016
2#.milvus.proto.plan.RangeExpr.OpType
\022
"
"/
\n\006
values
\030\003
\003
(
\013
2
\037
.milvus.proto.plan.Gene"
"ricValue
\"
n
\n\006
OpType
\022\013\n\007
Invalid
\020\000\022\017\n\013
Great"
"erThan
\020\001\022\020\n\014
GreaterEqual
\020\002\022\014\n\010
LessThan
\020\003
"
"
\022\r\n\t
LessEqual
\020\004\022\t\n\005
Equal
\020\005\022\014\n\010
NotEqual
\020\006
"
"
\"
o
\n\010
TermExpr
\022
2
\n\013
column_info
\030\001
\001
(
\013
2
\035
.milv"
"us.proto.plan.ColumnInfo
\022
/
\n\006
values
\030\002
\003
(
\013
"
"2
\037
.milvus.proto.plan.GenericValue
\"\206\001\n\t
Un"
"aryExpr
\022
0
\n\002
op
\030\001
\001
(
\016
2$.milvus.proto.plan."
"UnaryExpr.UnaryOp
\022
&
\n\005
child
\030\002
\001
(
\013
2
\027
.milvu"
"s.proto.plan.Expr
\"\037\n\007
UnaryOp
\022\013\n\007
Invalid
\020
"
"
\000\022\007\n\003
Not
\020\001\"\307\001\n\n
BinaryExpr
\022
2
\n\002
op
\030\001
\001
(
\016
2&."
"milvus.proto.plan.BinaryExpr.BinaryOp
\022
%
\n
"
"
\004
left
\030\002
\001
(
\013
2
\027
.milvus.proto.plan.Expr
\022
&
\n\005
"
"right
\030\003
\001
(
\013
2
\027
.milvus.proto.plan.Expr
\"
6
\n\010
"
"BinaryOp
\022\013\n\007
Invalid
\020\000\022\016\n\n
LogicalAnd
\020\001\022\r\n
"
"
\t
LogicalOr
\020\002\"\336\001\n\004
Expr
\022
2
\n\n
range_expr
\030\001
\001
("
"
\013
2
\034
.milvus.proto.plan.RangeExprH
\000\022
0
\n\t
ter"
"m_expr
\030\002
\001
(
\013
2
\033
.milvus.proto.plan.TermExp"
"rH
\000\022
2
\n\n
unary_expr
\030\003
\001
(
\013
2
\034
.milvus.proto.p"
"lan.UnaryExprH
\000\022
4
\n\013
binary_expr
\030\004
\001
(
\013
2
\035
.m"
"ilvus.proto.plan.BinaryExprH
\000
B
\006\n\004
expr
\"\251\001
"
"
\n\n
VectorANNS
\022\021\n\t
is_binary
\030\001
\001
(
\010\022\020\n\010
field"
"_id
\030\002
\001
(
\003\022
+
\n\n
predicates
\030\003
\001
(
\013
2
\027
.milvus.p"
"roto.plan.Expr
\022
0
\n\n
query_info
\030\004
\001
(
\013
2
\034
.mil"
"vus.proto.plan.QueryInfo
\022\027\n\017
placeholder_"
"tag
\030\005
\001
(
\t\"
H
\n\010
PlanNode
\022
4
\n\013
vector_anns
\030\001
\001
"
"(
\013
2
\035
.milvus.proto.plan.VectorANNSH
\000
B
\006\n\004
n"
"ode
\"
O
\n\017
RetrieveRequest
\022
%
\n\003
ids
\030\001
\001
(
\013
2
\030
.mi"
"lvus.proto.schema.IDs
\022\025\n\r
output_fields
\030\002
"
"
\003
(
\t\"
m
\n\017
RetrieveResults
\022
%
\n\003
ids
\030\001
\001
(
\013
2
\030
.m"
"ilvus.proto.schema.IDs
\022
3
\n\013
fields_data
\030\002
"
"
\003
(
\013
2
\036
.milvus.proto.schema.FieldDataB3Z1g"
"ithub.com/milvus-io/milvus/internal/prot"
"o/planpbb
\006
proto3"
"ype
\022\026\n\016
is_primary_key
\030\003
\001
(
\010\022\021\n\t
is_autoID"
"
\030\004
\001
(
\010\"\222\002\n\t
RangeExpr
\022
2
\n\013
column_info
\030\001
\001
("
"
\013
2
\035
.milvus.proto.plan.ColumnInfo
\022
0
\n\003
ops
\030
"
"
\002
\003
(
\016
2#.milvus.proto.plan.RangeExpr.OpTy"
"pe
\022
/
\n\006
values
\030\003
\003
(
\013
2
\037
.milvus.proto.plan.G"
"enericValue
\"
n
\n\006
OpType
\022\013\n\007
Invalid
\020\000\022\017\n\013
Gr"
"eaterThan
\020\001\022\020\n\014
GreaterEqual
\020\002\022\014\n\010
LessTha"
"n
\020\003\022\r\n\t
LessEqual
\020\004\022\t\n\005
Equal
\020\005\022\014\n\010
NotEqua"
"l
\020\006\"
o
\n\010
TermExpr
\022
2
\n\013
column_info
\030\001
\001
(
\013
2
\035
.m"
"ilvus.proto.plan.ColumnInfo
\022
/
\n\006
values
\030\002
"
"
\003
(
\013
2
\037
.milvus.proto.plan.GenericValue
\"\206\001\n
"
"
\t
UnaryExpr
\022
0
\n\002
op
\030\001
\001
(
\016
2$.milvus.proto.pl"
"an.UnaryExpr.UnaryOp
\022
&
\n\005
child
\030\002
\001
(
\013
2
\027
.mi"
"lvus.proto.plan.Expr
\"\037\n\007
UnaryOp
\022\013\n\007
Inval"
"id
\020\000\022\007\n\003
Not
\020\001\"\307\001\n\n
BinaryExpr
\022
2
\n\002
op
\030\001
\001
(
\016
"
"2&.milvus.proto.plan.BinaryExpr.BinaryOp"
"
\022
%
\n\004
left
\030\002
\001
(
\013
2
\027
.milvus.proto.plan.Expr
\022
"
"&
\n\005
right
\030\003
\001
(
\013
2
\027
.milvus.proto.plan.Expr
\"
"
"6
\n\010
BinaryOp
\022\013\n\007
Invalid
\020\000\022\016\n\n
LogicalAnd
\020\001
"
"
\022\r\n\t
LogicalOr
\020\002\"\336\001\n\004
Expr
\022
2
\n\n
range_expr
\030\001
"
"
\001
(
\013
2
\034
.milvus.proto.plan.RangeExprH
\000\022
0
\n\t
"
"term_expr
\030\002
\001
(
\013
2
\033
.milvus.proto.plan.Term"
"ExprH
\000\022
2
\n\n
unary_expr
\030\003
\001
(
\013
2
\034
.milvus.prot"
"o.plan.UnaryExprH
\000\022
4
\n\013
binary_expr
\030\004
\001
(
\013
2"
"
\035
.milvus.proto.plan.BinaryExprH
\000
B
\006\n\004
expr"
"
\"\251\001\n\n
VectorANNS
\022\021\n\t
is_binary
\030\001
\001
(
\010\022\020\n\010
fi"
"eld_id
\030\002
\001
(
\003\022
+
\n\n
predicates
\030\003
\001
(
\013
2
\027
.milvu"
"s.proto.plan.Expr
\022
0
\n\n
query_info
\030\004
\001
(
\013
2
\034
."
"milvus.proto.plan.QueryInfo
\022\027\n\017
placehold"
"er_tag
\030\005
\001
(
\t\"
H
\n\010
PlanNode
\022
4
\n\013
vector_anns
\030
"
"
\001
\001
(
\013
2
\035
.milvus.proto.plan.VectorANNSH
\000
B
\006
"
"
\n\004
node
\"
O
\n\017
RetrieveRequest
\022
%
\n\003
ids
\030\001
\001
(
\013
2
\030
"
".milvus.proto.schema.IDs
\022\025\n\r
output_field"
"s
\030\002
\003
(
\t\"
m
\n\017
RetrieveResults
\022
%
\n\003
ids
\030\001
\001
(
\013
2"
"
\030
.milvus.proto.schema.IDs
\022
3
\n\013
fields_data"
"
\030\002
\003
(
\013
2
\036
.milvus.proto.schema.FieldDataB3"
"Z1github.com/milvus-io/milvus/internal/p"
"roto/planpbb
\006
proto3"
;
static
const
::
PROTOBUF_NAMESPACE_ID
::
internal
::
DescriptorTable
*
const
descriptor_table_plan_2eproto_deps
[
1
]
=
{
&::
descriptor_table_schema_2eproto
,
...
...
@@ -445,7 +448,7 @@ static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_pla
static
::
PROTOBUF_NAMESPACE_ID
::
internal
::
once_flag
descriptor_table_plan_2eproto_once
;
static
bool
descriptor_table_plan_2eproto_initialized
=
false
;
const
::
PROTOBUF_NAMESPACE_ID
::
internal
::
DescriptorTable
descriptor_table_plan_2eproto
=
{
&
descriptor_table_plan_2eproto_initialized
,
descriptor_table_protodef_plan_2eproto
,
"plan.proto"
,
17
36
,
&
descriptor_table_plan_2eproto_initialized
,
descriptor_table_protodef_plan_2eproto
,
"plan.proto"
,
17
79
,
&
descriptor_table_plan_2eproto_once
,
descriptor_table_plan_2eproto_sccs
,
descriptor_table_plan_2eproto_deps
,
10
,
1
,
schemas
,
file_default_instances
,
TableStruct_plan_2eproto
::
offsets
,
file_level_metadata_plan_2eproto
,
12
,
file_level_enum_descriptors_plan_2eproto
,
file_level_service_descriptors_plan_2eproto
,
...
...
@@ -1314,15 +1317,15 @@ ColumnInfo::ColumnInfo(const ColumnInfo& from)
_internal_metadata_
(
nullptr
)
{
_internal_metadata_
.
MergeFrom
(
from
.
_internal_metadata_
);
::
memcpy
(
&
field_id_
,
&
from
.
field_id_
,
static_cast
<
size_t
>
(
reinterpret_cast
<
char
*>
(
&
data_type
_
)
-
reinterpret_cast
<
char
*>
(
&
field_id_
))
+
sizeof
(
data_type
_
));
static_cast
<
size_t
>
(
reinterpret_cast
<
char
*>
(
&
is_autoid
_
)
-
reinterpret_cast
<
char
*>
(
&
field_id_
))
+
sizeof
(
is_autoid
_
));
// @@protoc_insertion_point(copy_constructor:milvus.proto.plan.ColumnInfo)
}
void
ColumnInfo
::
SharedCtor
()
{
::
memset
(
&
field_id_
,
0
,
static_cast
<
size_t
>
(
reinterpret_cast
<
char
*>
(
&
data_type
_
)
-
reinterpret_cast
<
char
*>
(
&
field_id_
))
+
sizeof
(
data_type
_
));
reinterpret_cast
<
char
*>
(
&
is_autoid
_
)
-
reinterpret_cast
<
char
*>
(
&
field_id_
))
+
sizeof
(
is_autoid
_
));
}
ColumnInfo
::~
ColumnInfo
()
{
...
...
@@ -1349,8 +1352,8 @@ void ColumnInfo::Clear() {
(
void
)
cached_has_bits
;
::
memset
(
&
field_id_
,
0
,
static_cast
<
size_t
>
(
reinterpret_cast
<
char
*>
(
&
data_type
_
)
-
reinterpret_cast
<
char
*>
(
&
field_id_
))
+
sizeof
(
data_type
_
));
reinterpret_cast
<
char
*>
(
&
is_autoid
_
)
-
reinterpret_cast
<
char
*>
(
&
field_id_
))
+
sizeof
(
is_autoid
_
));
_internal_metadata_
.
Clear
();
}
...
...
@@ -1377,6 +1380,20 @@ const char* ColumnInfo::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID:
set_data_type
(
static_cast
<::
milvus
::
proto
::
schema
::
DataType
>
(
val
));
}
else
goto
handle_unusual
;
continue
;
// bool is_primary_key = 3;
case
3
:
if
(
PROTOBUF_PREDICT_TRUE
(
static_cast
<::
PROTOBUF_NAMESPACE_ID
::
uint8
>
(
tag
)
==
24
))
{
is_primary_key_
=
::
PROTOBUF_NAMESPACE_ID
::
internal
::
ReadVarint
(
&
ptr
);
CHK_
(
ptr
);
}
else
goto
handle_unusual
;
continue
;
// bool is_autoID = 4;
case
4
:
if
(
PROTOBUF_PREDICT_TRUE
(
static_cast
<::
PROTOBUF_NAMESPACE_ID
::
uint8
>
(
tag
)
==
32
))
{
is_autoid_
=
::
PROTOBUF_NAMESPACE_ID
::
internal
::
ReadVarint
(
&
ptr
);
CHK_
(
ptr
);
}
else
goto
handle_unusual
;
continue
;
default:
{
handle_unusual:
if
((
tag
&
7
)
==
4
||
tag
==
0
)
{
...
...
@@ -1434,6 +1451,32 @@ bool ColumnInfo::MergePartialFromCodedStream(
break
;
}
// bool is_primary_key = 3;
case
3
:
{
if
(
static_cast
<
::
PROTOBUF_NAMESPACE_ID
::
uint8
>
(
tag
)
==
(
24
&
0xFF
))
{
DO_
((
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
ReadPrimitive
<
bool
,
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
TYPE_BOOL
>
(
input
,
&
is_primary_key_
)));
}
else
{
goto
handle_unusual
;
}
break
;
}
// bool is_autoID = 4;
case
4
:
{
if
(
static_cast
<
::
PROTOBUF_NAMESPACE_ID
::
uint8
>
(
tag
)
==
(
32
&
0xFF
))
{
DO_
((
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
ReadPrimitive
<
bool
,
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
TYPE_BOOL
>
(
input
,
&
is_autoid_
)));
}
else
{
goto
handle_unusual
;
}
break
;
}
default:
{
handle_unusual:
if
(
tag
==
0
)
{
...
...
@@ -1472,6 +1515,16 @@ void ColumnInfo::SerializeWithCachedSizes(
2
,
this
->
data_type
(),
output
);
}
// bool is_primary_key = 3;
if
(
this
->
is_primary_key
()
!=
0
)
{
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
WriteBool
(
3
,
this
->
is_primary_key
(),
output
);
}
// bool is_autoID = 4;
if
(
this
->
is_autoid
()
!=
0
)
{
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
WriteBool
(
4
,
this
->
is_autoid
(),
output
);
}
if
(
_internal_metadata_
.
have_unknown_fields
())
{
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormat
::
SerializeUnknownFields
(
_internal_metadata_
.
unknown_fields
(),
output
);
...
...
@@ -1496,6 +1549,16 @@ void ColumnInfo::SerializeWithCachedSizes(
2
,
this
->
data_type
(),
target
);
}
// bool is_primary_key = 3;
if
(
this
->
is_primary_key
()
!=
0
)
{
target
=
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
WriteBoolToArray
(
3
,
this
->
is_primary_key
(),
target
);
}
// bool is_autoID = 4;
if
(
this
->
is_autoid
()
!=
0
)
{
target
=
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
WriteBoolToArray
(
4
,
this
->
is_autoid
(),
target
);
}
if
(
_internal_metadata_
.
have_unknown_fields
())
{
target
=
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormat
::
SerializeUnknownFieldsToArray
(
_internal_metadata_
.
unknown_fields
(),
target
);
...
...
@@ -1530,6 +1593,16 @@ size_t ColumnInfo::ByteSizeLong() const {
::
PROTOBUF_NAMESPACE_ID
::
internal
::
WireFormatLite
::
EnumSize
(
this
->
data_type
());
}
// bool is_primary_key = 3;
if
(
this
->
is_primary_key
()
!=
0
)
{
total_size
+=
1
+
1
;
}
// bool is_autoID = 4;
if
(
this
->
is_autoid
()
!=
0
)
{
total_size
+=
1
+
1
;
}
int
cached_size
=
::
PROTOBUF_NAMESPACE_ID
::
internal
::
ToCachedSize
(
total_size
);
SetCachedSize
(
cached_size
);
return
total_size
;
...
...
@@ -1563,6 +1636,12 @@ void ColumnInfo::MergeFrom(const ColumnInfo& from) {
if
(
from
.
data_type
()
!=
0
)
{
set_data_type
(
from
.
data_type
());
}
if
(
from
.
is_primary_key
()
!=
0
)
{
set_is_primary_key
(
from
.
is_primary_key
());
}
if
(
from
.
is_autoid
()
!=
0
)
{
set_is_autoid
(
from
.
is_autoid
());
}
}
void
ColumnInfo
::
CopyFrom
(
const
::
PROTOBUF_NAMESPACE_ID
::
Message
&
from
)
{
...
...
@@ -1588,6 +1667,8 @@ void ColumnInfo::InternalSwap(ColumnInfo* other) {
_internal_metadata_
.
Swap
(
&
other
->
_internal_metadata_
);
swap
(
field_id_
,
other
->
field_id_
);
swap
(
data_type_
,
other
->
data_type_
);
swap
(
is_primary_key_
,
other
->
is_primary_key_
);
swap
(
is_autoid_
,
other
->
is_autoid_
);
}
::
PROTOBUF_NAMESPACE_ID
::
Metadata
ColumnInfo
::
GetMetadata
()
const
{
...
...
internal/core/src/pb/plan.pb.h
浏览文件 @
68f703f9
...
...
@@ -645,6 +645,8 @@ class ColumnInfo :
enum
:
int
{
kFieldIdFieldNumber
=
1
,
kDataTypeFieldNumber
=
2
,
kIsPrimaryKeyFieldNumber
=
3
,
kIsAutoIDFieldNumber
=
4
,
};
// int64 field_id = 1;
void
clear_field_id
();
...
...
@@ -656,6 +658,16 @@ class ColumnInfo :
::
milvus
::
proto
::
schema
::
DataType
data_type
()
const
;
void
set_data_type
(
::
milvus
::
proto
::
schema
::
DataType
value
);
// bool is_primary_key = 3;
void
clear_is_primary_key
();
bool
is_primary_key
()
const
;
void
set_is_primary_key
(
bool
value
);
// bool is_autoID = 4;
void
clear_is_autoid
();
bool
is_autoid
()
const
;
void
set_is_autoid
(
bool
value
);
// @@protoc_insertion_point(class_scope:milvus.proto.plan.ColumnInfo)
private:
class
_Internal
;
...
...
@@ -663,6 +675,8 @@ class ColumnInfo :
::
PROTOBUF_NAMESPACE_ID
::
internal
::
InternalMetadataWithArena
_internal_metadata_
;
::
PROTOBUF_NAMESPACE_ID
::
int64
field_id_
;
int
data_type_
;
bool
is_primary_key_
;
bool
is_autoid_
;
mutable
::
PROTOBUF_NAMESPACE_ID
::
internal
::
CachedSize
_cached_size_
;
friend
struct
::
TableStruct_plan_2eproto
;
};
...
...
@@ -2432,6 +2446,34 @@ inline void ColumnInfo::set_data_type(::milvus::proto::schema::DataType value) {
// @@protoc_insertion_point(field_set:milvus.proto.plan.ColumnInfo.data_type)
}
// bool is_primary_key = 3;
inline
void
ColumnInfo
::
clear_is_primary_key
()
{
is_primary_key_
=
false
;
}
inline
bool
ColumnInfo
::
is_primary_key
()
const
{
// @@protoc_insertion_point(field_get:milvus.proto.plan.ColumnInfo.is_primary_key)
return
is_primary_key_
;
}
inline
void
ColumnInfo
::
set_is_primary_key
(
bool
value
)
{
is_primary_key_
=
value
;
// @@protoc_insertion_point(field_set:milvus.proto.plan.ColumnInfo.is_primary_key)
}
// bool is_autoID = 4;
inline
void
ColumnInfo
::
clear_is_autoid
()
{
is_autoid_
=
false
;
}
inline
bool
ColumnInfo
::
is_autoid
()
const
{
// @@protoc_insertion_point(field_get:milvus.proto.plan.ColumnInfo.is_autoID)
return
is_autoid_
;
}
inline
void
ColumnInfo
::
set_is_autoid
(
bool
value
)
{
is_autoid_
=
value
;
// @@protoc_insertion_point(field_set:milvus.proto.plan.ColumnInfo.is_autoID)
}
// -------------------------------------------------------------------
// RangeExpr
...
...
internal/proto/plan.proto
浏览文件 @
68f703f9
...
...
@@ -22,6 +22,8 @@ message QueryInfo {
message
ColumnInfo
{
int64
field_id
=
1
;
schema.DataType
data_type
=
2
;
bool
is_primary_key
=
3
;
bool
is_autoID
=
4
;
}
message
RangeExpr
{
...
...
internal/proto/planpb/plan.pb.go
浏览文件 @
68f703f9
...
...
@@ -267,6 +267,8 @@ func (m *QueryInfo) GetSearchParams() string {
type
ColumnInfo
struct
{
FieldId
int64
`protobuf:"varint,1,opt,name=field_id,json=fieldId,proto3" json:"field_id,omitempty"`
DataType
schemapb
.
DataType
`protobuf:"varint,2,opt,name=data_type,json=dataType,proto3,enum=milvus.proto.schema.DataType" json:"data_type,omitempty"`
IsPrimaryKey
bool
`protobuf:"varint,3,opt,name=is_primary_key,json=isPrimaryKey,proto3" json:"is_primary_key,omitempty"`
IsAutoID
bool
`protobuf:"varint,4,opt,name=is_autoID,json=isAutoID,proto3" json:"is_autoID,omitempty"`
XXX_NoUnkeyedLiteral
struct
{}
`json:"-"`
XXX_unrecognized
[]
byte
`json:"-"`
XXX_sizecache
int32
`json:"-"`
...
...
@@ -311,6 +313,20 @@ func (m *ColumnInfo) GetDataType() schemapb.DataType {
return
schemapb
.
DataType_None
}
func
(
m
*
ColumnInfo
)
GetIsPrimaryKey
()
bool
{
if
m
!=
nil
{
return
m
.
IsPrimaryKey
}
return
false
}
func
(
m
*
ColumnInfo
)
GetIsAutoID
()
bool
{
if
m
!=
nil
{
return
m
.
IsAutoID
}
return
false
}
type
RangeExpr
struct
{
ColumnInfo
*
ColumnInfo
`protobuf:"bytes,1,opt,name=column_info,json=columnInfo,proto3" json:"column_info,omitempty"`
Ops
[]
RangeExpr_OpType
`protobuf:"varint,2,rep,packed,name=ops,proto3,enum=milvus.proto.plan.RangeExpr_OpType" json:"ops,omitempty"`
...
...
@@ -876,62 +892,65 @@ func init() {
func
init
()
{
proto
.
RegisterFile
(
"plan.proto"
,
fileDescriptor_2d655ab2f7683c23
)
}
var
fileDescriptor_2d655ab2f7683c23
=
[]
byte
{
// 9
1
1 bytes of a gzipped FileDescriptorProto
// 9
5
1 bytes of a gzipped FileDescriptorProto
0x1f
,
0x8b
,
0x08
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x02
,
0xff
,
0xac
,
0x55
,
0x4f
,
0x6f
,
0x1b
,
0x45
,
0x14
,
0xcf
,
0xee
,
0x3a
,
0xf1
,
0xee
,
0xb3
,
0xeb
,
0x98
,
0xb9
,
0x60
,
0x08
,
0x25
,
0xd6
,
0x16
,
0x81
,
0x05
,
0xaa
,
0x23
,
0xdc
,
0x92
,
0x4a
,
0x45
,
0x05
,
0x12
,
0x5a
,
0x9a
,
0x48
,
0x95
,
0x53
,
0x06
,
0x93
,
0x03
,
0x97
,
0xd5
,
0x78
,
0x77
,
0x6c
,
0x8f
,
0x18
,
0xcf
,
0x6c
,
0x66
,
0x67
,
0xad
,
0xe6
,
0xc2
,
0x85
,
0x1b
,
0x37
,
0x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,
0xd3
,
0xc7
,
0x6b
,
0x31
,
0x36
,
0xa0
,
0xf9
,
0x94
,
0x30
,
0x38
,
0x88
,
0xa1
,
0x4f
,
0x1f
,
0xff
,
0xf2
,
0xc5
,
0x88
,
0xe9
,
0x71
,
0x39
,
0x38
,
0x4c
,
0xe5
,
0xe4
,
0xc8
,
0xe1
,
0x1e
,
0x31
,
0x59
,
0x51
,
0x47
,
0x4c
,
0x68
,
0xaa
,
0x04
,
0xe1
,
0x47
,
0xd6
,
0xd5
,
0x91
,
0xe9
,
0x5b
,
0x3e
,
0x18
,
0x6c
,
0x59
,
0xee
,
0xf1
,
0xbf
,
0x01
,
0x00
,
0x00
,
0xff
,
0xff
,
0x6d
,
0xf2
,
0x58
,
0xac
,
0x3c
,
0x08
,
0x00
,
0x00
,
}
internal/proxynode/impl.go
浏览文件 @
68f703f9
...
...
@@ -26,6 +26,7 @@ import (
"github.com/milvus-io/milvus/internal/proto/datapb"
"github.com/milvus-io/milvus/internal/proto/internalpb"
"github.com/milvus-io/milvus/internal/proto/milvuspb"
"github.com/milvus-io/milvus/internal/proto/planpb"
"github.com/milvus-io/milvus/internal/proto/proxypb"
"github.com/milvus-io/milvus/internal/proto/querypb"
"github.com/milvus-io/milvus/internal/proto/schemapb"
...
...
@@ -1276,7 +1277,124 @@ func (node *ProxyNode) Flush(ctx context.Context, request *milvuspb.FlushRequest
}
func
(
node
*
ProxyNode
)
Query
(
ctx
context
.
Context
,
request
*
milvuspb
.
QueryRequest
)
(
*
milvuspb
.
QueryResults
,
error
)
{
panic
(
"Not implemented yet"
)
schemaPb
,
err
:=
globalMetaCache
.
GetCollectionSchema
(
ctx
,
request
.
CollectionName
)
if
err
!=
nil
{
// err is not nil if collection not exists
return
nil
,
err
}
schema
,
err
:=
typeutil
.
CreateSchemaHelper
(
schemaPb
)
if
err
!=
nil
{
return
nil
,
err
}
parseRetrieveTask
:=
func
(
exprString
string
)
(
bool
,
[]
int64
)
{
expr
,
err
:=
parseQueryExpr
(
schema
,
exprString
)
if
err
!=
nil
{
return
false
,
nil
}
switch
xExpr
:=
expr
.
Expr
.
(
type
)
{
case
*
planpb
.
Expr_TermExpr
:
var
ids
[]
int64
for
_
,
value
:=
range
xExpr
.
TermExpr
.
Values
{
switch
v
:=
value
.
Val
.
(
type
)
{
case
*
planpb
.
GenericValue_Int64Val
:
ids
=
append
(
ids
,
v
.
Int64Val
)
default
:
return
false
,
nil
}
}
return
xExpr
.
TermExpr
.
ColumnInfo
.
IsPrimaryKey
,
ids
default
:
return
false
,
nil
}
}
isRetrieveTask
,
ids
:=
parseRetrieveTask
(
request
.
Expr
)
if
isRetrieveTask
{
retrieveRequest
:=
&
milvuspb
.
RetrieveRequest
{
DbName
:
request
.
DbName
,
CollectionName
:
request
.
CollectionName
,
PartitionNames
:
request
.
PartitionNames
,
Ids
:
&
schemapb
.
IDs
{
IdField
:
&
schemapb
.
IDs_IntId
{
IntId
:
&
schemapb
.
LongArray
{
Data
:
ids
,
},
},
},
OutputFields
:
request
.
OutputFields
,
}
rt
:=
&
RetrieveTask
{
ctx
:
ctx
,
Condition
:
NewTaskCondition
(
ctx
),
RetrieveRequest
:
&
internalpb
.
RetrieveRequest
{
Base
:
&
commonpb
.
MsgBase
{
MsgType
:
commonpb
.
MsgType_Retrieve
,
SourceID
:
Params
.
ProxyID
,
},
ResultChannelID
:
strconv
.
FormatInt
(
Params
.
ProxyID
,
10
),
},
queryMsgStream
:
node
.
queryMsgStream
,
resultBuf
:
make
(
chan
[]
*
internalpb
.
RetrieveResults
),
retrieve
:
retrieveRequest
,
}
err
:=
node
.
sched
.
DqQueue
.
Enqueue
(
rt
)
if
err
!=
nil
{
return
&
milvuspb
.
QueryResults
{
Status
:
&
commonpb
.
Status
{
ErrorCode
:
commonpb
.
ErrorCode_UnexpectedError
,
Reason
:
err
.
Error
(),
},
},
nil
}
log
.
Debug
(
"Retrieve"
,
zap
.
String
(
"role"
,
Params
.
RoleName
),
zap
.
Int64
(
"msgID"
,
rt
.
Base
.
MsgID
),
zap
.
Uint64
(
"timestamp"
,
rt
.
Base
.
Timestamp
),
zap
.
String
(
"db"
,
retrieveRequest
.
DbName
),
zap
.
String
(
"collection"
,
retrieveRequest
.
CollectionName
),
zap
.
Any
(
"partitions"
,
retrieveRequest
.
PartitionNames
),
zap
.
Any
(
"len(Ids)"
,
len
(
retrieveRequest
.
Ids
.
IdField
.
(
*
schemapb
.
IDs_IntId
)
.
IntId
.
Data
)))
defer
func
()
{
log
.
Debug
(
"Retrieve Done"
,
zap
.
Error
(
err
),
zap
.
String
(
"role"
,
Params
.
RoleName
),
zap
.
Int64
(
"msgID"
,
rt
.
Base
.
MsgID
),
zap
.
Uint64
(
"timestamp"
,
rt
.
Base
.
Timestamp
),
zap
.
String
(
"db"
,
retrieveRequest
.
DbName
),
zap
.
String
(
"collection"
,
retrieveRequest
.
CollectionName
),
zap
.
Any
(
"partitions"
,
retrieveRequest
.
PartitionNames
),
zap
.
Any
(
"len(Ids)"
,
len
(
retrieveRequest
.
Ids
.
IdField
.
(
*
schemapb
.
IDs_IntId
)
.
IntId
.
Data
)))
}()
err
=
rt
.
WaitToFinish
()
if
err
!=
nil
{
return
&
milvuspb
.
QueryResults
{
Status
:
&
commonpb
.
Status
{
ErrorCode
:
commonpb
.
ErrorCode_UnexpectedError
,
Reason
:
err
.
Error
(),
},
},
nil
}
return
&
milvuspb
.
QueryResults
{
Status
:
rt
.
result
.
Status
,
FieldsData
:
rt
.
result
.
FieldsData
,
},
nil
}
err
=
errors
.
New
(
"Not implemented"
)
return
&
milvuspb
.
QueryResults
{
Status
:
&
commonpb
.
Status
{
ErrorCode
:
commonpb
.
ErrorCode_UnexpectedError
,
Reason
:
err
.
Error
(),
},
},
nil
}
func
(
node
*
ProxyNode
)
GetDdChannel
(
ctx
context
.
Context
,
request
*
internalpb
.
GetDdChannelRequest
)
(
*
milvuspb
.
StringResponse
,
error
)
{
...
...
internal/proxynode/plan_parser.go
浏览文件 @
68f703f9
...
...
@@ -45,8 +45,9 @@ func parseQueryExprAdvanced(schema *typeutil.SchemaHelper, exprStr string) (*pla
func
(
context
*
ParserContext
)
createColumnInfo
(
field
*
schemapb
.
FieldSchema
)
*
planpb
.
ColumnInfo
{
return
&
planpb
.
ColumnInfo
{
FieldId
:
field
.
FieldID
,
DataType
:
field
.
DataType
,
FieldId
:
field
.
FieldID
,
DataType
:
field
.
DataType
,
IsPrimaryKey
:
field
.
IsPrimaryKey
,
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录