Support query by expression (#7386)

Signed-off-by: fishpenguin <kun.yu@zilliz.com>
pull/7467/head
yukun 2021-09-03 17:12:55 +08:00 committed by GitHub
parent db8067d61c
commit 94272bba87
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
49 changed files with 953 additions and 1075 deletions

View File

@ -83,6 +83,17 @@ struct SearchResult {
using SearchResultPtr = std::shared_ptr<SearchResult>; using SearchResultPtr = std::shared_ptr<SearchResult>;
struct RetrieveResult {
RetrieveResult() = default;
public:
void* segment_;
std::vector<int64_t> result_offsets_;
std::vector<DataArray> field_data_;
};
using RetrieveResultPtr = std::shared_ptr<RetrieveResult>;
struct EntityResults { struct EntityResults {
// use protobuf results to simplify // use protobuf results to simplify
}; };

View File

@ -84,6 +84,7 @@ class PlanNodeDefaultTypeInternal {
public: public:
::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<PlanNode> _instance; ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<PlanNode> _instance;
const ::milvus::proto::plan::VectorANNS* vector_anns_; const ::milvus::proto::plan::VectorANNS* vector_anns_;
const ::milvus::proto::plan::Expr* predicates_;
} _PlanNode_default_instance_; } _PlanNode_default_instance_;
} // namespace plan } // namespace plan
} // namespace proto } // namespace proto
@ -188,9 +189,10 @@ static void InitDefaultsscc_info_PlanNode_plan_2eproto() {
::milvus::proto::plan::PlanNode::InitAsDefaultInstance(); ::milvus::proto::plan::PlanNode::InitAsDefaultInstance();
} }
::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_PlanNode_plan_2eproto = ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_PlanNode_plan_2eproto =
{{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_PlanNode_plan_2eproto}, { {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsscc_info_PlanNode_plan_2eproto}, {
&scc_info_VectorANNS_plan_2eproto.base,}}; &scc_info_VectorANNS_plan_2eproto.base,
&scc_info_BinaryExpr_plan_2eproto.base,}};
static void InitDefaultsscc_info_QueryInfo_plan_2eproto() { static void InitDefaultsscc_info_QueryInfo_plan_2eproto() {
GOOGLE_PROTOBUF_VERIFY_VERSION; GOOGLE_PROTOBUF_VERIFY_VERSION;
@ -361,6 +363,7 @@ const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_plan_2eproto::offsets[] PROTOB
PROTOBUF_FIELD_OFFSET(::milvus::proto::plan::PlanNode, _oneof_case_[0]), PROTOBUF_FIELD_OFFSET(::milvus::proto::plan::PlanNode, _oneof_case_[0]),
~0u, // no _weak_field_map_ ~0u, // no _weak_field_map_
offsetof(::milvus::proto::plan::PlanNodeDefaultTypeInternal, vector_anns_), offsetof(::milvus::proto::plan::PlanNodeDefaultTypeInternal, vector_anns_),
offsetof(::milvus::proto::plan::PlanNodeDefaultTypeInternal, predicates_),
PROTOBUF_FIELD_OFFSET(::milvus::proto::plan::PlanNode, output_field_ids_), PROTOBUF_FIELD_OFFSET(::milvus::proto::plan::PlanNode, output_field_ids_),
PROTOBUF_FIELD_OFFSET(::milvus::proto::plan::PlanNode, node_), PROTOBUF_FIELD_OFFSET(::milvus::proto::plan::PlanNode, node_),
}; };
@ -441,14 +444,15 @@ const char descriptor_table_protodef_plan_2eproto[] PROTOBUF_SECTION_VARIABLE(pr
"y\030\001 \001(\010\022\020\n\010field_id\030\002 \001(\003\022+\n\npredicates\030" "y\030\001 \001(\010\022\020\n\010field_id\030\002 \001(\003\022+\n\npredicates\030"
"\003 \001(\0132\027.milvus.proto.plan.Expr\0220\n\nquery_" "\003 \001(\0132\027.milvus.proto.plan.Expr\0220\n\nquery_"
"info\030\004 \001(\0132\034.milvus.proto.plan.QueryInfo" "info\030\004 \001(\0132\034.milvus.proto.plan.QueryInfo"
"\022\027\n\017placeholder_tag\030\005 \001(\t\"b\n\010PlanNode\0224\n" "\022\027\n\017placeholder_tag\030\005 \001(\t\"\221\001\n\010PlanNode\0224"
"\013vector_anns\030\001 \001(\0132\035.milvus.proto.plan.V" "\n\013vector_anns\030\001 \001(\0132\035.milvus.proto.plan."
"ectorANNSH\000\022\030\n\020output_field_ids\030\002 \003(\003B\006\n" "VectorANNSH\000\022-\n\npredicates\030\002 \001(\0132\027.milvu"
"\004node*n\n\006OpType\022\013\n\007Invalid\020\000\022\017\n\013GreaterT" "s.proto.plan.ExprH\000\022\030\n\020output_field_ids\030"
"han\020\001\022\020\n\014GreaterEqual\020\002\022\014\n\010LessThan\020\003\022\r\n" "\003 \003(\003B\006\n\004node*n\n\006OpType\022\013\n\007Invalid\020\000\022\017\n\013"
"\tLessEqual\020\004\022\t\n\005Equal\020\005\022\014\n\010NotEqual\020\006B3Z" "GreaterThan\020\001\022\020\n\014GreaterEqual\020\002\022\014\n\010LessT"
"1github.com/milvus-io/milvus/internal/pr" "han\020\003\022\r\n\tLessEqual\020\004\022\t\n\005Equal\020\005\022\014\n\010NotEq"
"oto/planpbb\006proto3" "ual\020\006B3Z1github.com/milvus-io/milvus/int"
"ernal/proto/planpbb\006proto3"
; ;
static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_plan_2eproto_deps[1] = { static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_plan_2eproto_deps[1] = {
&::descriptor_table_schema_2eproto, &::descriptor_table_schema_2eproto,
@ -468,7 +472,7 @@ static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_pla
static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_plan_2eproto_once; static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_plan_2eproto_once;
static bool descriptor_table_plan_2eproto_initialized = false; static bool descriptor_table_plan_2eproto_initialized = false;
const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_plan_2eproto = { const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_plan_2eproto = {
&descriptor_table_plan_2eproto_initialized, descriptor_table_protodef_plan_2eproto, "plan.proto", 2138, &descriptor_table_plan_2eproto_initialized, descriptor_table_protodef_plan_2eproto, "plan.proto", 2186,
&descriptor_table_plan_2eproto_once, descriptor_table_plan_2eproto_sccs, descriptor_table_plan_2eproto_deps, 10, 1, &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, 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, file_level_metadata_plan_2eproto, 12, file_level_enum_descriptors_plan_2eproto, file_level_service_descriptors_plan_2eproto,
@ -5055,16 +5059,23 @@ void VectorANNS::InternalSwap(VectorANNS* other) {
void PlanNode::InitAsDefaultInstance() { void PlanNode::InitAsDefaultInstance() {
::milvus::proto::plan::_PlanNode_default_instance_.vector_anns_ = const_cast< ::milvus::proto::plan::VectorANNS*>( ::milvus::proto::plan::_PlanNode_default_instance_.vector_anns_ = const_cast< ::milvus::proto::plan::VectorANNS*>(
::milvus::proto::plan::VectorANNS::internal_default_instance()); ::milvus::proto::plan::VectorANNS::internal_default_instance());
::milvus::proto::plan::_PlanNode_default_instance_.predicates_ = const_cast< ::milvus::proto::plan::Expr*>(
::milvus::proto::plan::Expr::internal_default_instance());
} }
class PlanNode::_Internal { class PlanNode::_Internal {
public: public:
static const ::milvus::proto::plan::VectorANNS& vector_anns(const PlanNode* msg); static const ::milvus::proto::plan::VectorANNS& vector_anns(const PlanNode* msg);
static const ::milvus::proto::plan::Expr& predicates(const PlanNode* msg);
}; };
const ::milvus::proto::plan::VectorANNS& const ::milvus::proto::plan::VectorANNS&
PlanNode::_Internal::vector_anns(const PlanNode* msg) { PlanNode::_Internal::vector_anns(const PlanNode* msg) {
return *msg->node_.vector_anns_; return *msg->node_.vector_anns_;
} }
const ::milvus::proto::plan::Expr&
PlanNode::_Internal::predicates(const PlanNode* msg) {
return *msg->node_.predicates_;
}
void PlanNode::set_allocated_vector_anns(::milvus::proto::plan::VectorANNS* vector_anns) { void PlanNode::set_allocated_vector_anns(::milvus::proto::plan::VectorANNS* vector_anns) {
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual(); ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
clear_node(); clear_node();
@ -5079,6 +5090,20 @@ void PlanNode::set_allocated_vector_anns(::milvus::proto::plan::VectorANNS* vect
} }
// @@protoc_insertion_point(field_set_allocated:milvus.proto.plan.PlanNode.vector_anns) // @@protoc_insertion_point(field_set_allocated:milvus.proto.plan.PlanNode.vector_anns)
} }
void PlanNode::set_allocated_predicates(::milvus::proto::plan::Expr* predicates) {
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
clear_node();
if (predicates) {
::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr;
if (message_arena != submessage_arena) {
predicates = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
message_arena, predicates, submessage_arena);
}
set_has_predicates();
node_.predicates_ = predicates;
}
// @@protoc_insertion_point(field_set_allocated:milvus.proto.plan.PlanNode.predicates)
}
PlanNode::PlanNode() PlanNode::PlanNode()
: ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
SharedCtor(); SharedCtor();
@ -5095,6 +5120,10 @@ PlanNode::PlanNode(const PlanNode& from)
mutable_vector_anns()->::milvus::proto::plan::VectorANNS::MergeFrom(from.vector_anns()); mutable_vector_anns()->::milvus::proto::plan::VectorANNS::MergeFrom(from.vector_anns());
break; break;
} }
case kPredicates: {
mutable_predicates()->::milvus::proto::plan::Expr::MergeFrom(from.predicates());
break;
}
case NODE_NOT_SET: { case NODE_NOT_SET: {
break; break;
} }
@ -5134,6 +5163,10 @@ void PlanNode::clear_node() {
delete node_.vector_anns_; delete node_.vector_anns_;
break; break;
} }
case kPredicates: {
delete node_.predicates_;
break;
}
case NODE_NOT_SET: { case NODE_NOT_SET: {
break; break;
} }
@ -5168,12 +5201,19 @@ const char* PlanNode::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::i
CHK_(ptr); CHK_(ptr);
} else goto handle_unusual; } else goto handle_unusual;
continue; continue;
// repeated int64 output_field_ids = 2; // .milvus.proto.plan.Expr predicates = 2;
case 2: case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
ptr = ctx->ParseMessage(mutable_predicates(), ptr);
CHK_(ptr);
} else goto handle_unusual;
continue;
// repeated int64 output_field_ids = 3;
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) {
ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt64Parser(mutable_output_field_ids(), ptr, ctx); ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt64Parser(mutable_output_field_ids(), ptr, ctx);
CHK_(ptr); CHK_(ptr);
} else if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16) { } else if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24) {
add_output_field_ids(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); add_output_field_ids(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr));
CHK_(ptr); CHK_(ptr);
} else goto handle_unusual; } else goto handle_unusual;
@ -5219,16 +5259,27 @@ bool PlanNode::MergePartialFromCodedStream(
break; break;
} }
// repeated int64 output_field_ids = 2; // .milvus.proto.plan.Expr predicates = 2;
case 2: { case 2: {
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) { if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) {
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
input, mutable_predicates()));
} else {
goto handle_unusual;
}
break;
}
// repeated int64 output_field_ids = 3;
case 3: {
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) {
DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPackedPrimitive< DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPackedPrimitive<
::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>( ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>(
input, this->mutable_output_field_ids()))); input, this->mutable_output_field_ids())));
} else if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (16 & 0xFF)) { } else if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (24 & 0xFF)) {
DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline< DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>( ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>(
1, 18u, input, this->mutable_output_field_ids()))); 1, 26u, input, this->mutable_output_field_ids())));
} else { } else {
goto handle_unusual; goto handle_unusual;
} }
@ -5268,9 +5319,15 @@ void PlanNode::SerializeWithCachedSizes(
1, _Internal::vector_anns(this), output); 1, _Internal::vector_anns(this), output);
} }
// repeated int64 output_field_ids = 2; // .milvus.proto.plan.Expr predicates = 2;
if (has_predicates()) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
2, _Internal::predicates(this), output);
}
// repeated int64 output_field_ids = 3;
if (this->output_field_ids_size() > 0) { if (this->output_field_ids_size() > 0) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteTag(2, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output); ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteTag(3, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
output->WriteVarint32(_output_field_ids_cached_byte_size_.load( output->WriteVarint32(_output_field_ids_cached_byte_size_.load(
std::memory_order_relaxed)); std::memory_order_relaxed));
} }
@ -5299,10 +5356,17 @@ void PlanNode::SerializeWithCachedSizes(
1, _Internal::vector_anns(this), target); 1, _Internal::vector_anns(this), target);
} }
// repeated int64 output_field_ids = 2; // .milvus.proto.plan.Expr predicates = 2;
if (has_predicates()) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessageToArray(
2, _Internal::predicates(this), target);
}
// repeated int64 output_field_ids = 3;
if (this->output_field_ids_size() > 0) { if (this->output_field_ids_size() > 0) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteTagToArray( target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteTagToArray(
2, 3,
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
target); target);
target = ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream::WriteVarint32ToArray( target = ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream::WriteVarint32ToArray(
@ -5333,7 +5397,7 @@ size_t PlanNode::ByteSizeLong() const {
// Prevent compiler warnings about cached_has_bits being unused // Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits; (void) cached_has_bits;
// repeated int64 output_field_ids = 2; // repeated int64 output_field_ids = 3;
{ {
size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
Int64Size(this->output_field_ids_); Int64Size(this->output_field_ids_);
@ -5356,6 +5420,13 @@ size_t PlanNode::ByteSizeLong() const {
*node_.vector_anns_); *node_.vector_anns_);
break; break;
} }
// .milvus.proto.plan.Expr predicates = 2;
case kPredicates: {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*node_.predicates_);
break;
}
case NODE_NOT_SET: { case NODE_NOT_SET: {
break; break;
} }
@ -5393,6 +5464,10 @@ void PlanNode::MergeFrom(const PlanNode& from) {
mutable_vector_anns()->::milvus::proto::plan::VectorANNS::MergeFrom(from.vector_anns()); mutable_vector_anns()->::milvus::proto::plan::VectorANNS::MergeFrom(from.vector_anns());
break; break;
} }
case kPredicates: {
mutable_predicates()->::milvus::proto::plan::Expr::MergeFrom(from.predicates());
break;
}
case NODE_NOT_SET: { case NODE_NOT_SET: {
break; break;
} }

View File

@ -2072,6 +2072,7 @@ class PlanNode :
enum NodeCase { enum NodeCase {
kVectorAnns = 1, kVectorAnns = 1,
kPredicates = 2,
NODE_NOT_SET = 0, NODE_NOT_SET = 0,
}; };
@ -2152,10 +2153,11 @@ class PlanNode :
// accessors ------------------------------------------------------- // accessors -------------------------------------------------------
enum : int { enum : int {
kOutputFieldIdsFieldNumber = 2, kOutputFieldIdsFieldNumber = 3,
kVectorAnnsFieldNumber = 1, kVectorAnnsFieldNumber = 1,
kPredicatesFieldNumber = 2,
}; };
// repeated int64 output_field_ids = 2; // repeated int64 output_field_ids = 3;
int output_field_ids_size() const; int output_field_ids_size() const;
void clear_output_field_ids(); void clear_output_field_ids();
::PROTOBUF_NAMESPACE_ID::int64 output_field_ids(int index) const; ::PROTOBUF_NAMESPACE_ID::int64 output_field_ids(int index) const;
@ -2174,12 +2176,21 @@ class PlanNode :
::milvus::proto::plan::VectorANNS* mutable_vector_anns(); ::milvus::proto::plan::VectorANNS* mutable_vector_anns();
void set_allocated_vector_anns(::milvus::proto::plan::VectorANNS* vector_anns); void set_allocated_vector_anns(::milvus::proto::plan::VectorANNS* vector_anns);
// .milvus.proto.plan.Expr predicates = 2;
bool has_predicates() const;
void clear_predicates();
const ::milvus::proto::plan::Expr& predicates() const;
::milvus::proto::plan::Expr* release_predicates();
::milvus::proto::plan::Expr* mutable_predicates();
void set_allocated_predicates(::milvus::proto::plan::Expr* predicates);
void clear_node(); void clear_node();
NodeCase node_case() const; NodeCase node_case() const;
// @@protoc_insertion_point(class_scope:milvus.proto.plan.PlanNode) // @@protoc_insertion_point(class_scope:milvus.proto.plan.PlanNode)
private: private:
class _Internal; class _Internal;
void set_has_vector_anns(); void set_has_vector_anns();
void set_has_predicates();
inline bool has_node() const; inline bool has_node() const;
inline void clear_has_node(); inline void clear_has_node();
@ -2190,6 +2201,7 @@ class PlanNode :
union NodeUnion { union NodeUnion {
NodeUnion() {} NodeUnion() {}
::milvus::proto::plan::VectorANNS* vector_anns_; ::milvus::proto::plan::VectorANNS* vector_anns_;
::milvus::proto::plan::Expr* predicates_;
} node_; } node_;
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
::PROTOBUF_NAMESPACE_ID::uint32 _oneof_case_[1]; ::PROTOBUF_NAMESPACE_ID::uint32 _oneof_case_[1];
@ -3671,7 +3683,48 @@ inline ::milvus::proto::plan::VectorANNS* PlanNode::mutable_vector_anns() {
return node_.vector_anns_; return node_.vector_anns_;
} }
// repeated int64 output_field_ids = 2; // .milvus.proto.plan.Expr predicates = 2;
inline bool PlanNode::has_predicates() const {
return node_case() == kPredicates;
}
inline void PlanNode::set_has_predicates() {
_oneof_case_[0] = kPredicates;
}
inline void PlanNode::clear_predicates() {
if (has_predicates()) {
delete node_.predicates_;
clear_has_node();
}
}
inline ::milvus::proto::plan::Expr* PlanNode::release_predicates() {
// @@protoc_insertion_point(field_release:milvus.proto.plan.PlanNode.predicates)
if (has_predicates()) {
clear_has_node();
::milvus::proto::plan::Expr* temp = node_.predicates_;
node_.predicates_ = nullptr;
return temp;
} else {
return nullptr;
}
}
inline const ::milvus::proto::plan::Expr& PlanNode::predicates() const {
// @@protoc_insertion_point(field_get:milvus.proto.plan.PlanNode.predicates)
return has_predicates()
? *node_.predicates_
: *reinterpret_cast< ::milvus::proto::plan::Expr*>(&::milvus::proto::plan::_Expr_default_instance_);
}
inline ::milvus::proto::plan::Expr* PlanNode::mutable_predicates() {
if (!has_predicates()) {
clear_node();
set_has_predicates();
node_.predicates_ = CreateMaybeMessage< ::milvus::proto::plan::Expr >(
GetArenaNoVirtual());
}
// @@protoc_insertion_point(field_mutable:milvus.proto.plan.PlanNode.predicates)
return node_.predicates_;
}
// repeated int64 output_field_ids = 3;
inline int PlanNode::output_field_ids_size() const { inline int PlanNode::output_field_ids_size() const {
return output_field_ids_.size(); return output_field_ids_.size();
} }

View File

@ -21,10 +21,6 @@ extern PROTOBUF_INTERNAL_EXPORT_segcore_2eproto ::PROTOBUF_NAMESPACE_ID::interna
namespace milvus { namespace milvus {
namespace proto { namespace proto {
namespace segcore { namespace segcore {
class RetrieveRequestDefaultTypeInternal {
public:
::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<RetrieveRequest> _instance;
} _RetrieveRequest_default_instance_;
class RetrieveResultsDefaultTypeInternal { class RetrieveResultsDefaultTypeInternal {
public: public:
::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<RetrieveResults> _instance; ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<RetrieveResults> _instance;
@ -69,21 +65,6 @@ static void InitDefaultsscc_info_LoadSegmentMeta_segcore_2eproto() {
{{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_LoadSegmentMeta_segcore_2eproto}, { {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_LoadSegmentMeta_segcore_2eproto}, {
&scc_info_LoadFieldMeta_segcore_2eproto.base,}}; &scc_info_LoadFieldMeta_segcore_2eproto.base,}};
static void InitDefaultsscc_info_RetrieveRequest_segcore_2eproto() {
GOOGLE_PROTOBUF_VERIFY_VERSION;
{
void* ptr = &::milvus::proto::segcore::_RetrieveRequest_default_instance_;
new (ptr) ::milvus::proto::segcore::RetrieveRequest();
::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
}
::milvus::proto::segcore::RetrieveRequest::InitAsDefaultInstance();
}
::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_RetrieveRequest_segcore_2eproto =
{{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_RetrieveRequest_segcore_2eproto}, {
&scc_info_IDs_schema_2eproto.base,}};
static void InitDefaultsscc_info_RetrieveResults_segcore_2eproto() { static void InitDefaultsscc_info_RetrieveResults_segcore_2eproto() {
GOOGLE_PROTOBUF_VERIFY_VERSION; GOOGLE_PROTOBUF_VERIFY_VERSION;
@ -100,18 +81,11 @@ static void InitDefaultsscc_info_RetrieveResults_segcore_2eproto() {
&scc_info_IDs_schema_2eproto.base, &scc_info_IDs_schema_2eproto.base,
&scc_info_FieldData_schema_2eproto.base,}}; &scc_info_FieldData_schema_2eproto.base,}};
static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_segcore_2eproto[4]; static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_segcore_2eproto[3];
static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_segcore_2eproto = nullptr; static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_segcore_2eproto = nullptr;
static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_segcore_2eproto = nullptr; static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_segcore_2eproto = nullptr;
const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_segcore_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_segcore_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::milvus::proto::segcore::RetrieveRequest, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
PROTOBUF_FIELD_OFFSET(::milvus::proto::segcore::RetrieveRequest, ids_),
PROTOBUF_FIELD_OFFSET(::milvus::proto::segcore::RetrieveRequest, output_fields_id_),
~0u, // no _has_bits_ ~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::milvus::proto::segcore::RetrieveResults, _internal_metadata_), PROTOBUF_FIELD_OFFSET(::milvus::proto::segcore::RetrieveResults, _internal_metadata_),
~0u, // no _extensions_ ~0u, // no _extensions_
@ -137,14 +111,12 @@ const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_segcore_2eproto::offsets[] PRO
PROTOBUF_FIELD_OFFSET(::milvus::proto::segcore::LoadSegmentMeta, total_size_), PROTOBUF_FIELD_OFFSET(::milvus::proto::segcore::LoadSegmentMeta, total_size_),
}; };
static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
{ 0, -1, sizeof(::milvus::proto::segcore::RetrieveRequest)}, { 0, -1, sizeof(::milvus::proto::segcore::RetrieveResults)},
{ 7, -1, sizeof(::milvus::proto::segcore::RetrieveResults)}, { 8, -1, sizeof(::milvus::proto::segcore::LoadFieldMeta)},
{ 15, -1, sizeof(::milvus::proto::segcore::LoadFieldMeta)}, { 16, -1, sizeof(::milvus::proto::segcore::LoadSegmentMeta)},
{ 23, -1, sizeof(::milvus::proto::segcore::LoadSegmentMeta)},
}; };
static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = { static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::milvus::proto::segcore::_RetrieveRequest_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::milvus::proto::segcore::_RetrieveResults_default_instance_), reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::milvus::proto::segcore::_RetrieveResults_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::milvus::proto::segcore::_LoadFieldMeta_default_instance_), reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::milvus::proto::segcore::_LoadFieldMeta_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::milvus::proto::segcore::_LoadSegmentMeta_default_instance_), reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::milvus::proto::segcore::_LoadSegmentMeta_default_instance_),
@ -152,35 +124,32 @@ static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] =
const char descriptor_table_protodef_segcore_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = const char descriptor_table_protodef_segcore_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
"\n\rsegcore.proto\022\024milvus.proto.segcore\032\014s" "\n\rsegcore.proto\022\024milvus.proto.segcore\032\014s"
"chema.proto\"R\n\017RetrieveRequest\022%\n\003ids\030\001 " "chema.proto\"}\n\017RetrieveResults\022%\n\003ids\030\001 "
"\001(\0132\030.milvus.proto.schema.IDs\022\030\n\020output_" "\001(\0132\030.milvus.proto.schema.IDs\022\016\n\006offset\030"
"fields_id\030\002 \003(\003\"}\n\017RetrieveResults\022%\n\003id" "\002 \003(\003\0223\n\013fields_data\030\003 \003(\0132\036.milvus.prot"
"s\030\001 \001(\0132\030.milvus.proto.schema.IDs\022\016\n\006off" "o.schema.FieldData\"P\n\rLoadFieldMeta\022\025\n\rm"
"set\030\002 \003(\003\0223\n\013fields_data\030\003 \003(\0132\036.milvus." "in_timestamp\030\001 \001(\003\022\025\n\rmax_timestamp\030\002 \001("
"proto.schema.FieldData\"P\n\rLoadFieldMeta\022" "\003\022\021\n\trow_count\030\003 \001(\003\"Y\n\017LoadSegmentMeta\022"
"\025\n\rmin_timestamp\030\001 \001(\003\022\025\n\rmax_timestamp\030" "2\n\005metas\030\001 \003(\0132#.milvus.proto.segcore.Lo"
"\002 \001(\003\022\021\n\trow_count\030\003 \001(\003\"Y\n\017LoadSegmentM" "adFieldMeta\022\022\n\ntotal_size\030\002 \001(\003B6Z4githu"
"eta\0222\n\005metas\030\001 \003(\0132#.milvus.proto.segcor" "b.com/milvus-io/milvus/internal/proto/se"
"e.LoadFieldMeta\022\022\n\ntotal_size\030\002 \001(\003B6Z4g" "gcorepbb\006proto3"
"ithub.com/milvus-io/milvus/internal/prot"
"o/segcorepbb\006proto3"
; ;
static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_segcore_2eproto_deps[1] = { static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_segcore_2eproto_deps[1] = {
&::descriptor_table_schema_2eproto, &::descriptor_table_schema_2eproto,
}; };
static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_segcore_2eproto_sccs[4] = { static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_segcore_2eproto_sccs[3] = {
&scc_info_LoadFieldMeta_segcore_2eproto.base, &scc_info_LoadFieldMeta_segcore_2eproto.base,
&scc_info_LoadSegmentMeta_segcore_2eproto.base, &scc_info_LoadSegmentMeta_segcore_2eproto.base,
&scc_info_RetrieveRequest_segcore_2eproto.base,
&scc_info_RetrieveResults_segcore_2eproto.base, &scc_info_RetrieveResults_segcore_2eproto.base,
}; };
static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_segcore_2eproto_once; static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_segcore_2eproto_once;
static bool descriptor_table_segcore_2eproto_initialized = false; static bool descriptor_table_segcore_2eproto_initialized = false;
const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_segcore_2eproto = { const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_segcore_2eproto = {
&descriptor_table_segcore_2eproto_initialized, descriptor_table_protodef_segcore_2eproto, "segcore.proto", 499, &descriptor_table_segcore_2eproto_initialized, descriptor_table_protodef_segcore_2eproto, "segcore.proto", 415,
&descriptor_table_segcore_2eproto_once, descriptor_table_segcore_2eproto_sccs, descriptor_table_segcore_2eproto_deps, 4, 1, &descriptor_table_segcore_2eproto_once, descriptor_table_segcore_2eproto_sccs, descriptor_table_segcore_2eproto_deps, 3, 1,
schemas, file_default_instances, TableStruct_segcore_2eproto::offsets, schemas, file_default_instances, TableStruct_segcore_2eproto::offsets,
file_level_metadata_segcore_2eproto, 4, file_level_enum_descriptors_segcore_2eproto, file_level_service_descriptors_segcore_2eproto, file_level_metadata_segcore_2eproto, 3, file_level_enum_descriptors_segcore_2eproto, file_level_service_descriptors_segcore_2eproto,
}; };
// Force running AddDescriptors() at dynamic initialization time. // Force running AddDescriptors() at dynamic initialization time.
@ -189,347 +158,6 @@ namespace milvus {
namespace proto { namespace proto {
namespace segcore { namespace segcore {
// ===================================================================
void RetrieveRequest::InitAsDefaultInstance() {
::milvus::proto::segcore::_RetrieveRequest_default_instance_._instance.get_mutable()->ids_ = const_cast< ::milvus::proto::schema::IDs*>(
::milvus::proto::schema::IDs::internal_default_instance());
}
class RetrieveRequest::_Internal {
public:
static const ::milvus::proto::schema::IDs& ids(const RetrieveRequest* msg);
};
const ::milvus::proto::schema::IDs&
RetrieveRequest::_Internal::ids(const RetrieveRequest* msg) {
return *msg->ids_;
}
void RetrieveRequest::clear_ids() {
if (GetArenaNoVirtual() == nullptr && ids_ != nullptr) {
delete ids_;
}
ids_ = nullptr;
}
RetrieveRequest::RetrieveRequest()
: ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
SharedCtor();
// @@protoc_insertion_point(constructor:milvus.proto.segcore.RetrieveRequest)
}
RetrieveRequest::RetrieveRequest(const RetrieveRequest& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
_internal_metadata_(nullptr),
output_fields_id_(from.output_fields_id_) {
_internal_metadata_.MergeFrom(from._internal_metadata_);
if (from.has_ids()) {
ids_ = new ::milvus::proto::schema::IDs(*from.ids_);
} else {
ids_ = nullptr;
}
// @@protoc_insertion_point(copy_constructor:milvus.proto.segcore.RetrieveRequest)
}
void RetrieveRequest::SharedCtor() {
::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_RetrieveRequest_segcore_2eproto.base);
ids_ = nullptr;
}
RetrieveRequest::~RetrieveRequest() {
// @@protoc_insertion_point(destructor:milvus.proto.segcore.RetrieveRequest)
SharedDtor();
}
void RetrieveRequest::SharedDtor() {
if (this != internal_default_instance()) delete ids_;
}
void RetrieveRequest::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
const RetrieveRequest& RetrieveRequest::default_instance() {
::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_RetrieveRequest_segcore_2eproto.base);
return *internal_default_instance();
}
void RetrieveRequest::Clear() {
// @@protoc_insertion_point(message_clear_start:milvus.proto.segcore.RetrieveRequest)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
output_fields_id_.Clear();
if (GetArenaNoVirtual() == nullptr && ids_ != nullptr) {
delete ids_;
}
ids_ = nullptr;
_internal_metadata_.Clear();
}
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
const char* RetrieveRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
while (!ctx->Done(&ptr)) {
::PROTOBUF_NAMESPACE_ID::uint32 tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
CHK_(ptr);
switch (tag >> 3) {
// .milvus.proto.schema.IDs ids = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
ptr = ctx->ParseMessage(mutable_ids(), ptr);
CHK_(ptr);
} else goto handle_unusual;
continue;
// repeated int64 output_fields_id = 2;
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt64Parser(mutable_output_fields_id(), ptr, ctx);
CHK_(ptr);
} else if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16) {
add_output_fields_id(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr));
CHK_(ptr);
} else goto handle_unusual;
continue;
default: {
handle_unusual:
if ((tag & 7) == 4 || tag == 0) {
ctx->SetLastTag(tag);
goto success;
}
ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
CHK_(ptr != nullptr);
continue;
}
} // switch
} // while
success:
return ptr;
failure:
ptr = nullptr;
goto success;
#undef CHK_
}
#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
bool RetrieveRequest::MergePartialFromCodedStream(
::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
::PROTOBUF_NAMESPACE_ID::uint32 tag;
// @@protoc_insertion_point(parse_start:milvus.proto.segcore.RetrieveRequest)
for (;;) {
::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// .milvus.proto.schema.IDs ids = 1;
case 1: {
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) {
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
input, mutable_ids()));
} else {
goto handle_unusual;
}
break;
}
// repeated int64 output_fields_id = 2;
case 2: {
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) {
DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPackedPrimitive<
::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>(
input, this->mutable_output_fields_id())));
} else if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (16 & 0xFF)) {
DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>(
1, 18u, input, this->mutable_output_fields_id())));
} else {
goto handle_unusual;
}
break;
}
default: {
handle_unusual:
if (tag == 0) {
goto success;
}
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
input, tag, _internal_metadata_.mutable_unknown_fields()));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:milvus.proto.segcore.RetrieveRequest)
return true;
failure:
// @@protoc_insertion_point(parse_failure:milvus.proto.segcore.RetrieveRequest)
return false;
#undef DO_
}
#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
void RetrieveRequest::SerializeWithCachedSizes(
::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:milvus.proto.segcore.RetrieveRequest)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
(void) cached_has_bits;
// .milvus.proto.schema.IDs ids = 1;
if (this->has_ids()) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
1, _Internal::ids(this), output);
}
// repeated int64 output_fields_id = 2;
if (this->output_fields_id_size() > 0) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteTag(2, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
output->WriteVarint32(_output_fields_id_cached_byte_size_.load(
std::memory_order_relaxed));
}
for (int i = 0, n = this->output_fields_id_size(); i < n; i++) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64NoTag(
this->output_fields_id(i), output);
}
if (_internal_metadata_.have_unknown_fields()) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
_internal_metadata_.unknown_fields(), output);
}
// @@protoc_insertion_point(serialize_end:milvus.proto.segcore.RetrieveRequest)
}
::PROTOBUF_NAMESPACE_ID::uint8* RetrieveRequest::InternalSerializeWithCachedSizesToArray(
::PROTOBUF_NAMESPACE_ID::uint8* target) const {
// @@protoc_insertion_point(serialize_to_array_start:milvus.proto.segcore.RetrieveRequest)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
(void) cached_has_bits;
// .milvus.proto.schema.IDs ids = 1;
if (this->has_ids()) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessageToArray(
1, _Internal::ids(this), target);
}
// repeated int64 output_fields_id = 2;
if (this->output_fields_id_size() > 0) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteTagToArray(
2,
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
target);
target = ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream::WriteVarint32ToArray(
_output_fields_id_cached_byte_size_.load(std::memory_order_relaxed),
target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
WriteInt64NoTagToArray(this->output_fields_id_, target);
}
if (_internal_metadata_.have_unknown_fields()) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields(), target);
}
// @@protoc_insertion_point(serialize_to_array_end:milvus.proto.segcore.RetrieveRequest)
return target;
}
size_t RetrieveRequest::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:milvus.proto.segcore.RetrieveRequest)
size_t total_size = 0;
if (_internal_metadata_.have_unknown_fields()) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
_internal_metadata_.unknown_fields());
}
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
// repeated int64 output_fields_id = 2;
{
size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
Int64Size(this->output_fields_id_);
if (data_size > 0) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
static_cast<::PROTOBUF_NAMESPACE_ID::int32>(data_size));
}
int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(data_size);
_output_fields_id_cached_byte_size_.store(cached_size,
std::memory_order_relaxed);
total_size += data_size;
}
// .milvus.proto.schema.IDs ids = 1;
if (this->has_ids()) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*ids_);
}
int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
SetCachedSize(cached_size);
return total_size;
}
void RetrieveRequest::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:milvus.proto.segcore.RetrieveRequest)
GOOGLE_DCHECK_NE(&from, this);
const RetrieveRequest* source =
::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<RetrieveRequest>(
&from);
if (source == nullptr) {
// @@protoc_insertion_point(generalized_merge_from_cast_fail:milvus.proto.segcore.RetrieveRequest)
::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
} else {
// @@protoc_insertion_point(generalized_merge_from_cast_success:milvus.proto.segcore.RetrieveRequest)
MergeFrom(*source);
}
}
void RetrieveRequest::MergeFrom(const RetrieveRequest& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:milvus.proto.segcore.RetrieveRequest)
GOOGLE_DCHECK_NE(&from, this);
_internal_metadata_.MergeFrom(from._internal_metadata_);
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
(void) cached_has_bits;
output_fields_id_.MergeFrom(from.output_fields_id_);
if (from.has_ids()) {
mutable_ids()->::milvus::proto::schema::IDs::MergeFrom(from.ids());
}
}
void RetrieveRequest::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:milvus.proto.segcore.RetrieveRequest)
if (&from == this) return;
Clear();
MergeFrom(from);
}
void RetrieveRequest::CopyFrom(const RetrieveRequest& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:milvus.proto.segcore.RetrieveRequest)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool RetrieveRequest::IsInitialized() const {
return true;
}
void RetrieveRequest::InternalSwap(RetrieveRequest* other) {
using std::swap;
_internal_metadata_.Swap(&other->_internal_metadata_);
output_fields_id_.InternalSwap(&other->output_fields_id_);
swap(ids_, other->ids_);
}
::PROTOBUF_NAMESPACE_ID::Metadata RetrieveRequest::GetMetadata() const {
return GetMetadataStatic();
}
// =================================================================== // ===================================================================
void RetrieveResults::InitAsDefaultInstance() { void RetrieveResults::InitAsDefaultInstance() {
@ -1576,9 +1204,6 @@ void LoadSegmentMeta::InternalSwap(LoadSegmentMeta* other) {
} // namespace proto } // namespace proto
} // namespace milvus } // namespace milvus
PROTOBUF_NAMESPACE_OPEN PROTOBUF_NAMESPACE_OPEN
template<> PROTOBUF_NOINLINE ::milvus::proto::segcore::RetrieveRequest* Arena::CreateMaybeMessage< ::milvus::proto::segcore::RetrieveRequest >(Arena* arena) {
return Arena::CreateInternal< ::milvus::proto::segcore::RetrieveRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::milvus::proto::segcore::RetrieveResults* Arena::CreateMaybeMessage< ::milvus::proto::segcore::RetrieveResults >(Arena* arena) { template<> PROTOBUF_NOINLINE ::milvus::proto::segcore::RetrieveResults* Arena::CreateMaybeMessage< ::milvus::proto::segcore::RetrieveResults >(Arena* arena) {
return Arena::CreateInternal< ::milvus::proto::segcore::RetrieveResults >(arena); return Arena::CreateInternal< ::milvus::proto::segcore::RetrieveResults >(arena);
} }

View File

@ -48,7 +48,7 @@ struct TableStruct_segcore_2eproto {
PROTOBUF_SECTION_VARIABLE(protodesc_cold); PROTOBUF_SECTION_VARIABLE(protodesc_cold);
static const ::PROTOBUF_NAMESPACE_ID::internal::AuxillaryParseTableField aux[] static const ::PROTOBUF_NAMESPACE_ID::internal::AuxillaryParseTableField aux[]
PROTOBUF_SECTION_VARIABLE(protodesc_cold); PROTOBUF_SECTION_VARIABLE(protodesc_cold);
static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[4] static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[3]
PROTOBUF_SECTION_VARIABLE(protodesc_cold); PROTOBUF_SECTION_VARIABLE(protodesc_cold);
static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[]; static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[];
static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[]; static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[];
@ -64,9 +64,6 @@ extern LoadFieldMetaDefaultTypeInternal _LoadFieldMeta_default_instance_;
class LoadSegmentMeta; class LoadSegmentMeta;
class LoadSegmentMetaDefaultTypeInternal; class LoadSegmentMetaDefaultTypeInternal;
extern LoadSegmentMetaDefaultTypeInternal _LoadSegmentMeta_default_instance_; extern LoadSegmentMetaDefaultTypeInternal _LoadSegmentMeta_default_instance_;
class RetrieveRequest;
class RetrieveRequestDefaultTypeInternal;
extern RetrieveRequestDefaultTypeInternal _RetrieveRequest_default_instance_;
class RetrieveResults; class RetrieveResults;
class RetrieveResultsDefaultTypeInternal; class RetrieveResultsDefaultTypeInternal;
extern RetrieveResultsDefaultTypeInternal _RetrieveResults_default_instance_; extern RetrieveResultsDefaultTypeInternal _RetrieveResults_default_instance_;
@ -76,7 +73,6 @@ extern RetrieveResultsDefaultTypeInternal _RetrieveResults_default_instance_;
PROTOBUF_NAMESPACE_OPEN PROTOBUF_NAMESPACE_OPEN
template<> ::milvus::proto::segcore::LoadFieldMeta* Arena::CreateMaybeMessage<::milvus::proto::segcore::LoadFieldMeta>(Arena*); template<> ::milvus::proto::segcore::LoadFieldMeta* Arena::CreateMaybeMessage<::milvus::proto::segcore::LoadFieldMeta>(Arena*);
template<> ::milvus::proto::segcore::LoadSegmentMeta* Arena::CreateMaybeMessage<::milvus::proto::segcore::LoadSegmentMeta>(Arena*); template<> ::milvus::proto::segcore::LoadSegmentMeta* Arena::CreateMaybeMessage<::milvus::proto::segcore::LoadSegmentMeta>(Arena*);
template<> ::milvus::proto::segcore::RetrieveRequest* Arena::CreateMaybeMessage<::milvus::proto::segcore::RetrieveRequest>(Arena*);
template<> ::milvus::proto::segcore::RetrieveResults* Arena::CreateMaybeMessage<::milvus::proto::segcore::RetrieveResults>(Arena*); template<> ::milvus::proto::segcore::RetrieveResults* Arena::CreateMaybeMessage<::milvus::proto::segcore::RetrieveResults>(Arena*);
PROTOBUF_NAMESPACE_CLOSE PROTOBUF_NAMESPACE_CLOSE
namespace milvus { namespace milvus {
@ -85,154 +81,6 @@ namespace segcore {
// =================================================================== // ===================================================================
class RetrieveRequest :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:milvus.proto.segcore.RetrieveRequest) */ {
public:
RetrieveRequest();
virtual ~RetrieveRequest();
RetrieveRequest(const RetrieveRequest& from);
RetrieveRequest(RetrieveRequest&& from) noexcept
: RetrieveRequest() {
*this = ::std::move(from);
}
inline RetrieveRequest& operator=(const RetrieveRequest& from) {
CopyFrom(from);
return *this;
}
inline RetrieveRequest& operator=(RetrieveRequest&& from) noexcept {
if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
if (this != &from) InternalSwap(&from);
} else {
CopyFrom(from);
}
return *this;
}
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
return GetDescriptor();
}
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
return GetMetadataStatic().descriptor;
}
static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() {
return GetMetadataStatic().reflection;
}
static const RetrieveRequest& default_instance();
static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY
static inline const RetrieveRequest* internal_default_instance() {
return reinterpret_cast<const RetrieveRequest*>(
&_RetrieveRequest_default_instance_);
}
static constexpr int kIndexInFileMessages =
0;
friend void swap(RetrieveRequest& a, RetrieveRequest& b) {
a.Swap(&b);
}
inline void Swap(RetrieveRequest* other) {
if (other == this) return;
InternalSwap(other);
}
// implements Message ----------------------------------------------
inline RetrieveRequest* New() const final {
return CreateMaybeMessage<RetrieveRequest>(nullptr);
}
RetrieveRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final {
return CreateMaybeMessage<RetrieveRequest>(arena);
}
void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
void CopyFrom(const RetrieveRequest& from);
void MergeFrom(const RetrieveRequest& from);
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
bool IsInitialized() const final;
size_t ByteSizeLong() const final;
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
#else
bool MergePartialFromCodedStream(
::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final;
#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
void SerializeWithCachedSizes(
::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final;
::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray(
::PROTOBUF_NAMESPACE_ID::uint8* target) const final;
int GetCachedSize() const final { return _cached_size_.Get(); }
private:
inline void SharedCtor();
inline void SharedDtor();
void SetCachedSize(int size) const final;
void InternalSwap(RetrieveRequest* other);
friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
return "milvus.proto.segcore.RetrieveRequest";
}
private:
inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const {
return nullptr;
}
inline void* MaybeArenaPtr() const {
return nullptr;
}
public:
::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final;
private:
static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() {
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_segcore_2eproto);
return ::descriptor_table_segcore_2eproto.file_level_metadata[kIndexInFileMessages];
}
public:
// nested types ----------------------------------------------------
// accessors -------------------------------------------------------
enum : int {
kOutputFieldsIdFieldNumber = 2,
kIdsFieldNumber = 1,
};
// repeated int64 output_fields_id = 2;
int output_fields_id_size() const;
void clear_output_fields_id();
::PROTOBUF_NAMESPACE_ID::int64 output_fields_id(int index) const;
void set_output_fields_id(int index, ::PROTOBUF_NAMESPACE_ID::int64 value);
void add_output_fields_id(::PROTOBUF_NAMESPACE_ID::int64 value);
const ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int64 >&
output_fields_id() const;
::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int64 >*
mutable_output_fields_id();
// .milvus.proto.schema.IDs ids = 1;
bool has_ids() const;
void clear_ids();
const ::milvus::proto::schema::IDs& ids() const;
::milvus::proto::schema::IDs* release_ids();
::milvus::proto::schema::IDs* mutable_ids();
void set_allocated_ids(::milvus::proto::schema::IDs* ids);
// @@protoc_insertion_point(class_scope:milvus.proto.segcore.RetrieveRequest)
private:
class _Internal;
::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_;
::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int64 > output_fields_id_;
mutable std::atomic<int> _output_fields_id_cached_byte_size_;
::milvus::proto::schema::IDs* ids_;
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
friend struct ::TableStruct_segcore_2eproto;
};
// -------------------------------------------------------------------
class RetrieveResults : class RetrieveResults :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:milvus.proto.segcore.RetrieveResults) */ { public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:milvus.proto.segcore.RetrieveResults) */ {
public: public:
@ -275,7 +123,7 @@ class RetrieveResults :
&_RetrieveResults_default_instance_); &_RetrieveResults_default_instance_);
} }
static constexpr int kIndexInFileMessages = static constexpr int kIndexInFileMessages =
1; 0;
friend void swap(RetrieveResults& a, RetrieveResults& b) { friend void swap(RetrieveResults& a, RetrieveResults& b) {
a.Swap(&b); a.Swap(&b);
@ -436,7 +284,7 @@ class LoadFieldMeta :
&_LoadFieldMeta_default_instance_); &_LoadFieldMeta_default_instance_);
} }
static constexpr int kIndexInFileMessages = static constexpr int kIndexInFileMessages =
2; 1;
friend void swap(LoadFieldMeta& a, LoadFieldMeta& b) { friend void swap(LoadFieldMeta& a, LoadFieldMeta& b) {
a.Swap(&b); a.Swap(&b);
@ -581,7 +429,7 @@ class LoadSegmentMeta :
&_LoadSegmentMeta_default_instance_); &_LoadSegmentMeta_default_instance_);
} }
static constexpr int kIndexInFileMessages = static constexpr int kIndexInFileMessages =
3; 2;
friend void swap(LoadSegmentMeta& a, LoadSegmentMeta& b) { friend void swap(LoadSegmentMeta& a, LoadSegmentMeta& b) {
a.Swap(&b); a.Swap(&b);
@ -690,85 +538,6 @@ class LoadSegmentMeta :
#pragma GCC diagnostic push #pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wstrict-aliasing" #pragma GCC diagnostic ignored "-Wstrict-aliasing"
#endif // __GNUC__ #endif // __GNUC__
// RetrieveRequest
// .milvus.proto.schema.IDs ids = 1;
inline bool RetrieveRequest::has_ids() const {
return this != internal_default_instance() && ids_ != nullptr;
}
inline const ::milvus::proto::schema::IDs& RetrieveRequest::ids() const {
const ::milvus::proto::schema::IDs* p = ids_;
// @@protoc_insertion_point(field_get:milvus.proto.segcore.RetrieveRequest.ids)
return p != nullptr ? *p : *reinterpret_cast<const ::milvus::proto::schema::IDs*>(
&::milvus::proto::schema::_IDs_default_instance_);
}
inline ::milvus::proto::schema::IDs* RetrieveRequest::release_ids() {
// @@protoc_insertion_point(field_release:milvus.proto.segcore.RetrieveRequest.ids)
::milvus::proto::schema::IDs* temp = ids_;
ids_ = nullptr;
return temp;
}
inline ::milvus::proto::schema::IDs* RetrieveRequest::mutable_ids() {
if (ids_ == nullptr) {
auto* p = CreateMaybeMessage<::milvus::proto::schema::IDs>(GetArenaNoVirtual());
ids_ = p;
}
// @@protoc_insertion_point(field_mutable:milvus.proto.segcore.RetrieveRequest.ids)
return ids_;
}
inline void RetrieveRequest::set_allocated_ids(::milvus::proto::schema::IDs* ids) {
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
if (message_arena == nullptr) {
delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(ids_);
}
if (ids) {
::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr;
if (message_arena != submessage_arena) {
ids = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
message_arena, ids, submessage_arena);
}
} else {
}
ids_ = ids;
// @@protoc_insertion_point(field_set_allocated:milvus.proto.segcore.RetrieveRequest.ids)
}
// repeated int64 output_fields_id = 2;
inline int RetrieveRequest::output_fields_id_size() const {
return output_fields_id_.size();
}
inline void RetrieveRequest::clear_output_fields_id() {
output_fields_id_.Clear();
}
inline ::PROTOBUF_NAMESPACE_ID::int64 RetrieveRequest::output_fields_id(int index) const {
// @@protoc_insertion_point(field_get:milvus.proto.segcore.RetrieveRequest.output_fields_id)
return output_fields_id_.Get(index);
}
inline void RetrieveRequest::set_output_fields_id(int index, ::PROTOBUF_NAMESPACE_ID::int64 value) {
output_fields_id_.Set(index, value);
// @@protoc_insertion_point(field_set:milvus.proto.segcore.RetrieveRequest.output_fields_id)
}
inline void RetrieveRequest::add_output_fields_id(::PROTOBUF_NAMESPACE_ID::int64 value) {
output_fields_id_.Add(value);
// @@protoc_insertion_point(field_add:milvus.proto.segcore.RetrieveRequest.output_fields_id)
}
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int64 >&
RetrieveRequest::output_fields_id() const {
// @@protoc_insertion_point(field_list:milvus.proto.segcore.RetrieveRequest.output_fields_id)
return output_fields_id_;
}
inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int64 >*
RetrieveRequest::mutable_output_fields_id() {
// @@protoc_insertion_point(field_mutable_list:milvus.proto.segcore.RetrieveRequest.output_fields_id)
return &output_fields_id_;
}
// -------------------------------------------------------------------
// RetrieveResults // RetrieveResults
// .milvus.proto.schema.IDs ids = 1; // .milvus.proto.schema.IDs ids = 1;
@ -974,8 +743,6 @@ inline void LoadSegmentMeta::set_total_size(::PROTOBUF_NAMESPACE_ID::int64 value
// ------------------------------------------------------------------- // -------------------------------------------------------------------
// -------------------------------------------------------------------
// @@protoc_insertion_point(namespace_scope) // @@protoc_insertion_point(namespace_scope)

View File

@ -396,6 +396,13 @@ CreatePlanByExpr(const Schema& schema, const char* serialized_expr_plan, int64_t
return ProtoParser(schema).CreatePlan(plan_node); return ProtoParser(schema).CreatePlan(plan_node);
} }
std::unique_ptr<RetrievePlan>
CreateRetrievePlanByExpr(const Schema& schema, const char* serialized_expr_plan, int size) {
proto::plan::PlanNode plan_node;
plan_node.ParseFromArray(serialized_expr_plan, size);
return ProtoParser(schema).CreateRetrievePlan(plan_node);
}
std::vector<ExprPtr> std::vector<ExprPtr>
Parser::ParseItemList(const Json& body) { Parser::ParseItemList(const Json& body) {
std::vector<ExprPtr> results; std::vector<ExprPtr> results;
@ -546,15 +553,15 @@ GetNumOfQueries(const PlaceholderGroup* group) {
return group->at(0).num_of_queries_; return group->at(0).num_of_queries_;
} }
std::unique_ptr<RetrievePlan> // std::unique_ptr<RetrievePlan>
CreateRetrievePlan(const Schema& schema, proto::segcore::RetrieveRequest&& request) { // CreateRetrievePlan(const Schema& schema, proto::segcore::RetrieveRequest&& request) {
auto plan = std::make_unique<RetrievePlan>(); // auto plan = std::make_unique<RetrievePlan>();
plan->ids_ = std::unique_ptr<proto::schema::IDs>(request.release_ids()); // plan->ids_ = std::unique_ptr<proto::schema::IDs>(request.release_ids());
for (auto& field_id : request.output_fields_id()) { // for (auto& field_id : request.output_fields_id()) {
plan->field_offsets_.push_back(schema.get_offset(FieldId(field_id))); // plan->field_offsets_.push_back(schema.get_offset(FieldId(field_id)));
} // }
return plan; // return plan;
} //}
void void
Plan::check_identical(Plan& other) { Plan::check_identical(Plan& other) {

View File

@ -38,8 +38,11 @@ ParsePlaceholderGroup(const Plan* plan, const std::string& placeholder_group_blo
int64_t int64_t
GetNumOfQueries(const PlaceholderGroup*); GetNumOfQueries(const PlaceholderGroup*);
// std::unique_ptr<RetrievePlan>
// CreateRetrievePlan(const Schema& schema, proto::segcore::RetrieveRequest&& request);
std::unique_ptr<RetrievePlan> std::unique_ptr<RetrievePlan>
CreateRetrievePlan(const Schema& schema, proto::segcore::RetrieveRequest&& request); CreateRetrievePlanByExpr(const Schema& schema, const char* serialized_expr_plan, int size);
// Query Overall TopK from Plan // Query Overall TopK from Plan
// Used to alloc result memory at Go side // Used to alloc result memory at Go side

View File

@ -81,7 +81,13 @@ struct Placeholder {
}; };
struct RetrievePlan { struct RetrievePlan {
std::unique_ptr<proto::schema::IDs> ids_; public:
explicit RetrievePlan(const Schema& schema) : schema_(schema) {
}
public:
const Schema& schema_;
std::unique_ptr<RetrievePlanNode> plan_node_;
std::vector<FieldOffset> field_offsets_; std::vector<FieldOffset> field_offsets_;
}; };

View File

@ -55,4 +55,12 @@ struct BinaryVectorANNS : VectorPlanNode {
accept(PlanNodeVisitor&) override; accept(PlanNodeVisitor&) override;
}; };
struct RetrievePlanNode : PlanNode {
public:
void
accept(PlanNodeVisitor&) override;
ExprPtr predicate_;
};
} // namespace milvus::query } // namespace milvus::query

View File

@ -137,6 +137,17 @@ ProtoParser::PlanNodeFromProto(const planpb::PlanNode& plan_node_proto) {
return plan_node; return plan_node;
} }
std::unique_ptr<RetrievePlanNode>
ProtoParser::RetrievePlanNodeFromProto(const planpb::PlanNode& plan_node_proto) {
Assert(plan_node_proto.has_predicates());
auto& predicate_proto = plan_node_proto.predicates();
auto expr_opt = [&]() -> ExprPtr { return ParseExpr(predicate_proto); }();
auto plan_node = [&]() -> std::unique_ptr<RetrievePlanNode> { return std::make_unique<RetrievePlanNode>(); }();
plan_node->predicate_ = std::move(expr_opt);
return plan_node;
}
std::unique_ptr<Plan> std::unique_ptr<Plan>
ProtoParser::CreatePlan(const proto::plan::PlanNode& plan_node_proto) { ProtoParser::CreatePlan(const proto::plan::PlanNode& plan_node_proto) {
auto plan = std::make_unique<Plan>(schema); auto plan = std::make_unique<Plan>(schema);
@ -159,6 +170,24 @@ ProtoParser::CreatePlan(const proto::plan::PlanNode& plan_node_proto) {
return plan; return plan;
} }
std::unique_ptr<RetrievePlan>
ProtoParser::CreateRetrievePlan(const proto::plan::PlanNode& plan_node_proto) {
auto retrieve_plan = std::make_unique<RetrievePlan>(schema);
auto plan_node = RetrievePlanNodeFromProto(plan_node_proto);
ExtractedPlanInfo plan_info(schema.size());
ExtractInfoPlanNodeVisitor extractor(plan_info);
plan_node->accept(extractor);
retrieve_plan->plan_node_ = std::move(plan_node);
for (auto field_id_raw : plan_node_proto.output_field_ids()) {
auto field_id = FieldId(field_id_raw);
auto offset = schema.get_offset(field_id);
retrieve_plan->field_offsets_.push_back(offset);
}
return retrieve_plan;
}
ExprPtr ExprPtr
ProtoParser::ParseUnaryRangeExpr(const proto::plan::UnaryRangeExpr& expr_pb) { ProtoParser::ParseUnaryRangeExpr(const proto::plan::UnaryRangeExpr& expr_pb) {
auto& column_info = expr_pb.column_info(); auto& column_info = expr_pb.column_info();

View File

@ -50,9 +50,15 @@ class ProtoParser {
std::unique_ptr<VectorPlanNode> std::unique_ptr<VectorPlanNode>
PlanNodeFromProto(const proto::plan::PlanNode& plan_node_proto); PlanNodeFromProto(const proto::plan::PlanNode& plan_node_proto);
std::unique_ptr<RetrievePlanNode>
RetrievePlanNodeFromProto(const proto::plan::PlanNode& plan_node_proto);
std::unique_ptr<Plan> std::unique_ptr<Plan>
CreatePlan(const proto::plan::PlanNode& plan_node_proto); CreatePlan(const proto::plan::PlanNode& plan_node_proto);
std::unique_ptr<RetrievePlan>
CreateRetrievePlan(const proto::plan::PlanNode& plan_node_proto);
private: private:
const Schema& schema; const Schema& schema;
// boost::dynamic_bitset<> involved_fields; // boost::dynamic_bitset<> involved_fields;

View File

@ -27,14 +27,21 @@ class ExecPlanNodeVisitor : public PlanNodeVisitor {
void void
visit(BinaryVectorANNS& node) override; visit(BinaryVectorANNS& node) override;
void
visit(RetrievePlanNode& node);
public: public:
using RetType = SearchResult; using RetType = SearchResult;
using RetrieveRetType = RetrieveResult;
ExecPlanNodeVisitor(const segcore::SegmentInterface& segment, ExecPlanNodeVisitor(const segcore::SegmentInterface& segment,
Timestamp timestamp, Timestamp timestamp,
const PlaceholderGroup& placeholder_group) const PlaceholderGroup& placeholder_group)
: segment_(segment), timestamp_(timestamp), placeholder_group_(placeholder_group) { : segment_(segment), timestamp_(timestamp), placeholder_group_(placeholder_group) {
} }
// using RetType = nlohmann::json;
ExecPlanNodeVisitor(const segcore::SegmentInterface& segment, Timestamp timestamp)
: segment_(segment), timestamp_(timestamp) {
}
RetType RetType
get_moved_result(PlanNode& node) { get_moved_result(PlanNode& node) {
@ -46,6 +53,17 @@ class ExecPlanNodeVisitor : public PlanNodeVisitor {
return ret; return ret;
} }
RetrieveRetType
get_retrieve_result(PlanNode& node) {
assert(!retrieve_ret_.has_value());
std::cout.flush();
node.accept(*this);
assert(retrieve_ret_.has_value());
auto retrieve_ret = std::move(retrieve_ret_).value();
retrieve_ret_ = std::nullopt;
return retrieve_ret;
}
private: private:
template <typename VectorType> template <typename VectorType>
void void
@ -55,8 +73,9 @@ class ExecPlanNodeVisitor : public PlanNodeVisitor {
// std::optional<RetType> ret_; // std::optional<RetType> ret_;
const segcore::SegmentInterface& segment_; const segcore::SegmentInterface& segment_;
Timestamp timestamp_; Timestamp timestamp_;
const PlaceholderGroup& placeholder_group_; PlaceholderGroup placeholder_group_;
std::optional<RetType> ret_; std::optional<RetType> ret_;
std::optional<RetrieveResult> retrieve_ret_;
}; };
} // namespace milvus::query } // namespace milvus::query

View File

@ -24,6 +24,9 @@ class ExtractInfoPlanNodeVisitor : public PlanNodeVisitor {
void void
visit(BinaryVectorANNS& node) override; visit(BinaryVectorANNS& node) override;
void
visit(RetrievePlanNode& node);
public: public:
explicit ExtractInfoPlanNodeVisitor(ExtractedPlanInfo& plan_info) : plan_info_(plan_info) { explicit ExtractInfoPlanNodeVisitor(ExtractedPlanInfo& plan_info) : plan_info_(plan_info) {
} }

View File

@ -25,4 +25,9 @@ BinaryVectorANNS::accept(PlanNodeVisitor& visitor) {
visitor.visit(*this); visitor.visit(*this);
} }
void
RetrievePlanNode::accept(PlanNodeVisitor& visitor) {
visitor.visit(*this);
}
} // namespace milvus::query } // namespace milvus::query

View File

@ -24,5 +24,8 @@ class PlanNodeVisitor {
virtual void virtual void
visit(BinaryVectorANNS&) = 0; visit(BinaryVectorANNS&) = 0;
virtual void
visit(RetrievePlanNode&) = 0;
}; };
} // namespace milvus::query } // namespace milvus::query

View File

@ -28,6 +28,9 @@ class ShowPlanNodeVisitor : public PlanNodeVisitor {
void void
visit(BinaryVectorANNS& node) override; visit(BinaryVectorANNS& node) override;
void
visit(RetrievePlanNode& node) override;
public: public:
using RetType = nlohmann::json; using RetType = nlohmann::json;

View File

@ -27,6 +27,9 @@ class VerifyPlanNodeVisitor : public PlanNodeVisitor {
void void
visit(BinaryVectorANNS& node) override; visit(BinaryVectorANNS& node) override;
void
visit(RetrievePlanNode& node) override;
public: public:
using RetType = SearchResult; using RetType = SearchResult;
VerifyPlanNodeVisitor() = default; VerifyPlanNodeVisitor() = default;

View File

@ -114,6 +114,33 @@ ExecPlanNodeVisitor::VectorVisitorImpl(VectorPlanNode& node) {
ret_ = ret; ret_ = ret;
} }
void
ExecPlanNodeVisitor::visit(RetrievePlanNode& node) {
assert(!retrieve_ret_.has_value());
auto segment = dynamic_cast<const segcore::SegmentInternalInterface*>(&segment_);
AssertInfo(segment, "Support SegmentSmallIndex Only");
RetrieveRetType ret;
boost::dynamic_bitset<> bitset_holder;
auto active_count = segment->get_active_count(timestamp_);
if (active_count == 0) {
return;
}
if (node.predicate_ != nullptr) {
ExecExprVisitor::RetType expr_ret =
ExecExprVisitor(*segment, active_count, timestamp_).call_child(*(node.predicate_));
bitset_holder = std::move(expr_ret);
}
segment->mask_with_timestamps(bitset_holder, timestamp_);
auto seg_offsets = std::move(segment->search_ids(bitset_holder, MAX_TIMESTAMP));
ret.result_offsets_.assign((int64_t*)seg_offsets.data(), (int64_t*)seg_offsets.data() + seg_offsets.size());
retrieve_ret_ = ret;
}
void void
ExecPlanNodeVisitor::visit(FloatVectorANNS& node) { ExecPlanNodeVisitor::visit(FloatVectorANNS& node) {
VectorVisitorImpl<FloatVector>(node); VectorVisitorImpl<FloatVector>(node);

View File

@ -48,4 +48,11 @@ ExtractInfoPlanNodeVisitor::visit(BinaryVectorANNS& node) {
} }
} }
void
ExtractInfoPlanNodeVisitor::visit(RetrievePlanNode& node) {
// Assert(node.predicate_.has_value());
ExtractInfoExprVisitor expr_visitor(plan_info_);
node.predicate_->accept(expr_visitor);
}
} // namespace milvus::query } // namespace milvus::query

View File

@ -93,4 +93,8 @@ ShowPlanNodeVisitor::visit(BinaryVectorANNS& node) {
ret_ = json_body; ret_ = json_body;
} }
void
ShowPlanNodeVisitor::visit(RetrievePlanNode& node) {
}
} // namespace milvus::query } // namespace milvus::query

View File

@ -108,4 +108,8 @@ VerifyPlanNodeVisitor::visit(BinaryVectorANNS& node) {
} }
} }
void
VerifyPlanNodeVisitor::visit(RetrievePlanNode& node) {
}
} // namespace milvus::query } // namespace milvus::query

View File

@ -437,6 +437,27 @@ SegmentGrowingImpl::Insert(int64_t reserved_offset,
do_insert(reserved_offset, size, row_ids.data(), timestamps.data(), columns_data); do_insert(reserved_offset, size, row_ids.data(), timestamps.data(), columns_data);
} }
std::vector<SegOffset>
SegmentGrowingImpl::search_ids(const boost::dynamic_bitset<>& bitset, Timestamp timestamp) const {
std::vector<SegOffset> res_offsets;
for (int i = 0; i < bitset.size(); i++) {
if (bitset[i]) {
SegOffset the_offset(-1);
auto offset = SegOffset(i);
if (record_.timestamps_[offset.get()] < timestamp) {
the_offset = std::max(the_offset, offset);
}
if (the_offset == SegOffset(-1)) {
continue;
}
res_offsets.push_back(the_offset);
}
}
return res_offsets;
}
std::pair<std::unique_ptr<IdArray>, std::vector<SegOffset>> std::pair<std::unique_ptr<IdArray>, std::vector<SegOffset>>
SegmentGrowingImpl::search_ids(const IdArray& id_array, Timestamp timestamp) const { SegmentGrowingImpl::search_ids(const IdArray& id_array, Timestamp timestamp) const {
Assert(id_array.has_int_id()); Assert(id_array.has_int_id());

View File

@ -182,6 +182,9 @@ class SegmentGrowingImpl : public SegmentGrowing {
std::pair<std::unique_ptr<IdArray>, std::vector<SegOffset>> std::pair<std::unique_ptr<IdArray>, std::vector<SegOffset>>
search_ids(const IdArray& id_array, Timestamp timestamp) const override; search_ids(const IdArray& id_array, Timestamp timestamp) const override;
std::vector<SegOffset>
search_ids(const boost::dynamic_bitset<>& view, Timestamp timestamp) const override;
protected: protected:
int64_t int64_t
num_chunk() const override; num_chunk() const override;

View File

@ -108,7 +108,7 @@ CreateScalarArrayFrom(const void* data_raw, int64_t count, DataType data_type) {
break; break;
} }
case DataType::INT32: { case DataType::INT32: {
auto data = reinterpret_cast<const int16_t*>(data_raw); auto data = reinterpret_cast<const int32_t*>(data_raw);
auto obj = scalar_array->mutable_int_data(); auto obj = scalar_array->mutable_int_data();
obj->mutable_data()->Add(data, data + count); obj->mutable_data()->Add(data, data + count);
break; break;
@ -192,29 +192,31 @@ SegmentInternalInterface::BulkSubScript(FieldOffset field_offset, const SegOffse
} }
std::unique_ptr<proto::segcore::RetrieveResults> std::unique_ptr<proto::segcore::RetrieveResults>
SegmentInternalInterface::GetEntityById(const std::vector<FieldOffset>& field_offsets, SegmentInternalInterface::Retrieve(const query::RetrievePlan* plan, Timestamp timestamp) const {
const IdArray& id_array, std::shared_lock lck(mutex_);
Timestamp timestamp) const {
auto results = std::make_unique<proto::segcore::RetrieveResults>(); auto results = std::make_unique<proto::segcore::RetrieveResults>();
query::ExecPlanNodeVisitor visitor(*this, timestamp);
auto retrieve_results = visitor.get_retrieve_result(*plan->plan_node_);
retrieve_results.segment_ = (void*)this;
auto [ids_, seg_offsets] = search_ids(id_array, timestamp); for (auto& seg_offset : retrieve_results.result_offsets_) {
results->add_offset(seg_offset);
// std::string dbg_log;
// dbg_log += "id_array:" + id_array.DebugString() + "\n";
// dbg_log += "ids:" + ids_->DebugString() + "\n";
// dbg_log += "segment_info:" + this->debug();
// std::cout << dbg_log << std::endl;
results->set_allocated_ids(ids_.release());
for (auto& seg_offset : seg_offsets) {
results->add_offset(seg_offset.get());
} }
auto fields_data = results->mutable_fields_data(); auto fields_data = results->mutable_fields_data();
for (auto field_offset : field_offsets) { auto ids = results->mutable_ids();
auto col = BulkSubScript(field_offset, seg_offsets.data(), seg_offsets.size()); auto pk_offset = plan->schema_.get_primary_key_offset();
fields_data->AddAllocated(col.release()); for (auto field_offset : plan->field_offsets_) {
auto col = BulkSubScript(field_offset, (SegOffset*)retrieve_results.result_offsets_.data(),
retrieve_results.result_offsets_.size());
auto col_data = col.release();
fields_data->AddAllocated(col_data);
if (pk_offset.has_value() && pk_offset.value() == field_offset) {
auto int_ids = ids->mutable_int_id();
for (int j = 0; j < col_data->scalars().long_data().data_size(); ++j) {
int_ids->add_data(col_data->scalars().long_data().data(j));
}
}
} }
return results; return results;
} }

View File

@ -40,9 +40,7 @@ class SegmentInterface {
Search(const query::Plan* Plan, const query::PlaceholderGroup& placeholder_group, Timestamp timestamp) const = 0; Search(const query::Plan* Plan, const query::PlaceholderGroup& placeholder_group, Timestamp timestamp) const = 0;
virtual std::unique_ptr<proto::segcore::RetrieveResults> virtual std::unique_ptr<proto::segcore::RetrieveResults>
GetEntityById(const std::vector<FieldOffset>& field_offsets, Retrieve(const query::RetrievePlan* Plan, Timestamp timestamp) const = 0;
const IdArray& id_array,
Timestamp timestamp) const = 0;
virtual int64_t virtual int64_t
GetMemoryUsageInBytes() const = 0; GetMemoryUsageInBytes() const = 0;
@ -88,9 +86,7 @@ class SegmentInternalInterface : public SegmentInterface {
FillTargetEntry(const query::Plan* plan, SearchResult& results) const override; FillTargetEntry(const query::Plan* plan, SearchResult& results) const override;
std::unique_ptr<proto::segcore::RetrieveResults> std::unique_ptr<proto::segcore::RetrieveResults>
GetEntityById(const std::vector<FieldOffset>& field_offsets, Retrieve(const query::RetrievePlan* plan, Timestamp timestamp) const override;
const IdArray& id_array,
Timestamp timestamp) const override;
virtual std::string virtual std::string
debug() const = 0; debug() const = 0;
@ -123,6 +119,9 @@ class SegmentInternalInterface : public SegmentInterface {
virtual int64_t virtual int64_t
get_active_count(Timestamp ts) const = 0; get_active_count(Timestamp ts) const = 0;
virtual std::vector<SegOffset>
search_ids(const boost::dynamic_bitset<>& view, Timestamp timestamp) const = 0;
protected: protected:
// internal API: return chunk_data in span // internal API: return chunk_data in span
virtual SpanBase virtual SpanBase

View File

@ -449,6 +449,17 @@ SegmentSealedImpl::search_ids(const IdArray& id_array, Timestamp timestamp) cons
return primary_key_index_->do_search_ids(id_array); return primary_key_index_->do_search_ids(id_array);
} }
std::vector<SegOffset>
SegmentSealedImpl::search_ids(const boost::dynamic_bitset<>& bitset, Timestamp timestamp) const {
std::vector<SegOffset> dst_offset;
for (int i = 0; i < bitset.size(); i++) {
if (bitset[i]) {
dst_offset.emplace_back(SegOffset(i));
}
}
return std::move(dst_offset);
}
std::string std::string
SegmentSealedImpl::debug() const { SegmentSealedImpl::debug() const {
std::string log_str; std::string log_str;

View File

@ -126,6 +126,9 @@ class SegmentSealedImpl : public SegmentSealed {
std::pair<std::unique_ptr<IdArray>, std::vector<SegOffset>> std::pair<std::unique_ptr<IdArray>, std::vector<SegOffset>>
search_ids(const IdArray& id_array, Timestamp timestamp) const override; search_ids(const IdArray& id_array, Timestamp timestamp) const override;
std::vector<SegOffset>
search_ids(const boost::dynamic_bitset<>& view, Timestamp timestamp) const override;
// virtual void // virtual void
// build_index_if_primary_key(FieldId field_id); // build_index_if_primary_key(FieldId field_id);

View File

@ -130,23 +130,51 @@ DeletePlaceholderGroup(CPlaceholderGroup cPlaceholder_group) {
// std::cout << "delete placeholder" << std::endl; // std::cout << "delete placeholder" << std::endl;
} }
CStatus // CStatus
CreateRetrievePlan(CCollection c_col, CProto retrieve_request, CRetrievePlan* output) { // CreateRetrievePlan(CCollection c_col, CProto retrieve_request, CRetrievePlan* output) {
auto col = (milvus::segcore::Collection*)c_col; // auto col = (milvus::segcore::Collection*)c_col;
try { // try {
milvus::proto::segcore::RetrieveRequest request; // milvus::proto::segcore::RetrieveRequest request;
request.ParseFromArray(retrieve_request.proto_blob, retrieve_request.proto_size); // request.ParseFromArray(retrieve_request.proto_blob, retrieve_request.proto_size);
auto plan = milvus::query::CreateRetrievePlan(*col->get_schema(), std::move(request)); // auto plan = milvus::query::CreateRetrievePlan(*col->get_schema(), std::move(request));
*output = plan.release(); // *output = plan.release();
//
// auto status = CStatus();
// status.error_code = Success;
// status.error_msg = "";
// return status;
// } catch (std::exception& e) {
// auto status = CStatus();
// status.error_code = UnexpectedError;
// status.error_msg = strdup(e.what());
// return status;
// }
//}
CStatus
CreateRetrievePlanByExpr(CCollection c_col, const char* serialized_expr_plan, int64_t size, CRetrievePlan* res_plan) {
auto col = (milvus::segcore::Collection*)c_col;
try {
auto res = milvus::query::CreateRetrievePlanByExpr(*col->get_schema(), serialized_expr_plan, size);
auto status = CStatus(); auto status = CStatus();
status.error_code = Success; status.error_code = Success;
status.error_msg = ""; status.error_msg = "";
auto plan = (CRetrievePlan)res.release();
*res_plan = plan;
return status;
} catch (milvus::SegcoreError& e) {
auto status = CStatus();
status.error_code = e.get_error_code();
status.error_msg = strdup(e.what());
*res_plan = nullptr;
return status; return status;
} catch (std::exception& e) { } catch (std::exception& e) {
auto status = CStatus(); auto status = CStatus();
status.error_code = UnexpectedError; status.error_code = UnexpectedError;
status.error_msg = strdup(e.what()); status.error_msg = strdup(e.what());
*res_plan = nullptr;
return status; return status;
} }
} }

View File

@ -53,6 +53,9 @@ DeletePlaceholderGroup(CPlaceholderGroup placeholder_group);
CStatus CStatus
CreateRetrievePlan(CCollection c_col, CProto retrieve_request, CRetrievePlan* output); CreateRetrievePlan(CCollection c_col, CProto retrieve_request, CRetrievePlan* output);
CStatus
CreateRetrievePlanByExpr(CCollection c_col, const char* serialized_expr_plan, int64_t size, CRetrievePlan* res_plan);
void void
DeleteRetrievePlan(CRetrievePlan plan); DeleteRetrievePlan(CRetrievePlan plan);

View File

@ -225,11 +225,11 @@ DropSealedSegmentIndex(CSegmentInterface c_segment, int64_t field_id) {
} }
CProtoResult CProtoResult
GetEntityByIds(CSegmentInterface c_segment, CRetrievePlan c_plan, uint64_t timestamp) { Retrieve(CSegmentInterface c_segment, CRetrievePlan c_plan, uint64_t timestamp) {
try { try {
auto segment = (const milvus::segcore::SegmentInterface*)c_segment; auto segment = (const milvus::segcore::SegmentInterface*)c_segment;
auto plan = (const milvus::query::RetrievePlan*)c_plan; auto plan = (const milvus::query::RetrievePlan*)c_plan;
auto result = segment->GetEntityById(plan->field_offsets_, *plan->ids_, timestamp); auto result = segment->Retrieve(plan, timestamp);
return milvus::AllocCProtoResult(*result); return milvus::AllocCProtoResult(*result);
} catch (std::exception& e) { } catch (std::exception& e) {
return CProtoResult{milvus::FailureCStatus(UnexpectedError, e.what())}; return CProtoResult{milvus::FailureCStatus(UnexpectedError, e.what())};

View File

@ -25,6 +25,7 @@ extern "C" {
typedef void* CSegmentInterface; typedef void* CSegmentInterface;
typedef void* CSearchResult; typedef void* CSearchResult;
typedef void* CRetrieveResult;
////////////////////////////// common interfaces ////////////////////////////// ////////////////////////////// common interfaces //////////////////////////////
CSegmentInterface CSegmentInterface
@ -44,7 +45,7 @@ Search(CSegmentInterface c_segment,
CSearchResult* result); CSearchResult* result);
CProtoResult CProtoResult
GetEntityByIds(CSegmentInterface c_segment, CRetrievePlan c_plan, uint64_t timestamp); Retrieve(CSegmentInterface c_segment, CRetrievePlan c_plan, uint64_t timestamp);
int64_t int64_t
GetMemoryUsageInBytes(CSegmentInterface c_segment); GetMemoryUsageInBytes(CSegmentInterface c_segment);

View File

@ -12,6 +12,7 @@
#include <gtest/gtest.h> #include <gtest/gtest.h>
#include "test_utils/DataGen.h" #include "test_utils/DataGen.h"
#include "segcore/ScalarIndex.h" #include "segcore/ScalarIndex.h"
#include "query/ExprImpl.h"
using namespace milvus; using namespace milvus;
using namespace milvus::segcore; using namespace milvus::segcore;
@ -68,17 +69,79 @@ TEST(GetEntityByIds, AUTOID) {
req_ids_arr->add_data(-1); req_ids_arr->add_data(-1);
std::vector<FieldOffset> target_offsets{FieldOffset(0), FieldOffset(1)}; std::vector<FieldOffset> target_offsets{FieldOffset(0), FieldOffset(1)};
auto retrieve_results = segment->GetEntityById(target_offsets, *req_ids, 0); // auto retrieve_results = segment->GetEntityById(target_offsets, *req_ids, 0);
auto ids = retrieve_results->ids().int_id(); // auto ids = retrieve_results->ids().int_id();
// Assert(retrieve_results->fields_data_size() == target_offsets.size());
// FieldOffset field_offset(0);
// auto field0 = retrieve_results->fields_data(0);
// Assert(field0.has_scalars());
// auto field0_data = field0.scalars().long_data();
// for (int i = 0; i < req_size; ++i) {
// auto id = ids.data(i);
// auto index = choose(i);
// ASSERT_EQ(id, dataset.row_ids_[index]);
// auto data = field0_data.data(i);
// ASSERT_EQ(data, i64_col[index]);
// }
//
// auto field1 = retrieve_results->fields_data(1);
// Assert(field1.has_vectors());
// auto field1_data = field1.vectors().float_vector();
// ASSERT_EQ(field1_data.data_size(), DIM * req_size);
//
// for (int i = 0; i < req_size; ++i) {
// for (int d = 0; d < DIM; ++d) {
// auto index = choose(i);
// auto data = field1_data.data(i * DIM + d);
// auto ref = vf_col[index * DIM + d];
// ASSERT_EQ(data, ref);
// }
// }
}
TEST(Retrieve, AUTOID) {
auto schema = std::make_shared<Schema>();
auto fid_64 = schema->AddDebugField("i64", DataType::INT64);
auto DIM = 16;
auto fid_vec = schema->AddDebugField("vector_64", DataType::VECTOR_FLOAT, DIM, MetricType::METRIC_L2);
schema->set_primary_key(FieldOffset(0));
int64_t N = 100;
int64_t req_size = 10;
auto choose = [=](int i) { return i * 3 % N; };
auto dataset = DataGen(schema, N);
auto segment = CreateSealedSegment(schema);
SealedLoader(dataset, *segment);
auto i64_col = dataset.get_col<int64_t>(0);
auto plan = std::make_unique<query::RetrievePlan>(*schema);
auto term_expr = std::make_unique<query::TermExprImpl<int64_t>>();
term_expr->field_offset_ = FieldOffset(0);
term_expr->data_type_ = DataType::INT64;
for (int i = 0; i < req_size; ++i) {
term_expr->terms_.emplace_back(i64_col[choose(i)]);
}
plan->plan_node_ = std::make_unique<query::RetrievePlanNode>();
plan->plan_node_->predicate_ = std::move(term_expr);
std::vector<FieldOffset> target_offsets{FieldOffset(0), FieldOffset(1)};
plan->field_offsets_ = target_offsets;
auto retrieve_results = segment->Retrieve(plan.get(), 100);
Assert(retrieve_results->fields_data_size() == target_offsets.size()); Assert(retrieve_results->fields_data_size() == target_offsets.size());
FieldOffset field_offset(0); FieldOffset field_offset(0);
auto field0 = retrieve_results->fields_data(0); auto field0 = retrieve_results->fields_data(0);
Assert(field0.has_scalars()); Assert(field0.has_scalars());
auto field0_data = field0.scalars().long_data(); auto field0_data = field0.scalars().long_data();
for (int i = 0; i < req_size; ++i) {
auto index = choose(i);
auto data = field0_data.data(i);
}
for (int i = 0; i < req_size; ++i) { for (int i = 0; i < req_size; ++i) {
auto id = ids.data(i);
auto index = choose(i); auto index = choose(i);
ASSERT_EQ(id, dataset.row_ids_[index]);
auto data = field0_data.data(i); auto data = field0_data.data(i);
ASSERT_EQ(data, i64_col[index]); ASSERT_EQ(data, i64_col[index]);
} }
@ -87,15 +150,6 @@ TEST(GetEntityByIds, AUTOID) {
Assert(field1.has_vectors()); Assert(field1.has_vectors());
auto field1_data = field1.vectors().float_vector(); auto field1_data = field1.vectors().float_vector();
ASSERT_EQ(field1_data.data_size(), DIM * req_size); ASSERT_EQ(field1_data.data_size(), DIM * req_size);
for (int i = 0; i < req_size; ++i) {
for (int d = 0; d < DIM; ++d) {
auto index = choose(i);
auto data = field1_data.data(i * DIM + d);
auto ref = vf_col[index * DIM + d];
ASSERT_EQ(data, ref);
}
}
} }
TEST(GetEntityByIds, PrimaryKey) { TEST(GetEntityByIds, PrimaryKey) {
@ -126,32 +180,32 @@ TEST(GetEntityByIds, PrimaryKey) {
req_ids_arr->add_data(-1); req_ids_arr->add_data(-1);
std::vector<FieldOffset> target_offsets{FieldOffset(0), FieldOffset(1)}; std::vector<FieldOffset> target_offsets{FieldOffset(0), FieldOffset(1)};
auto retrieve_results = segment->GetEntityById(target_offsets, *req_ids, 0); // auto retrieve_results = segment->GetEntityById(target_offsets, *req_ids, 0);
auto ids = retrieve_results->ids().int_id(); // auto ids = retrieve_results->ids().int_id();
Assert(retrieve_results->fields_data_size() == target_offsets.size()); // Assert(retrieve_results->fields_data_size() == target_offsets.size());
FieldOffset field_offset(0); // FieldOffset field_offset(0);
auto field0 = retrieve_results->fields_data(0); // auto field0 = retrieve_results->fields_data(0);
Assert(field0.has_scalars()); // Assert(field0.has_scalars());
auto field0_data = field0.scalars().long_data(); // auto field0_data = field0.scalars().long_data();
for (int i = 0; i < req_size; ++i) { // for (int i = 0; i < req_size; ++i) {
auto id = ids.data(i); // auto id = ids.data(i);
auto index = choose(i); // auto index = choose(i);
ASSERT_EQ(id, i64_col[index]); // ASSERT_EQ(id, i64_col[index]);
auto data = field0_data.data(i); // auto data = field0_data.data(i);
ASSERT_EQ(data, i64_col[index]); // ASSERT_EQ(data, i64_col[index]);
} // }
//
auto field1 = retrieve_results->fields_data(1); // auto field1 = retrieve_results->fields_data(1);
Assert(field1.has_vectors()); // Assert(field1.has_vectors());
auto field1_data = field1.vectors().float_vector(); // auto field1_data = field1.vectors().float_vector();
ASSERT_EQ(field1_data.data_size(), DIM * req_size); // ASSERT_EQ(field1_data.data_size(), DIM * req_size);
//
for (int i = 0; i < req_size; ++i) { // for (int i = 0; i < req_size; ++i) {
for (int d = 0; d < DIM; ++d) { // for (int d = 0; d < DIM; ++d) {
auto index = choose(i); // auto index = choose(i);
auto data = field1_data.data(i * DIM + d); // auto data = field1_data.data(i * DIM + d);
auto ref = vf_col[index * DIM + d]; // auto ref = vf_col[index * DIM + d];
ASSERT_EQ(data, ref); // ASSERT_EQ(data, ref);
} // }
} // }
} }

View File

@ -148,8 +148,11 @@ DataGen(SchemaPtr schema, int64_t N, uint64_t seed = 42) {
x = index++; x = index++;
} }
} else { } else {
int i = 0;
for (auto& x : data) { for (auto& x : data) {
x = er() % (2 * N); x = er() % (2 * N);
x = i;
i++;
} }
} }
insert_cols(data); insert_cols(data);
@ -191,7 +194,7 @@ DataGen(SchemaPtr schema, int64_t N, uint64_t seed = 42) {
res.row_ids_.push_back(i); res.row_ids_.push_back(i);
res.timestamps_.push_back(i); res.timestamps_.push_back(i);
} }
std::shuffle(res.row_ids_.begin(), res.row_ids_.end(), er); // std::shuffle(res.row_ids_.begin(), res.row_ids_.end(), er);
res.generate_rows(N, schema); res.generate_rows(N, schema);
return std::move(res); return std::move(res);
} }

View File

@ -161,7 +161,7 @@ message RetrieveRequest {
int64 dbID = 3; int64 dbID = 3;
int64 collectionID = 4; int64 collectionID = 4;
repeated int64 partitionIDs = 5; repeated int64 partitionIDs = 5;
schema.IDs ids = 6; bytes serialized_expr_plan = 6;
repeated int64 output_fields_id = 7; repeated int64 output_fields_id = 7;
uint64 travel_timestamp = 8; uint64 travel_timestamp = 8;
uint64 guarantee_timestamp = 9; uint64 guarantee_timestamp = 9;

View File

@ -1313,7 +1313,7 @@ type RetrieveRequest struct {
DbID int64 `protobuf:"varint,3,opt,name=dbID,proto3" json:"dbID,omitempty"` DbID int64 `protobuf:"varint,3,opt,name=dbID,proto3" json:"dbID,omitempty"`
CollectionID int64 `protobuf:"varint,4,opt,name=collectionID,proto3" json:"collectionID,omitempty"` CollectionID int64 `protobuf:"varint,4,opt,name=collectionID,proto3" json:"collectionID,omitempty"`
PartitionIDs []int64 `protobuf:"varint,5,rep,packed,name=partitionIDs,proto3" json:"partitionIDs,omitempty"` PartitionIDs []int64 `protobuf:"varint,5,rep,packed,name=partitionIDs,proto3" json:"partitionIDs,omitempty"`
Ids *schemapb.IDs `protobuf:"bytes,6,opt,name=ids,proto3" json:"ids,omitempty"` SerializedExprPlan []byte `protobuf:"bytes,6,opt,name=serialized_expr_plan,json=serializedExprPlan,proto3" json:"serialized_expr_plan,omitempty"`
OutputFieldsId []int64 `protobuf:"varint,7,rep,packed,name=output_fields_id,json=outputFieldsId,proto3" json:"output_fields_id,omitempty"` OutputFieldsId []int64 `protobuf:"varint,7,rep,packed,name=output_fields_id,json=outputFieldsId,proto3" json:"output_fields_id,omitempty"`
TravelTimestamp uint64 `protobuf:"varint,8,opt,name=travel_timestamp,json=travelTimestamp,proto3" json:"travel_timestamp,omitempty"` TravelTimestamp uint64 `protobuf:"varint,8,opt,name=travel_timestamp,json=travelTimestamp,proto3" json:"travel_timestamp,omitempty"`
GuaranteeTimestamp uint64 `protobuf:"varint,9,opt,name=guarantee_timestamp,json=guaranteeTimestamp,proto3" json:"guarantee_timestamp,omitempty"` GuaranteeTimestamp uint64 `protobuf:"varint,9,opt,name=guarantee_timestamp,json=guaranteeTimestamp,proto3" json:"guarantee_timestamp,omitempty"`
@ -1382,9 +1382,9 @@ func (m *RetrieveRequest) GetPartitionIDs() []int64 {
return nil return nil
} }
func (m *RetrieveRequest) GetIds() *schemapb.IDs { func (m *RetrieveRequest) GetSerializedExprPlan() []byte {
if m != nil { if m != nil {
return m.Ids return m.SerializedExprPlan
} }
return nil return nil
} }
@ -2220,128 +2220,128 @@ func init() {
func init() { proto.RegisterFile("internal.proto", fileDescriptor_41f4a519b878ee3b) } func init() { proto.RegisterFile("internal.proto", fileDescriptor_41f4a519b878ee3b) }
var fileDescriptor_41f4a519b878ee3b = []byte{ var fileDescriptor_41f4a519b878ee3b = []byte{
// 1959 bytes of a gzipped FileDescriptorProto // 1958 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x59, 0x5b, 0x6f, 0x24, 0x47, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x59, 0x5b, 0x6f, 0x1c, 0x49,
0x15, 0xa6, 0xa7, 0xc7, 0x9e, 0x99, 0x33, 0x63, 0x7b, 0xb6, 0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35, 0xab, 0xad, 0x1a, 0x00, 0x00,
} }

View File

@ -102,6 +102,7 @@ message VectorANNS {
message PlanNode { message PlanNode {
oneof node { oneof node {
VectorANNS vector_anns = 1; VectorANNS vector_anns = 1;
Expr predicates = 2;
} }
repeated int64 output_field_ids = 2; repeated int64 output_field_ids = 3;
} }

View File

@ -871,8 +871,9 @@ func (m *VectorANNS) GetPlaceholderTag() string {
type PlanNode struct { type PlanNode struct {
// Types that are valid to be assigned to Node: // Types that are valid to be assigned to Node:
// *PlanNode_VectorAnns // *PlanNode_VectorAnns
// *PlanNode_Predicates
Node isPlanNode_Node `protobuf_oneof:"node"` Node isPlanNode_Node `protobuf_oneof:"node"`
OutputFieldIds []int64 `protobuf:"varint,2,rep,packed,name=output_field_ids,json=outputFieldIds,proto3" json:"output_field_ids,omitempty"` OutputFieldIds []int64 `protobuf:"varint,3,rep,packed,name=output_field_ids,json=outputFieldIds,proto3" json:"output_field_ids,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"` XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"` XXX_sizecache int32 `json:"-"`
@ -911,8 +912,14 @@ type PlanNode_VectorAnns struct {
VectorAnns *VectorANNS `protobuf:"bytes,1,opt,name=vector_anns,json=vectorAnns,proto3,oneof"` VectorAnns *VectorANNS `protobuf:"bytes,1,opt,name=vector_anns,json=vectorAnns,proto3,oneof"`
} }
type PlanNode_Predicates struct {
Predicates *Expr `protobuf:"bytes,2,opt,name=predicates,proto3,oneof"`
}
func (*PlanNode_VectorAnns) isPlanNode_Node() {} func (*PlanNode_VectorAnns) isPlanNode_Node() {}
func (*PlanNode_Predicates) isPlanNode_Node() {}
func (m *PlanNode) GetNode() isPlanNode_Node { func (m *PlanNode) GetNode() isPlanNode_Node {
if m != nil { if m != nil {
return m.Node return m.Node
@ -927,6 +934,13 @@ func (m *PlanNode) GetVectorAnns() *VectorANNS {
return nil return nil
} }
func (m *PlanNode) GetPredicates() *Expr {
if x, ok := m.GetNode().(*PlanNode_Predicates); ok {
return x.Predicates
}
return nil
}
func (m *PlanNode) GetOutputFieldIds() []int64 { func (m *PlanNode) GetOutputFieldIds() []int64 {
if m != nil { if m != nil {
return m.OutputFieldIds return m.OutputFieldIds
@ -938,6 +952,7 @@ func (m *PlanNode) GetOutputFieldIds() []int64 {
func (*PlanNode) XXX_OneofWrappers() []interface{} { func (*PlanNode) XXX_OneofWrappers() []interface{} {
return []interface{}{ return []interface{}{
(*PlanNode_VectorAnns)(nil), (*PlanNode_VectorAnns)(nil),
(*PlanNode_Predicates)(nil),
} }
} }
@ -962,71 +977,72 @@ func init() {
func init() { proto.RegisterFile("plan.proto", fileDescriptor_2d655ab2f7683c23) } func init() { proto.RegisterFile("plan.proto", fileDescriptor_2d655ab2f7683c23) }
var fileDescriptor_2d655ab2f7683c23 = []byte{ var fileDescriptor_2d655ab2f7683c23 = []byte{
// 1055 bytes of a gzipped FileDescriptorProto // 1067 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0xdd, 0x72, 0xdb, 0x44, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0xdd, 0x72, 0xdb, 0x44,
0x14, 0xb6, 0x2c, 0xdb, 0x91, 0x8e, 0x5c, 0xdb, 0xd1, 0x0d, 0x29, 0xa1, 0x24, 0x88, 0x0e, 0x0d, 0x14, 0xb6, 0x2c, 0xdb, 0x91, 0x8e, 0x5c, 0xdb, 0xd5, 0x0d, 0x29, 0xa1, 0x24, 0x88, 0x0e, 0x0d,
0x30, 0x4d, 0x86, 0xb6, 0xa4, 0x33, 0x65, 0x60, 0xf2, 0xd3, 0x12, 0x7b, 0x28, 0x49, 0x10, 0x21, 0x30, 0x4d, 0x86, 0xb6, 0xa4, 0x43, 0x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x46, 0xfd, 0x8f, 0xe1, 0x56, 0x4e, 0x89, 0x8c, 0x87, 0x51, 0xdc, 0x10, 0x8c, 0xe8, 0x74, 0x92, 0x51, 0xff, 0x43, 0xb8, 0x95, 0x53, 0x22, 0xe3, 0x61, 0x94,
0x46, 0x24, 0x19, 0xe5, 0x6b, 0x35, 0x54, 0x69, 0x1a, 0xe1, 0x29, 0xca, 0x82, 0x3f, 0x2c, 0x80, 0x11, 0x49, 0x46, 0xf9, 0x6a, 0x0d, 0x55, 0x9a, 0x46, 0x78, 0x82, 0xb2, 0xe0, 0x37, 0x0b, 0xe0,
0x43, 0xc1, 0x8b, 0x51, 0x8a, 0x81, 0x6e, 0x83, 0x73, 0xc1, 0x28, 0x4f, 0x22, 0x96, 0x94, 0xc1, 0x40, 0xf0, 0x62, 0x94, 0x62, 0xa0, 0x3b, 0xe0, 0x9c, 0x33, 0xca, 0x93, 0x88, 0x25, 0x65, 0xb0,
0x56, 0xf0, 0xbb, 0x97, 0xf8, 0x4f, 0xc0, 0x4d, 0x88, 0x22, 0x26, 0x9a, 0x46, 0xd5, 0x7a, 0x70, 0x15, 0xfc, 0xee, 0x25, 0xfe, 0x53, 0x70, 0x13, 0xa2, 0x88, 0x89, 0xa6, 0x51, 0xb5, 0x1e, 0xde,
0x67, 0x7b, 0x81, 0xb7, 0x92, 0xb1, 0xa7, 0x44, 0x11, 0x9d, 0x40, 0xe8, 0x24, 0xe5, 0xc9, 0xbf, 0xdd, 0x5a, 0xe0, 0xad, 0x64, 0xec, 0x19, 0x51, 0x44, 0x27, 0x10, 0x3a, 0x49, 0x79, 0xf2, 0xef,
0x0b, 0x2d, 0x96, 0x47, 0x99, 0x64, 0x23, 0x22, 0x27, 0xd1, 0x0b, 0x3a, 0xc1, 0x74, 0x9d, 0xb0, 0x41, 0x8b, 0xe5, 0x51, 0x26, 0xd9, 0x88, 0xc8, 0x49, 0xf4, 0x92, 0x4e, 0x30, 0x5d, 0x27, 0x6c,
0xc9, 0xf2, 0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, 0x3d, 0xfa, 0x2f, 0x00,
0x00, 0xff, 0xff, 0x6e, 0xb0, 0x90, 0xcb, 0x55, 0x0a, 0x00, 0x00,
} }

View File

@ -4,11 +4,6 @@ package milvus.proto.segcore;
option go_package = "github.com/milvus-io/milvus/internal/proto/segcorepb"; option go_package = "github.com/milvus-io/milvus/internal/proto/segcorepb";
import "schema.proto"; import "schema.proto";
message RetrieveRequest {
schema.IDs ids = 1;
repeated int64 output_fields_id = 2;
}
message RetrieveResults { message RetrieveResults {
schema.IDs ids = 1; schema.IDs ids = 1;
repeated int64 offset = 2; repeated int64 offset = 2;

View File

@ -21,53 +21,6 @@ var _ = math.Inf
// proto package needs to be updated. // proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
type RetrieveRequest struct {
Ids *schemapb.IDs `protobuf:"bytes,1,opt,name=ids,proto3" json:"ids,omitempty"`
OutputFieldsId []int64 `protobuf:"varint,2,rep,packed,name=output_fields_id,json=outputFieldsId,proto3" json:"output_fields_id,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *RetrieveRequest) Reset() { *m = RetrieveRequest{} }
func (m *RetrieveRequest) String() string { return proto.CompactTextString(m) }
func (*RetrieveRequest) ProtoMessage() {}
func (*RetrieveRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_1d79fce784797357, []int{0}
}
func (m *RetrieveRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_RetrieveRequest.Unmarshal(m, b)
}
func (m *RetrieveRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_RetrieveRequest.Marshal(b, m, deterministic)
}
func (m *RetrieveRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_RetrieveRequest.Merge(m, src)
}
func (m *RetrieveRequest) XXX_Size() int {
return xxx_messageInfo_RetrieveRequest.Size(m)
}
func (m *RetrieveRequest) XXX_DiscardUnknown() {
xxx_messageInfo_RetrieveRequest.DiscardUnknown(m)
}
var xxx_messageInfo_RetrieveRequest proto.InternalMessageInfo
func (m *RetrieveRequest) GetIds() *schemapb.IDs {
if m != nil {
return m.Ids
}
return nil
}
func (m *RetrieveRequest) GetOutputFieldsId() []int64 {
if m != nil {
return m.OutputFieldsId
}
return nil
}
type RetrieveResults struct { type RetrieveResults struct {
Ids *schemapb.IDs `protobuf:"bytes,1,opt,name=ids,proto3" json:"ids,omitempty"` Ids *schemapb.IDs `protobuf:"bytes,1,opt,name=ids,proto3" json:"ids,omitempty"`
Offset []int64 `protobuf:"varint,2,rep,packed,name=offset,proto3" json:"offset,omitempty"` Offset []int64 `protobuf:"varint,2,rep,packed,name=offset,proto3" json:"offset,omitempty"`
@ -81,7 +34,7 @@ func (m *RetrieveResults) Reset() { *m = RetrieveResults{} }
func (m *RetrieveResults) String() string { return proto.CompactTextString(m) } func (m *RetrieveResults) String() string { return proto.CompactTextString(m) }
func (*RetrieveResults) ProtoMessage() {} func (*RetrieveResults) ProtoMessage() {}
func (*RetrieveResults) Descriptor() ([]byte, []int) { func (*RetrieveResults) Descriptor() ([]byte, []int) {
return fileDescriptor_1d79fce784797357, []int{1} return fileDescriptor_1d79fce784797357, []int{0}
} }
func (m *RetrieveResults) XXX_Unmarshal(b []byte) error { func (m *RetrieveResults) XXX_Unmarshal(b []byte) error {
@ -136,7 +89,7 @@ func (m *LoadFieldMeta) Reset() { *m = LoadFieldMeta{} }
func (m *LoadFieldMeta) String() string { return proto.CompactTextString(m) } func (m *LoadFieldMeta) String() string { return proto.CompactTextString(m) }
func (*LoadFieldMeta) ProtoMessage() {} func (*LoadFieldMeta) ProtoMessage() {}
func (*LoadFieldMeta) Descriptor() ([]byte, []int) { func (*LoadFieldMeta) Descriptor() ([]byte, []int) {
return fileDescriptor_1d79fce784797357, []int{2} return fileDescriptor_1d79fce784797357, []int{1}
} }
func (m *LoadFieldMeta) XXX_Unmarshal(b []byte) error { func (m *LoadFieldMeta) XXX_Unmarshal(b []byte) error {
@ -191,7 +144,7 @@ func (m *LoadSegmentMeta) Reset() { *m = LoadSegmentMeta{} }
func (m *LoadSegmentMeta) String() string { return proto.CompactTextString(m) } func (m *LoadSegmentMeta) String() string { return proto.CompactTextString(m) }
func (*LoadSegmentMeta) ProtoMessage() {} func (*LoadSegmentMeta) ProtoMessage() {}
func (*LoadSegmentMeta) Descriptor() ([]byte, []int) { func (*LoadSegmentMeta) Descriptor() ([]byte, []int) {
return fileDescriptor_1d79fce784797357, []int{3} return fileDescriptor_1d79fce784797357, []int{2}
} }
func (m *LoadSegmentMeta) XXX_Unmarshal(b []byte) error { func (m *LoadSegmentMeta) XXX_Unmarshal(b []byte) error {
@ -227,7 +180,6 @@ func (m *LoadSegmentMeta) GetTotalSize() int64 {
} }
func init() { func init() {
proto.RegisterType((*RetrieveRequest)(nil), "milvus.proto.segcore.RetrieveRequest")
proto.RegisterType((*RetrieveResults)(nil), "milvus.proto.segcore.RetrieveResults") proto.RegisterType((*RetrieveResults)(nil), "milvus.proto.segcore.RetrieveResults")
proto.RegisterType((*LoadFieldMeta)(nil), "milvus.proto.segcore.LoadFieldMeta") proto.RegisterType((*LoadFieldMeta)(nil), "milvus.proto.segcore.LoadFieldMeta")
proto.RegisterType((*LoadSegmentMeta)(nil), "milvus.proto.segcore.LoadSegmentMeta") proto.RegisterType((*LoadSegmentMeta)(nil), "milvus.proto.segcore.LoadSegmentMeta")
@ -236,28 +188,26 @@ func init() {
func init() { proto.RegisterFile("segcore.proto", fileDescriptor_1d79fce784797357) } func init() { proto.RegisterFile("segcore.proto", fileDescriptor_1d79fce784797357) }
var fileDescriptor_1d79fce784797357 = []byte{ var fileDescriptor_1d79fce784797357 = []byte{
// 357 bytes of a gzipped FileDescriptorProto // 326 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x91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7, 0x71, 0xbb, 0x94, 0xbc, 0x2a, 0xe7, 0x61, 0xa2,
0xfd, 0x83, 0xb6, 0x61, 0xb3, 0x61, 0x9f, 0x01, 0x90, 0x24, 0x96, 0x45, 0x8a, 0xef, 0xd0, 0x94, 0x55, 0x54, 0xad, 0xbd, 0x96, 0xba, 0x7e, 0x45, 0x32, 0x67, 0x2a, 0x72, 0xcc, 0x22, 0xe7, 0x14,
0xe9, 0x6a, 0x65, 0xce, 0x77, 0x78, 0x7f, 0xf3, 0x7a, 0x9d, 0x72, 0x5a, 0x55, 0x0b, 0x3f, 0x96, 0xd5, 0x4e, 0xeb, 0xf9, 0xbc, 0xe5, 0x84, 0x9b, 0xef, 0x00, 0x00, 0x00, 0xff, 0xff, 0x5a, 0xd6,
0x22, 0x68, 0x62, 0x2f, 0xb9, 0x34, 0xa7, 0x80, 0xe7, 0x84, 0x65, 0xce, 0xb2, 0x40, 0x93, 0x02, 0xac, 0xcc, 0xf1, 0x01, 0x00, 0x00,
0x43, 0x2a, 0x16, 0x8b, 0x8e, 0x16, 0xae, 0x3e, 0x03, 0x00, 0x00, 0xff, 0xff, 0x12, 0x58, 0xd4,
0xce, 0x5a, 0x02, 0x00, 0x00,
} }

View File

@ -1660,13 +1660,13 @@ func (node *Proxy) CalcDistance(ctx context.Context, request *milvuspb.CalcDista
MsgType: commonpb.MsgType_Retrieve, MsgType: commonpb.MsgType_Retrieve,
SourceID: Params.ProxyID, SourceID: Params.ProxyID,
}, },
Ids: ids.IdArray,
ResultChannelID: strconv.FormatInt(Params.ProxyID, 10), ResultChannelID: strconv.FormatInt(Params.ProxyID, 10),
}, },
resultBuf: make(chan []*internalpb.RetrieveResults), resultBuf: make(chan []*internalpb.RetrieveResults),
query: queryRequest, query: queryRequest,
chMgr: node.chMgr, chMgr: node.chMgr,
qc: node.queryCoord, qc: node.queryCoord,
ids: ids.IdArray,
} }
err := node.sched.DqQueue.Enqueue(qt) err := node.sched.DqQueue.Enqueue(qt)

View File

@ -633,3 +633,22 @@ func CreateQueryPlan(schemaPb *schemapb.CollectionSchema, exprStr string, vector
} }
return planNode, nil return planNode, nil
} }
func CreateExprQueryPlan(schemaPb *schemapb.CollectionSchema, exprStr string) (*planpb.PlanNode, error) {
schema, err := typeutil.CreateSchemaHelper(schemaPb)
if err != nil {
return nil, err
}
expr, err := parseQueryExpr(schema, exprStr)
if err != nil {
return nil, err
}
planNode := &planpb.PlanNode{
Node: &planpb.PlanNode_Predicates{
Predicates: expr,
},
}
return planNode, nil
}

View File

@ -2012,6 +2012,7 @@ type QueryTask struct {
query *milvuspb.QueryRequest query *milvuspb.QueryRequest
chMgr channelsMgr chMgr channelsMgr
qc types.QueryCoord qc types.QueryCoord
ids *schemapb.IDs
} }
func (qt *QueryTask) TraceCtx() context.Context { func (qt *QueryTask) TraceCtx() context.Context {
@ -2105,6 +2106,11 @@ func parseIdsFromExpr(exprStr string, schema *typeutil.SchemaHelper) ([]int64, e
} }
} }
func IDs2Expr(fieldName string, ids []int64) string {
idsStr := strings.Trim(strings.Join(strings.Fields(fmt.Sprint(ids)), ", "), "[]")
return fieldName + " in [ " + idsStr + " ]"
}
func (qt *QueryTask) PreExecute(ctx context.Context) error { func (qt *QueryTask) PreExecute(ctx context.Context) error {
qt.Base.MsgType = commonpb.MsgType_Retrieve qt.Base.MsgType = commonpb.MsgType_Retrieve
qt.Base.SourceID = Params.ProxyID qt.Base.SourceID = Params.ProxyID
@ -2172,31 +2178,52 @@ func (qt *QueryTask) PreExecute(ctx context.Context) error {
if err != nil { // err is not nil if collection not exists if err != nil { // err is not nil if collection not exists
return err return err
} }
schemaHelper, err := typeutil.CreateSchemaHelper(schema) // schemaHelper, err := typeutil.CreateSchemaHelper(schema)
if err != nil { // if err != nil {
return err // return err
} // }
// TODO(dragondriver): necessary to check if partition was loaded into query node? // TODO(dragondriver): necessary to check if partition was loaded into query node?
if qt.Ids == nil { // if qt.Ids == nil {
if qt.query.Expr == "" { // if qt.query.Expr == "" {
errMsg := "Query expression is empty" // errMsg := "Query expression is empty"
return fmt.Errorf(errMsg) // return fmt.Errorf(errMsg)
} // }
ids, err := parseIdsFromExpr(qt.query.Expr, schemaHelper) // ids, err := parseIdsFromExpr(qt.query.Expr, schemaHelper)
if err != nil { // if err != nil {
return err // return err
} // }
qt.Base.MsgType = commonpb.MsgType_Retrieve // qt.Base.MsgType = commonpb.MsgType_Retrieve
qt.Ids = &schemapb.IDs{ // qt.Ids = &schemapb.IDs{
IdField: &schemapb.IDs_IntId{ // IdField: &schemapb.IDs_IntId{
IntId: &schemapb.LongArray{ // IntId: &schemapb.LongArray{
Data: ids, // Data: ids,
}, // },
}, // },
// }
// }
if qt.ids != nil {
pkField := ""
for _, field := range schema.Fields {
if field.IsPrimaryKey {
pkField = field.Name
}
} }
qt.query.Expr = IDs2Expr(pkField, qt.ids.GetIntId().Data)
}
if qt.query.Expr == "" {
errMsg := "Query expression is empty"
return fmt.Errorf(errMsg)
}
plan, err := CreateExprQueryPlan(schema, qt.query.Expr)
if err != nil {
//return errors.New("invalid expression: " + st.query.Dsl)
return err
} }
qt.query.OutputFields, err = translateOutputFields(qt.query.OutputFields, schema, true) qt.query.OutputFields, err = translateOutputFields(qt.query.OutputFields, schema, true)
if err != nil { if err != nil {
@ -2220,9 +2247,11 @@ func (qt *QueryTask) PreExecute(ctx context.Context) error {
} }
findField = true findField = true
qt.OutputFieldsId = append(qt.OutputFieldsId, field.FieldID) qt.OutputFieldsId = append(qt.OutputFieldsId, field.FieldID)
plan.OutputFieldIds = append(plan.OutputFieldIds, field.FieldID)
} else { } else {
if field.IsPrimaryKey && !addPrimaryKey { if field.IsPrimaryKey && !addPrimaryKey {
qt.OutputFieldsId = append(qt.OutputFieldsId, field.FieldID) qt.OutputFieldsId = append(qt.OutputFieldsId, field.FieldID)
plan.OutputFieldIds = append(plan.OutputFieldIds, field.FieldID)
addPrimaryKey = true addPrimaryKey = true
} }
} }
@ -2235,6 +2264,11 @@ func (qt *QueryTask) PreExecute(ctx context.Context) error {
} }
log.Debug("translate output fields to field ids", zap.Any("OutputFieldsID", qt.OutputFieldsId)) log.Debug("translate output fields to field ids", zap.Any("OutputFieldsID", qt.OutputFieldsId))
qt.RetrieveRequest.SerializedExprPlan, err = proto.Marshal(plan)
if err != nil {
return err
}
travelTimestamp := qt.query.TravelTimestamp travelTimestamp := qt.query.TravelTimestamp
if travelTimestamp == 0 { if travelTimestamp == 0 {
travelTimestamp = qt.BeginTs() travelTimestamp = qt.BeginTs()

View File

@ -23,8 +23,6 @@ import "C"
import ( import (
"errors" "errors"
"unsafe" "unsafe"
"github.com/milvus-io/milvus/internal/proto/segcorepb"
) )
type SearchPlan struct { type SearchPlan struct {
@ -110,19 +108,36 @@ type RetrievePlan struct {
Timestamp uint64 Timestamp uint64
} }
func createRetrievePlan(col *Collection, msg *segcorepb.RetrieveRequest, timestamp uint64) (*RetrievePlan, error) { // func createRetrievePlan(col *Collection, msg *segcorepb.RetrieveRequest, timestamp uint64) (*RetrievePlan, error) {
protoCGo, err := MarshalForCGo(msg) // protoCGo, err := MarshalForCGo(msg)
// if err != nil {
// return nil, err
// }
// plan := new(RetrievePlan)
// plan.Timestamp = timestamp
// status := C.CreateRetrievePlan(col.collectionPtr, protoCGo.CProto, &plan.cRetrievePlan)
// err2 := HandleCStatus(&status, "create retrieve plan failed")
// if err2 != nil {
// return nil, err2
// }
// return plan, nil
// }
func createRetrievePlanByExpr(col *Collection, expr []byte, timestamp uint64) (*RetrievePlan, error) {
var cPlan C.CRetrievePlan
status := C.CreateRetrievePlanByExpr(col.collectionPtr, (*C.char)(unsafe.Pointer(&expr[0])),
(C.int64_t)(len(expr)), &cPlan)
err := HandleCStatus(&status, "Create retrieve plan by expr failed")
if err != nil { if err != nil {
return nil, err return nil, err
} }
plan := new(RetrievePlan)
plan.Timestamp = timestamp var newPlan = &RetrievePlan{
status := C.CreateRetrievePlan(col.collectionPtr, protoCGo.CProto, &plan.cRetrievePlan) cRetrievePlan: cPlan,
err2 := HandleCStatus(&status, "create retrieve plan failed") Timestamp: timestamp,
if err2 != nil {
return nil, err2
} }
return plan, nil return newPlan, nil
} }
func (plan *RetrievePlan) delete() { func (plan *RetrievePlan) delete() {

View File

@ -1045,12 +1045,8 @@ func (q *queryCollection) retrieve(msg queryMsg) error {
return err return err
} }
req := &segcorepb.RetrieveRequest{ expr := retrieveMsg.SerializedExprPlan
Ids: retrieveMsg.Ids, plan, err := createRetrievePlanByExpr(collection, expr, timestamp)
OutputFieldsId: retrieveMsg.OutputFieldsId,
}
plan, err := createRetrievePlan(collection, req, timestamp)
if err != nil { if err != nil {
return err return err
} }

View File

@ -120,6 +120,25 @@ func genTestCollectionMeta(collectionID UniqueID, isBinary bool) *etcdpb.Collect
return &collectionMeta return &collectionMeta
} }
func genTestCollectionMetaWithPK(collectionID UniqueID, isBinary bool) *etcdpb.CollectionInfo {
schema := genTestCollectionSchema(collectionID, isBinary, 16)
schema.Fields = append(schema.Fields, &schemapb.FieldSchema{
FieldID: UniqueID(0),
Name: "id",
IsPrimaryKey: true,
DataType: schemapb.DataType_Int64,
})
collectionMeta := etcdpb.CollectionInfo{
ID: collectionID,
Schema: schema,
CreateTime: Timestamp(0),
PartitionIDs: []UniqueID{defaultPartitionID},
}
return &collectionMeta
}
func initTestMeta(t *testing.T, node *QueryNode, collectionID UniqueID, segmentID UniqueID, optional ...bool) { func initTestMeta(t *testing.T, node *QueryNode, collectionID UniqueID, segmentID UniqueID, optional ...bool) {
isBinary := false isBinary := false
if len(optional) > 0 { if len(optional) > 0 {

View File

@ -312,7 +312,7 @@ func (s *Segment) getEntityByIds(plan *RetrievePlan) (*segcorepb.RetrieveResults
if s.segmentPtr == nil { if s.segmentPtr == nil {
return nil, errors.New("null seg core pointer") return nil, errors.New("null seg core pointer")
} }
resProto := C.GetEntityByIds(s.segmentPtr, plan.cRetrievePlan, C.uint64_t(plan.Timestamp)) resProto := C.Retrieve(s.segmentPtr, plan.cRetrievePlan, C.uint64_t(plan.Timestamp))
result := new(segcorepb.RetrieveResults) result := new(segcorepb.RetrieveResults)
err := HandleCProtoResult(&resProto, result) err := HandleCProtoResult(&resProto, result)
if err != nil { if err != nil {

View File

@ -23,8 +23,8 @@ import (
"github.com/milvus-io/milvus/internal/proto/commonpb" "github.com/milvus-io/milvus/internal/proto/commonpb"
"github.com/milvus-io/milvus/internal/proto/milvuspb" "github.com/milvus-io/milvus/internal/proto/milvuspb"
"github.com/milvus-io/milvus/internal/proto/planpb"
"github.com/milvus-io/milvus/internal/proto/schemapb" "github.com/milvus-io/milvus/internal/proto/schemapb"
"github.com/milvus-io/milvus/internal/proto/segcorepb"
) )
//-------------------------------------------------------------------------------------- constructor and destructor //-------------------------------------------------------------------------------------- constructor and destructor
@ -133,7 +133,7 @@ func TestSegment_retrieve(t *testing.T) {
rawData = append(rawData, buf...) rawData = append(rawData, buf...)
} }
bs := make([]byte, 4) bs := make([]byte, 4)
binary.LittleEndian.PutUint32(bs, 1) binary.LittleEndian.PutUint32(bs, uint32(i+1))
rawData = append(rawData, bs...) rawData = append(rawData, bs...)
blob := &commonpb.Blob{ blob := &commonpb.Blob{
Value: rawData, Value: rawData,
@ -146,24 +146,58 @@ func TestSegment_retrieve(t *testing.T) {
err = segment.segmentInsert(offset, &ids, &timestamps, &records) err = segment.segmentInsert(offset, &ids, &timestamps, &records)
assert.NoError(t, err) assert.NoError(t, err)
reqIds := &segcorepb.RetrieveRequest{ planNode := &planpb.PlanNode{
Ids: &schemapb.IDs{ Node: &planpb.PlanNode_Predicates{
IdField: &schemapb.IDs_IntId{ Predicates: &planpb.Expr{
IntId: &schemapb.LongArray{ Expr: &planpb.Expr_TermExpr{
Data: []int64{2, 3, 1}, TermExpr: &planpb.TermExpr{
ColumnInfo: &planpb.ColumnInfo{
FieldId: 101,
DataType: schemapb.DataType_Int32,
},
Values: []*planpb.GenericValue{
{
Val: &planpb.GenericValue_Int64Val{
Int64Val: 1,
},
},
{
Val: &planpb.GenericValue_Int64Val{
Int64Val: 2,
},
},
{
Val: &planpb.GenericValue_Int64Val{
Int64Val: 3,
},
},
},
},
}, },
}, },
}, },
OutputFieldsId: []int64{100}, OutputFieldIds: []int64{101},
} }
plan, err := createRetrievePlan(collection, reqIds, 100) // reqIds := &segcorepb.RetrieveRequest{
// Ids: &schemapb.IDs{
// IdField: &schemapb.IDs_IntId{
// IntId: &schemapb.LongArray{
// Data: []int64{2, 3, 1},
// },
// },
// },
// OutputFieldsId: []int64{100},
// }
planExpr, err := proto.Marshal(planNode)
assert.NoError(t, err)
plan, err := createRetrievePlanByExpr(collection, planExpr, 100)
defer plan.delete() defer plan.delete()
assert.NoError(t, err) assert.NoError(t, err)
res, err := segment.getEntityByIds(plan) res, err := segment.getEntityByIds(plan)
assert.NoError(t, err) assert.NoError(t, err)
assert.Equal(t, res.Ids.GetIntId().Data, []int64{2, 3, 1}) assert.Equal(t, res.GetFieldsData()[0].GetScalars().Data.(*schemapb.ScalarField_IntData).IntData.Data, []int32{1, 2, 3})
} }
func TestSegment_getDeletedCount(t *testing.T) { func TestSegment_getDeletedCount(t *testing.T) {

View File

@ -273,8 +273,9 @@ class TestQueryBase:
with pytest.raises(Exception): with pytest.raises(Exception):
connect.query(collection, term_expr) connect.query(collection, term_expr)
# TODO(yukun): "not in" is supported now
@pytest.mark.parametrize("expr", [f'{default_int_field_name} inn [1, 2]', @pytest.mark.parametrize("expr", [f'{default_int_field_name} inn [1, 2]',
f'{default_int_field_name} not in [1, 2]', # f'{default_int_field_name} not in [1, 2]',
f'{default_int_field_name} in not [1, 2]']) f'{default_int_field_name} in not [1, 2]'])
@pytest.mark.tags(CaseLabel.L0) @pytest.mark.tags(CaseLabel.L0)
def test_query_expr_wrong_term_keyword(self, connect, collection, expr): def test_query_expr_wrong_term_keyword(self, connect, collection, expr):
@ -368,7 +369,8 @@ class TestQueryBase:
assert res[index][default_float_field_name] == entities[1]["values"][index] assert res[index][default_float_field_name] == entities[1]["values"][index]
ut.assert_equal_vector(res[index][ut.default_float_vec_field_name], entities[2]["values"][index]) ut.assert_equal_vector(res[index][ut.default_float_vec_field_name], entities[2]["values"][index])
@pytest.mark.tags(CaseLabel.L0) # @pytest.mark.tags(CaseLabel.L0)
@pytest.mark.xfail(reason="Need to discuss")
def test_query_expr_repeated_term_array(self, connect, collection): def test_query_expr_repeated_term_array(self, connect, collection):
""" """
target: test query with repeated term array on primary field with unique value target: test query with repeated term array on primary field with unique value

View File

@ -202,9 +202,10 @@ class TestQueryBase(TestcaseBase):
error_1 = {ct.err_code: 1, ct.err_msg: f'unexpected token Identifier("inn")'} error_1 = {ct.err_code: 1, ct.err_msg: f'unexpected token Identifier("inn")'}
collection_w.query(expr_1, check_task=CheckTasks.err_res, check_items=error_1) collection_w.query(expr_1, check_task=CheckTasks.err_res, check_items=error_1)
expr_2 = f'{ct.default_int64_field_name} not in [1, 2]' # TODO(yukun): "not in" is supported now
error_2 = {ct.err_code: 1, ct.err_msg: 'not top level term'} # expr_2 = f'{ct.default_int64_field_name} not in [1, 2]'
collection_w.query(expr_2, check_task=CheckTasks.err_res, check_items=error_2) # error_2 = {ct.err_code: 1, ct.err_msg: 'not top level term'}
# collection_w.query(expr_2, check_task=CheckTasks.err_res, check_items=error_2)
expr_3 = f'{ct.default_int64_field_name} in not [1, 2]' expr_3 = f'{ct.default_int64_field_name} in not [1, 2]'
error_3 = {ct.err_code: 1, ct.err_msg: 'right operand of the InExpr must be array'} error_3 = {ct.err_code: 1, ct.err_msg: 'right operand of the InExpr must be array'}