Split segcore and plan proto for future feature (#5767)

* Split segcore and plan proto for future feature

Signed-off-by: fluorinedog <fluorinedog@gmail.com>

* lint

Signed-off-by: fluorinedog <fluorinedog@gmail.com>
This commit is contained in:
FluorineDog 2021-06-15 14:43:57 +08:00 committed by GitHub
parent cdbc6d2c94
commit bec9f2c182
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
21 changed files with 1642 additions and 1440 deletions

View File

@ -12,7 +12,7 @@
get_property(PROTOC_EXCUTABLE GLOBAL PROPERTY PROTOC_EXCUTABLE )
set(proto_file_names common.proto etcd_meta.proto schema.proto milvus.proto index_cgo_msg.proto plan.proto)
set(proto_file_names common.proto etcd_meta.proto schema.proto milvus.proto index_cgo_msg.proto plan.proto segcore.proto)
set( PROTO_PATH "${MILVUS_SOURCE_DIR}/../proto/" )

View File

@ -22,8 +22,6 @@ extern PROTOBUF_INTERNAL_EXPORT_plan_2eproto ::PROTOBUF_NAMESPACE_ID::internal::
extern PROTOBUF_INTERNAL_EXPORT_plan_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_RangeExpr_plan_2eproto;
extern PROTOBUF_INTERNAL_EXPORT_plan_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_TermExpr_plan_2eproto;
extern PROTOBUF_INTERNAL_EXPORT_plan_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_VectorANNS_plan_2eproto;
extern PROTOBUF_INTERNAL_EXPORT_schema_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_FieldData_schema_2eproto;
extern PROTOBUF_INTERNAL_EXPORT_schema_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_IDs_schema_2eproto;
namespace milvus {
namespace proto {
namespace plan {
@ -75,14 +73,6 @@ class PlanNodeDefaultTypeInternal {
::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<PlanNode> _instance;
const ::milvus::proto::plan::VectorANNS* vector_anns_;
} _PlanNode_default_instance_;
class RetrieveRequestDefaultTypeInternal {
public:
::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<RetrieveRequest> _instance;
} _RetrieveRequest_default_instance_;
class RetrieveResultsDefaultTypeInternal {
public:
::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<RetrieveResults> _instance;
} _RetrieveResults_default_instance_;
} // namespace plan
} // namespace proto
} // namespace milvus
@ -187,37 +177,6 @@ static void InitDefaultsscc_info_RangeExpr_plan_2eproto() {
&scc_info_ColumnInfo_plan_2eproto.base,
&scc_info_GenericValue_plan_2eproto.base,}};
static void InitDefaultsscc_info_RetrieveRequest_plan_2eproto() {
GOOGLE_PROTOBUF_VERIFY_VERSION;
{
void* ptr = &::milvus::proto::plan::_RetrieveRequest_default_instance_;
new (ptr) ::milvus::proto::plan::RetrieveRequest();
::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
}
::milvus::proto::plan::RetrieveRequest::InitAsDefaultInstance();
}
::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_RetrieveRequest_plan_2eproto =
{{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_RetrieveRequest_plan_2eproto}, {
&scc_info_IDs_schema_2eproto.base,}};
static void InitDefaultsscc_info_RetrieveResults_plan_2eproto() {
GOOGLE_PROTOBUF_VERIFY_VERSION;
{
void* ptr = &::milvus::proto::plan::_RetrieveResults_default_instance_;
new (ptr) ::milvus::proto::plan::RetrieveResults();
::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
}
::milvus::proto::plan::RetrieveResults::InitAsDefaultInstance();
}
::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_RetrieveResults_plan_2eproto =
{{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsscc_info_RetrieveResults_plan_2eproto}, {
&scc_info_IDs_schema_2eproto.base,
&scc_info_FieldData_schema_2eproto.base,}};
static void InitDefaultsscc_info_TermExpr_plan_2eproto() {
GOOGLE_PROTOBUF_VERIFY_VERSION;
@ -250,7 +209,7 @@ static void InitDefaultsscc_info_VectorANNS_plan_2eproto() {
&scc_info_BinaryExpr_plan_2eproto.base,
&scc_info_QueryInfo_plan_2eproto.base,}};
static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_plan_2eproto[12];
static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_plan_2eproto[10];
static const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* file_level_enum_descriptors_plan_2eproto[3];
static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_plan_2eproto = nullptr;
@ -338,20 +297,6 @@ const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_plan_2eproto::offsets[] PROTOB
~0u, // no _weak_field_map_
offsetof(::milvus::proto::plan::PlanNodeDefaultTypeInternal, vector_anns_),
PROTOBUF_FIELD_OFFSET(::milvus::proto::plan::PlanNode, node_),
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::milvus::proto::plan::RetrieveRequest, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
PROTOBUF_FIELD_OFFSET(::milvus::proto::plan::RetrieveRequest, ids_),
PROTOBUF_FIELD_OFFSET(::milvus::proto::plan::RetrieveRequest, output_fields_),
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::milvus::proto::plan::RetrieveResults, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
PROTOBUF_FIELD_OFFSET(::milvus::proto::plan::RetrieveResults, ids_),
PROTOBUF_FIELD_OFFSET(::milvus::proto::plan::RetrieveResults, fields_data_),
};
static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
{ 0, -1, sizeof(::milvus::proto::plan::GenericValue)},
@ -364,8 +309,6 @@ static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOB
{ 56, -1, sizeof(::milvus::proto::plan::Expr)},
{ 66, -1, sizeof(::milvus::proto::plan::VectorANNS)},
{ 76, -1, sizeof(::milvus::proto::plan::PlanNode)},
{ 83, -1, sizeof(::milvus::proto::plan::RetrieveRequest)},
{ 90, -1, sizeof(::milvus::proto::plan::RetrieveResults)},
};
static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {
@ -379,8 +322,6 @@ static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] =
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::milvus::proto::plan::_Expr_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::milvus::proto::plan::_VectorANNS_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::milvus::proto::plan::_PlanNode_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::milvus::proto::plan::_RetrieveRequest_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::milvus::proto::plan::_RetrieveResults_default_instance_),
};
const char descriptor_table_protodef_plan_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
@ -422,36 +363,29 @@ const char descriptor_table_protodef_plan_2eproto[] PROTOBUF_SECTION_VARIABLE(pr
"milvus.proto.plan.QueryInfo\022\027\n\017placehold"
"er_tag\030\005 \001(\t\"H\n\010PlanNode\0224\n\013vector_anns\030"
"\001 \001(\0132\035.milvus.proto.plan.VectorANNSH\000B\006"
"\n\004node\"O\n\017RetrieveRequest\022%\n\003ids\030\001 \001(\0132\030"
".milvus.proto.schema.IDs\022\025\n\routput_field"
"s\030\002 \003(\t\"m\n\017RetrieveResults\022%\n\003ids\030\001 \001(\0132"
"\030.milvus.proto.schema.IDs\0223\n\013fields_data"
"\030\002 \003(\0132\036.milvus.proto.schema.FieldDataB3"
"Z1github.com/milvus-io/milvus/internal/p"
"roto/planpbb\006proto3"
"\n\004nodeB3Z1github.com/milvus-io/milvus/in"
"ternal/proto/planpbb\006proto3"
;
static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_plan_2eproto_deps[1] = {
&::descriptor_table_schema_2eproto,
};
static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_plan_2eproto_sccs[10] = {
static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_plan_2eproto_sccs[8] = {
&scc_info_BinaryExpr_plan_2eproto.base,
&scc_info_ColumnInfo_plan_2eproto.base,
&scc_info_GenericValue_plan_2eproto.base,
&scc_info_PlanNode_plan_2eproto.base,
&scc_info_QueryInfo_plan_2eproto.base,
&scc_info_RangeExpr_plan_2eproto.base,
&scc_info_RetrieveRequest_plan_2eproto.base,
&scc_info_RetrieveResults_plan_2eproto.base,
&scc_info_TermExpr_plan_2eproto.base,
&scc_info_VectorANNS_plan_2eproto.base,
};
static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_plan_2eproto_once;
static bool descriptor_table_plan_2eproto_initialized = false;
const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_plan_2eproto = {
&descriptor_table_plan_2eproto_initialized, descriptor_table_protodef_plan_2eproto, "plan.proto", 1779,
&descriptor_table_plan_2eproto_once, descriptor_table_plan_2eproto_sccs, descriptor_table_plan_2eproto_deps, 10, 1,
&descriptor_table_plan_2eproto_initialized, descriptor_table_protodef_plan_2eproto, "plan.proto", 1587,
&descriptor_table_plan_2eproto_once, descriptor_table_plan_2eproto_sccs, descriptor_table_plan_2eproto_deps, 8, 1,
schemas, file_default_instances, TableStruct_plan_2eproto::offsets,
file_level_metadata_plan_2eproto, 12, file_level_enum_descriptors_plan_2eproto, file_level_service_descriptors_plan_2eproto,
file_level_metadata_plan_2eproto, 10, file_level_enum_descriptors_plan_2eproto, file_level_service_descriptors_plan_2eproto,
};
// Force running AddDescriptors() at dynamic initialization time.
@ -4401,668 +4335,6 @@ void PlanNode::InternalSwap(PlanNode* other) {
}
// ===================================================================
void RetrieveRequest::InitAsDefaultInstance() {
::milvus::proto::plan::_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.plan.RetrieveRequest)
}
RetrieveRequest::RetrieveRequest(const RetrieveRequest& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
_internal_metadata_(nullptr),
output_fields_(from.output_fields_) {
_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.plan.RetrieveRequest)
}
void RetrieveRequest::SharedCtor() {
::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_RetrieveRequest_plan_2eproto.base);
ids_ = nullptr;
}
RetrieveRequest::~RetrieveRequest() {
// @@protoc_insertion_point(destructor:milvus.proto.plan.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_plan_2eproto.base);
return *internal_default_instance();
}
void RetrieveRequest::Clear() {
// @@protoc_insertion_point(message_clear_start:milvus.proto.plan.RetrieveRequest)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
output_fields_.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 string output_fields = 2;
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
ptr -= 1;
do {
ptr += 1;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(add_output_fields(), ptr, ctx, "milvus.proto.plan.RetrieveRequest.output_fields");
CHK_(ptr);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 18);
} 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.plan.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 string output_fields = 2;
case 2: {
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) {
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
input, this->add_output_fields()));
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
this->output_fields(this->output_fields_size() - 1).data(),
static_cast<int>(this->output_fields(this->output_fields_size() - 1).length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
"milvus.proto.plan.RetrieveRequest.output_fields"));
} 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.plan.RetrieveRequest)
return true;
failure:
// @@protoc_insertion_point(parse_failure:milvus.proto.plan.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.plan.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 string output_fields = 2;
for (int i = 0, n = this->output_fields_size(); i < n; i++) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
this->output_fields(i).data(), static_cast<int>(this->output_fields(i).length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
"milvus.proto.plan.RetrieveRequest.output_fields");
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteString(
2, this->output_fields(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.plan.RetrieveRequest)
}
::PROTOBUF_NAMESPACE_ID::uint8* RetrieveRequest::InternalSerializeWithCachedSizesToArray(
::PROTOBUF_NAMESPACE_ID::uint8* target) const {
// @@protoc_insertion_point(serialize_to_array_start:milvus.proto.plan.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 string output_fields = 2;
for (int i = 0, n = this->output_fields_size(); i < n; i++) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
this->output_fields(i).data(), static_cast<int>(this->output_fields(i).length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
"milvus.proto.plan.RetrieveRequest.output_fields");
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
WriteStringToArray(2, this->output_fields(i), 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.plan.RetrieveRequest)
return target;
}
size_t RetrieveRequest::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:milvus.proto.plan.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 string output_fields = 2;
total_size += 1 *
::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->output_fields_size());
for (int i = 0, n = this->output_fields_size(); i < n; i++) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->output_fields(i));
}
// .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.plan.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.plan.RetrieveRequest)
::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
} else {
// @@protoc_insertion_point(generalized_merge_from_cast_success:milvus.proto.plan.RetrieveRequest)
MergeFrom(*source);
}
}
void RetrieveRequest::MergeFrom(const RetrieveRequest& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:milvus.proto.plan.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_.MergeFrom(from.output_fields_);
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.plan.RetrieveRequest)
if (&from == this) return;
Clear();
MergeFrom(from);
}
void RetrieveRequest::CopyFrom(const RetrieveRequest& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:milvus.proto.plan.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_.InternalSwap(CastToBase(&other->output_fields_));
swap(ids_, other->ids_);
}
::PROTOBUF_NAMESPACE_ID::Metadata RetrieveRequest::GetMetadata() const {
return GetMetadataStatic();
}
// ===================================================================
void RetrieveResults::InitAsDefaultInstance() {
::milvus::proto::plan::_RetrieveResults_default_instance_._instance.get_mutable()->ids_ = const_cast< ::milvus::proto::schema::IDs*>(
::milvus::proto::schema::IDs::internal_default_instance());
}
class RetrieveResults::_Internal {
public:
static const ::milvus::proto::schema::IDs& ids(const RetrieveResults* msg);
};
const ::milvus::proto::schema::IDs&
RetrieveResults::_Internal::ids(const RetrieveResults* msg) {
return *msg->ids_;
}
void RetrieveResults::clear_ids() {
if (GetArenaNoVirtual() == nullptr && ids_ != nullptr) {
delete ids_;
}
ids_ = nullptr;
}
void RetrieveResults::clear_fields_data() {
fields_data_.Clear();
}
RetrieveResults::RetrieveResults()
: ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
SharedCtor();
// @@protoc_insertion_point(constructor:milvus.proto.plan.RetrieveResults)
}
RetrieveResults::RetrieveResults(const RetrieveResults& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
_internal_metadata_(nullptr),
fields_data_(from.fields_data_) {
_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.plan.RetrieveResults)
}
void RetrieveResults::SharedCtor() {
::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_RetrieveResults_plan_2eproto.base);
ids_ = nullptr;
}
RetrieveResults::~RetrieveResults() {
// @@protoc_insertion_point(destructor:milvus.proto.plan.RetrieveResults)
SharedDtor();
}
void RetrieveResults::SharedDtor() {
if (this != internal_default_instance()) delete ids_;
}
void RetrieveResults::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
const RetrieveResults& RetrieveResults::default_instance() {
::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_RetrieveResults_plan_2eproto.base);
return *internal_default_instance();
}
void RetrieveResults::Clear() {
// @@protoc_insertion_point(message_clear_start:milvus.proto.plan.RetrieveResults)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
fields_data_.Clear();
if (GetArenaNoVirtual() == nullptr && ids_ != nullptr) {
delete ids_;
}
ids_ = nullptr;
_internal_metadata_.Clear();
}
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
const char* RetrieveResults::_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 .milvus.proto.schema.FieldData fields_data = 2;
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
ptr -= 1;
do {
ptr += 1;
ptr = ctx->ParseMessage(add_fields_data(), ptr);
CHK_(ptr);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 18);
} 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 RetrieveResults::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.plan.RetrieveResults)
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 .milvus.proto.schema.FieldData fields_data = 2;
case 2: {
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) {
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
input, add_fields_data()));
} 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.plan.RetrieveResults)
return true;
failure:
// @@protoc_insertion_point(parse_failure:milvus.proto.plan.RetrieveResults)
return false;
#undef DO_
}
#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
void RetrieveResults::SerializeWithCachedSizes(
::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:milvus.proto.plan.RetrieveResults)
::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 .milvus.proto.schema.FieldData fields_data = 2;
for (unsigned int i = 0,
n = static_cast<unsigned int>(this->fields_data_size()); i < n; i++) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
2,
this->fields_data(static_cast<int>(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.plan.RetrieveResults)
}
::PROTOBUF_NAMESPACE_ID::uint8* RetrieveResults::InternalSerializeWithCachedSizesToArray(
::PROTOBUF_NAMESPACE_ID::uint8* target) const {
// @@protoc_insertion_point(serialize_to_array_start:milvus.proto.plan.RetrieveResults)
::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 .milvus.proto.schema.FieldData fields_data = 2;
for (unsigned int i = 0,
n = static_cast<unsigned int>(this->fields_data_size()); i < n; i++) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessageToArray(
2, this->fields_data(static_cast<int>(i)), 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.plan.RetrieveResults)
return target;
}
size_t RetrieveResults::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:milvus.proto.plan.RetrieveResults)
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 .milvus.proto.schema.FieldData fields_data = 2;
{
unsigned int count = static_cast<unsigned int>(this->fields_data_size());
total_size += 1UL * count;
for (unsigned int i = 0; i < count; i++) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
this->fields_data(static_cast<int>(i)));
}
}
// .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 RetrieveResults::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:milvus.proto.plan.RetrieveResults)
GOOGLE_DCHECK_NE(&from, this);
const RetrieveResults* source =
::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<RetrieveResults>(
&from);
if (source == nullptr) {
// @@protoc_insertion_point(generalized_merge_from_cast_fail:milvus.proto.plan.RetrieveResults)
::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
} else {
// @@protoc_insertion_point(generalized_merge_from_cast_success:milvus.proto.plan.RetrieveResults)
MergeFrom(*source);
}
}
void RetrieveResults::MergeFrom(const RetrieveResults& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:milvus.proto.plan.RetrieveResults)
GOOGLE_DCHECK_NE(&from, this);
_internal_metadata_.MergeFrom(from._internal_metadata_);
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
(void) cached_has_bits;
fields_data_.MergeFrom(from.fields_data_);
if (from.has_ids()) {
mutable_ids()->::milvus::proto::schema::IDs::MergeFrom(from.ids());
}
}
void RetrieveResults::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:milvus.proto.plan.RetrieveResults)
if (&from == this) return;
Clear();
MergeFrom(from);
}
void RetrieveResults::CopyFrom(const RetrieveResults& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:milvus.proto.plan.RetrieveResults)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool RetrieveResults::IsInitialized() const {
return true;
}
void RetrieveResults::InternalSwap(RetrieveResults* other) {
using std::swap;
_internal_metadata_.Swap(&other->_internal_metadata_);
CastToBase(&fields_data_)->InternalSwap(CastToBase(&other->fields_data_));
swap(ids_, other->ids_);
}
::PROTOBUF_NAMESPACE_ID::Metadata RetrieveResults::GetMetadata() const {
return GetMetadataStatic();
}
// @@protoc_insertion_point(namespace_scope)
} // namespace plan
} // namespace proto
@ -5098,12 +4370,6 @@ template<> PROTOBUF_NOINLINE ::milvus::proto::plan::VectorANNS* Arena::CreateMay
template<> PROTOBUF_NOINLINE ::milvus::proto::plan::PlanNode* Arena::CreateMaybeMessage< ::milvus::proto::plan::PlanNode >(Arena* arena) {
return Arena::CreateInternal< ::milvus::proto::plan::PlanNode >(arena);
}
template<> PROTOBUF_NOINLINE ::milvus::proto::plan::RetrieveRequest* Arena::CreateMaybeMessage< ::milvus::proto::plan::RetrieveRequest >(Arena* arena) {
return Arena::CreateInternal< ::milvus::proto::plan::RetrieveRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::milvus::proto::plan::RetrieveResults* Arena::CreateMaybeMessage< ::milvus::proto::plan::RetrieveResults >(Arena* arena) {
return Arena::CreateInternal< ::milvus::proto::plan::RetrieveResults >(arena);
}
PROTOBUF_NAMESPACE_CLOSE
// @@protoc_insertion_point(global_scope)

View File

@ -49,7 +49,7 @@ struct TableStruct_plan_2eproto {
PROTOBUF_SECTION_VARIABLE(protodesc_cold);
static const ::PROTOBUF_NAMESPACE_ID::internal::AuxillaryParseTableField aux[]
PROTOBUF_SECTION_VARIABLE(protodesc_cold);
static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[12]
static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[10]
PROTOBUF_SECTION_VARIABLE(protodesc_cold);
static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[];
static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[];
@ -80,12 +80,6 @@ extern QueryInfoDefaultTypeInternal _QueryInfo_default_instance_;
class RangeExpr;
class RangeExprDefaultTypeInternal;
extern RangeExprDefaultTypeInternal _RangeExpr_default_instance_;
class RetrieveRequest;
class RetrieveRequestDefaultTypeInternal;
extern RetrieveRequestDefaultTypeInternal _RetrieveRequest_default_instance_;
class RetrieveResults;
class RetrieveResultsDefaultTypeInternal;
extern RetrieveResultsDefaultTypeInternal _RetrieveResults_default_instance_;
class TermExpr;
class TermExprDefaultTypeInternal;
extern TermExprDefaultTypeInternal _TermExpr_default_instance_;
@ -106,8 +100,6 @@ template<> ::milvus::proto::plan::GenericValue* Arena::CreateMaybeMessage<::milv
template<> ::milvus::proto::plan::PlanNode* Arena::CreateMaybeMessage<::milvus::proto::plan::PlanNode>(Arena*);
template<> ::milvus::proto::plan::QueryInfo* Arena::CreateMaybeMessage<::milvus::proto::plan::QueryInfo>(Arena*);
template<> ::milvus::proto::plan::RangeExpr* Arena::CreateMaybeMessage<::milvus::proto::plan::RangeExpr>(Arena*);
template<> ::milvus::proto::plan::RetrieveRequest* Arena::CreateMaybeMessage<::milvus::proto::plan::RetrieveRequest>(Arena*);
template<> ::milvus::proto::plan::RetrieveResults* Arena::CreateMaybeMessage<::milvus::proto::plan::RetrieveResults>(Arena*);
template<> ::milvus::proto::plan::TermExpr* Arena::CreateMaybeMessage<::milvus::proto::plan::TermExpr>(Arena*);
template<> ::milvus::proto::plan::UnaryExpr* Arena::CreateMaybeMessage<::milvus::proto::plan::UnaryExpr>(Arena*);
template<> ::milvus::proto::plan::VectorANNS* Arena::CreateMaybeMessage<::milvus::proto::plan::VectorANNS>(Arena*);
@ -1887,306 +1879,6 @@ class PlanNode :
friend struct ::TableStruct_plan_2eproto;
};
// -------------------------------------------------------------------
class RetrieveRequest :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:milvus.proto.plan.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 =
10;
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.plan.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_plan_2eproto);
return ::descriptor_table_plan_2eproto.file_level_metadata[kIndexInFileMessages];
}
public:
// nested types ----------------------------------------------------
// accessors -------------------------------------------------------
enum : int {
kOutputFieldsFieldNumber = 2,
kIdsFieldNumber = 1,
};
// repeated string output_fields = 2;
int output_fields_size() const;
void clear_output_fields();
const std::string& output_fields(int index) const;
std::string* mutable_output_fields(int index);
void set_output_fields(int index, const std::string& value);
void set_output_fields(int index, std::string&& value);
void set_output_fields(int index, const char* value);
void set_output_fields(int index, const char* value, size_t size);
std::string* add_output_fields();
void add_output_fields(const std::string& value);
void add_output_fields(std::string&& value);
void add_output_fields(const char* value);
void add_output_fields(const char* value, size_t size);
const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<std::string>& output_fields() const;
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<std::string>* mutable_output_fields();
// .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.plan.RetrieveRequest)
private:
class _Internal;
::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_;
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<std::string> output_fields_;
::milvus::proto::schema::IDs* ids_;
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
friend struct ::TableStruct_plan_2eproto;
};
// -------------------------------------------------------------------
class RetrieveResults :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:milvus.proto.plan.RetrieveResults) */ {
public:
RetrieveResults();
virtual ~RetrieveResults();
RetrieveResults(const RetrieveResults& from);
RetrieveResults(RetrieveResults&& from) noexcept
: RetrieveResults() {
*this = ::std::move(from);
}
inline RetrieveResults& operator=(const RetrieveResults& from) {
CopyFrom(from);
return *this;
}
inline RetrieveResults& operator=(RetrieveResults&& 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 RetrieveResults& default_instance();
static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY
static inline const RetrieveResults* internal_default_instance() {
return reinterpret_cast<const RetrieveResults*>(
&_RetrieveResults_default_instance_);
}
static constexpr int kIndexInFileMessages =
11;
friend void swap(RetrieveResults& a, RetrieveResults& b) {
a.Swap(&b);
}
inline void Swap(RetrieveResults* other) {
if (other == this) return;
InternalSwap(other);
}
// implements Message ----------------------------------------------
inline RetrieveResults* New() const final {
return CreateMaybeMessage<RetrieveResults>(nullptr);
}
RetrieveResults* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final {
return CreateMaybeMessage<RetrieveResults>(arena);
}
void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
void CopyFrom(const RetrieveResults& from);
void MergeFrom(const RetrieveResults& 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(RetrieveResults* other);
friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
return "milvus.proto.plan.RetrieveResults";
}
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_plan_2eproto);
return ::descriptor_table_plan_2eproto.file_level_metadata[kIndexInFileMessages];
}
public:
// nested types ----------------------------------------------------
// accessors -------------------------------------------------------
enum : int {
kFieldsDataFieldNumber = 2,
kIdsFieldNumber = 1,
};
// repeated .milvus.proto.schema.FieldData fields_data = 2;
int fields_data_size() const;
void clear_fields_data();
::milvus::proto::schema::FieldData* mutable_fields_data(int index);
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::proto::schema::FieldData >*
mutable_fields_data();
const ::milvus::proto::schema::FieldData& fields_data(int index) const;
::milvus::proto::schema::FieldData* add_fields_data();
const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::proto::schema::FieldData >&
fields_data() const;
// .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.plan.RetrieveResults)
private:
class _Internal;
::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_;
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::proto::schema::FieldData > fields_data_;
::milvus::proto::schema::IDs* ids_;
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
friend struct ::TableStruct_plan_2eproto;
};
// ===================================================================
@ -3279,196 +2971,6 @@ inline void PlanNode::clear_has_node() {
inline PlanNode::NodeCase PlanNode::node_case() const {
return PlanNode::NodeCase(_oneof_case_[0]);
}
// -------------------------------------------------------------------
// 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.plan.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.plan.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.plan.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.plan.RetrieveRequest.ids)
}
// repeated string output_fields = 2;
inline int RetrieveRequest::output_fields_size() const {
return output_fields_.size();
}
inline void RetrieveRequest::clear_output_fields() {
output_fields_.Clear();
}
inline const std::string& RetrieveRequest::output_fields(int index) const {
// @@protoc_insertion_point(field_get:milvus.proto.plan.RetrieveRequest.output_fields)
return output_fields_.Get(index);
}
inline std::string* RetrieveRequest::mutable_output_fields(int index) {
// @@protoc_insertion_point(field_mutable:milvus.proto.plan.RetrieveRequest.output_fields)
return output_fields_.Mutable(index);
}
inline void RetrieveRequest::set_output_fields(int index, const std::string& value) {
// @@protoc_insertion_point(field_set:milvus.proto.plan.RetrieveRequest.output_fields)
output_fields_.Mutable(index)->assign(value);
}
inline void RetrieveRequest::set_output_fields(int index, std::string&& value) {
// @@protoc_insertion_point(field_set:milvus.proto.plan.RetrieveRequest.output_fields)
output_fields_.Mutable(index)->assign(std::move(value));
}
inline void RetrieveRequest::set_output_fields(int index, const char* value) {
GOOGLE_DCHECK(value != nullptr);
output_fields_.Mutable(index)->assign(value);
// @@protoc_insertion_point(field_set_char:milvus.proto.plan.RetrieveRequest.output_fields)
}
inline void RetrieveRequest::set_output_fields(int index, const char* value, size_t size) {
output_fields_.Mutable(index)->assign(
reinterpret_cast<const char*>(value), size);
// @@protoc_insertion_point(field_set_pointer:milvus.proto.plan.RetrieveRequest.output_fields)
}
inline std::string* RetrieveRequest::add_output_fields() {
// @@protoc_insertion_point(field_add_mutable:milvus.proto.plan.RetrieveRequest.output_fields)
return output_fields_.Add();
}
inline void RetrieveRequest::add_output_fields(const std::string& value) {
output_fields_.Add()->assign(value);
// @@protoc_insertion_point(field_add:milvus.proto.plan.RetrieveRequest.output_fields)
}
inline void RetrieveRequest::add_output_fields(std::string&& value) {
output_fields_.Add(std::move(value));
// @@protoc_insertion_point(field_add:milvus.proto.plan.RetrieveRequest.output_fields)
}
inline void RetrieveRequest::add_output_fields(const char* value) {
GOOGLE_DCHECK(value != nullptr);
output_fields_.Add()->assign(value);
// @@protoc_insertion_point(field_add_char:milvus.proto.plan.RetrieveRequest.output_fields)
}
inline void RetrieveRequest::add_output_fields(const char* value, size_t size) {
output_fields_.Add()->assign(reinterpret_cast<const char*>(value), size);
// @@protoc_insertion_point(field_add_pointer:milvus.proto.plan.RetrieveRequest.output_fields)
}
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<std::string>&
RetrieveRequest::output_fields() const {
// @@protoc_insertion_point(field_list:milvus.proto.plan.RetrieveRequest.output_fields)
return output_fields_;
}
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<std::string>*
RetrieveRequest::mutable_output_fields() {
// @@protoc_insertion_point(field_mutable_list:milvus.proto.plan.RetrieveRequest.output_fields)
return &output_fields_;
}
// -------------------------------------------------------------------
// RetrieveResults
// .milvus.proto.schema.IDs ids = 1;
inline bool RetrieveResults::has_ids() const {
return this != internal_default_instance() && ids_ != nullptr;
}
inline const ::milvus::proto::schema::IDs& RetrieveResults::ids() const {
const ::milvus::proto::schema::IDs* p = ids_;
// @@protoc_insertion_point(field_get:milvus.proto.plan.RetrieveResults.ids)
return p != nullptr ? *p : *reinterpret_cast<const ::milvus::proto::schema::IDs*>(
&::milvus::proto::schema::_IDs_default_instance_);
}
inline ::milvus::proto::schema::IDs* RetrieveResults::release_ids() {
// @@protoc_insertion_point(field_release:milvus.proto.plan.RetrieveResults.ids)
::milvus::proto::schema::IDs* temp = ids_;
ids_ = nullptr;
return temp;
}
inline ::milvus::proto::schema::IDs* RetrieveResults::mutable_ids() {
if (ids_ == nullptr) {
auto* p = CreateMaybeMessage<::milvus::proto::schema::IDs>(GetArenaNoVirtual());
ids_ = p;
}
// @@protoc_insertion_point(field_mutable:milvus.proto.plan.RetrieveResults.ids)
return ids_;
}
inline void RetrieveResults::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.plan.RetrieveResults.ids)
}
// repeated .milvus.proto.schema.FieldData fields_data = 2;
inline int RetrieveResults::fields_data_size() const {
return fields_data_.size();
}
inline ::milvus::proto::schema::FieldData* RetrieveResults::mutable_fields_data(int index) {
// @@protoc_insertion_point(field_mutable:milvus.proto.plan.RetrieveResults.fields_data)
return fields_data_.Mutable(index);
}
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::proto::schema::FieldData >*
RetrieveResults::mutable_fields_data() {
// @@protoc_insertion_point(field_mutable_list:milvus.proto.plan.RetrieveResults.fields_data)
return &fields_data_;
}
inline const ::milvus::proto::schema::FieldData& RetrieveResults::fields_data(int index) const {
// @@protoc_insertion_point(field_get:milvus.proto.plan.RetrieveResults.fields_data)
return fields_data_.Get(index);
}
inline ::milvus::proto::schema::FieldData* RetrieveResults::add_fields_data() {
// @@protoc_insertion_point(field_add:milvus.proto.plan.RetrieveResults.fields_data)
return fields_data_.Add();
}
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::proto::schema::FieldData >&
RetrieveResults::fields_data() const {
// @@protoc_insertion_point(field_list:milvus.proto.plan.RetrieveResults.fields_data)
return fields_data_;
}
#ifdef __GNUC__
#pragma GCC diagnostic pop
#endif // __GNUC__
@ -3490,10 +2992,6 @@ RetrieveResults::fields_data() const {
// -------------------------------------------------------------------
// -------------------------------------------------------------------
// -------------------------------------------------------------------
// @@protoc_insertion_point(namespace_scope)

View File

@ -0,0 +1,803 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: segcore.proto
#include "segcore.pb.h"
#include <algorithm>
#include <google/protobuf/stubs/common.h>
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/extension_set.h>
#include <google/protobuf/wire_format_lite.h>
#include <google/protobuf/descriptor.h>
#include <google/protobuf/generated_message_reflection.h>
#include <google/protobuf/reflection_ops.h>
#include <google/protobuf/wire_format.h>
// @@protoc_insertion_point(includes)
#include <google/protobuf/port_def.inc>
extern PROTOBUF_INTERNAL_EXPORT_schema_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_FieldData_schema_2eproto;
extern PROTOBUF_INTERNAL_EXPORT_schema_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_IDs_schema_2eproto;
namespace milvus {
namespace proto {
namespace segcore {
class RetrieveRequestDefaultTypeInternal {
public:
::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<RetrieveRequest> _instance;
} _RetrieveRequest_default_instance_;
class RetrieveResultsDefaultTypeInternal {
public:
::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<RetrieveResults> _instance;
} _RetrieveResults_default_instance_;
} // namespace segcore
} // namespace proto
} // namespace milvus
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() {
GOOGLE_PROTOBUF_VERIFY_VERSION;
{
void* ptr = &::milvus::proto::segcore::_RetrieveResults_default_instance_;
new (ptr) ::milvus::proto::segcore::RetrieveResults();
::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
}
::milvus::proto::segcore::RetrieveResults::InitAsDefaultInstance();
}
::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_RetrieveResults_segcore_2eproto =
{{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsscc_info_RetrieveResults_segcore_2eproto}, {
&scc_info_IDs_schema_2eproto.base,
&scc_info_FieldData_schema_2eproto.base,}};
static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_segcore_2eproto[2];
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;
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_),
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::milvus::proto::segcore::RetrieveResults, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
PROTOBUF_FIELD_OFFSET(::milvus::proto::segcore::RetrieveResults, ids_),
PROTOBUF_FIELD_OFFSET(::milvus::proto::segcore::RetrieveResults, fields_data_),
};
static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
{ 0, -1, sizeof(::milvus::proto::segcore::RetrieveRequest)},
{ 7, -1, sizeof(::milvus::proto::segcore::RetrieveResults)},
};
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_),
};
const char descriptor_table_protodef_segcore_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
"\n\rsegcore.proto\022\024milvus.proto.segcore\032\014s"
"chema.proto\"O\n\017RetrieveRequest\022%\n\003ids\030\001 "
"\001(\0132\030.milvus.proto.schema.IDs\022\025\n\routput_"
"fields\030\002 \003(\t\"m\n\017RetrieveResults\022%\n\003ids\030\001"
" \001(\0132\030.milvus.proto.schema.IDs\0223\n\013fields"
"_data\030\002 \003(\0132\036.milvus.proto.schema.FieldD"
"ataB6Z4github.com/milvus-io/milvus/inter"
"nal/proto/segcorepbb\006proto3"
;
static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_segcore_2eproto_deps[1] = {
&::descriptor_table_schema_2eproto,
};
static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_segcore_2eproto_sccs[2] = {
&scc_info_RetrieveRequest_segcore_2eproto.base,
&scc_info_RetrieveResults_segcore_2eproto.base,
};
static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_segcore_2eproto_once;
static bool descriptor_table_segcore_2eproto_initialized = false;
const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_segcore_2eproto = {
&descriptor_table_segcore_2eproto_initialized, descriptor_table_protodef_segcore_2eproto, "segcore.proto", 307,
&descriptor_table_segcore_2eproto_once, descriptor_table_segcore_2eproto_sccs, descriptor_table_segcore_2eproto_deps, 2, 1,
schemas, file_default_instances, TableStruct_segcore_2eproto::offsets,
file_level_metadata_segcore_2eproto, 2, file_level_enum_descriptors_segcore_2eproto, file_level_service_descriptors_segcore_2eproto,
};
// Force running AddDescriptors() at dynamic initialization time.
static bool dynamic_init_dummy_segcore_2eproto = ( ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_segcore_2eproto), true);
namespace milvus {
namespace proto {
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_(from.output_fields_) {
_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_.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 string output_fields = 2;
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
ptr -= 1;
do {
ptr += 1;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(add_output_fields(), ptr, ctx, "milvus.proto.segcore.RetrieveRequest.output_fields");
CHK_(ptr);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 18);
} 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 string output_fields = 2;
case 2: {
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) {
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
input, this->add_output_fields()));
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
this->output_fields(this->output_fields_size() - 1).data(),
static_cast<int>(this->output_fields(this->output_fields_size() - 1).length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
"milvus.proto.segcore.RetrieveRequest.output_fields"));
} 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 string output_fields = 2;
for (int i = 0, n = this->output_fields_size(); i < n; i++) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
this->output_fields(i).data(), static_cast<int>(this->output_fields(i).length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
"milvus.proto.segcore.RetrieveRequest.output_fields");
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteString(
2, this->output_fields(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 string output_fields = 2;
for (int i = 0, n = this->output_fields_size(); i < n; i++) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
this->output_fields(i).data(), static_cast<int>(this->output_fields(i).length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
"milvus.proto.segcore.RetrieveRequest.output_fields");
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
WriteStringToArray(2, this->output_fields(i), 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 string output_fields = 2;
total_size += 1 *
::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->output_fields_size());
for (int i = 0, n = this->output_fields_size(); i < n; i++) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->output_fields(i));
}
// .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_.MergeFrom(from.output_fields_);
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_.InternalSwap(CastToBase(&other->output_fields_));
swap(ids_, other->ids_);
}
::PROTOBUF_NAMESPACE_ID::Metadata RetrieveRequest::GetMetadata() const {
return GetMetadataStatic();
}
// ===================================================================
void RetrieveResults::InitAsDefaultInstance() {
::milvus::proto::segcore::_RetrieveResults_default_instance_._instance.get_mutable()->ids_ = const_cast< ::milvus::proto::schema::IDs*>(
::milvus::proto::schema::IDs::internal_default_instance());
}
class RetrieveResults::_Internal {
public:
static const ::milvus::proto::schema::IDs& ids(const RetrieveResults* msg);
};
const ::milvus::proto::schema::IDs&
RetrieveResults::_Internal::ids(const RetrieveResults* msg) {
return *msg->ids_;
}
void RetrieveResults::clear_ids() {
if (GetArenaNoVirtual() == nullptr && ids_ != nullptr) {
delete ids_;
}
ids_ = nullptr;
}
void RetrieveResults::clear_fields_data() {
fields_data_.Clear();
}
RetrieveResults::RetrieveResults()
: ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
SharedCtor();
// @@protoc_insertion_point(constructor:milvus.proto.segcore.RetrieveResults)
}
RetrieveResults::RetrieveResults(const RetrieveResults& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
_internal_metadata_(nullptr),
fields_data_(from.fields_data_) {
_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.RetrieveResults)
}
void RetrieveResults::SharedCtor() {
::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_RetrieveResults_segcore_2eproto.base);
ids_ = nullptr;
}
RetrieveResults::~RetrieveResults() {
// @@protoc_insertion_point(destructor:milvus.proto.segcore.RetrieveResults)
SharedDtor();
}
void RetrieveResults::SharedDtor() {
if (this != internal_default_instance()) delete ids_;
}
void RetrieveResults::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
const RetrieveResults& RetrieveResults::default_instance() {
::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_RetrieveResults_segcore_2eproto.base);
return *internal_default_instance();
}
void RetrieveResults::Clear() {
// @@protoc_insertion_point(message_clear_start:milvus.proto.segcore.RetrieveResults)
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
fields_data_.Clear();
if (GetArenaNoVirtual() == nullptr && ids_ != nullptr) {
delete ids_;
}
ids_ = nullptr;
_internal_metadata_.Clear();
}
#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
const char* RetrieveResults::_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 .milvus.proto.schema.FieldData fields_data = 2;
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
ptr -= 1;
do {
ptr += 1;
ptr = ctx->ParseMessage(add_fields_data(), ptr);
CHK_(ptr);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 18);
} 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 RetrieveResults::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.RetrieveResults)
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 .milvus.proto.schema.FieldData fields_data = 2;
case 2: {
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) {
DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
input, add_fields_data()));
} 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.RetrieveResults)
return true;
failure:
// @@protoc_insertion_point(parse_failure:milvus.proto.segcore.RetrieveResults)
return false;
#undef DO_
}
#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
void RetrieveResults::SerializeWithCachedSizes(
::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:milvus.proto.segcore.RetrieveResults)
::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 .milvus.proto.schema.FieldData fields_data = 2;
for (unsigned int i = 0,
n = static_cast<unsigned int>(this->fields_data_size()); i < n; i++) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
2,
this->fields_data(static_cast<int>(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.RetrieveResults)
}
::PROTOBUF_NAMESPACE_ID::uint8* RetrieveResults::InternalSerializeWithCachedSizesToArray(
::PROTOBUF_NAMESPACE_ID::uint8* target) const {
// @@protoc_insertion_point(serialize_to_array_start:milvus.proto.segcore.RetrieveResults)
::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 .milvus.proto.schema.FieldData fields_data = 2;
for (unsigned int i = 0,
n = static_cast<unsigned int>(this->fields_data_size()); i < n; i++) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessageToArray(
2, this->fields_data(static_cast<int>(i)), 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.RetrieveResults)
return target;
}
size_t RetrieveResults::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:milvus.proto.segcore.RetrieveResults)
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 .milvus.proto.schema.FieldData fields_data = 2;
{
unsigned int count = static_cast<unsigned int>(this->fields_data_size());
total_size += 1UL * count;
for (unsigned int i = 0; i < count; i++) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
this->fields_data(static_cast<int>(i)));
}
}
// .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 RetrieveResults::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:milvus.proto.segcore.RetrieveResults)
GOOGLE_DCHECK_NE(&from, this);
const RetrieveResults* source =
::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<RetrieveResults>(
&from);
if (source == nullptr) {
// @@protoc_insertion_point(generalized_merge_from_cast_fail:milvus.proto.segcore.RetrieveResults)
::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
} else {
// @@protoc_insertion_point(generalized_merge_from_cast_success:milvus.proto.segcore.RetrieveResults)
MergeFrom(*source);
}
}
void RetrieveResults::MergeFrom(const RetrieveResults& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:milvus.proto.segcore.RetrieveResults)
GOOGLE_DCHECK_NE(&from, this);
_internal_metadata_.MergeFrom(from._internal_metadata_);
::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
(void) cached_has_bits;
fields_data_.MergeFrom(from.fields_data_);
if (from.has_ids()) {
mutable_ids()->::milvus::proto::schema::IDs::MergeFrom(from.ids());
}
}
void RetrieveResults::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:milvus.proto.segcore.RetrieveResults)
if (&from == this) return;
Clear();
MergeFrom(from);
}
void RetrieveResults::CopyFrom(const RetrieveResults& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:milvus.proto.segcore.RetrieveResults)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool RetrieveResults::IsInitialized() const {
return true;
}
void RetrieveResults::InternalSwap(RetrieveResults* other) {
using std::swap;
_internal_metadata_.Swap(&other->_internal_metadata_);
CastToBase(&fields_data_)->InternalSwap(CastToBase(&other->fields_data_));
swap(ids_, other->ids_);
}
::PROTOBUF_NAMESPACE_ID::Metadata RetrieveResults::GetMetadata() const {
return GetMetadataStatic();
}
// @@protoc_insertion_point(namespace_scope)
} // namespace segcore
} // namespace proto
} // namespace milvus
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) {
return Arena::CreateInternal< ::milvus::proto::segcore::RetrieveResults >(arena);
}
PROTOBUF_NAMESPACE_CLOSE
// @@protoc_insertion_point(global_scope)
#include <google/protobuf/port_undef.inc>

View File

@ -0,0 +1,590 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: segcore.proto
#ifndef GOOGLE_PROTOBUF_INCLUDED_segcore_2eproto
#define GOOGLE_PROTOBUF_INCLUDED_segcore_2eproto
#include <limits>
#include <string>
#include <google/protobuf/port_def.inc>
#if PROTOBUF_VERSION < 3009000
#error This file was generated by a newer version of protoc which is
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
#if 3009000 < PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.
#endif
#include <google/protobuf/port_undef.inc>
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/arena.h>
#include <google/protobuf/arenastring.h>
#include <google/protobuf/generated_message_table_driven.h>
#include <google/protobuf/generated_message_util.h>
#include <google/protobuf/inlined_string_field.h>
#include <google/protobuf/metadata.h>
#include <google/protobuf/generated_message_reflection.h>
#include <google/protobuf/message.h>
#include <google/protobuf/repeated_field.h> // IWYU pragma: export
#include <google/protobuf/extension_set.h> // IWYU pragma: export
#include <google/protobuf/unknown_field_set.h>
#include "schema.pb.h"
// @@protoc_insertion_point(includes)
#include <google/protobuf/port_def.inc>
#define PROTOBUF_INTERNAL_EXPORT_segcore_2eproto
PROTOBUF_NAMESPACE_OPEN
namespace internal {
class AnyMetadata;
} // namespace internal
PROTOBUF_NAMESPACE_CLOSE
// Internal implementation detail -- do not use these members.
struct TableStruct_segcore_2eproto {
static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[]
PROTOBUF_SECTION_VARIABLE(protodesc_cold);
static const ::PROTOBUF_NAMESPACE_ID::internal::AuxillaryParseTableField aux[]
PROTOBUF_SECTION_VARIABLE(protodesc_cold);
static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[2]
PROTOBUF_SECTION_VARIABLE(protodesc_cold);
static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[];
static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[];
static const ::PROTOBUF_NAMESPACE_ID::uint32 offsets[];
};
extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_segcore_2eproto;
namespace milvus {
namespace proto {
namespace segcore {
class RetrieveRequest;
class RetrieveRequestDefaultTypeInternal;
extern RetrieveRequestDefaultTypeInternal _RetrieveRequest_default_instance_;
class RetrieveResults;
class RetrieveResultsDefaultTypeInternal;
extern RetrieveResultsDefaultTypeInternal _RetrieveResults_default_instance_;
} // namespace segcore
} // namespace proto
} // namespace milvus
PROTOBUF_NAMESPACE_OPEN
template<> ::milvus::proto::segcore::RetrieveRequest* Arena::CreateMaybeMessage<::milvus::proto::segcore::RetrieveRequest>(Arena*);
template<> ::milvus::proto::segcore::RetrieveResults* Arena::CreateMaybeMessage<::milvus::proto::segcore::RetrieveResults>(Arena*);
PROTOBUF_NAMESPACE_CLOSE
namespace milvus {
namespace proto {
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 {
kOutputFieldsFieldNumber = 2,
kIdsFieldNumber = 1,
};
// repeated string output_fields = 2;
int output_fields_size() const;
void clear_output_fields();
const std::string& output_fields(int index) const;
std::string* mutable_output_fields(int index);
void set_output_fields(int index, const std::string& value);
void set_output_fields(int index, std::string&& value);
void set_output_fields(int index, const char* value);
void set_output_fields(int index, const char* value, size_t size);
std::string* add_output_fields();
void add_output_fields(const std::string& value);
void add_output_fields(std::string&& value);
void add_output_fields(const char* value);
void add_output_fields(const char* value, size_t size);
const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<std::string>& output_fields() const;
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<std::string>* mutable_output_fields();
// .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::RepeatedPtrField<std::string> output_fields_;
::milvus::proto::schema::IDs* ids_;
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
friend struct ::TableStruct_segcore_2eproto;
};
// -------------------------------------------------------------------
class RetrieveResults :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:milvus.proto.segcore.RetrieveResults) */ {
public:
RetrieveResults();
virtual ~RetrieveResults();
RetrieveResults(const RetrieveResults& from);
RetrieveResults(RetrieveResults&& from) noexcept
: RetrieveResults() {
*this = ::std::move(from);
}
inline RetrieveResults& operator=(const RetrieveResults& from) {
CopyFrom(from);
return *this;
}
inline RetrieveResults& operator=(RetrieveResults&& 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 RetrieveResults& default_instance();
static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY
static inline const RetrieveResults* internal_default_instance() {
return reinterpret_cast<const RetrieveResults*>(
&_RetrieveResults_default_instance_);
}
static constexpr int kIndexInFileMessages =
1;
friend void swap(RetrieveResults& a, RetrieveResults& b) {
a.Swap(&b);
}
inline void Swap(RetrieveResults* other) {
if (other == this) return;
InternalSwap(other);
}
// implements Message ----------------------------------------------
inline RetrieveResults* New() const final {
return CreateMaybeMessage<RetrieveResults>(nullptr);
}
RetrieveResults* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final {
return CreateMaybeMessage<RetrieveResults>(arena);
}
void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
void CopyFrom(const RetrieveResults& from);
void MergeFrom(const RetrieveResults& 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(RetrieveResults* other);
friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
return "milvus.proto.segcore.RetrieveResults";
}
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 {
kFieldsDataFieldNumber = 2,
kIdsFieldNumber = 1,
};
// repeated .milvus.proto.schema.FieldData fields_data = 2;
int fields_data_size() const;
void clear_fields_data();
::milvus::proto::schema::FieldData* mutable_fields_data(int index);
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::proto::schema::FieldData >*
mutable_fields_data();
const ::milvus::proto::schema::FieldData& fields_data(int index) const;
::milvus::proto::schema::FieldData* add_fields_data();
const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::proto::schema::FieldData >&
fields_data() const;
// .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.RetrieveResults)
private:
class _Internal;
::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_;
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::proto::schema::FieldData > fields_data_;
::milvus::proto::schema::IDs* ids_;
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
friend struct ::TableStruct_segcore_2eproto;
};
// ===================================================================
// ===================================================================
#ifdef __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
#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 string output_fields = 2;
inline int RetrieveRequest::output_fields_size() const {
return output_fields_.size();
}
inline void RetrieveRequest::clear_output_fields() {
output_fields_.Clear();
}
inline const std::string& RetrieveRequest::output_fields(int index) const {
// @@protoc_insertion_point(field_get:milvus.proto.segcore.RetrieveRequest.output_fields)
return output_fields_.Get(index);
}
inline std::string* RetrieveRequest::mutable_output_fields(int index) {
// @@protoc_insertion_point(field_mutable:milvus.proto.segcore.RetrieveRequest.output_fields)
return output_fields_.Mutable(index);
}
inline void RetrieveRequest::set_output_fields(int index, const std::string& value) {
// @@protoc_insertion_point(field_set:milvus.proto.segcore.RetrieveRequest.output_fields)
output_fields_.Mutable(index)->assign(value);
}
inline void RetrieveRequest::set_output_fields(int index, std::string&& value) {
// @@protoc_insertion_point(field_set:milvus.proto.segcore.RetrieveRequest.output_fields)
output_fields_.Mutable(index)->assign(std::move(value));
}
inline void RetrieveRequest::set_output_fields(int index, const char* value) {
GOOGLE_DCHECK(value != nullptr);
output_fields_.Mutable(index)->assign(value);
// @@protoc_insertion_point(field_set_char:milvus.proto.segcore.RetrieveRequest.output_fields)
}
inline void RetrieveRequest::set_output_fields(int index, const char* value, size_t size) {
output_fields_.Mutable(index)->assign(
reinterpret_cast<const char*>(value), size);
// @@protoc_insertion_point(field_set_pointer:milvus.proto.segcore.RetrieveRequest.output_fields)
}
inline std::string* RetrieveRequest::add_output_fields() {
// @@protoc_insertion_point(field_add_mutable:milvus.proto.segcore.RetrieveRequest.output_fields)
return output_fields_.Add();
}
inline void RetrieveRequest::add_output_fields(const std::string& value) {
output_fields_.Add()->assign(value);
// @@protoc_insertion_point(field_add:milvus.proto.segcore.RetrieveRequest.output_fields)
}
inline void RetrieveRequest::add_output_fields(std::string&& value) {
output_fields_.Add(std::move(value));
// @@protoc_insertion_point(field_add:milvus.proto.segcore.RetrieveRequest.output_fields)
}
inline void RetrieveRequest::add_output_fields(const char* value) {
GOOGLE_DCHECK(value != nullptr);
output_fields_.Add()->assign(value);
// @@protoc_insertion_point(field_add_char:milvus.proto.segcore.RetrieveRequest.output_fields)
}
inline void RetrieveRequest::add_output_fields(const char* value, size_t size) {
output_fields_.Add()->assign(reinterpret_cast<const char*>(value), size);
// @@protoc_insertion_point(field_add_pointer:milvus.proto.segcore.RetrieveRequest.output_fields)
}
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<std::string>&
RetrieveRequest::output_fields() const {
// @@protoc_insertion_point(field_list:milvus.proto.segcore.RetrieveRequest.output_fields)
return output_fields_;
}
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<std::string>*
RetrieveRequest::mutable_output_fields() {
// @@protoc_insertion_point(field_mutable_list:milvus.proto.segcore.RetrieveRequest.output_fields)
return &output_fields_;
}
// -------------------------------------------------------------------
// RetrieveResults
// .milvus.proto.schema.IDs ids = 1;
inline bool RetrieveResults::has_ids() const {
return this != internal_default_instance() && ids_ != nullptr;
}
inline const ::milvus::proto::schema::IDs& RetrieveResults::ids() const {
const ::milvus::proto::schema::IDs* p = ids_;
// @@protoc_insertion_point(field_get:milvus.proto.segcore.RetrieveResults.ids)
return p != nullptr ? *p : *reinterpret_cast<const ::milvus::proto::schema::IDs*>(
&::milvus::proto::schema::_IDs_default_instance_);
}
inline ::milvus::proto::schema::IDs* RetrieveResults::release_ids() {
// @@protoc_insertion_point(field_release:milvus.proto.segcore.RetrieveResults.ids)
::milvus::proto::schema::IDs* temp = ids_;
ids_ = nullptr;
return temp;
}
inline ::milvus::proto::schema::IDs* RetrieveResults::mutable_ids() {
if (ids_ == nullptr) {
auto* p = CreateMaybeMessage<::milvus::proto::schema::IDs>(GetArenaNoVirtual());
ids_ = p;
}
// @@protoc_insertion_point(field_mutable:milvus.proto.segcore.RetrieveResults.ids)
return ids_;
}
inline void RetrieveResults::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.RetrieveResults.ids)
}
// repeated .milvus.proto.schema.FieldData fields_data = 2;
inline int RetrieveResults::fields_data_size() const {
return fields_data_.size();
}
inline ::milvus::proto::schema::FieldData* RetrieveResults::mutable_fields_data(int index) {
// @@protoc_insertion_point(field_mutable:milvus.proto.segcore.RetrieveResults.fields_data)
return fields_data_.Mutable(index);
}
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::proto::schema::FieldData >*
RetrieveResults::mutable_fields_data() {
// @@protoc_insertion_point(field_mutable_list:milvus.proto.segcore.RetrieveResults.fields_data)
return &fields_data_;
}
inline const ::milvus::proto::schema::FieldData& RetrieveResults::fields_data(int index) const {
// @@protoc_insertion_point(field_get:milvus.proto.segcore.RetrieveResults.fields_data)
return fields_data_.Get(index);
}
inline ::milvus::proto::schema::FieldData* RetrieveResults::add_fields_data() {
// @@protoc_insertion_point(field_add:milvus.proto.segcore.RetrieveResults.fields_data)
return fields_data_.Add();
}
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::milvus::proto::schema::FieldData >&
RetrieveResults::fields_data() const {
// @@protoc_insertion_point(field_list:milvus.proto.segcore.RetrieveResults.fields_data)
return fields_data_;
}
#ifdef __GNUC__
#pragma GCC diagnostic pop
#endif // __GNUC__
// -------------------------------------------------------------------
// @@protoc_insertion_point(namespace_scope)
} // namespace segcore
} // namespace proto
} // namespace milvus
// @@protoc_insertion_point(global_scope)
#include <google/protobuf/port_undef.inc>
#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_segcore_2eproto

View File

@ -480,7 +480,7 @@ GetNumOfQueries(const PlaceholderGroup* group) {
}
[[maybe_unused]] std::unique_ptr<RetrievePlan>
CreateRetrievePlan(const Schema& schema, proto::plan::RetrieveRequest&& request) {
CreateRetrievePlan(const Schema& schema, proto::segcore::RetrieveRequest&& request) {
auto plan = std::make_unique<RetrievePlan>();
plan->ids_ = std::unique_ptr<proto::schema::IDs>(request.release_ids());
for (auto& field_name : request.output_fields()) {

View File

@ -15,6 +15,7 @@
#include <string>
#include "common/Schema.h"
#include "pb/plan.pb.h"
#include "pb/segcore.pb.h"
namespace milvus::query {
// NOTE: APIs for C wrapper
@ -38,7 +39,7 @@ int64_t
GetNumOfQueries(const PlaceholderGroup*);
std::unique_ptr<RetrievePlan>
CreateRetrievePlan(const Schema& schema, proto::plan::RetrieveRequest&& request);
CreateRetrievePlan(const Schema& schema, proto::segcore::RetrieveRequest&& request);
// Query Overall TopK from Plan
// Used to alloc result memory at Go side

View File

@ -190,11 +190,11 @@ SegmentInternalInterface::BulkSubScript(FieldOffset field_offset, const SegOffse
}
}
std::unique_ptr<proto::plan::RetrieveResults>
std::unique_ptr<proto::segcore::RetrieveResults>
SegmentInternalInterface::GetEntityById(const std::vector<FieldOffset>& field_offsets,
const IdArray& id_array,
Timestamp timestamp) const {
auto results = std::make_unique<proto::plan::RetrieveResults>();
auto results = std::make_unique<proto::segcore::RetrieveResults>();
auto [ids_, seg_offsets] = search_ids(id_array, timestamp);

View File

@ -19,6 +19,7 @@
#include "common/SystemProperty.h"
#include "query/PlanNode.h"
#include "pb/schema.pb.h"
#include "pb/segcore.pb.h"
#include <memory>
#include <vector>
#include <utility>
@ -40,7 +41,7 @@ class SegmentInterface {
const Timestamp timestamps[],
int64_t num_groups) const = 0;
virtual std::unique_ptr<proto::plan::RetrieveResults>
virtual std::unique_ptr<proto::segcore::RetrieveResults>
GetEntityById(const std::vector<FieldOffset>& field_offsets,
const IdArray& id_array,
Timestamp timestamp) const = 0;
@ -89,7 +90,7 @@ class SegmentInternalInterface : public SegmentInterface {
void
FillTargetEntry(const query::Plan* plan, QueryResult& results) const override;
std::unique_ptr<proto::plan::RetrieveResults>
std::unique_ptr<proto::segcore::RetrieveResults>
GetEntityById(const std::vector<FieldOffset>& field_offsets,
const IdArray& id_array,
Timestamp timestamp) const override;

View File

@ -12,6 +12,7 @@
#include "segcore/plan_c.h"
#include "query/Plan.h"
#include "segcore/Collection.h"
#include "pb/segcore.pb.h"
CStatus
CreatePlan(CCollection c_col, const char* dsl, CPlan* res_plan) {
@ -135,7 +136,7 @@ CStatus
CreateRetrievePlan(CCollection c_col, CProto retrieve_request, CRetrievePlan* output) {
auto col = (milvus::segcore::Collection*)c_col;
try {
milvus::proto::plan::RetrieveRequest request;
milvus::proto::segcore::RetrieveRequest request;
request.ParseFromArray(retrieve_request.proto_blob, retrieve_request.proto_size);
auto plan = milvus::query::CreateRetrievePlan(*col->get_schema(), std::move(request));
*output = plan.release();

View File

@ -1,5 +0,0 @@
syntax = "proto3";
package milvus.proto.plan;
option go_package = "github.com/milvus-io/milvus/internal/proto/cgo";
import "schema.proto";

View File

@ -88,13 +88,3 @@ message PlanNode {
VectorANNS vector_anns = 1;
}
}
message RetrieveRequest {
schema.IDs ids = 1;
repeated string output_fields = 2;
}
message RetrieveResults {
schema.IDs ids = 1;
repeated schema.FieldData fields_data = 2;
}

View File

@ -777,100 +777,6 @@ func (*PlanNode) XXX_OneofWrappers() []interface{} {
}
}
type RetrieveRequest struct {
Ids *schemapb.IDs `protobuf:"bytes,1,opt,name=ids,proto3" json:"ids,omitempty"`
OutputFields []string `protobuf:"bytes,2,rep,name=output_fields,json=outputFields,proto3" json:"output_fields,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_2d655ab2f7683c23, []int{10}
}
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) GetOutputFields() []string {
if m != nil {
return m.OutputFields
}
return nil
}
type RetrieveResults struct {
Ids *schemapb.IDs `protobuf:"bytes,1,opt,name=ids,proto3" json:"ids,omitempty"`
FieldsData []*schemapb.FieldData `protobuf:"bytes,2,rep,name=fields_data,json=fieldsData,proto3" json:"fields_data,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *RetrieveResults) Reset() { *m = RetrieveResults{} }
func (m *RetrieveResults) String() string { return proto.CompactTextString(m) }
func (*RetrieveResults) ProtoMessage() {}
func (*RetrieveResults) Descriptor() ([]byte, []int) {
return fileDescriptor_2d655ab2f7683c23, []int{11}
}
func (m *RetrieveResults) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_RetrieveResults.Unmarshal(m, b)
}
func (m *RetrieveResults) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_RetrieveResults.Marshal(b, m, deterministic)
}
func (m *RetrieveResults) XXX_Merge(src proto.Message) {
xxx_messageInfo_RetrieveResults.Merge(m, src)
}
func (m *RetrieveResults) XXX_Size() int {
return xxx_messageInfo_RetrieveResults.Size(m)
}
func (m *RetrieveResults) XXX_DiscardUnknown() {
xxx_messageInfo_RetrieveResults.DiscardUnknown(m)
}
var xxx_messageInfo_RetrieveResults proto.InternalMessageInfo
func (m *RetrieveResults) GetIds() *schemapb.IDs {
if m != nil {
return m.Ids
}
return nil
}
func (m *RetrieveResults) GetFieldsData() []*schemapb.FieldData {
if m != nil {
return m.FieldsData
}
return nil
}
func init() {
proto.RegisterEnum("milvus.proto.plan.RangeExpr_OpType", RangeExpr_OpType_name, RangeExpr_OpType_value)
proto.RegisterEnum("milvus.proto.plan.UnaryExpr_UnaryOp", UnaryExpr_UnaryOp_name, UnaryExpr_UnaryOp_value)
@ -885,72 +791,65 @@ func init() {
proto.RegisterType((*Expr)(nil), "milvus.proto.plan.Expr")
proto.RegisterType((*VectorANNS)(nil), "milvus.proto.plan.VectorANNS")
proto.RegisterType((*PlanNode)(nil), "milvus.proto.plan.PlanNode")
proto.RegisterType((*RetrieveRequest)(nil), "milvus.proto.plan.RetrieveRequest")
proto.RegisterType((*RetrieveResults)(nil), "milvus.proto.plan.RetrieveResults")
}
func init() { proto.RegisterFile("plan.proto", fileDescriptor_2d655ab2f7683c23) }
var fileDescriptor_2d655ab2f7683c23 = []byte{
// 951 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x55, 0x4f, 0x6f, 0x1b, 0x45,
0x14, 0xcf, 0xee, 0x3a, 0xc9, 0xee, 0xb3, 0xeb, 0x98, 0xb9, 0x60, 0x08, 0x25, 0xd1, 0xb6, 0x82,
0x08, 0xd4, 0x44, 0xb8, 0x25, 0x95, 0x8a, 0x0a, 0x24, 0xa4, 0x34, 0x16, 0x95, 0x13, 0x06, 0x93,
0x03, 0x97, 0xd5, 0x78, 0x77, 0x6c, 0x8f, 0x3a, 0x9e, 0xd9, 0xcc, 0xce, 0x5a, 0xf5, 0x85, 0x0b,
0x37, 0x6e, 0x7c, 0x09, 0x2e, 0x7c, 0x21, 0xee, 0x7c, 0x11, 0x34, 0x33, 0x1b, 0xff, 0x41, 0x4e,
0x50, 0xa5, 0xde, 0xde, 0xbf, 0xdf, 0xfb, 0x3f, 0x6f, 0x00, 0x72, 0x4e, 0xc4, 0x61, 0xae, 0xa4,
0x96, 0xe8, 0xbd, 0x09, 0xe3, 0xd3, 0xb2, 0x70, 0xdc, 0xa1, 0x51, 0x7c, 0xd8, 0x28, 0xd2, 0x31,
0x9d, 0x10, 0x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c6, 0xc8, 0x7c, 0x3c, 0xb2, 0xd4, 0x79, 0xa9, 0x13, 0xdb, 0x45, 0x77, 0x36, 0x22, 0xdc,
0x70, 0xc2, 0xef, 0xad, 0x2c, 0xfe, 0x75, 0x39, 0x46, 0x51, 0x72, 0x5d, 0xbc, 0x55, 0x8c, 0x6f,
0xa0, 0xee, 0x9c, 0x27, 0xe6, 0x93, 0xa9, 0x0e, 0xd3, 0xc7, 0x6b, 0x31, 0x36, 0xa0, 0xf9, 0x94,
0x30, 0x38, 0x88, 0xa1, 0x4f, 0x1f, 0xff, 0xf2, 0xc5, 0x88, 0xe9, 0x71, 0x39, 0x38, 0x4c, 0xe5,
0xe4, 0xc8, 0xe1, 0x1e, 0x31, 0x59, 0x51, 0x47, 0x4c, 0x68, 0xaa, 0x04, 0xe1, 0x47, 0xd6, 0xd5,
0x91, 0xe9, 0x5b, 0x3e, 0x18, 0x6c, 0x59, 0xee, 0xf1, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x6d,
0xf2, 0x58, 0xac, 0x3c, 0x08, 0x00, 0x00,
// 872 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x54, 0x4d, 0x6f, 0x1b, 0x37,
0x13, 0xd6, 0xee, 0xea, 0x63, 0x77, 0xa4, 0x28, 0x7a, 0x79, 0x79, 0xd5, 0xba, 0x81, 0x85, 0x4d,
0xd0, 0x0a, 0x28, 0x22, 0xa3, 0x4a, 0xea, 0x00, 0x29, 0x52, 0xd4, 0x6e, 0x82, 0xd8, 0x68, 0x20,
0xbb, 0x5b, 0xd5, 0x87, 0x5e, 0x16, 0xd4, 0x2e, 0x25, 0x11, 0xa1, 0x48, 0x9a, 0x4b, 0x09, 0xd1,
0xb9, 0xb7, 0xde, 0xfa, 0x27, 0x7a, 0xe9, 0x1f, 0xea, 0xbd, 0x7f, 0xa4, 0x20, 0xb9, 0x96, 0xac,
0x42,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, 0x1d, 0x17, 0x39, 0x39, 0x7d, 0xf6, 0xd3, 0x17, 0x33, 0xaa, 0xe7, 0xcb, 0xc9, 0x20,
0x13, 0x8b, 0x23, 0x97, 0xe0, 0x29, 0x15, 0xe5, 0xeb, 0x88, 0x72, 0x4d, 0x14, 0xc7, 0xec, 0xc8,
0xe6, 0x3c, 0x32, 0x39, 0xe5, 0x64, 0x52, 0xb7, 0xd2, 0xb3, 0xbf, 0x02, 0x00, 0x00, 0xff, 0xff,
0x11, 0x2c, 0xa8, 0xdc, 0x58, 0x07, 0x00, 0x00,
}

View File

@ -0,0 +1,16 @@
syntax = "proto3";
package milvus.proto.segcore;
option go_package = "github.com/milvus-io/milvus/internal/proto/segcorepb";
import "schema.proto";
message RetrieveRequest {
schema.IDs ids = 1;
repeated string output_fields = 2;
}
message RetrieveResults {
schema.IDs ids = 1;
repeated schema.FieldData fields_data = 2;
}

View File

@ -0,0 +1,141 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: segcore.proto
package segcorepb
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
schemapb "github.com/milvus-io/milvus/internal/proto/schemapb"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
type RetrieveRequest struct {
Ids *schemapb.IDs `protobuf:"bytes,1,opt,name=ids,proto3" json:"ids,omitempty"`
OutputFields []string `protobuf:"bytes,2,rep,name=output_fields,json=outputFields,proto3" json:"output_fields,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) GetOutputFields() []string {
if m != nil {
return m.OutputFields
}
return nil
}
type RetrieveResults struct {
Ids *schemapb.IDs `protobuf:"bytes,1,opt,name=ids,proto3" json:"ids,omitempty"`
FieldsData []*schemapb.FieldData `protobuf:"bytes,2,rep,name=fields_data,json=fieldsData,proto3" json:"fields_data,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *RetrieveResults) Reset() { *m = RetrieveResults{} }
func (m *RetrieveResults) String() string { return proto.CompactTextString(m) }
func (*RetrieveResults) ProtoMessage() {}
func (*RetrieveResults) Descriptor() ([]byte, []int) {
return fileDescriptor_1d79fce784797357, []int{1}
}
func (m *RetrieveResults) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_RetrieveResults.Unmarshal(m, b)
}
func (m *RetrieveResults) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_RetrieveResults.Marshal(b, m, deterministic)
}
func (m *RetrieveResults) XXX_Merge(src proto.Message) {
xxx_messageInfo_RetrieveResults.Merge(m, src)
}
func (m *RetrieveResults) XXX_Size() int {
return xxx_messageInfo_RetrieveResults.Size(m)
}
func (m *RetrieveResults) XXX_DiscardUnknown() {
xxx_messageInfo_RetrieveResults.DiscardUnknown(m)
}
var xxx_messageInfo_RetrieveResults proto.InternalMessageInfo
func (m *RetrieveResults) GetIds() *schemapb.IDs {
if m != nil {
return m.Ids
}
return nil
}
func (m *RetrieveResults) GetFieldsData() []*schemapb.FieldData {
if m != nil {
return m.FieldsData
}
return nil
}
func init() {
proto.RegisterType((*RetrieveRequest)(nil), "milvus.proto.segcore.RetrieveRequest")
proto.RegisterType((*RetrieveResults)(nil), "milvus.proto.segcore.RetrieveResults")
}
func init() { proto.RegisterFile("segcore.proto", fileDescriptor_1d79fce784797357) }
var fileDescriptor_1d79fce784797357 = []byte{
// 222 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x90, 0xb1, 0x4b, 0xc4, 0x30,
0x14, 0xc6, 0x39, 0x0f, 0x04, 0xd3, 0x3b, 0x84, 0xe2, 0x50, 0x1c, 0xe4, 0x38, 0x97, 0x43, 0x30,
0x81, 0x2a, 0xae, 0x82, 0x14, 0xc1, 0x35, 0xa3, 0x4b, 0x49, 0xda, 0x67, 0x1b, 0x48, 0x9b, 0x9a,
0xf7, 0xd2, 0xd1, 0xbf, 0x5d, 0x9a, 0x74, 0x50, 0x70, 0x71, 0xfb, 0xf2, 0x25, 0xbf, 0xef, 0x07,
0x61, 0x7b, 0x84, 0xae, 0x71, 0x1e, 0xf8, 0xe4, 0x1d, 0xb9, 0xfc, 0x6a, 0x30, 0x76, 0x0e, 0x98,
0x4e, 0x7c, 0xbd, 0xbb, 0xde, 0x61, 0xd3, 0xc3, 0xa0, 0x52, 0x7b, 0xd4, 0xec, 0x52, 0x02, 0x79,
0x03, 0x33, 0x48, 0xf8, 0x0c, 0x80, 0x94, 0xdf, 0xb1, 0xad, 0x69, 0xb1, 0xd8, 0x1c, 0x36, 0xa7,
0xac, 0x2c, 0xf8, 0xef, 0x91, 0xc4, 0xbe, 0x55, 0x28, 0x97, 0x47, 0xf9, 0x2d, 0xdb, 0xbb, 0x40,
0x53, 0xa0, 0xfa, 0xc3, 0x80, 0x6d, 0xb1, 0x38, 0x3b, 0x6c, 0x4f, 0x17, 0x72, 0x97, 0xca, 0xd7,
0xd8, 0x1d, 0xbf, 0x7e, 0x3a, 0x30, 0x58, 0xc2, 0x7f, 0x39, 0x9e, 0x59, 0x96, 0xc6, 0xeb, 0x56,
0x91, 0x8a, 0x86, 0xac, 0xbc, 0xf9, 0x93, 0x89, 0xc2, 0x4a, 0x91, 0x92, 0x2c, 0x21, 0x4b, 0x7e,
0x79, 0x7a, 0x7f, 0xec, 0x0c, 0xf5, 0x41, 0xf3, 0xc6, 0x0d, 0x22, 0x71, 0xf7, 0xc6, 0xad, 0x49,
0x98, 0x91, 0xc0, 0x8f, 0xca, 0x8a, 0x38, 0x25, 0xd6, 0x7f, 0x9a, 0xb4, 0x3e, 0x8f, 0xc5, 0xc3,
0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0xed, 0xbc, 0x2b, 0xca, 0x57, 0x01, 0x00, 0x00,
}

View File

@ -24,7 +24,7 @@ import (
"errors"
"unsafe"
"github.com/milvus-io/milvus/internal/proto/planpb"
"github.com/milvus-io/milvus/internal/proto/segcorepb"
)
type Plan struct {
@ -110,7 +110,7 @@ type RetrievePlan struct {
Timestamp uint64
}
func createRetrievePlan(col *Collection, msg *planpb.RetrieveRequest, timestamp uint64) (*RetrievePlan, error) {
func createRetrievePlan(col *Collection, msg *segcorepb.RetrieveRequest, timestamp uint64) (*RetrievePlan, error) {
protoCGo, err := MarshalForCGo(msg)
if err != nil {
return nil, err

View File

@ -27,7 +27,7 @@ import (
"github.com/milvus-io/milvus/internal/msgstream"
"github.com/milvus-io/milvus/internal/proto/commonpb"
"github.com/milvus-io/milvus/internal/proto/internalpb"
"github.com/milvus-io/milvus/internal/proto/planpb"
"github.com/milvus-io/milvus/internal/proto/segcorepb"
"github.com/milvus-io/milvus/internal/util/trace"
"github.com/milvus-io/milvus/internal/util/tsoutil"
)
@ -317,15 +317,15 @@ func (rc *retrieveCollection) doUnsolvedMsgRetrieve() {
}
}
func mergeRetrieveResults(dataArr []*planpb.RetrieveResults) (*planpb.RetrieveResults, error) {
var final *planpb.RetrieveResults
func mergeRetrieveResults(dataArr []*segcorepb.RetrieveResults) (*segcorepb.RetrieveResults, error) {
var final *segcorepb.RetrieveResults
for _, data := range dataArr {
if data == nil {
continue
}
if final == nil {
final = proto.Clone(data).(*planpb.RetrieveResults)
final = proto.Clone(data).(*segcorepb.RetrieveResults)
continue
}
@ -360,7 +360,7 @@ func (rc *retrieveCollection) retrieve(retrieveMsg *msgstream.RetrieveMsg) error
return err
}
req := &planpb.RetrieveRequest{
req := &segcorepb.RetrieveRequest{
Ids: retrieveMsg.Ids,
OutputFields: retrieveMsg.OutputFields,
}
@ -401,7 +401,7 @@ func (rc *retrieveCollection) retrieve(retrieveMsg *msgstream.RetrieveMsg) error
}
}
var mergeList []*planpb.RetrieveResults
var mergeList []*segcorepb.RetrieveResults
for _, partitionID := range partitionIDsInHistorical {
segmentIDs, err := rc.historical.replica.getSegmentIDs(partitionID)
if err != nil {

View File

@ -5,8 +5,8 @@ import (
"github.com/stretchr/testify/assert"
"github.com/milvus-io/milvus/internal/proto/planpb"
"github.com/milvus-io/milvus/internal/proto/schemapb"
"github.com/milvus-io/milvus/internal/proto/segcorepb"
)
func TestRetrieve_Merge(t *testing.T) {
@ -35,7 +35,7 @@ func TestRetrieve_Merge(t *testing.T) {
},
}
subRes := &planpb.RetrieveResults{
subRes := &segcorepb.RetrieveResults{
Ids: &schemapb.IDs{
IdField: &schemapb.IDs_IntId{
IntId: &schemapb.LongArray{
@ -48,7 +48,7 @@ func TestRetrieve_Merge(t *testing.T) {
col2,
},
}
finalRes, err := mergeRetrieveResults([]*planpb.RetrieveResults{subRes, subRes})
finalRes, err := mergeRetrieveResults([]*segcorepb.RetrieveResults{subRes, subRes})
assert.NoError(t, err)
println(finalRes.String())
}

View File

@ -25,7 +25,6 @@ import "C"
import (
"errors"
"fmt"
"github.com/milvus-io/milvus/internal/proto/planpb"
"strconv"
"sync"
"unsafe"
@ -35,6 +34,7 @@ import (
"github.com/milvus-io/milvus/internal/log"
"github.com/milvus-io/milvus/internal/proto/commonpb"
"github.com/milvus-io/milvus/internal/proto/segcorepb"
)
type segmentType int32
@ -249,9 +249,9 @@ func (s *Segment) segmentSearch(plan *Plan,
return &searchResult, nil
}
func (s *Segment) segmentGetEntityByIds(plan *RetrievePlan) (*planpb.RetrieveResults, error) {
func (s *Segment) segmentGetEntityByIds(plan *RetrievePlan) (*segcorepb.RetrieveResults, error) {
resProto := C.GetEntityByIds(s.segmentPtr, plan.RetrievePlanPtr, C.uint64_t(plan.Timestamp))
result := new(planpb.RetrieveResults)
result := new(segcorepb.RetrieveResults)
err := HandleCProtoResult(&resProto, result)
if err != nil {
return nil, err

View File

@ -22,8 +22,8 @@ import (
"github.com/milvus-io/milvus/internal/proto/commonpb"
"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/segcorepb"
)
//-------------------------------------------------------------------------------------- constructor and destructor
@ -145,7 +145,7 @@ func TestSegment_retrieve(t *testing.T) {
err = segment.segmentInsert(offset, &ids, &timestamps, &records)
assert.NoError(t, err)
reqIds := &planpb.RetrieveRequest{
reqIds := &segcorepb.RetrieveRequest{
Ids: &schemapb.IDs{
IdField: &schemapb.IDs_IntId{
IntId: &schemapb.LongArray{

View File

@ -51,5 +51,6 @@ ${protoc} --go_out=plugins=grpc,paths=source_relative:./indexpb index_service.pr
${protoc} --go_out=plugins=grpc,paths=source_relative:./datapb data_service.proto
${protoc} --go_out=plugins=grpc,paths=source_relative:./querypb query_service.proto
${protoc} --go_out=plugins=grpc,paths=source_relative:./planpb plan.proto
${protoc} --go_out=plugins=grpc,paths=source_relative:./segcorepb segcore.proto
popd