mirror of https://github.com/milvus-io/milvus.git
Add Query impl in proxynode (#5644)
Signed-off-by: Xiangyu Wang <xiangyu.wang@zilliz.com>pull/5656/head
parent
6530974932
commit
68f703f983
|
@ -279,6 +279,8 @@ const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_plan_2eproto::offsets[] PROTOB
|
|||
~0u, // no _weak_field_map_
|
||||
PROTOBUF_FIELD_OFFSET(::milvus::proto::plan::ColumnInfo, field_id_),
|
||||
PROTOBUF_FIELD_OFFSET(::milvus::proto::plan::ColumnInfo, data_type_),
|
||||
PROTOBUF_FIELD_OFFSET(::milvus::proto::plan::ColumnInfo, is_primary_key_),
|
||||
PROTOBUF_FIELD_OFFSET(::milvus::proto::plan::ColumnInfo, is_autoid_),
|
||||
~0u, // no _has_bits_
|
||||
PROTOBUF_FIELD_OFFSET(::milvus::proto::plan::RangeExpr, _internal_metadata_),
|
||||
~0u, // no _extensions_
|
||||
|
@ -355,15 +357,15 @@ static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOB
|
|||
{ 0, -1, sizeof(::milvus::proto::plan::GenericValue)},
|
||||
{ 9, -1, sizeof(::milvus::proto::plan::QueryInfo)},
|
||||
{ 17, -1, sizeof(::milvus::proto::plan::ColumnInfo)},
|
||||
{ 24, -1, sizeof(::milvus::proto::plan::RangeExpr)},
|
||||
{ 32, -1, sizeof(::milvus::proto::plan::TermExpr)},
|
||||
{ 39, -1, sizeof(::milvus::proto::plan::UnaryExpr)},
|
||||
{ 46, -1, sizeof(::milvus::proto::plan::BinaryExpr)},
|
||||
{ 54, -1, sizeof(::milvus::proto::plan::Expr)},
|
||||
{ 64, -1, sizeof(::milvus::proto::plan::VectorANNS)},
|
||||
{ 74, -1, sizeof(::milvus::proto::plan::PlanNode)},
|
||||
{ 81, -1, sizeof(::milvus::proto::plan::RetrieveRequest)},
|
||||
{ 88, -1, sizeof(::milvus::proto::plan::RetrieveResults)},
|
||||
{ 26, -1, sizeof(::milvus::proto::plan::RangeExpr)},
|
||||
{ 34, -1, sizeof(::milvus::proto::plan::TermExpr)},
|
||||
{ 41, -1, sizeof(::milvus::proto::plan::UnaryExpr)},
|
||||
{ 48, -1, sizeof(::milvus::proto::plan::BinaryExpr)},
|
||||
{ 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[] = {
|
||||
|
@ -387,45 +389,46 @@ const char descriptor_table_protodef_plan_2eproto[] PROTOBUF_SECTION_VARIABLE(pr
|
|||
"\000\022\023\n\tint64_val\030\002 \001(\003H\000\022\023\n\tfloat_val\030\003 \001("
|
||||
"\001H\000B\005\n\003val\"E\n\tQueryInfo\022\014\n\004topk\030\001 \001(\003\022\023\n"
|
||||
"\013metric_type\030\003 \001(\t\022\025\n\rsearch_params\030\004 \001("
|
||||
"\t\"P\n\nColumnInfo\022\020\n\010field_id\030\001 \001(\003\0220\n\tdat"
|
||||
"\t\"{\n\nColumnInfo\022\020\n\010field_id\030\001 \001(\003\0220\n\tdat"
|
||||
"a_type\030\002 \001(\0162\035.milvus.proto.schema.DataT"
|
||||
"ype\"\222\002\n\tRangeExpr\0222\n\013column_info\030\001 \001(\0132\035"
|
||||
".milvus.proto.plan.ColumnInfo\0220\n\003ops\030\002 \003"
|
||||
"(\0162#.milvus.proto.plan.RangeExpr.OpType\022"
|
||||
"/\n\006values\030\003 \003(\0132\037.milvus.proto.plan.Gene"
|
||||
"ricValue\"n\n\006OpType\022\013\n\007Invalid\020\000\022\017\n\013Great"
|
||||
"erThan\020\001\022\020\n\014GreaterEqual\020\002\022\014\n\010LessThan\020\003"
|
||||
"\022\r\n\tLessEqual\020\004\022\t\n\005Equal\020\005\022\014\n\010NotEqual\020\006"
|
||||
"\"o\n\010TermExpr\0222\n\013column_info\030\001 \001(\0132\035.milv"
|
||||
"us.proto.plan.ColumnInfo\022/\n\006values\030\002 \003(\013"
|
||||
"2\037.milvus.proto.plan.GenericValue\"\206\001\n\tUn"
|
||||
"aryExpr\0220\n\002op\030\001 \001(\0162$.milvus.proto.plan."
|
||||
"UnaryExpr.UnaryOp\022&\n\005child\030\002 \001(\0132\027.milvu"
|
||||
"s.proto.plan.Expr\"\037\n\007UnaryOp\022\013\n\007Invalid\020"
|
||||
"\000\022\007\n\003Not\020\001\"\307\001\n\nBinaryExpr\0222\n\002op\030\001 \001(\0162&."
|
||||
"milvus.proto.plan.BinaryExpr.BinaryOp\022%\n"
|
||||
"\004left\030\002 \001(\0132\027.milvus.proto.plan.Expr\022&\n\005"
|
||||
"right\030\003 \001(\0132\027.milvus.proto.plan.Expr\"6\n\010"
|
||||
"BinaryOp\022\013\n\007Invalid\020\000\022\016\n\nLogicalAnd\020\001\022\r\n"
|
||||
"\tLogicalOr\020\002\"\336\001\n\004Expr\0222\n\nrange_expr\030\001 \001("
|
||||
"\0132\034.milvus.proto.plan.RangeExprH\000\0220\n\tter"
|
||||
"m_expr\030\002 \001(\0132\033.milvus.proto.plan.TermExp"
|
||||
"rH\000\0222\n\nunary_expr\030\003 \001(\0132\034.milvus.proto.p"
|
||||
"lan.UnaryExprH\000\0224\n\013binary_expr\030\004 \001(\0132\035.m"
|
||||
"ilvus.proto.plan.BinaryExprH\000B\006\n\004expr\"\251\001"
|
||||
"\n\nVectorANNS\022\021\n\tis_binary\030\001 \001(\010\022\020\n\010field"
|
||||
"_id\030\002 \001(\003\022+\n\npredicates\030\003 \001(\0132\027.milvus.p"
|
||||
"roto.plan.Expr\0220\n\nquery_info\030\004 \001(\0132\034.mil"
|
||||
"vus.proto.plan.QueryInfo\022\027\n\017placeholder_"
|
||||
"tag\030\005 \001(\t\"H\n\010PlanNode\0224\n\013vector_anns\030\001 \001"
|
||||
"(\0132\035.milvus.proto.plan.VectorANNSH\000B\006\n\004n"
|
||||
"ode\"O\n\017RetrieveRequest\022%\n\003ids\030\001 \001(\0132\030.mi"
|
||||
"lvus.proto.schema.IDs\022\025\n\routput_fields\030\002"
|
||||
" \003(\t\"m\n\017RetrieveResults\022%\n\003ids\030\001 \001(\0132\030.m"
|
||||
"ilvus.proto.schema.IDs\0223\n\013fields_data\030\002 "
|
||||
"\003(\0132\036.milvus.proto.schema.FieldDataB3Z1g"
|
||||
"ithub.com/milvus-io/milvus/internal/prot"
|
||||
"o/planpbb\006proto3"
|
||||
"ype\022\026\n\016is_primary_key\030\003 \001(\010\022\021\n\tis_autoID"
|
||||
"\030\004 \001(\010\"\222\002\n\tRangeExpr\0222\n\013column_info\030\001 \001("
|
||||
"\0132\035.milvus.proto.plan.ColumnInfo\0220\n\003ops\030"
|
||||
"\002 \003(\0162#.milvus.proto.plan.RangeExpr.OpTy"
|
||||
"pe\022/\n\006values\030\003 \003(\0132\037.milvus.proto.plan.G"
|
||||
"enericValue\"n\n\006OpType\022\013\n\007Invalid\020\000\022\017\n\013Gr"
|
||||
"eaterThan\020\001\022\020\n\014GreaterEqual\020\002\022\014\n\010LessTha"
|
||||
"n\020\003\022\r\n\tLessEqual\020\004\022\t\n\005Equal\020\005\022\014\n\010NotEqua"
|
||||
"l\020\006\"o\n\010TermExpr\0222\n\013column_info\030\001 \001(\0132\035.m"
|
||||
"ilvus.proto.plan.ColumnInfo\022/\n\006values\030\002 "
|
||||
"\003(\0132\037.milvus.proto.plan.GenericValue\"\206\001\n"
|
||||
"\tUnaryExpr\0220\n\002op\030\001 \001(\0162$.milvus.proto.pl"
|
||||
"an.UnaryExpr.UnaryOp\022&\n\005child\030\002 \001(\0132\027.mi"
|
||||
"lvus.proto.plan.Expr\"\037\n\007UnaryOp\022\013\n\007Inval"
|
||||
"id\020\000\022\007\n\003Not\020\001\"\307\001\n\nBinaryExpr\0222\n\002op\030\001 \001(\016"
|
||||
"2&.milvus.proto.plan.BinaryExpr.BinaryOp"
|
||||
"\022%\n\004left\030\002 \001(\0132\027.milvus.proto.plan.Expr\022"
|
||||
"&\n\005right\030\003 \001(\0132\027.milvus.proto.plan.Expr\""
|
||||
"6\n\010BinaryOp\022\013\n\007Invalid\020\000\022\016\n\nLogicalAnd\020\001"
|
||||
"\022\r\n\tLogicalOr\020\002\"\336\001\n\004Expr\0222\n\nrange_expr\030\001"
|
||||
" \001(\0132\034.milvus.proto.plan.RangeExprH\000\0220\n\t"
|
||||
"term_expr\030\002 \001(\0132\033.milvus.proto.plan.Term"
|
||||
"ExprH\000\0222\n\nunary_expr\030\003 \001(\0132\034.milvus.prot"
|
||||
"o.plan.UnaryExprH\000\0224\n\013binary_expr\030\004 \001(\0132"
|
||||
"\035.milvus.proto.plan.BinaryExprH\000B\006\n\004expr"
|
||||
"\"\251\001\n\nVectorANNS\022\021\n\tis_binary\030\001 \001(\010\022\020\n\010fi"
|
||||
"eld_id\030\002 \001(\003\022+\n\npredicates\030\003 \001(\0132\027.milvu"
|
||||
"s.proto.plan.Expr\0220\n\nquery_info\030\004 \001(\0132\034."
|
||||
"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"
|
||||
;
|
||||
static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_plan_2eproto_deps[1] = {
|
||||
&::descriptor_table_schema_2eproto,
|
||||
|
@ -445,7 +448,7 @@ static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_pla
|
|||
static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_plan_2eproto_once;
|
||||
static bool descriptor_table_plan_2eproto_initialized = false;
|
||||
const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_plan_2eproto = {
|
||||
&descriptor_table_plan_2eproto_initialized, descriptor_table_protodef_plan_2eproto, "plan.proto", 1736,
|
||||
&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,
|
||||
schemas, file_default_instances, TableStruct_plan_2eproto::offsets,
|
||||
file_level_metadata_plan_2eproto, 12, file_level_enum_descriptors_plan_2eproto, file_level_service_descriptors_plan_2eproto,
|
||||
|
@ -1314,15 +1317,15 @@ ColumnInfo::ColumnInfo(const ColumnInfo& from)
|
|||
_internal_metadata_(nullptr) {
|
||||
_internal_metadata_.MergeFrom(from._internal_metadata_);
|
||||
::memcpy(&field_id_, &from.field_id_,
|
||||
static_cast<size_t>(reinterpret_cast<char*>(&data_type_) -
|
||||
reinterpret_cast<char*>(&field_id_)) + sizeof(data_type_));
|
||||
static_cast<size_t>(reinterpret_cast<char*>(&is_autoid_) -
|
||||
reinterpret_cast<char*>(&field_id_)) + sizeof(is_autoid_));
|
||||
// @@protoc_insertion_point(copy_constructor:milvus.proto.plan.ColumnInfo)
|
||||
}
|
||||
|
||||
void ColumnInfo::SharedCtor() {
|
||||
::memset(&field_id_, 0, static_cast<size_t>(
|
||||
reinterpret_cast<char*>(&data_type_) -
|
||||
reinterpret_cast<char*>(&field_id_)) + sizeof(data_type_));
|
||||
reinterpret_cast<char*>(&is_autoid_) -
|
||||
reinterpret_cast<char*>(&field_id_)) + sizeof(is_autoid_));
|
||||
}
|
||||
|
||||
ColumnInfo::~ColumnInfo() {
|
||||
|
@ -1349,8 +1352,8 @@ void ColumnInfo::Clear() {
|
|||
(void) cached_has_bits;
|
||||
|
||||
::memset(&field_id_, 0, static_cast<size_t>(
|
||||
reinterpret_cast<char*>(&data_type_) -
|
||||
reinterpret_cast<char*>(&field_id_)) + sizeof(data_type_));
|
||||
reinterpret_cast<char*>(&is_autoid_) -
|
||||
reinterpret_cast<char*>(&field_id_)) + sizeof(is_autoid_));
|
||||
_internal_metadata_.Clear();
|
||||
}
|
||||
|
||||
|
@ -1377,6 +1380,20 @@ const char* ColumnInfo::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID:
|
|||
set_data_type(static_cast<::milvus::proto::schema::DataType>(val));
|
||||
} else goto handle_unusual;
|
||||
continue;
|
||||
// bool is_primary_key = 3;
|
||||
case 3:
|
||||
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) {
|
||||
is_primary_key_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
|
||||
CHK_(ptr);
|
||||
} else goto handle_unusual;
|
||||
continue;
|
||||
// bool is_autoID = 4;
|
||||
case 4:
|
||||
if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) {
|
||||
is_autoid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
|
||||
CHK_(ptr);
|
||||
} else goto handle_unusual;
|
||||
continue;
|
||||
default: {
|
||||
handle_unusual:
|
||||
if ((tag & 7) == 4 || tag == 0) {
|
||||
|
@ -1434,6 +1451,32 @@ bool ColumnInfo::MergePartialFromCodedStream(
|
|||
break;
|
||||
}
|
||||
|
||||
// bool is_primary_key = 3;
|
||||
case 3: {
|
||||
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (24 & 0xFF)) {
|
||||
|
||||
DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
|
||||
bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>(
|
||||
input, &is_primary_key_)));
|
||||
} else {
|
||||
goto handle_unusual;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
// bool is_autoID = 4;
|
||||
case 4: {
|
||||
if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (32 & 0xFF)) {
|
||||
|
||||
DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
|
||||
bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>(
|
||||
input, &is_autoid_)));
|
||||
} else {
|
||||
goto handle_unusual;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
default: {
|
||||
handle_unusual:
|
||||
if (tag == 0) {
|
||||
|
@ -1472,6 +1515,16 @@ void ColumnInfo::SerializeWithCachedSizes(
|
|||
2, this->data_type(), output);
|
||||
}
|
||||
|
||||
// bool is_primary_key = 3;
|
||||
if (this->is_primary_key() != 0) {
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(3, this->is_primary_key(), output);
|
||||
}
|
||||
|
||||
// bool is_autoID = 4;
|
||||
if (this->is_autoid() != 0) {
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(4, this->is_autoid(), output);
|
||||
}
|
||||
|
||||
if (_internal_metadata_.have_unknown_fields()) {
|
||||
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
|
||||
_internal_metadata_.unknown_fields(), output);
|
||||
|
@ -1496,6 +1549,16 @@ void ColumnInfo::SerializeWithCachedSizes(
|
|||
2, this->data_type(), target);
|
||||
}
|
||||
|
||||
// bool is_primary_key = 3;
|
||||
if (this->is_primary_key() != 0) {
|
||||
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(3, this->is_primary_key(), target);
|
||||
}
|
||||
|
||||
// bool is_autoID = 4;
|
||||
if (this->is_autoid() != 0) {
|
||||
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(4, this->is_autoid(), target);
|
||||
}
|
||||
|
||||
if (_internal_metadata_.have_unknown_fields()) {
|
||||
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
|
||||
_internal_metadata_.unknown_fields(), target);
|
||||
|
@ -1530,6 +1593,16 @@ size_t ColumnInfo::ByteSizeLong() const {
|
|||
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->data_type());
|
||||
}
|
||||
|
||||
// bool is_primary_key = 3;
|
||||
if (this->is_primary_key() != 0) {
|
||||
total_size += 1 + 1;
|
||||
}
|
||||
|
||||
// bool is_autoID = 4;
|
||||
if (this->is_autoid() != 0) {
|
||||
total_size += 1 + 1;
|
||||
}
|
||||
|
||||
int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
|
||||
SetCachedSize(cached_size);
|
||||
return total_size;
|
||||
|
@ -1563,6 +1636,12 @@ void ColumnInfo::MergeFrom(const ColumnInfo& from) {
|
|||
if (from.data_type() != 0) {
|
||||
set_data_type(from.data_type());
|
||||
}
|
||||
if (from.is_primary_key() != 0) {
|
||||
set_is_primary_key(from.is_primary_key());
|
||||
}
|
||||
if (from.is_autoid() != 0) {
|
||||
set_is_autoid(from.is_autoid());
|
||||
}
|
||||
}
|
||||
|
||||
void ColumnInfo::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
|
||||
|
@ -1588,6 +1667,8 @@ void ColumnInfo::InternalSwap(ColumnInfo* other) {
|
|||
_internal_metadata_.Swap(&other->_internal_metadata_);
|
||||
swap(field_id_, other->field_id_);
|
||||
swap(data_type_, other->data_type_);
|
||||
swap(is_primary_key_, other->is_primary_key_);
|
||||
swap(is_autoid_, other->is_autoid_);
|
||||
}
|
||||
|
||||
::PROTOBUF_NAMESPACE_ID::Metadata ColumnInfo::GetMetadata() const {
|
||||
|
|
|
@ -645,6 +645,8 @@ class ColumnInfo :
|
|||
enum : int {
|
||||
kFieldIdFieldNumber = 1,
|
||||
kDataTypeFieldNumber = 2,
|
||||
kIsPrimaryKeyFieldNumber = 3,
|
||||
kIsAutoIDFieldNumber = 4,
|
||||
};
|
||||
// int64 field_id = 1;
|
||||
void clear_field_id();
|
||||
|
@ -656,6 +658,16 @@ class ColumnInfo :
|
|||
::milvus::proto::schema::DataType data_type() const;
|
||||
void set_data_type(::milvus::proto::schema::DataType value);
|
||||
|
||||
// bool is_primary_key = 3;
|
||||
void clear_is_primary_key();
|
||||
bool is_primary_key() const;
|
||||
void set_is_primary_key(bool value);
|
||||
|
||||
// bool is_autoID = 4;
|
||||
void clear_is_autoid();
|
||||
bool is_autoid() const;
|
||||
void set_is_autoid(bool value);
|
||||
|
||||
// @@protoc_insertion_point(class_scope:milvus.proto.plan.ColumnInfo)
|
||||
private:
|
||||
class _Internal;
|
||||
|
@ -663,6 +675,8 @@ class ColumnInfo :
|
|||
::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_;
|
||||
::PROTOBUF_NAMESPACE_ID::int64 field_id_;
|
||||
int data_type_;
|
||||
bool is_primary_key_;
|
||||
bool is_autoid_;
|
||||
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
|
||||
friend struct ::TableStruct_plan_2eproto;
|
||||
};
|
||||
|
@ -2432,6 +2446,34 @@ inline void ColumnInfo::set_data_type(::milvus::proto::schema::DataType value) {
|
|||
// @@protoc_insertion_point(field_set:milvus.proto.plan.ColumnInfo.data_type)
|
||||
}
|
||||
|
||||
// bool is_primary_key = 3;
|
||||
inline void ColumnInfo::clear_is_primary_key() {
|
||||
is_primary_key_ = false;
|
||||
}
|
||||
inline bool ColumnInfo::is_primary_key() const {
|
||||
// @@protoc_insertion_point(field_get:milvus.proto.plan.ColumnInfo.is_primary_key)
|
||||
return is_primary_key_;
|
||||
}
|
||||
inline void ColumnInfo::set_is_primary_key(bool value) {
|
||||
|
||||
is_primary_key_ = value;
|
||||
// @@protoc_insertion_point(field_set:milvus.proto.plan.ColumnInfo.is_primary_key)
|
||||
}
|
||||
|
||||
// bool is_autoID = 4;
|
||||
inline void ColumnInfo::clear_is_autoid() {
|
||||
is_autoid_ = false;
|
||||
}
|
||||
inline bool ColumnInfo::is_autoid() const {
|
||||
// @@protoc_insertion_point(field_get:milvus.proto.plan.ColumnInfo.is_autoID)
|
||||
return is_autoid_;
|
||||
}
|
||||
inline void ColumnInfo::set_is_autoid(bool value) {
|
||||
|
||||
is_autoid_ = value;
|
||||
// @@protoc_insertion_point(field_set:milvus.proto.plan.ColumnInfo.is_autoID)
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
// RangeExpr
|
||||
|
|
|
@ -22,6 +22,8 @@ message QueryInfo {
|
|||
message ColumnInfo {
|
||||
int64 field_id = 1;
|
||||
schema.DataType data_type = 2;
|
||||
bool is_primary_key = 3;
|
||||
bool is_autoID = 4;
|
||||
}
|
||||
|
||||
message RangeExpr {
|
||||
|
|
|
@ -267,6 +267,8 @@ func (m *QueryInfo) GetSearchParams() string {
|
|||
type ColumnInfo struct {
|
||||
FieldId int64 `protobuf:"varint,1,opt,name=field_id,json=fieldId,proto3" json:"field_id,omitempty"`
|
||||
DataType schemapb.DataType `protobuf:"varint,2,opt,name=data_type,json=dataType,proto3,enum=milvus.proto.schema.DataType" json:"data_type,omitempty"`
|
||||
IsPrimaryKey bool `protobuf:"varint,3,opt,name=is_primary_key,json=isPrimaryKey,proto3" json:"is_primary_key,omitempty"`
|
||||
IsAutoID bool `protobuf:"varint,4,opt,name=is_autoID,json=isAutoID,proto3" json:"is_autoID,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
|
@ -311,6 +313,20 @@ func (m *ColumnInfo) GetDataType() schemapb.DataType {
|
|||
return schemapb.DataType_None
|
||||
}
|
||||
|
||||
func (m *ColumnInfo) GetIsPrimaryKey() bool {
|
||||
if m != nil {
|
||||
return m.IsPrimaryKey
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (m *ColumnInfo) GetIsAutoID() bool {
|
||||
if m != nil {
|
||||
return m.IsAutoID
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
type RangeExpr struct {
|
||||
ColumnInfo *ColumnInfo `protobuf:"bytes,1,opt,name=column_info,json=columnInfo,proto3" json:"column_info,omitempty"`
|
||||
Ops []RangeExpr_OpType `protobuf:"varint,2,rep,packed,name=ops,proto3,enum=milvus.proto.plan.RangeExpr_OpType" json:"ops,omitempty"`
|
||||
|
@ -876,62 +892,65 @@ func init() {
|
|||
func init() { proto.RegisterFile("plan.proto", fileDescriptor_2d655ab2f7683c23) }
|
||||
|
||||
var fileDescriptor_2d655ab2f7683c23 = []byte{
|
||||
// 911 bytes of a gzipped FileDescriptorProto
|
||||
// 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, 0xf1, 0xee, 0xb3, 0xeb, 0x98, 0xb9, 0x60, 0x08, 0x25, 0xd6, 0x16, 0x81,
|
||||
0x05, 0xaa, 0x23, 0xdc, 0x92, 0x4a, 0x45, 0x05, 0x12, 0x5a, 0x9a, 0x48, 0x95, 0x53, 0x06, 0x93,
|
||||
0x03, 0x97, 0xd5, 0x78, 0x77, 0x6c, 0x8f, 0x18, 0xcf, 0x6c, 0x66, 0x67, 0xad, 0xe6, 0xc2, 0x85,
|
||||
0x1b, 0x37, 0x3e, 0x07, 0x5f, 0x88, 0x3b, 0x5f, 0x04, 0xcd, 0xcc, 0xc6, 0x7f, 0x90, 0x13, 0x54,
|
||||
0xa9, 0xb7, 0x99, 0xf7, 0xde, 0xef, 0xfd, 0xde, 0xbf, 0x79, 0x03, 0x90, 0x73, 0x22, 0xfa, 0xb9,
|
||||
0x92, 0x5a, 0xa2, 0xf7, 0xe6, 0x8c, 0x2f, 0xca, 0xc2, 0xdd, 0xfa, 0x46, 0xf1, 0x61, 0xb3, 0x48,
|
||||
0x67, 0x74, 0x4e, 0x9c, 0x28, 0xce, 0xa1, 0xf9, 0x92, 0x0a, 0xaa, 0x58, 0x7a, 0x49, 0x78, 0x49,
|
||||
0xd1, 0x01, 0x84, 0x63, 0x29, 0x79, 0xb2, 0x20, 0xbc, 0xe3, 0x75, 0xbd, 0x5e, 0x78, 0xb6, 0x83,
|
||||
0xeb, 0x46, 0x72, 0x49, 0x38, 0xba, 0x0f, 0x11, 0x13, 0xfa, 0xf8, 0xb1, 0xd5, 0xfa, 0x5d, 0xaf,
|
||||
0x17, 0x9c, 0xed, 0xe0, 0xd0, 0x8a, 0x2a, 0xf5, 0x84, 0x4b, 0xa2, 0xad, 0x3a, 0xe8, 0x7a, 0x3d,
|
||||
0xcf, 0xa8, 0xad, 0xe8, 0x92, 0xf0, 0xd3, 0x5d, 0x08, 0x16, 0x84, 0xc7, 0x14, 0xa2, 0x1f, 0x4b,
|
||||
0xaa, 0xae, 0xcf, 0xc5, 0x44, 0x22, 0x04, 0x35, 0x2d, 0xf3, 0x5f, 0x2d, 0x55, 0x80, 0xed, 0x19,
|
||||
0x1d, 0x42, 0x63, 0x4e, 0xb5, 0x62, 0x69, 0xa2, 0xaf, 0x73, 0x6a, 0x1d, 0x45, 0x18, 0x9c, 0x68,
|
||||
0x74, 0x9d, 0x53, 0xf4, 0x00, 0xee, 0x15, 0x94, 0xa8, 0x74, 0x96, 0xe4, 0x44, 0x91, 0x79, 0xd1,
|
||||
0xa9, 0x59, 0x93, 0xa6, 0x13, 0xbe, 0xb6, 0xb2, 0x38, 0x05, 0xf8, 0x5e, 0xf2, 0x72, 0x2e, 0x2c,
|
||||
0xcf, 0x07, 0x10, 0x4e, 0x18, 0xe5, 0x59, 0xc2, 0xb2, 0x8a, 0xab, 0x6e, 0xef, 0xe7, 0x19, 0x7a,
|
||||
0x0a, 0x51, 0x46, 0x34, 0x71, 0x64, 0x26, 0xa9, 0xd6, 0xe0, 0x7e, 0x7f, 0xa3, 0x6c, 0x55, 0xc1,
|
||||
0x9e, 0x13, 0x4d, 0x0c, 0x3f, 0x0e, 0xb3, 0xea, 0x14, 0xff, 0xe5, 0x43, 0x84, 0x89, 0x98, 0xd2,
|
||||
0x17, 0x6f, 0x72, 0x85, 0xbe, 0x81, 0x46, 0x6a, 0x29, 0x13, 0x26, 0x26, 0xd2, 0xf2, 0x34, 0xfe,
|
||||
0xeb, 0xcb, 0xf6, 0x66, 0x15, 0x18, 0x86, 0x74, 0x15, 0xe4, 0x57, 0x10, 0xc8, 0xbc, 0xe8, 0xf8,
|
||||
0xdd, 0xa0, 0xd7, 0x1a, 0x3c, 0xd8, 0x82, 0x5b, 0x52, 0xf5, 0x2f, 0x72, 0x1b, 0x89, 0xb1, 0x47,
|
||||
0x4f, 0x60, 0x6f, 0x61, 0x7a, 0x57, 0x74, 0x82, 0x6e, 0xd0, 0x6b, 0x0c, 0x0e, 0xb7, 0x20, 0xd7,
|
||||
0x7b, 0x8c, 0x2b, 0xf3, 0x58, 0xc0, 0x9e, 0xf3, 0x83, 0x1a, 0x50, 0x3f, 0x17, 0x0b, 0xc2, 0x59,
|
||||
0xd6, 0xde, 0x41, 0xfb, 0xd0, 0x78, 0xa9, 0x28, 0xd1, 0x54, 0x8d, 0x66, 0x44, 0xb4, 0x3d, 0xd4,
|
||||
0x86, 0x66, 0x25, 0x78, 0x71, 0x55, 0x12, 0xde, 0xf6, 0x51, 0x13, 0xc2, 0x57, 0xb4, 0x28, 0xac,
|
||||
0x3e, 0x40, 0xf7, 0x20, 0x32, 0x37, 0xa7, 0xac, 0xa1, 0x08, 0x76, 0xdd, 0x71, 0xd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, 0x10, 0x85, 0xa9, 0x9d, 0x90, 0x19, 0x8d, 0xc7,
|
||||
0xb0, 0x8f, 0xcd, 0x1f, 0x40, 0x17, 0x14, 0xd3, 0xab, 0x92, 0x16, 0x1a, 0x7d, 0x0e, 0x01, 0xcb,
|
||||
0x6e, 0x9c, 0x76, 0xb6, 0x2e, 0xed, 0xf3, 0xe7, 0x05, 0x36, 0x46, 0xe6, 0xd3, 0x90, 0xa5, 0xce,
|
||||
0x4b, 0x9d, 0xd8, 0x2a, 0xba, 0xb5, 0x11, 0xe1, 0xa6, 0x13, 0xfe, 0x60, 0x65, 0xf1, 0x6f, 0xeb,
|
||||
0x1c, 0x45, 0xc9, 0x75, 0xf1, 0x56, 0x1c, 0xdf, 0x42, 0xc3, 0x39, 0x4f, 0xcc, 0x0f, 0x51, 0x2d,
|
||||
0xa6, 0x8f, 0xb7, 0x62, 0x2c, 0xa1, 0xf9, 0x51, 0x30, 0x38, 0x88, 0x39, 0x9f, 0x3e, 0xfa, 0xe5,
|
||||
0xcb, 0x29, 0xd3, 0xb3, 0x72, 0xdc, 0x4f, 0xe5, 0xfc, 0xc8, 0xe1, 0x1e, 0x32, 0x59, 0x9d, 0x8e,
|
||||
0x98, 0xd0, 0x54, 0x09, 0xc2, 0x8f, 0xac, 0xab, 0x23, 0x53, 0xb7, 0x7c, 0x3c, 0xde, 0xb3, 0xb7,
|
||||
0x47, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0xeb, 0x2d, 0x71, 0x52, 0xf8, 0x07, 0x00, 0x00,
|
||||
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, 0x27, 0x8a, 0x73, 0x68, 0xbc, 0xa4, 0x82, 0x2a, 0x96, 0x5e, 0x11, 0x5e, 0x52, 0xb4,
|
||||
0x0b, 0xe1, 0x40, 0x4a, 0x9e, 0x4c, 0x09, 0x6f, 0x7b, 0xfb, 0xde, 0x41, 0x78, 0xbe, 0x81, 0xb7,
|
||||
0x8d, 0xe4, 0x8a, 0x70, 0x74, 0x1f, 0x22, 0x26, 0xf4, 0xf1, 0x13, 0xab, 0xf5, 0xf7, 0xbd, 0x83,
|
||||
0xe0, 0x7c, 0x03, 0x87, 0x56, 0x54, 0xa9, 0x87, 0x5c, 0x12, 0x6d, 0xd5, 0xc1, 0xbe, 0x77, 0xe0,
|
||||
0x19, 0xb5, 0x15, 0x5d, 0x11, 0x7e, 0xba, 0x09, 0xc1, 0x94, 0xf0, 0x98, 0x42, 0xf4, 0x63, 0x49,
|
||||
0xd5, 0xac, 0x2b, 0x86, 0x12, 0x21, 0xa8, 0x69, 0x99, 0xbf, 0xb6, 0xa1, 0x02, 0x6c, 0x69, 0xb4,
|
||||
0x07, 0xf5, 0x09, 0xd5, 0x8a, 0xa5, 0x89, 0x9e, 0xe5, 0xd4, 0x3a, 0x8a, 0x30, 0x38, 0x51, 0x7f,
|
||||
0x96, 0x53, 0xf4, 0x00, 0xee, 0x15, 0x94, 0xa8, 0x74, 0x9c, 0xe4, 0x44, 0x91, 0x49, 0xd1, 0xae,
|
||||
0x59, 0x93, 0x86, 0x13, 0x5e, 0x5a, 0x59, 0xfc, 0xa7, 0x07, 0xf0, 0x9d, 0xe4, 0xe5, 0x44, 0xd8,
|
||||
0x40, 0x1f, 0x40, 0x38, 0x64, 0x94, 0x67, 0x09, 0xcb, 0xaa, 0x60, 0xdb, 0x96, 0xef, 0x66, 0xe8,
|
||||
0x19, 0x44, 0x19, 0xd1, 0xc4, 0x45, 0x33, 0x55, 0x35, 0x3b, 0xf7, 0x0f, 0x57, 0xfa, 0x56, 0x75,
|
||||
0xec, 0x8c, 0x68, 0x62, 0x12, 0xc0, 0x61, 0x56, 0x51, 0xe8, 0x21, 0x34, 0x59, 0x91, 0xe4, 0x8a,
|
||||
0x4d, 0x88, 0x9a, 0x25, 0xaf, 0xe9, 0xcc, 0xa6, 0x1b, 0xe2, 0x06, 0x2b, 0x2e, 0x9d, 0xf0, 0x07,
|
||||
0x3a, 0x43, 0xbb, 0x10, 0xb1, 0x22, 0x21, 0xa5, 0x96, 0xdd, 0x33, 0x9b, 0x6c, 0x88, 0x43, 0x56,
|
||||
0x9c, 0x58, 0x3e, 0xfe, 0xcb, 0x87, 0x08, 0x13, 0x31, 0xa2, 0x2f, 0xde, 0xe4, 0x0a, 0x7d, 0x0d,
|
||||
0xf5, 0xd4, 0x66, 0x9d, 0x30, 0x31, 0x94, 0x36, 0xd5, 0xfa, 0x7f, 0xd3, 0xb1, 0xf3, 0x5d, 0xd4,
|
||||
0x86, 0x21, 0x5d, 0xd4, 0xf9, 0x25, 0x04, 0x32, 0x2f, 0xda, 0xfe, 0x7e, 0x70, 0xd0, 0xec, 0x3c,
|
||||
0x58, 0x83, 0x9b, 0x87, 0x3a, 0xbc, 0xc8, 0x6d, 0x31, 0xc6, 0x1e, 0x3d, 0x85, 0xad, 0xa9, 0x99,
|
||||
0x7f, 0xd1, 0x0e, 0xf6, 0x83, 0x83, 0x7a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, 0xd5,
|
||||
0x91, 0xe9, 0x5b, 0x3e, 0x18, 0x6c, 0x59, 0xee, 0xf1, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x6d,
|
||||
0xf2, 0x58, 0xac, 0x3c, 0x08, 0x00, 0x00,
|
||||
}
|
||||
|
|
|
@ -26,6 +26,7 @@ import (
|
|||
"github.com/milvus-io/milvus/internal/proto/datapb"
|
||||
"github.com/milvus-io/milvus/internal/proto/internalpb"
|
||||
"github.com/milvus-io/milvus/internal/proto/milvuspb"
|
||||
"github.com/milvus-io/milvus/internal/proto/planpb"
|
||||
"github.com/milvus-io/milvus/internal/proto/proxypb"
|
||||
"github.com/milvus-io/milvus/internal/proto/querypb"
|
||||
"github.com/milvus-io/milvus/internal/proto/schemapb"
|
||||
|
@ -1276,7 +1277,124 @@ func (node *ProxyNode) Flush(ctx context.Context, request *milvuspb.FlushRequest
|
|||
}
|
||||
|
||||
func (node *ProxyNode) Query(ctx context.Context, request *milvuspb.QueryRequest) (*milvuspb.QueryResults, error) {
|
||||
panic("Not implemented yet")
|
||||
schemaPb, err := globalMetaCache.GetCollectionSchema(ctx, request.CollectionName)
|
||||
if err != nil { // err is not nil if collection not exists
|
||||
return nil, err
|
||||
}
|
||||
schema, err := typeutil.CreateSchemaHelper(schemaPb)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
parseRetrieveTask := func(exprString string) (bool, []int64) {
|
||||
expr, err := parseQueryExpr(schema, exprString)
|
||||
if err != nil {
|
||||
return false, nil
|
||||
}
|
||||
|
||||
switch xExpr := expr.Expr.(type) {
|
||||
case *planpb.Expr_TermExpr:
|
||||
var ids []int64
|
||||
for _, value := range xExpr.TermExpr.Values {
|
||||
switch v := value.Val.(type) {
|
||||
case *planpb.GenericValue_Int64Val:
|
||||
ids = append(ids, v.Int64Val)
|
||||
default:
|
||||
return false, nil
|
||||
}
|
||||
}
|
||||
return xExpr.TermExpr.ColumnInfo.IsPrimaryKey, ids
|
||||
default:
|
||||
return false, nil
|
||||
}
|
||||
}
|
||||
|
||||
isRetrieveTask, ids := parseRetrieveTask(request.Expr)
|
||||
|
||||
if isRetrieveTask {
|
||||
retrieveRequest := &milvuspb.RetrieveRequest{
|
||||
DbName: request.DbName,
|
||||
CollectionName: request.CollectionName,
|
||||
PartitionNames: request.PartitionNames,
|
||||
Ids: &schemapb.IDs{
|
||||
IdField: &schemapb.IDs_IntId{
|
||||
IntId: &schemapb.LongArray{
|
||||
Data: ids,
|
||||
},
|
||||
},
|
||||
},
|
||||
OutputFields: request.OutputFields,
|
||||
}
|
||||
|
||||
rt := &RetrieveTask{
|
||||
ctx: ctx,
|
||||
Condition: NewTaskCondition(ctx),
|
||||
RetrieveRequest: &internalpb.RetrieveRequest{
|
||||
Base: &commonpb.MsgBase{
|
||||
MsgType: commonpb.MsgType_Retrieve,
|
||||
SourceID: Params.ProxyID,
|
||||
},
|
||||
ResultChannelID: strconv.FormatInt(Params.ProxyID, 10),
|
||||
},
|
||||
queryMsgStream: node.queryMsgStream,
|
||||
resultBuf: make(chan []*internalpb.RetrieveResults),
|
||||
retrieve: retrieveRequest,
|
||||
}
|
||||
|
||||
err := node.sched.DqQueue.Enqueue(rt)
|
||||
if err != nil {
|
||||
return &milvuspb.QueryResults{
|
||||
Status: &commonpb.Status{
|
||||
ErrorCode: commonpb.ErrorCode_UnexpectedError,
|
||||
Reason: err.Error(),
|
||||
},
|
||||
}, nil
|
||||
}
|
||||
|
||||
log.Debug("Retrieve",
|
||||
zap.String("role", Params.RoleName),
|
||||
zap.Int64("msgID", rt.Base.MsgID),
|
||||
zap.Uint64("timestamp", rt.Base.Timestamp),
|
||||
zap.String("db", retrieveRequest.DbName),
|
||||
zap.String("collection", retrieveRequest.CollectionName),
|
||||
zap.Any("partitions", retrieveRequest.PartitionNames),
|
||||
zap.Any("len(Ids)", len(retrieveRequest.Ids.IdField.(*schemapb.IDs_IntId).IntId.Data)))
|
||||
defer func() {
|
||||
log.Debug("Retrieve Done",
|
||||
zap.Error(err),
|
||||
zap.String("role", Params.RoleName),
|
||||
zap.Int64("msgID", rt.Base.MsgID),
|
||||
zap.Uint64("timestamp", rt.Base.Timestamp),
|
||||
zap.String("db", retrieveRequest.DbName),
|
||||
zap.String("collection", retrieveRequest.CollectionName),
|
||||
zap.Any("partitions", retrieveRequest.PartitionNames),
|
||||
zap.Any("len(Ids)", len(retrieveRequest.Ids.IdField.(*schemapb.IDs_IntId).IntId.Data)))
|
||||
}()
|
||||
|
||||
err = rt.WaitToFinish()
|
||||
if err != nil {
|
||||
return &milvuspb.QueryResults{
|
||||
Status: &commonpb.Status{
|
||||
ErrorCode: commonpb.ErrorCode_UnexpectedError,
|
||||
Reason: err.Error(),
|
||||
},
|
||||
}, nil
|
||||
}
|
||||
|
||||
return &milvuspb.QueryResults{
|
||||
Status: rt.result.Status,
|
||||
FieldsData: rt.result.FieldsData,
|
||||
}, nil
|
||||
}
|
||||
|
||||
err = errors.New("Not implemented")
|
||||
return &milvuspb.QueryResults{
|
||||
Status: &commonpb.Status{
|
||||
ErrorCode: commonpb.ErrorCode_UnexpectedError,
|
||||
Reason: err.Error(),
|
||||
},
|
||||
}, nil
|
||||
|
||||
}
|
||||
|
||||
func (node *ProxyNode) GetDdChannel(ctx context.Context, request *internalpb.GetDdChannelRequest) (*milvuspb.StringResponse, error) {
|
||||
|
|
|
@ -45,8 +45,9 @@ func parseQueryExprAdvanced(schema *typeutil.SchemaHelper, exprStr string) (*pla
|
|||
|
||||
func (context *ParserContext) createColumnInfo(field *schemapb.FieldSchema) *planpb.ColumnInfo {
|
||||
return &planpb.ColumnInfo{
|
||||
FieldId: field.FieldID,
|
||||
DataType: field.DataType,
|
||||
FieldId: field.FieldID,
|
||||
DataType: field.DataType,
|
||||
IsPrimaryKey: field.IsPrimaryKey,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue