feat: adds vector index meta (#307)
Signed-off-by: Dennis Zhuang <killme2008@gmail.com>
This commit is contained in:
@@ -70,6 +70,7 @@ fn main() {
|
|||||||
"proto/greptime/v1/frontend/server.proto",
|
"proto/greptime/v1/frontend/server.proto",
|
||||||
"proto/greptime/v1/index/bloom_filter.proto",
|
"proto/greptime/v1/index/bloom_filter.proto",
|
||||||
"proto/greptime/v1/index/inverted_index.proto",
|
"proto/greptime/v1/index/inverted_index.proto",
|
||||||
|
"proto/greptime/v1/index/vector_index.proto",
|
||||||
"proto/prometheus/remote/remote.proto",
|
"proto/prometheus/remote/remote.proto",
|
||||||
"proto/substrait_extension/promql_plan.proto",
|
"proto/substrait_extension/promql_plan.proto",
|
||||||
"proto/substrait_extension/dist_plan.proto",
|
"proto/substrait_extension/dist_plan.proto",
|
||||||
|
|||||||
@@ -0,0 +1,29 @@
|
|||||||
|
// Generated by the gRPC C++ plugin.
|
||||||
|
// If you make any local change, they will be lost.
|
||||||
|
// source: greptime/v1/index/vector_index.proto
|
||||||
|
|
||||||
|
#include "greptime/v1/index/vector_index.pb.h"
|
||||||
|
#include "greptime/v1/index/vector_index.grpc.pb.h"
|
||||||
|
|
||||||
|
#include <functional>
|
||||||
|
#include <grpcpp/support/async_stream.h>
|
||||||
|
#include <grpcpp/support/async_unary_call.h>
|
||||||
|
#include <grpcpp/impl/channel_interface.h>
|
||||||
|
#include <grpcpp/impl/client_unary_call.h>
|
||||||
|
#include <grpcpp/support/client_callback.h>
|
||||||
|
#include <grpcpp/support/message_allocator.h>
|
||||||
|
#include <grpcpp/support/method_handler.h>
|
||||||
|
#include <grpcpp/impl/rpc_service_method.h>
|
||||||
|
#include <grpcpp/support/server_callback.h>
|
||||||
|
#include <grpcpp/impl/codegen/server_callback_handlers.h>
|
||||||
|
#include <grpcpp/server_context.h>
|
||||||
|
#include <grpcpp/impl/service_type.h>
|
||||||
|
#include <grpcpp/support/sync_stream.h>
|
||||||
|
namespace greptime {
|
||||||
|
namespace v1 {
|
||||||
|
namespace index {
|
||||||
|
|
||||||
|
} // namespace greptime
|
||||||
|
} // namespace v1
|
||||||
|
} // namespace index
|
||||||
|
|
||||||
@@ -0,0 +1,52 @@
|
|||||||
|
// Generated by the gRPC C++ plugin.
|
||||||
|
// If you make any local change, they will be lost.
|
||||||
|
// source: greptime/v1/index/vector_index.proto
|
||||||
|
// Original file comments:
|
||||||
|
// Copyright 2023 Greptime Team
|
||||||
|
//
|
||||||
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
// you may not use this file except in compliance with the License.
|
||||||
|
// You may obtain a copy of the License at
|
||||||
|
//
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
//
|
||||||
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
// See the License for the specific language governing permissions and
|
||||||
|
// limitations under the License.
|
||||||
|
//
|
||||||
|
#ifndef GRPC_greptime_2fv1_2findex_2fvector_5findex_2eproto__INCLUDED
|
||||||
|
#define GRPC_greptime_2fv1_2findex_2fvector_5findex_2eproto__INCLUDED
|
||||||
|
|
||||||
|
#include "greptime/v1/index/vector_index.pb.h"
|
||||||
|
|
||||||
|
#include <functional>
|
||||||
|
#include <grpcpp/generic/async_generic_service.h>
|
||||||
|
#include <grpcpp/support/async_stream.h>
|
||||||
|
#include <grpcpp/support/async_unary_call.h>
|
||||||
|
#include <grpcpp/support/client_callback.h>
|
||||||
|
#include <grpcpp/client_context.h>
|
||||||
|
#include <grpcpp/completion_queue.h>
|
||||||
|
#include <grpcpp/support/message_allocator.h>
|
||||||
|
#include <grpcpp/support/method_handler.h>
|
||||||
|
#include <grpcpp/impl/codegen/proto_utils.h>
|
||||||
|
#include <grpcpp/impl/rpc_method.h>
|
||||||
|
#include <grpcpp/support/server_callback.h>
|
||||||
|
#include <grpcpp/impl/codegen/server_callback_handlers.h>
|
||||||
|
#include <grpcpp/server_context.h>
|
||||||
|
#include <grpcpp/impl/service_type.h>
|
||||||
|
#include <grpcpp/impl/codegen/status.h>
|
||||||
|
#include <grpcpp/support/stub_options.h>
|
||||||
|
#include <grpcpp/support/sync_stream.h>
|
||||||
|
|
||||||
|
namespace greptime {
|
||||||
|
namespace v1 {
|
||||||
|
namespace index {
|
||||||
|
|
||||||
|
} // namespace index
|
||||||
|
} // namespace v1
|
||||||
|
} // namespace greptime
|
||||||
|
|
||||||
|
|
||||||
|
#endif // GRPC_greptime_2fv1_2findex_2fvector_5findex_2eproto__INCLUDED
|
||||||
@@ -0,0 +1,826 @@
|
|||||||
|
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||||
|
// source: greptime/v1/index/vector_index.proto
|
||||||
|
|
||||||
|
#include "greptime/v1/index/vector_index.pb.h"
|
||||||
|
|
||||||
|
#include <algorithm>
|
||||||
|
|
||||||
|
#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>
|
||||||
|
|
||||||
|
PROTOBUF_PRAGMA_INIT_SEG
|
||||||
|
|
||||||
|
namespace _pb = ::PROTOBUF_NAMESPACE_ID;
|
||||||
|
namespace _pbi = _pb::internal;
|
||||||
|
|
||||||
|
namespace greptime {
|
||||||
|
namespace v1 {
|
||||||
|
namespace index {
|
||||||
|
PROTOBUF_CONSTEXPR VectorIndexMeta::VectorIndexMeta(
|
||||||
|
::_pbi::ConstantInitialized): _impl_{
|
||||||
|
/*decltype(_impl_.stats_)*/nullptr
|
||||||
|
, /*decltype(_impl_.engine_)*/0
|
||||||
|
, /*decltype(_impl_.dim_)*/0u
|
||||||
|
, /*decltype(_impl_.metric_)*/0
|
||||||
|
, /*decltype(_impl_.connectivity_)*/0u
|
||||||
|
, /*decltype(_impl_.expansion_add_)*/0u
|
||||||
|
, /*decltype(_impl_.expansion_search_)*/0u
|
||||||
|
, /*decltype(_impl_.index_size_)*/uint64_t{0u}
|
||||||
|
, /*decltype(_impl_.null_bitmap_size_)*/0u
|
||||||
|
, /*decltype(_impl_._cached_size_)*/{}} {}
|
||||||
|
struct VectorIndexMetaDefaultTypeInternal {
|
||||||
|
PROTOBUF_CONSTEXPR VectorIndexMetaDefaultTypeInternal()
|
||||||
|
: _instance(::_pbi::ConstantInitialized{}) {}
|
||||||
|
~VectorIndexMetaDefaultTypeInternal() {}
|
||||||
|
union {
|
||||||
|
VectorIndexMeta _instance;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 VectorIndexMetaDefaultTypeInternal _VectorIndexMeta_default_instance_;
|
||||||
|
PROTOBUF_CONSTEXPR VectorIndexStats::VectorIndexStats(
|
||||||
|
::_pbi::ConstantInitialized): _impl_{
|
||||||
|
/*decltype(_impl_.total_row_count_)*/uint64_t{0u}
|
||||||
|
, /*decltype(_impl_.indexed_row_count_)*/uint64_t{0u}
|
||||||
|
, /*decltype(_impl_.null_count_)*/uint64_t{0u}
|
||||||
|
, /*decltype(_impl_._cached_size_)*/{}} {}
|
||||||
|
struct VectorIndexStatsDefaultTypeInternal {
|
||||||
|
PROTOBUF_CONSTEXPR VectorIndexStatsDefaultTypeInternal()
|
||||||
|
: _instance(::_pbi::ConstantInitialized{}) {}
|
||||||
|
~VectorIndexStatsDefaultTypeInternal() {}
|
||||||
|
union {
|
||||||
|
VectorIndexStats _instance;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 VectorIndexStatsDefaultTypeInternal _VectorIndexStats_default_instance_;
|
||||||
|
} // namespace index
|
||||||
|
} // namespace v1
|
||||||
|
} // namespace greptime
|
||||||
|
static ::_pb::Metadata file_level_metadata_greptime_2fv1_2findex_2fvector_5findex_2eproto[2];
|
||||||
|
static const ::_pb::EnumDescriptor* file_level_enum_descriptors_greptime_2fv1_2findex_2fvector_5findex_2eproto[2];
|
||||||
|
static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_greptime_2fv1_2findex_2fvector_5findex_2eproto = nullptr;
|
||||||
|
|
||||||
|
const uint32_t TableStruct_greptime_2fv1_2findex_2fvector_5findex_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
|
||||||
|
~0u, // no _has_bits_
|
||||||
|
PROTOBUF_FIELD_OFFSET(::greptime::v1::index::VectorIndexMeta, _internal_metadata_),
|
||||||
|
~0u, // no _extensions_
|
||||||
|
~0u, // no _oneof_case_
|
||||||
|
~0u, // no _weak_field_map_
|
||||||
|
~0u, // no _inlined_string_donated_
|
||||||
|
PROTOBUF_FIELD_OFFSET(::greptime::v1::index::VectorIndexMeta, _impl_.engine_),
|
||||||
|
PROTOBUF_FIELD_OFFSET(::greptime::v1::index::VectorIndexMeta, _impl_.dim_),
|
||||||
|
PROTOBUF_FIELD_OFFSET(::greptime::v1::index::VectorIndexMeta, _impl_.metric_),
|
||||||
|
PROTOBUF_FIELD_OFFSET(::greptime::v1::index::VectorIndexMeta, _impl_.connectivity_),
|
||||||
|
PROTOBUF_FIELD_OFFSET(::greptime::v1::index::VectorIndexMeta, _impl_.expansion_add_),
|
||||||
|
PROTOBUF_FIELD_OFFSET(::greptime::v1::index::VectorIndexMeta, _impl_.expansion_search_),
|
||||||
|
PROTOBUF_FIELD_OFFSET(::greptime::v1::index::VectorIndexMeta, _impl_.null_bitmap_size_),
|
||||||
|
PROTOBUF_FIELD_OFFSET(::greptime::v1::index::VectorIndexMeta, _impl_.index_size_),
|
||||||
|
PROTOBUF_FIELD_OFFSET(::greptime::v1::index::VectorIndexMeta, _impl_.stats_),
|
||||||
|
~0u, // no _has_bits_
|
||||||
|
PROTOBUF_FIELD_OFFSET(::greptime::v1::index::VectorIndexStats, _internal_metadata_),
|
||||||
|
~0u, // no _extensions_
|
||||||
|
~0u, // no _oneof_case_
|
||||||
|
~0u, // no _weak_field_map_
|
||||||
|
~0u, // no _inlined_string_donated_
|
||||||
|
PROTOBUF_FIELD_OFFSET(::greptime::v1::index::VectorIndexStats, _impl_.total_row_count_),
|
||||||
|
PROTOBUF_FIELD_OFFSET(::greptime::v1::index::VectorIndexStats, _impl_.indexed_row_count_),
|
||||||
|
PROTOBUF_FIELD_OFFSET(::greptime::v1::index::VectorIndexStats, _impl_.null_count_),
|
||||||
|
};
|
||||||
|
static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
|
||||||
|
{ 0, -1, -1, sizeof(::greptime::v1::index::VectorIndexMeta)},
|
||||||
|
{ 15, -1, -1, sizeof(::greptime::v1::index::VectorIndexStats)},
|
||||||
|
};
|
||||||
|
|
||||||
|
static const ::_pb::Message* const file_default_instances[] = {
|
||||||
|
&::greptime::v1::index::_VectorIndexMeta_default_instance_._instance,
|
||||||
|
&::greptime::v1::index::_VectorIndexStats_default_instance_._instance,
|
||||||
|
};
|
||||||
|
|
||||||
|
const char descriptor_table_protodef_greptime_2fv1_2findex_2fvector_5findex_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
|
||||||
|
"\n$greptime/v1/index/vector_index.proto\022\021"
|
||||||
|
"greptime.v1.index\"\266\002\n\017VectorIndexMeta\0224\n"
|
||||||
|
"\006engine\030\001 \001(\0162$.greptime.v1.index.Vector"
|
||||||
|
"IndexEngine\022\013\n\003dim\030\002 \001(\r\0227\n\006metric\030\003 \001(\016"
|
||||||
|
"2\'.greptime.v1.index.VectorDistanceMetri"
|
||||||
|
"c\022\024\n\014connectivity\030\004 \001(\r\022\025\n\rexpansion_add"
|
||||||
|
"\030\005 \001(\r\022\030\n\020expansion_search\030\006 \001(\r\022\030\n\020null"
|
||||||
|
"_bitmap_size\030\007 \001(\r\022\022\n\nindex_size\030\010 \001(\004\0222"
|
||||||
|
"\n\005stats\030\t \001(\0132#.greptime.v1.index.Vector"
|
||||||
|
"IndexStats\"Z\n\020VectorIndexStats\022\027\n\017total_"
|
||||||
|
"row_count\030\001 \001(\004\022\031\n\021indexed_row_count\030\002 \001"
|
||||||
|
"(\004\022\022\n\nnull_count\030\003 \001(\004*4\n\021VectorIndexEng"
|
||||||
|
"ine\022\037\n\033VECTOR_INDEX_ENGINE_USEARCH\020\000*\204\001\n"
|
||||||
|
"\024VectorDistanceMetric\022\037\n\033VECTOR_DISTANCE"
|
||||||
|
"_METRIC_L2SQ\020\000\022!\n\035VECTOR_DISTANCE_METRIC"
|
||||||
|
"_COSINE\020\001\022(\n$VECTOR_DISTANCE_METRIC_INNE"
|
||||||
|
"R_PRODUCT\020\002B=Z;github.com/GreptimeTeam/g"
|
||||||
|
"reptime-proto/go/greptime/v1/indexb\006prot"
|
||||||
|
"o3"
|
||||||
|
;
|
||||||
|
static ::_pbi::once_flag descriptor_table_greptime_2fv1_2findex_2fvector_5findex_2eproto_once;
|
||||||
|
const ::_pbi::DescriptorTable descriptor_table_greptime_2fv1_2findex_2fvector_5findex_2eproto = {
|
||||||
|
false, false, 722, descriptor_table_protodef_greptime_2fv1_2findex_2fvector_5findex_2eproto,
|
||||||
|
"greptime/v1/index/vector_index.proto",
|
||||||
|
&descriptor_table_greptime_2fv1_2findex_2fvector_5findex_2eproto_once, nullptr, 0, 2,
|
||||||
|
schemas, file_default_instances, TableStruct_greptime_2fv1_2findex_2fvector_5findex_2eproto::offsets,
|
||||||
|
file_level_metadata_greptime_2fv1_2findex_2fvector_5findex_2eproto, file_level_enum_descriptors_greptime_2fv1_2findex_2fvector_5findex_2eproto,
|
||||||
|
file_level_service_descriptors_greptime_2fv1_2findex_2fvector_5findex_2eproto,
|
||||||
|
};
|
||||||
|
PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_greptime_2fv1_2findex_2fvector_5findex_2eproto_getter() {
|
||||||
|
return &descriptor_table_greptime_2fv1_2findex_2fvector_5findex_2eproto;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Force running AddDescriptors() at dynamic initialization time.
|
||||||
|
PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_greptime_2fv1_2findex_2fvector_5findex_2eproto(&descriptor_table_greptime_2fv1_2findex_2fvector_5findex_2eproto);
|
||||||
|
namespace greptime {
|
||||||
|
namespace v1 {
|
||||||
|
namespace index {
|
||||||
|
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* VectorIndexEngine_descriptor() {
|
||||||
|
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_greptime_2fv1_2findex_2fvector_5findex_2eproto);
|
||||||
|
return file_level_enum_descriptors_greptime_2fv1_2findex_2fvector_5findex_2eproto[0];
|
||||||
|
}
|
||||||
|
bool VectorIndexEngine_IsValid(int value) {
|
||||||
|
switch (value) {
|
||||||
|
case 0:
|
||||||
|
return true;
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* VectorDistanceMetric_descriptor() {
|
||||||
|
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_greptime_2fv1_2findex_2fvector_5findex_2eproto);
|
||||||
|
return file_level_enum_descriptors_greptime_2fv1_2findex_2fvector_5findex_2eproto[1];
|
||||||
|
}
|
||||||
|
bool VectorDistanceMetric_IsValid(int value) {
|
||||||
|
switch (value) {
|
||||||
|
case 0:
|
||||||
|
case 1:
|
||||||
|
case 2:
|
||||||
|
return true;
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ===================================================================
|
||||||
|
|
||||||
|
class VectorIndexMeta::_Internal {
|
||||||
|
public:
|
||||||
|
static const ::greptime::v1::index::VectorIndexStats& stats(const VectorIndexMeta* msg);
|
||||||
|
};
|
||||||
|
|
||||||
|
const ::greptime::v1::index::VectorIndexStats&
|
||||||
|
VectorIndexMeta::_Internal::stats(const VectorIndexMeta* msg) {
|
||||||
|
return *msg->_impl_.stats_;
|
||||||
|
}
|
||||||
|
VectorIndexMeta::VectorIndexMeta(::PROTOBUF_NAMESPACE_ID::Arena* arena,
|
||||||
|
bool is_message_owned)
|
||||||
|
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
|
||||||
|
SharedCtor(arena, is_message_owned);
|
||||||
|
// @@protoc_insertion_point(arena_constructor:greptime.v1.index.VectorIndexMeta)
|
||||||
|
}
|
||||||
|
VectorIndexMeta::VectorIndexMeta(const VectorIndexMeta& from)
|
||||||
|
: ::PROTOBUF_NAMESPACE_ID::Message() {
|
||||||
|
VectorIndexMeta* const _this = this; (void)_this;
|
||||||
|
new (&_impl_) Impl_{
|
||||||
|
decltype(_impl_.stats_){nullptr}
|
||||||
|
, decltype(_impl_.engine_){}
|
||||||
|
, decltype(_impl_.dim_){}
|
||||||
|
, decltype(_impl_.metric_){}
|
||||||
|
, decltype(_impl_.connectivity_){}
|
||||||
|
, decltype(_impl_.expansion_add_){}
|
||||||
|
, decltype(_impl_.expansion_search_){}
|
||||||
|
, decltype(_impl_.index_size_){}
|
||||||
|
, decltype(_impl_.null_bitmap_size_){}
|
||||||
|
, /*decltype(_impl_._cached_size_)*/{}};
|
||||||
|
|
||||||
|
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
|
||||||
|
if (from._internal_has_stats()) {
|
||||||
|
_this->_impl_.stats_ = new ::greptime::v1::index::VectorIndexStats(*from._impl_.stats_);
|
||||||
|
}
|
||||||
|
::memcpy(&_impl_.engine_, &from._impl_.engine_,
|
||||||
|
static_cast<size_t>(reinterpret_cast<char*>(&_impl_.null_bitmap_size_) -
|
||||||
|
reinterpret_cast<char*>(&_impl_.engine_)) + sizeof(_impl_.null_bitmap_size_));
|
||||||
|
// @@protoc_insertion_point(copy_constructor:greptime.v1.index.VectorIndexMeta)
|
||||||
|
}
|
||||||
|
|
||||||
|
inline void VectorIndexMeta::SharedCtor(
|
||||||
|
::_pb::Arena* arena, bool is_message_owned) {
|
||||||
|
(void)arena;
|
||||||
|
(void)is_message_owned;
|
||||||
|
new (&_impl_) Impl_{
|
||||||
|
decltype(_impl_.stats_){nullptr}
|
||||||
|
, decltype(_impl_.engine_){0}
|
||||||
|
, decltype(_impl_.dim_){0u}
|
||||||
|
, decltype(_impl_.metric_){0}
|
||||||
|
, decltype(_impl_.connectivity_){0u}
|
||||||
|
, decltype(_impl_.expansion_add_){0u}
|
||||||
|
, decltype(_impl_.expansion_search_){0u}
|
||||||
|
, decltype(_impl_.index_size_){uint64_t{0u}}
|
||||||
|
, decltype(_impl_.null_bitmap_size_){0u}
|
||||||
|
, /*decltype(_impl_._cached_size_)*/{}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
VectorIndexMeta::~VectorIndexMeta() {
|
||||||
|
// @@protoc_insertion_point(destructor:greptime.v1.index.VectorIndexMeta)
|
||||||
|
if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
|
||||||
|
(void)arena;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
SharedDtor();
|
||||||
|
}
|
||||||
|
|
||||||
|
inline void VectorIndexMeta::SharedDtor() {
|
||||||
|
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
|
||||||
|
if (this != internal_default_instance()) delete _impl_.stats_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void VectorIndexMeta::SetCachedSize(int size) const {
|
||||||
|
_impl_._cached_size_.Set(size);
|
||||||
|
}
|
||||||
|
|
||||||
|
void VectorIndexMeta::Clear() {
|
||||||
|
// @@protoc_insertion_point(message_clear_start:greptime.v1.index.VectorIndexMeta)
|
||||||
|
uint32_t cached_has_bits = 0;
|
||||||
|
// Prevent compiler warnings about cached_has_bits being unused
|
||||||
|
(void) cached_has_bits;
|
||||||
|
|
||||||
|
if (GetArenaForAllocation() == nullptr && _impl_.stats_ != nullptr) {
|
||||||
|
delete _impl_.stats_;
|
||||||
|
}
|
||||||
|
_impl_.stats_ = nullptr;
|
||||||
|
::memset(&_impl_.engine_, 0, static_cast<size_t>(
|
||||||
|
reinterpret_cast<char*>(&_impl_.null_bitmap_size_) -
|
||||||
|
reinterpret_cast<char*>(&_impl_.engine_)) + sizeof(_impl_.null_bitmap_size_));
|
||||||
|
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
|
||||||
|
}
|
||||||
|
|
||||||
|
const char* VectorIndexMeta::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
|
||||||
|
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
|
||||||
|
while (!ctx->Done(&ptr)) {
|
||||||
|
uint32_t tag;
|
||||||
|
ptr = ::_pbi::ReadTag(ptr, &tag);
|
||||||
|
switch (tag >> 3) {
|
||||||
|
// .greptime.v1.index.VectorIndexEngine engine = 1;
|
||||||
|
case 1:
|
||||||
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
|
||||||
|
uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
|
||||||
|
CHK_(ptr);
|
||||||
|
_internal_set_engine(static_cast<::greptime::v1::index::VectorIndexEngine>(val));
|
||||||
|
} else
|
||||||
|
goto handle_unusual;
|
||||||
|
continue;
|
||||||
|
// uint32 dim = 2;
|
||||||
|
case 2:
|
||||||
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
|
||||||
|
_impl_.dim_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
|
||||||
|
CHK_(ptr);
|
||||||
|
} else
|
||||||
|
goto handle_unusual;
|
||||||
|
continue;
|
||||||
|
// .greptime.v1.index.VectorDistanceMetric metric = 3;
|
||||||
|
case 3:
|
||||||
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
|
||||||
|
uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
|
||||||
|
CHK_(ptr);
|
||||||
|
_internal_set_metric(static_cast<::greptime::v1::index::VectorDistanceMetric>(val));
|
||||||
|
} else
|
||||||
|
goto handle_unusual;
|
||||||
|
continue;
|
||||||
|
// uint32 connectivity = 4;
|
||||||
|
case 4:
|
||||||
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
|
||||||
|
_impl_.connectivity_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
|
||||||
|
CHK_(ptr);
|
||||||
|
} else
|
||||||
|
goto handle_unusual;
|
||||||
|
continue;
|
||||||
|
// uint32 expansion_add = 5;
|
||||||
|
case 5:
|
||||||
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 40)) {
|
||||||
|
_impl_.expansion_add_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
|
||||||
|
CHK_(ptr);
|
||||||
|
} else
|
||||||
|
goto handle_unusual;
|
||||||
|
continue;
|
||||||
|
// uint32 expansion_search = 6;
|
||||||
|
case 6:
|
||||||
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 48)) {
|
||||||
|
_impl_.expansion_search_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
|
||||||
|
CHK_(ptr);
|
||||||
|
} else
|
||||||
|
goto handle_unusual;
|
||||||
|
continue;
|
||||||
|
// uint32 null_bitmap_size = 7;
|
||||||
|
case 7:
|
||||||
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 56)) {
|
||||||
|
_impl_.null_bitmap_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
|
||||||
|
CHK_(ptr);
|
||||||
|
} else
|
||||||
|
goto handle_unusual;
|
||||||
|
continue;
|
||||||
|
// uint64 index_size = 8;
|
||||||
|
case 8:
|
||||||
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 64)) {
|
||||||
|
_impl_.index_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
|
||||||
|
CHK_(ptr);
|
||||||
|
} else
|
||||||
|
goto handle_unusual;
|
||||||
|
continue;
|
||||||
|
// .greptime.v1.index.VectorIndexStats stats = 9;
|
||||||
|
case 9:
|
||||||
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 74)) {
|
||||||
|
ptr = ctx->ParseMessage(_internal_mutable_stats(), ptr);
|
||||||
|
CHK_(ptr);
|
||||||
|
} else
|
||||||
|
goto handle_unusual;
|
||||||
|
continue;
|
||||||
|
default:
|
||||||
|
goto handle_unusual;
|
||||||
|
} // switch
|
||||||
|
handle_unusual:
|
||||||
|
if ((tag == 0) || ((tag & 7) == 4)) {
|
||||||
|
CHK_(ptr);
|
||||||
|
ctx->SetLastTag(tag);
|
||||||
|
goto message_done;
|
||||||
|
}
|
||||||
|
ptr = UnknownFieldParse(
|
||||||
|
tag,
|
||||||
|
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
|
||||||
|
ptr, ctx);
|
||||||
|
CHK_(ptr != nullptr);
|
||||||
|
} // while
|
||||||
|
message_done:
|
||||||
|
return ptr;
|
||||||
|
failure:
|
||||||
|
ptr = nullptr;
|
||||||
|
goto message_done;
|
||||||
|
#undef CHK_
|
||||||
|
}
|
||||||
|
|
||||||
|
uint8_t* VectorIndexMeta::_InternalSerialize(
|
||||||
|
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
|
||||||
|
// @@protoc_insertion_point(serialize_to_array_start:greptime.v1.index.VectorIndexMeta)
|
||||||
|
uint32_t cached_has_bits = 0;
|
||||||
|
(void) cached_has_bits;
|
||||||
|
|
||||||
|
// .greptime.v1.index.VectorIndexEngine engine = 1;
|
||||||
|
if (this->_internal_engine() != 0) {
|
||||||
|
target = stream->EnsureSpace(target);
|
||||||
|
target = ::_pbi::WireFormatLite::WriteEnumToArray(
|
||||||
|
1, this->_internal_engine(), target);
|
||||||
|
}
|
||||||
|
|
||||||
|
// uint32 dim = 2;
|
||||||
|
if (this->_internal_dim() != 0) {
|
||||||
|
target = stream->EnsureSpace(target);
|
||||||
|
target = ::_pbi::WireFormatLite::WriteUInt32ToArray(2, this->_internal_dim(), target);
|
||||||
|
}
|
||||||
|
|
||||||
|
// .greptime.v1.index.VectorDistanceMetric metric = 3;
|
||||||
|
if (this->_internal_metric() != 0) {
|
||||||
|
target = stream->EnsureSpace(target);
|
||||||
|
target = ::_pbi::WireFormatLite::WriteEnumToArray(
|
||||||
|
3, this->_internal_metric(), target);
|
||||||
|
}
|
||||||
|
|
||||||
|
// uint32 connectivity = 4;
|
||||||
|
if (this->_internal_connectivity() != 0) {
|
||||||
|
target = stream->EnsureSpace(target);
|
||||||
|
target = ::_pbi::WireFormatLite::WriteUInt32ToArray(4, this->_internal_connectivity(), target);
|
||||||
|
}
|
||||||
|
|
||||||
|
// uint32 expansion_add = 5;
|
||||||
|
if (this->_internal_expansion_add() != 0) {
|
||||||
|
target = stream->EnsureSpace(target);
|
||||||
|
target = ::_pbi::WireFormatLite::WriteUInt32ToArray(5, this->_internal_expansion_add(), target);
|
||||||
|
}
|
||||||
|
|
||||||
|
// uint32 expansion_search = 6;
|
||||||
|
if (this->_internal_expansion_search() != 0) {
|
||||||
|
target = stream->EnsureSpace(target);
|
||||||
|
target = ::_pbi::WireFormatLite::WriteUInt32ToArray(6, this->_internal_expansion_search(), target);
|
||||||
|
}
|
||||||
|
|
||||||
|
// uint32 null_bitmap_size = 7;
|
||||||
|
if (this->_internal_null_bitmap_size() != 0) {
|
||||||
|
target = stream->EnsureSpace(target);
|
||||||
|
target = ::_pbi::WireFormatLite::WriteUInt32ToArray(7, this->_internal_null_bitmap_size(), target);
|
||||||
|
}
|
||||||
|
|
||||||
|
// uint64 index_size = 8;
|
||||||
|
if (this->_internal_index_size() != 0) {
|
||||||
|
target = stream->EnsureSpace(target);
|
||||||
|
target = ::_pbi::WireFormatLite::WriteUInt64ToArray(8, this->_internal_index_size(), target);
|
||||||
|
}
|
||||||
|
|
||||||
|
// .greptime.v1.index.VectorIndexStats stats = 9;
|
||||||
|
if (this->_internal_has_stats()) {
|
||||||
|
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
|
||||||
|
InternalWriteMessage(9, _Internal::stats(this),
|
||||||
|
_Internal::stats(this).GetCachedSize(), target, stream);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
|
||||||
|
target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
|
||||||
|
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
|
||||||
|
}
|
||||||
|
// @@protoc_insertion_point(serialize_to_array_end:greptime.v1.index.VectorIndexMeta)
|
||||||
|
return target;
|
||||||
|
}
|
||||||
|
|
||||||
|
size_t VectorIndexMeta::ByteSizeLong() const {
|
||||||
|
// @@protoc_insertion_point(message_byte_size_start:greptime.v1.index.VectorIndexMeta)
|
||||||
|
size_t total_size = 0;
|
||||||
|
|
||||||
|
uint32_t cached_has_bits = 0;
|
||||||
|
// Prevent compiler warnings about cached_has_bits being unused
|
||||||
|
(void) cached_has_bits;
|
||||||
|
|
||||||
|
// .greptime.v1.index.VectorIndexStats stats = 9;
|
||||||
|
if (this->_internal_has_stats()) {
|
||||||
|
total_size += 1 +
|
||||||
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
|
||||||
|
*_impl_.stats_);
|
||||||
|
}
|
||||||
|
|
||||||
|
// .greptime.v1.index.VectorIndexEngine engine = 1;
|
||||||
|
if (this->_internal_engine() != 0) {
|
||||||
|
total_size += 1 +
|
||||||
|
::_pbi::WireFormatLite::EnumSize(this->_internal_engine());
|
||||||
|
}
|
||||||
|
|
||||||
|
// uint32 dim = 2;
|
||||||
|
if (this->_internal_dim() != 0) {
|
||||||
|
total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_dim());
|
||||||
|
}
|
||||||
|
|
||||||
|
// .greptime.v1.index.VectorDistanceMetric metric = 3;
|
||||||
|
if (this->_internal_metric() != 0) {
|
||||||
|
total_size += 1 +
|
||||||
|
::_pbi::WireFormatLite::EnumSize(this->_internal_metric());
|
||||||
|
}
|
||||||
|
|
||||||
|
// uint32 connectivity = 4;
|
||||||
|
if (this->_internal_connectivity() != 0) {
|
||||||
|
total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_connectivity());
|
||||||
|
}
|
||||||
|
|
||||||
|
// uint32 expansion_add = 5;
|
||||||
|
if (this->_internal_expansion_add() != 0) {
|
||||||
|
total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_expansion_add());
|
||||||
|
}
|
||||||
|
|
||||||
|
// uint32 expansion_search = 6;
|
||||||
|
if (this->_internal_expansion_search() != 0) {
|
||||||
|
total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_expansion_search());
|
||||||
|
}
|
||||||
|
|
||||||
|
// uint64 index_size = 8;
|
||||||
|
if (this->_internal_index_size() != 0) {
|
||||||
|
total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_index_size());
|
||||||
|
}
|
||||||
|
|
||||||
|
// uint32 null_bitmap_size = 7;
|
||||||
|
if (this->_internal_null_bitmap_size() != 0) {
|
||||||
|
total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_null_bitmap_size());
|
||||||
|
}
|
||||||
|
|
||||||
|
return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
|
||||||
|
}
|
||||||
|
|
||||||
|
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData VectorIndexMeta::_class_data_ = {
|
||||||
|
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
|
||||||
|
VectorIndexMeta::MergeImpl
|
||||||
|
};
|
||||||
|
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*VectorIndexMeta::GetClassData() const { return &_class_data_; }
|
||||||
|
|
||||||
|
|
||||||
|
void VectorIndexMeta::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
|
||||||
|
auto* const _this = static_cast<VectorIndexMeta*>(&to_msg);
|
||||||
|
auto& from = static_cast<const VectorIndexMeta&>(from_msg);
|
||||||
|
// @@protoc_insertion_point(class_specific_merge_from_start:greptime.v1.index.VectorIndexMeta)
|
||||||
|
GOOGLE_DCHECK_NE(&from, _this);
|
||||||
|
uint32_t cached_has_bits = 0;
|
||||||
|
(void) cached_has_bits;
|
||||||
|
|
||||||
|
if (from._internal_has_stats()) {
|
||||||
|
_this->_internal_mutable_stats()->::greptime::v1::index::VectorIndexStats::MergeFrom(
|
||||||
|
from._internal_stats());
|
||||||
|
}
|
||||||
|
if (from._internal_engine() != 0) {
|
||||||
|
_this->_internal_set_engine(from._internal_engine());
|
||||||
|
}
|
||||||
|
if (from._internal_dim() != 0) {
|
||||||
|
_this->_internal_set_dim(from._internal_dim());
|
||||||
|
}
|
||||||
|
if (from._internal_metric() != 0) {
|
||||||
|
_this->_internal_set_metric(from._internal_metric());
|
||||||
|
}
|
||||||
|
if (from._internal_connectivity() != 0) {
|
||||||
|
_this->_internal_set_connectivity(from._internal_connectivity());
|
||||||
|
}
|
||||||
|
if (from._internal_expansion_add() != 0) {
|
||||||
|
_this->_internal_set_expansion_add(from._internal_expansion_add());
|
||||||
|
}
|
||||||
|
if (from._internal_expansion_search() != 0) {
|
||||||
|
_this->_internal_set_expansion_search(from._internal_expansion_search());
|
||||||
|
}
|
||||||
|
if (from._internal_index_size() != 0) {
|
||||||
|
_this->_internal_set_index_size(from._internal_index_size());
|
||||||
|
}
|
||||||
|
if (from._internal_null_bitmap_size() != 0) {
|
||||||
|
_this->_internal_set_null_bitmap_size(from._internal_null_bitmap_size());
|
||||||
|
}
|
||||||
|
_this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
|
||||||
|
}
|
||||||
|
|
||||||
|
void VectorIndexMeta::CopyFrom(const VectorIndexMeta& from) {
|
||||||
|
// @@protoc_insertion_point(class_specific_copy_from_start:greptime.v1.index.VectorIndexMeta)
|
||||||
|
if (&from == this) return;
|
||||||
|
Clear();
|
||||||
|
MergeFrom(from);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool VectorIndexMeta::IsInitialized() const {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void VectorIndexMeta::InternalSwap(VectorIndexMeta* other) {
|
||||||
|
using std::swap;
|
||||||
|
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
|
||||||
|
::PROTOBUF_NAMESPACE_ID::internal::memswap<
|
||||||
|
PROTOBUF_FIELD_OFFSET(VectorIndexMeta, _impl_.null_bitmap_size_)
|
||||||
|
+ sizeof(VectorIndexMeta::_impl_.null_bitmap_size_)
|
||||||
|
- PROTOBUF_FIELD_OFFSET(VectorIndexMeta, _impl_.stats_)>(
|
||||||
|
reinterpret_cast<char*>(&_impl_.stats_),
|
||||||
|
reinterpret_cast<char*>(&other->_impl_.stats_));
|
||||||
|
}
|
||||||
|
|
||||||
|
::PROTOBUF_NAMESPACE_ID::Metadata VectorIndexMeta::GetMetadata() const {
|
||||||
|
return ::_pbi::AssignDescriptors(
|
||||||
|
&descriptor_table_greptime_2fv1_2findex_2fvector_5findex_2eproto_getter, &descriptor_table_greptime_2fv1_2findex_2fvector_5findex_2eproto_once,
|
||||||
|
file_level_metadata_greptime_2fv1_2findex_2fvector_5findex_2eproto[0]);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ===================================================================
|
||||||
|
|
||||||
|
class VectorIndexStats::_Internal {
|
||||||
|
public:
|
||||||
|
};
|
||||||
|
|
||||||
|
VectorIndexStats::VectorIndexStats(::PROTOBUF_NAMESPACE_ID::Arena* arena,
|
||||||
|
bool is_message_owned)
|
||||||
|
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
|
||||||
|
SharedCtor(arena, is_message_owned);
|
||||||
|
// @@protoc_insertion_point(arena_constructor:greptime.v1.index.VectorIndexStats)
|
||||||
|
}
|
||||||
|
VectorIndexStats::VectorIndexStats(const VectorIndexStats& from)
|
||||||
|
: ::PROTOBUF_NAMESPACE_ID::Message() {
|
||||||
|
VectorIndexStats* const _this = this; (void)_this;
|
||||||
|
new (&_impl_) Impl_{
|
||||||
|
decltype(_impl_.total_row_count_){}
|
||||||
|
, decltype(_impl_.indexed_row_count_){}
|
||||||
|
, decltype(_impl_.null_count_){}
|
||||||
|
, /*decltype(_impl_._cached_size_)*/{}};
|
||||||
|
|
||||||
|
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
|
||||||
|
::memcpy(&_impl_.total_row_count_, &from._impl_.total_row_count_,
|
||||||
|
static_cast<size_t>(reinterpret_cast<char*>(&_impl_.null_count_) -
|
||||||
|
reinterpret_cast<char*>(&_impl_.total_row_count_)) + sizeof(_impl_.null_count_));
|
||||||
|
// @@protoc_insertion_point(copy_constructor:greptime.v1.index.VectorIndexStats)
|
||||||
|
}
|
||||||
|
|
||||||
|
inline void VectorIndexStats::SharedCtor(
|
||||||
|
::_pb::Arena* arena, bool is_message_owned) {
|
||||||
|
(void)arena;
|
||||||
|
(void)is_message_owned;
|
||||||
|
new (&_impl_) Impl_{
|
||||||
|
decltype(_impl_.total_row_count_){uint64_t{0u}}
|
||||||
|
, decltype(_impl_.indexed_row_count_){uint64_t{0u}}
|
||||||
|
, decltype(_impl_.null_count_){uint64_t{0u}}
|
||||||
|
, /*decltype(_impl_._cached_size_)*/{}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
VectorIndexStats::~VectorIndexStats() {
|
||||||
|
// @@protoc_insertion_point(destructor:greptime.v1.index.VectorIndexStats)
|
||||||
|
if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
|
||||||
|
(void)arena;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
SharedDtor();
|
||||||
|
}
|
||||||
|
|
||||||
|
inline void VectorIndexStats::SharedDtor() {
|
||||||
|
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
|
||||||
|
}
|
||||||
|
|
||||||
|
void VectorIndexStats::SetCachedSize(int size) const {
|
||||||
|
_impl_._cached_size_.Set(size);
|
||||||
|
}
|
||||||
|
|
||||||
|
void VectorIndexStats::Clear() {
|
||||||
|
// @@protoc_insertion_point(message_clear_start:greptime.v1.index.VectorIndexStats)
|
||||||
|
uint32_t cached_has_bits = 0;
|
||||||
|
// Prevent compiler warnings about cached_has_bits being unused
|
||||||
|
(void) cached_has_bits;
|
||||||
|
|
||||||
|
::memset(&_impl_.total_row_count_, 0, static_cast<size_t>(
|
||||||
|
reinterpret_cast<char*>(&_impl_.null_count_) -
|
||||||
|
reinterpret_cast<char*>(&_impl_.total_row_count_)) + sizeof(_impl_.null_count_));
|
||||||
|
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
|
||||||
|
}
|
||||||
|
|
||||||
|
const char* VectorIndexStats::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
|
||||||
|
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
|
||||||
|
while (!ctx->Done(&ptr)) {
|
||||||
|
uint32_t tag;
|
||||||
|
ptr = ::_pbi::ReadTag(ptr, &tag);
|
||||||
|
switch (tag >> 3) {
|
||||||
|
// uint64 total_row_count = 1;
|
||||||
|
case 1:
|
||||||
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
|
||||||
|
_impl_.total_row_count_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
|
||||||
|
CHK_(ptr);
|
||||||
|
} else
|
||||||
|
goto handle_unusual;
|
||||||
|
continue;
|
||||||
|
// uint64 indexed_row_count = 2;
|
||||||
|
case 2:
|
||||||
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
|
||||||
|
_impl_.indexed_row_count_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
|
||||||
|
CHK_(ptr);
|
||||||
|
} else
|
||||||
|
goto handle_unusual;
|
||||||
|
continue;
|
||||||
|
// uint64 null_count = 3;
|
||||||
|
case 3:
|
||||||
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
|
||||||
|
_impl_.null_count_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
|
||||||
|
CHK_(ptr);
|
||||||
|
} else
|
||||||
|
goto handle_unusual;
|
||||||
|
continue;
|
||||||
|
default:
|
||||||
|
goto handle_unusual;
|
||||||
|
} // switch
|
||||||
|
handle_unusual:
|
||||||
|
if ((tag == 0) || ((tag & 7) == 4)) {
|
||||||
|
CHK_(ptr);
|
||||||
|
ctx->SetLastTag(tag);
|
||||||
|
goto message_done;
|
||||||
|
}
|
||||||
|
ptr = UnknownFieldParse(
|
||||||
|
tag,
|
||||||
|
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
|
||||||
|
ptr, ctx);
|
||||||
|
CHK_(ptr != nullptr);
|
||||||
|
} // while
|
||||||
|
message_done:
|
||||||
|
return ptr;
|
||||||
|
failure:
|
||||||
|
ptr = nullptr;
|
||||||
|
goto message_done;
|
||||||
|
#undef CHK_
|
||||||
|
}
|
||||||
|
|
||||||
|
uint8_t* VectorIndexStats::_InternalSerialize(
|
||||||
|
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
|
||||||
|
// @@protoc_insertion_point(serialize_to_array_start:greptime.v1.index.VectorIndexStats)
|
||||||
|
uint32_t cached_has_bits = 0;
|
||||||
|
(void) cached_has_bits;
|
||||||
|
|
||||||
|
// uint64 total_row_count = 1;
|
||||||
|
if (this->_internal_total_row_count() != 0) {
|
||||||
|
target = stream->EnsureSpace(target);
|
||||||
|
target = ::_pbi::WireFormatLite::WriteUInt64ToArray(1, this->_internal_total_row_count(), target);
|
||||||
|
}
|
||||||
|
|
||||||
|
// uint64 indexed_row_count = 2;
|
||||||
|
if (this->_internal_indexed_row_count() != 0) {
|
||||||
|
target = stream->EnsureSpace(target);
|
||||||
|
target = ::_pbi::WireFormatLite::WriteUInt64ToArray(2, this->_internal_indexed_row_count(), target);
|
||||||
|
}
|
||||||
|
|
||||||
|
// uint64 null_count = 3;
|
||||||
|
if (this->_internal_null_count() != 0) {
|
||||||
|
target = stream->EnsureSpace(target);
|
||||||
|
target = ::_pbi::WireFormatLite::WriteUInt64ToArray(3, this->_internal_null_count(), target);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
|
||||||
|
target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
|
||||||
|
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
|
||||||
|
}
|
||||||
|
// @@protoc_insertion_point(serialize_to_array_end:greptime.v1.index.VectorIndexStats)
|
||||||
|
return target;
|
||||||
|
}
|
||||||
|
|
||||||
|
size_t VectorIndexStats::ByteSizeLong() const {
|
||||||
|
// @@protoc_insertion_point(message_byte_size_start:greptime.v1.index.VectorIndexStats)
|
||||||
|
size_t total_size = 0;
|
||||||
|
|
||||||
|
uint32_t cached_has_bits = 0;
|
||||||
|
// Prevent compiler warnings about cached_has_bits being unused
|
||||||
|
(void) cached_has_bits;
|
||||||
|
|
||||||
|
// uint64 total_row_count = 1;
|
||||||
|
if (this->_internal_total_row_count() != 0) {
|
||||||
|
total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_total_row_count());
|
||||||
|
}
|
||||||
|
|
||||||
|
// uint64 indexed_row_count = 2;
|
||||||
|
if (this->_internal_indexed_row_count() != 0) {
|
||||||
|
total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_indexed_row_count());
|
||||||
|
}
|
||||||
|
|
||||||
|
// uint64 null_count = 3;
|
||||||
|
if (this->_internal_null_count() != 0) {
|
||||||
|
total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_null_count());
|
||||||
|
}
|
||||||
|
|
||||||
|
return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
|
||||||
|
}
|
||||||
|
|
||||||
|
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData VectorIndexStats::_class_data_ = {
|
||||||
|
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
|
||||||
|
VectorIndexStats::MergeImpl
|
||||||
|
};
|
||||||
|
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*VectorIndexStats::GetClassData() const { return &_class_data_; }
|
||||||
|
|
||||||
|
|
||||||
|
void VectorIndexStats::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
|
||||||
|
auto* const _this = static_cast<VectorIndexStats*>(&to_msg);
|
||||||
|
auto& from = static_cast<const VectorIndexStats&>(from_msg);
|
||||||
|
// @@protoc_insertion_point(class_specific_merge_from_start:greptime.v1.index.VectorIndexStats)
|
||||||
|
GOOGLE_DCHECK_NE(&from, _this);
|
||||||
|
uint32_t cached_has_bits = 0;
|
||||||
|
(void) cached_has_bits;
|
||||||
|
|
||||||
|
if (from._internal_total_row_count() != 0) {
|
||||||
|
_this->_internal_set_total_row_count(from._internal_total_row_count());
|
||||||
|
}
|
||||||
|
if (from._internal_indexed_row_count() != 0) {
|
||||||
|
_this->_internal_set_indexed_row_count(from._internal_indexed_row_count());
|
||||||
|
}
|
||||||
|
if (from._internal_null_count() != 0) {
|
||||||
|
_this->_internal_set_null_count(from._internal_null_count());
|
||||||
|
}
|
||||||
|
_this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
|
||||||
|
}
|
||||||
|
|
||||||
|
void VectorIndexStats::CopyFrom(const VectorIndexStats& from) {
|
||||||
|
// @@protoc_insertion_point(class_specific_copy_from_start:greptime.v1.index.VectorIndexStats)
|
||||||
|
if (&from == this) return;
|
||||||
|
Clear();
|
||||||
|
MergeFrom(from);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool VectorIndexStats::IsInitialized() const {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void VectorIndexStats::InternalSwap(VectorIndexStats* other) {
|
||||||
|
using std::swap;
|
||||||
|
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
|
||||||
|
::PROTOBUF_NAMESPACE_ID::internal::memswap<
|
||||||
|
PROTOBUF_FIELD_OFFSET(VectorIndexStats, _impl_.null_count_)
|
||||||
|
+ sizeof(VectorIndexStats::_impl_.null_count_)
|
||||||
|
- PROTOBUF_FIELD_OFFSET(VectorIndexStats, _impl_.total_row_count_)>(
|
||||||
|
reinterpret_cast<char*>(&_impl_.total_row_count_),
|
||||||
|
reinterpret_cast<char*>(&other->_impl_.total_row_count_));
|
||||||
|
}
|
||||||
|
|
||||||
|
::PROTOBUF_NAMESPACE_ID::Metadata VectorIndexStats::GetMetadata() const {
|
||||||
|
return ::_pbi::AssignDescriptors(
|
||||||
|
&descriptor_table_greptime_2fv1_2findex_2fvector_5findex_2eproto_getter, &descriptor_table_greptime_2fv1_2findex_2fvector_5findex_2eproto_once,
|
||||||
|
file_level_metadata_greptime_2fv1_2findex_2fvector_5findex_2eproto[1]);
|
||||||
|
}
|
||||||
|
|
||||||
|
// @@protoc_insertion_point(namespace_scope)
|
||||||
|
} // namespace index
|
||||||
|
} // namespace v1
|
||||||
|
} // namespace greptime
|
||||||
|
PROTOBUF_NAMESPACE_OPEN
|
||||||
|
template<> PROTOBUF_NOINLINE ::greptime::v1::index::VectorIndexMeta*
|
||||||
|
Arena::CreateMaybeMessage< ::greptime::v1::index::VectorIndexMeta >(Arena* arena) {
|
||||||
|
return Arena::CreateMessageInternal< ::greptime::v1::index::VectorIndexMeta >(arena);
|
||||||
|
}
|
||||||
|
template<> PROTOBUF_NOINLINE ::greptime::v1::index::VectorIndexStats*
|
||||||
|
Arena::CreateMaybeMessage< ::greptime::v1::index::VectorIndexStats >(Arena* arena) {
|
||||||
|
return Arena::CreateMessageInternal< ::greptime::v1::index::VectorIndexStats >(arena);
|
||||||
|
}
|
||||||
|
PROTOBUF_NAMESPACE_CLOSE
|
||||||
|
|
||||||
|
// @@protoc_insertion_point(global_scope)
|
||||||
|
#include <google/protobuf/port_undef.inc>
|
||||||
@@ -0,0 +1,888 @@
|
|||||||
|
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||||
|
// source: greptime/v1/index/vector_index.proto
|
||||||
|
|
||||||
|
#ifndef GOOGLE_PROTOBUF_INCLUDED_greptime_2fv1_2findex_2fvector_5findex_2eproto
|
||||||
|
#define GOOGLE_PROTOBUF_INCLUDED_greptime_2fv1_2findex_2fvector_5findex_2eproto
|
||||||
|
|
||||||
|
#include <limits>
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
#include <google/protobuf/port_def.inc>
|
||||||
|
#if PROTOBUF_VERSION < 3021000
|
||||||
|
#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 3021006 < 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_util.h>
|
||||||
|
#include <google/protobuf/metadata_lite.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/generated_enum_reflection.h>
|
||||||
|
#include <google/protobuf/unknown_field_set.h>
|
||||||
|
// @@protoc_insertion_point(includes)
|
||||||
|
#include <google/protobuf/port_def.inc>
|
||||||
|
#define PROTOBUF_INTERNAL_EXPORT_greptime_2fv1_2findex_2fvector_5findex_2eproto
|
||||||
|
PROTOBUF_NAMESPACE_OPEN
|
||||||
|
namespace internal {
|
||||||
|
class AnyMetadata;
|
||||||
|
} // namespace internal
|
||||||
|
PROTOBUF_NAMESPACE_CLOSE
|
||||||
|
|
||||||
|
// Internal implementation detail -- do not use these members.
|
||||||
|
struct TableStruct_greptime_2fv1_2findex_2fvector_5findex_2eproto {
|
||||||
|
static const uint32_t offsets[];
|
||||||
|
};
|
||||||
|
extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_greptime_2fv1_2findex_2fvector_5findex_2eproto;
|
||||||
|
namespace greptime {
|
||||||
|
namespace v1 {
|
||||||
|
namespace index {
|
||||||
|
class VectorIndexMeta;
|
||||||
|
struct VectorIndexMetaDefaultTypeInternal;
|
||||||
|
extern VectorIndexMetaDefaultTypeInternal _VectorIndexMeta_default_instance_;
|
||||||
|
class VectorIndexStats;
|
||||||
|
struct VectorIndexStatsDefaultTypeInternal;
|
||||||
|
extern VectorIndexStatsDefaultTypeInternal _VectorIndexStats_default_instance_;
|
||||||
|
} // namespace index
|
||||||
|
} // namespace v1
|
||||||
|
} // namespace greptime
|
||||||
|
PROTOBUF_NAMESPACE_OPEN
|
||||||
|
template<> ::greptime::v1::index::VectorIndexMeta* Arena::CreateMaybeMessage<::greptime::v1::index::VectorIndexMeta>(Arena*);
|
||||||
|
template<> ::greptime::v1::index::VectorIndexStats* Arena::CreateMaybeMessage<::greptime::v1::index::VectorIndexStats>(Arena*);
|
||||||
|
PROTOBUF_NAMESPACE_CLOSE
|
||||||
|
namespace greptime {
|
||||||
|
namespace v1 {
|
||||||
|
namespace index {
|
||||||
|
|
||||||
|
enum VectorIndexEngine : int {
|
||||||
|
VECTOR_INDEX_ENGINE_USEARCH = 0,
|
||||||
|
VectorIndexEngine_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<int32_t>::min(),
|
||||||
|
VectorIndexEngine_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<int32_t>::max()
|
||||||
|
};
|
||||||
|
bool VectorIndexEngine_IsValid(int value);
|
||||||
|
constexpr VectorIndexEngine VectorIndexEngine_MIN = VECTOR_INDEX_ENGINE_USEARCH;
|
||||||
|
constexpr VectorIndexEngine VectorIndexEngine_MAX = VECTOR_INDEX_ENGINE_USEARCH;
|
||||||
|
constexpr int VectorIndexEngine_ARRAYSIZE = VectorIndexEngine_MAX + 1;
|
||||||
|
|
||||||
|
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* VectorIndexEngine_descriptor();
|
||||||
|
template<typename T>
|
||||||
|
inline const std::string& VectorIndexEngine_Name(T enum_t_value) {
|
||||||
|
static_assert(::std::is_same<T, VectorIndexEngine>::value ||
|
||||||
|
::std::is_integral<T>::value,
|
||||||
|
"Incorrect type passed to function VectorIndexEngine_Name.");
|
||||||
|
return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum(
|
||||||
|
VectorIndexEngine_descriptor(), enum_t_value);
|
||||||
|
}
|
||||||
|
inline bool VectorIndexEngine_Parse(
|
||||||
|
::PROTOBUF_NAMESPACE_ID::ConstStringParam name, VectorIndexEngine* value) {
|
||||||
|
return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum<VectorIndexEngine>(
|
||||||
|
VectorIndexEngine_descriptor(), name, value);
|
||||||
|
}
|
||||||
|
enum VectorDistanceMetric : int {
|
||||||
|
VECTOR_DISTANCE_METRIC_L2SQ = 0,
|
||||||
|
VECTOR_DISTANCE_METRIC_COSINE = 1,
|
||||||
|
VECTOR_DISTANCE_METRIC_INNER_PRODUCT = 2,
|
||||||
|
VectorDistanceMetric_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<int32_t>::min(),
|
||||||
|
VectorDistanceMetric_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<int32_t>::max()
|
||||||
|
};
|
||||||
|
bool VectorDistanceMetric_IsValid(int value);
|
||||||
|
constexpr VectorDistanceMetric VectorDistanceMetric_MIN = VECTOR_DISTANCE_METRIC_L2SQ;
|
||||||
|
constexpr VectorDistanceMetric VectorDistanceMetric_MAX = VECTOR_DISTANCE_METRIC_INNER_PRODUCT;
|
||||||
|
constexpr int VectorDistanceMetric_ARRAYSIZE = VectorDistanceMetric_MAX + 1;
|
||||||
|
|
||||||
|
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* VectorDistanceMetric_descriptor();
|
||||||
|
template<typename T>
|
||||||
|
inline const std::string& VectorDistanceMetric_Name(T enum_t_value) {
|
||||||
|
static_assert(::std::is_same<T, VectorDistanceMetric>::value ||
|
||||||
|
::std::is_integral<T>::value,
|
||||||
|
"Incorrect type passed to function VectorDistanceMetric_Name.");
|
||||||
|
return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum(
|
||||||
|
VectorDistanceMetric_descriptor(), enum_t_value);
|
||||||
|
}
|
||||||
|
inline bool VectorDistanceMetric_Parse(
|
||||||
|
::PROTOBUF_NAMESPACE_ID::ConstStringParam name, VectorDistanceMetric* value) {
|
||||||
|
return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum<VectorDistanceMetric>(
|
||||||
|
VectorDistanceMetric_descriptor(), name, value);
|
||||||
|
}
|
||||||
|
// ===================================================================
|
||||||
|
|
||||||
|
class VectorIndexMeta final :
|
||||||
|
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:greptime.v1.index.VectorIndexMeta) */ {
|
||||||
|
public:
|
||||||
|
inline VectorIndexMeta() : VectorIndexMeta(nullptr) {}
|
||||||
|
~VectorIndexMeta() override;
|
||||||
|
explicit PROTOBUF_CONSTEXPR VectorIndexMeta(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized);
|
||||||
|
|
||||||
|
VectorIndexMeta(const VectorIndexMeta& from);
|
||||||
|
VectorIndexMeta(VectorIndexMeta&& from) noexcept
|
||||||
|
: VectorIndexMeta() {
|
||||||
|
*this = ::std::move(from);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline VectorIndexMeta& operator=(const VectorIndexMeta& from) {
|
||||||
|
CopyFrom(from);
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
inline VectorIndexMeta& operator=(VectorIndexMeta&& from) noexcept {
|
||||||
|
if (this == &from) return *this;
|
||||||
|
if (GetOwningArena() == from.GetOwningArena()
|
||||||
|
#ifdef PROTOBUF_FORCE_COPY_IN_MOVE
|
||||||
|
&& GetOwningArena() != nullptr
|
||||||
|
#endif // !PROTOBUF_FORCE_COPY_IN_MOVE
|
||||||
|
) {
|
||||||
|
InternalSwap(&from);
|
||||||
|
} else {
|
||||||
|
CopyFrom(from);
|
||||||
|
}
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
|
||||||
|
return GetDescriptor();
|
||||||
|
}
|
||||||
|
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
|
||||||
|
return default_instance().GetMetadata().descriptor;
|
||||||
|
}
|
||||||
|
static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() {
|
||||||
|
return default_instance().GetMetadata().reflection;
|
||||||
|
}
|
||||||
|
static const VectorIndexMeta& default_instance() {
|
||||||
|
return *internal_default_instance();
|
||||||
|
}
|
||||||
|
static inline const VectorIndexMeta* internal_default_instance() {
|
||||||
|
return reinterpret_cast<const VectorIndexMeta*>(
|
||||||
|
&_VectorIndexMeta_default_instance_);
|
||||||
|
}
|
||||||
|
static constexpr int kIndexInFileMessages =
|
||||||
|
0;
|
||||||
|
|
||||||
|
friend void swap(VectorIndexMeta& a, VectorIndexMeta& b) {
|
||||||
|
a.Swap(&b);
|
||||||
|
}
|
||||||
|
inline void Swap(VectorIndexMeta* other) {
|
||||||
|
if (other == this) return;
|
||||||
|
#ifdef PROTOBUF_FORCE_COPY_IN_SWAP
|
||||||
|
if (GetOwningArena() != nullptr &&
|
||||||
|
GetOwningArena() == other->GetOwningArena()) {
|
||||||
|
#else // PROTOBUF_FORCE_COPY_IN_SWAP
|
||||||
|
if (GetOwningArena() == other->GetOwningArena()) {
|
||||||
|
#endif // !PROTOBUF_FORCE_COPY_IN_SWAP
|
||||||
|
InternalSwap(other);
|
||||||
|
} else {
|
||||||
|
::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
void UnsafeArenaSwap(VectorIndexMeta* other) {
|
||||||
|
if (other == this) return;
|
||||||
|
GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena());
|
||||||
|
InternalSwap(other);
|
||||||
|
}
|
||||||
|
|
||||||
|
// implements Message ----------------------------------------------
|
||||||
|
|
||||||
|
VectorIndexMeta* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final {
|
||||||
|
return CreateMaybeMessage<VectorIndexMeta>(arena);
|
||||||
|
}
|
||||||
|
using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom;
|
||||||
|
void CopyFrom(const VectorIndexMeta& from);
|
||||||
|
using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom;
|
||||||
|
void MergeFrom( const VectorIndexMeta& from) {
|
||||||
|
VectorIndexMeta::MergeImpl(*this, from);
|
||||||
|
}
|
||||||
|
private:
|
||||||
|
static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg);
|
||||||
|
public:
|
||||||
|
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
|
||||||
|
bool IsInitialized() const final;
|
||||||
|
|
||||||
|
size_t ByteSizeLong() const final;
|
||||||
|
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
|
||||||
|
uint8_t* _InternalSerialize(
|
||||||
|
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
|
||||||
|
int GetCachedSize() const final { return _impl_._cached_size_.Get(); }
|
||||||
|
|
||||||
|
private:
|
||||||
|
void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned);
|
||||||
|
void SharedDtor();
|
||||||
|
void SetCachedSize(int size) const final;
|
||||||
|
void InternalSwap(VectorIndexMeta* other);
|
||||||
|
|
||||||
|
private:
|
||||||
|
friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
|
||||||
|
static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
|
||||||
|
return "greptime.v1.index.VectorIndexMeta";
|
||||||
|
}
|
||||||
|
protected:
|
||||||
|
explicit VectorIndexMeta(::PROTOBUF_NAMESPACE_ID::Arena* arena,
|
||||||
|
bool is_message_owned = false);
|
||||||
|
public:
|
||||||
|
|
||||||
|
static const ClassData _class_data_;
|
||||||
|
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final;
|
||||||
|
|
||||||
|
::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final;
|
||||||
|
|
||||||
|
// nested types ----------------------------------------------------
|
||||||
|
|
||||||
|
// accessors -------------------------------------------------------
|
||||||
|
|
||||||
|
enum : int {
|
||||||
|
kStatsFieldNumber = 9,
|
||||||
|
kEngineFieldNumber = 1,
|
||||||
|
kDimFieldNumber = 2,
|
||||||
|
kMetricFieldNumber = 3,
|
||||||
|
kConnectivityFieldNumber = 4,
|
||||||
|
kExpansionAddFieldNumber = 5,
|
||||||
|
kExpansionSearchFieldNumber = 6,
|
||||||
|
kIndexSizeFieldNumber = 8,
|
||||||
|
kNullBitmapSizeFieldNumber = 7,
|
||||||
|
};
|
||||||
|
// .greptime.v1.index.VectorIndexStats stats = 9;
|
||||||
|
bool has_stats() const;
|
||||||
|
private:
|
||||||
|
bool _internal_has_stats() const;
|
||||||
|
public:
|
||||||
|
void clear_stats();
|
||||||
|
const ::greptime::v1::index::VectorIndexStats& stats() const;
|
||||||
|
PROTOBUF_NODISCARD ::greptime::v1::index::VectorIndexStats* release_stats();
|
||||||
|
::greptime::v1::index::VectorIndexStats* mutable_stats();
|
||||||
|
void set_allocated_stats(::greptime::v1::index::VectorIndexStats* stats);
|
||||||
|
private:
|
||||||
|
const ::greptime::v1::index::VectorIndexStats& _internal_stats() const;
|
||||||
|
::greptime::v1::index::VectorIndexStats* _internal_mutable_stats();
|
||||||
|
public:
|
||||||
|
void unsafe_arena_set_allocated_stats(
|
||||||
|
::greptime::v1::index::VectorIndexStats* stats);
|
||||||
|
::greptime::v1::index::VectorIndexStats* unsafe_arena_release_stats();
|
||||||
|
|
||||||
|
// .greptime.v1.index.VectorIndexEngine engine = 1;
|
||||||
|
void clear_engine();
|
||||||
|
::greptime::v1::index::VectorIndexEngine engine() const;
|
||||||
|
void set_engine(::greptime::v1::index::VectorIndexEngine value);
|
||||||
|
private:
|
||||||
|
::greptime::v1::index::VectorIndexEngine _internal_engine() const;
|
||||||
|
void _internal_set_engine(::greptime::v1::index::VectorIndexEngine value);
|
||||||
|
public:
|
||||||
|
|
||||||
|
// uint32 dim = 2;
|
||||||
|
void clear_dim();
|
||||||
|
uint32_t dim() const;
|
||||||
|
void set_dim(uint32_t value);
|
||||||
|
private:
|
||||||
|
uint32_t _internal_dim() const;
|
||||||
|
void _internal_set_dim(uint32_t value);
|
||||||
|
public:
|
||||||
|
|
||||||
|
// .greptime.v1.index.VectorDistanceMetric metric = 3;
|
||||||
|
void clear_metric();
|
||||||
|
::greptime::v1::index::VectorDistanceMetric metric() const;
|
||||||
|
void set_metric(::greptime::v1::index::VectorDistanceMetric value);
|
||||||
|
private:
|
||||||
|
::greptime::v1::index::VectorDistanceMetric _internal_metric() const;
|
||||||
|
void _internal_set_metric(::greptime::v1::index::VectorDistanceMetric value);
|
||||||
|
public:
|
||||||
|
|
||||||
|
// uint32 connectivity = 4;
|
||||||
|
void clear_connectivity();
|
||||||
|
uint32_t connectivity() const;
|
||||||
|
void set_connectivity(uint32_t value);
|
||||||
|
private:
|
||||||
|
uint32_t _internal_connectivity() const;
|
||||||
|
void _internal_set_connectivity(uint32_t value);
|
||||||
|
public:
|
||||||
|
|
||||||
|
// uint32 expansion_add = 5;
|
||||||
|
void clear_expansion_add();
|
||||||
|
uint32_t expansion_add() const;
|
||||||
|
void set_expansion_add(uint32_t value);
|
||||||
|
private:
|
||||||
|
uint32_t _internal_expansion_add() const;
|
||||||
|
void _internal_set_expansion_add(uint32_t value);
|
||||||
|
public:
|
||||||
|
|
||||||
|
// uint32 expansion_search = 6;
|
||||||
|
void clear_expansion_search();
|
||||||
|
uint32_t expansion_search() const;
|
||||||
|
void set_expansion_search(uint32_t value);
|
||||||
|
private:
|
||||||
|
uint32_t _internal_expansion_search() const;
|
||||||
|
void _internal_set_expansion_search(uint32_t value);
|
||||||
|
public:
|
||||||
|
|
||||||
|
// uint64 index_size = 8;
|
||||||
|
void clear_index_size();
|
||||||
|
uint64_t index_size() const;
|
||||||
|
void set_index_size(uint64_t value);
|
||||||
|
private:
|
||||||
|
uint64_t _internal_index_size() const;
|
||||||
|
void _internal_set_index_size(uint64_t value);
|
||||||
|
public:
|
||||||
|
|
||||||
|
// uint32 null_bitmap_size = 7;
|
||||||
|
void clear_null_bitmap_size();
|
||||||
|
uint32_t null_bitmap_size() const;
|
||||||
|
void set_null_bitmap_size(uint32_t value);
|
||||||
|
private:
|
||||||
|
uint32_t _internal_null_bitmap_size() const;
|
||||||
|
void _internal_set_null_bitmap_size(uint32_t value);
|
||||||
|
public:
|
||||||
|
|
||||||
|
// @@protoc_insertion_point(class_scope:greptime.v1.index.VectorIndexMeta)
|
||||||
|
private:
|
||||||
|
class _Internal;
|
||||||
|
|
||||||
|
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
|
||||||
|
typedef void InternalArenaConstructable_;
|
||||||
|
typedef void DestructorSkippable_;
|
||||||
|
struct Impl_ {
|
||||||
|
::greptime::v1::index::VectorIndexStats* stats_;
|
||||||
|
int engine_;
|
||||||
|
uint32_t dim_;
|
||||||
|
int metric_;
|
||||||
|
uint32_t connectivity_;
|
||||||
|
uint32_t expansion_add_;
|
||||||
|
uint32_t expansion_search_;
|
||||||
|
uint64_t index_size_;
|
||||||
|
uint32_t null_bitmap_size_;
|
||||||
|
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
|
||||||
|
};
|
||||||
|
union { Impl_ _impl_; };
|
||||||
|
friend struct ::TableStruct_greptime_2fv1_2findex_2fvector_5findex_2eproto;
|
||||||
|
};
|
||||||
|
// -------------------------------------------------------------------
|
||||||
|
|
||||||
|
class VectorIndexStats final :
|
||||||
|
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:greptime.v1.index.VectorIndexStats) */ {
|
||||||
|
public:
|
||||||
|
inline VectorIndexStats() : VectorIndexStats(nullptr) {}
|
||||||
|
~VectorIndexStats() override;
|
||||||
|
explicit PROTOBUF_CONSTEXPR VectorIndexStats(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized);
|
||||||
|
|
||||||
|
VectorIndexStats(const VectorIndexStats& from);
|
||||||
|
VectorIndexStats(VectorIndexStats&& from) noexcept
|
||||||
|
: VectorIndexStats() {
|
||||||
|
*this = ::std::move(from);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline VectorIndexStats& operator=(const VectorIndexStats& from) {
|
||||||
|
CopyFrom(from);
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
inline VectorIndexStats& operator=(VectorIndexStats&& from) noexcept {
|
||||||
|
if (this == &from) return *this;
|
||||||
|
if (GetOwningArena() == from.GetOwningArena()
|
||||||
|
#ifdef PROTOBUF_FORCE_COPY_IN_MOVE
|
||||||
|
&& GetOwningArena() != nullptr
|
||||||
|
#endif // !PROTOBUF_FORCE_COPY_IN_MOVE
|
||||||
|
) {
|
||||||
|
InternalSwap(&from);
|
||||||
|
} else {
|
||||||
|
CopyFrom(from);
|
||||||
|
}
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
|
||||||
|
return GetDescriptor();
|
||||||
|
}
|
||||||
|
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
|
||||||
|
return default_instance().GetMetadata().descriptor;
|
||||||
|
}
|
||||||
|
static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() {
|
||||||
|
return default_instance().GetMetadata().reflection;
|
||||||
|
}
|
||||||
|
static const VectorIndexStats& default_instance() {
|
||||||
|
return *internal_default_instance();
|
||||||
|
}
|
||||||
|
static inline const VectorIndexStats* internal_default_instance() {
|
||||||
|
return reinterpret_cast<const VectorIndexStats*>(
|
||||||
|
&_VectorIndexStats_default_instance_);
|
||||||
|
}
|
||||||
|
static constexpr int kIndexInFileMessages =
|
||||||
|
1;
|
||||||
|
|
||||||
|
friend void swap(VectorIndexStats& a, VectorIndexStats& b) {
|
||||||
|
a.Swap(&b);
|
||||||
|
}
|
||||||
|
inline void Swap(VectorIndexStats* other) {
|
||||||
|
if (other == this) return;
|
||||||
|
#ifdef PROTOBUF_FORCE_COPY_IN_SWAP
|
||||||
|
if (GetOwningArena() != nullptr &&
|
||||||
|
GetOwningArena() == other->GetOwningArena()) {
|
||||||
|
#else // PROTOBUF_FORCE_COPY_IN_SWAP
|
||||||
|
if (GetOwningArena() == other->GetOwningArena()) {
|
||||||
|
#endif // !PROTOBUF_FORCE_COPY_IN_SWAP
|
||||||
|
InternalSwap(other);
|
||||||
|
} else {
|
||||||
|
::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
void UnsafeArenaSwap(VectorIndexStats* other) {
|
||||||
|
if (other == this) return;
|
||||||
|
GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena());
|
||||||
|
InternalSwap(other);
|
||||||
|
}
|
||||||
|
|
||||||
|
// implements Message ----------------------------------------------
|
||||||
|
|
||||||
|
VectorIndexStats* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final {
|
||||||
|
return CreateMaybeMessage<VectorIndexStats>(arena);
|
||||||
|
}
|
||||||
|
using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom;
|
||||||
|
void CopyFrom(const VectorIndexStats& from);
|
||||||
|
using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom;
|
||||||
|
void MergeFrom( const VectorIndexStats& from) {
|
||||||
|
VectorIndexStats::MergeImpl(*this, from);
|
||||||
|
}
|
||||||
|
private:
|
||||||
|
static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg);
|
||||||
|
public:
|
||||||
|
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
|
||||||
|
bool IsInitialized() const final;
|
||||||
|
|
||||||
|
size_t ByteSizeLong() const final;
|
||||||
|
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
|
||||||
|
uint8_t* _InternalSerialize(
|
||||||
|
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
|
||||||
|
int GetCachedSize() const final { return _impl_._cached_size_.Get(); }
|
||||||
|
|
||||||
|
private:
|
||||||
|
void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned);
|
||||||
|
void SharedDtor();
|
||||||
|
void SetCachedSize(int size) const final;
|
||||||
|
void InternalSwap(VectorIndexStats* other);
|
||||||
|
|
||||||
|
private:
|
||||||
|
friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
|
||||||
|
static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
|
||||||
|
return "greptime.v1.index.VectorIndexStats";
|
||||||
|
}
|
||||||
|
protected:
|
||||||
|
explicit VectorIndexStats(::PROTOBUF_NAMESPACE_ID::Arena* arena,
|
||||||
|
bool is_message_owned = false);
|
||||||
|
public:
|
||||||
|
|
||||||
|
static const ClassData _class_data_;
|
||||||
|
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final;
|
||||||
|
|
||||||
|
::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final;
|
||||||
|
|
||||||
|
// nested types ----------------------------------------------------
|
||||||
|
|
||||||
|
// accessors -------------------------------------------------------
|
||||||
|
|
||||||
|
enum : int {
|
||||||
|
kTotalRowCountFieldNumber = 1,
|
||||||
|
kIndexedRowCountFieldNumber = 2,
|
||||||
|
kNullCountFieldNumber = 3,
|
||||||
|
};
|
||||||
|
// uint64 total_row_count = 1;
|
||||||
|
void clear_total_row_count();
|
||||||
|
uint64_t total_row_count() const;
|
||||||
|
void set_total_row_count(uint64_t value);
|
||||||
|
private:
|
||||||
|
uint64_t _internal_total_row_count() const;
|
||||||
|
void _internal_set_total_row_count(uint64_t value);
|
||||||
|
public:
|
||||||
|
|
||||||
|
// uint64 indexed_row_count = 2;
|
||||||
|
void clear_indexed_row_count();
|
||||||
|
uint64_t indexed_row_count() const;
|
||||||
|
void set_indexed_row_count(uint64_t value);
|
||||||
|
private:
|
||||||
|
uint64_t _internal_indexed_row_count() const;
|
||||||
|
void _internal_set_indexed_row_count(uint64_t value);
|
||||||
|
public:
|
||||||
|
|
||||||
|
// uint64 null_count = 3;
|
||||||
|
void clear_null_count();
|
||||||
|
uint64_t null_count() const;
|
||||||
|
void set_null_count(uint64_t value);
|
||||||
|
private:
|
||||||
|
uint64_t _internal_null_count() const;
|
||||||
|
void _internal_set_null_count(uint64_t value);
|
||||||
|
public:
|
||||||
|
|
||||||
|
// @@protoc_insertion_point(class_scope:greptime.v1.index.VectorIndexStats)
|
||||||
|
private:
|
||||||
|
class _Internal;
|
||||||
|
|
||||||
|
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
|
||||||
|
typedef void InternalArenaConstructable_;
|
||||||
|
typedef void DestructorSkippable_;
|
||||||
|
struct Impl_ {
|
||||||
|
uint64_t total_row_count_;
|
||||||
|
uint64_t indexed_row_count_;
|
||||||
|
uint64_t null_count_;
|
||||||
|
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
|
||||||
|
};
|
||||||
|
union { Impl_ _impl_; };
|
||||||
|
friend struct ::TableStruct_greptime_2fv1_2findex_2fvector_5findex_2eproto;
|
||||||
|
};
|
||||||
|
// ===================================================================
|
||||||
|
|
||||||
|
|
||||||
|
// ===================================================================
|
||||||
|
|
||||||
|
#ifdef __GNUC__
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
|
||||||
|
#endif // __GNUC__
|
||||||
|
// VectorIndexMeta
|
||||||
|
|
||||||
|
// .greptime.v1.index.VectorIndexEngine engine = 1;
|
||||||
|
inline void VectorIndexMeta::clear_engine() {
|
||||||
|
_impl_.engine_ = 0;
|
||||||
|
}
|
||||||
|
inline ::greptime::v1::index::VectorIndexEngine VectorIndexMeta::_internal_engine() const {
|
||||||
|
return static_cast< ::greptime::v1::index::VectorIndexEngine >(_impl_.engine_);
|
||||||
|
}
|
||||||
|
inline ::greptime::v1::index::VectorIndexEngine VectorIndexMeta::engine() const {
|
||||||
|
// @@protoc_insertion_point(field_get:greptime.v1.index.VectorIndexMeta.engine)
|
||||||
|
return _internal_engine();
|
||||||
|
}
|
||||||
|
inline void VectorIndexMeta::_internal_set_engine(::greptime::v1::index::VectorIndexEngine value) {
|
||||||
|
|
||||||
|
_impl_.engine_ = value;
|
||||||
|
}
|
||||||
|
inline void VectorIndexMeta::set_engine(::greptime::v1::index::VectorIndexEngine value) {
|
||||||
|
_internal_set_engine(value);
|
||||||
|
// @@protoc_insertion_point(field_set:greptime.v1.index.VectorIndexMeta.engine)
|
||||||
|
}
|
||||||
|
|
||||||
|
// uint32 dim = 2;
|
||||||
|
inline void VectorIndexMeta::clear_dim() {
|
||||||
|
_impl_.dim_ = 0u;
|
||||||
|
}
|
||||||
|
inline uint32_t VectorIndexMeta::_internal_dim() const {
|
||||||
|
return _impl_.dim_;
|
||||||
|
}
|
||||||
|
inline uint32_t VectorIndexMeta::dim() const {
|
||||||
|
// @@protoc_insertion_point(field_get:greptime.v1.index.VectorIndexMeta.dim)
|
||||||
|
return _internal_dim();
|
||||||
|
}
|
||||||
|
inline void VectorIndexMeta::_internal_set_dim(uint32_t value) {
|
||||||
|
|
||||||
|
_impl_.dim_ = value;
|
||||||
|
}
|
||||||
|
inline void VectorIndexMeta::set_dim(uint32_t value) {
|
||||||
|
_internal_set_dim(value);
|
||||||
|
// @@protoc_insertion_point(field_set:greptime.v1.index.VectorIndexMeta.dim)
|
||||||
|
}
|
||||||
|
|
||||||
|
// .greptime.v1.index.VectorDistanceMetric metric = 3;
|
||||||
|
inline void VectorIndexMeta::clear_metric() {
|
||||||
|
_impl_.metric_ = 0;
|
||||||
|
}
|
||||||
|
inline ::greptime::v1::index::VectorDistanceMetric VectorIndexMeta::_internal_metric() const {
|
||||||
|
return static_cast< ::greptime::v1::index::VectorDistanceMetric >(_impl_.metric_);
|
||||||
|
}
|
||||||
|
inline ::greptime::v1::index::VectorDistanceMetric VectorIndexMeta::metric() const {
|
||||||
|
// @@protoc_insertion_point(field_get:greptime.v1.index.VectorIndexMeta.metric)
|
||||||
|
return _internal_metric();
|
||||||
|
}
|
||||||
|
inline void VectorIndexMeta::_internal_set_metric(::greptime::v1::index::VectorDistanceMetric value) {
|
||||||
|
|
||||||
|
_impl_.metric_ = value;
|
||||||
|
}
|
||||||
|
inline void VectorIndexMeta::set_metric(::greptime::v1::index::VectorDistanceMetric value) {
|
||||||
|
_internal_set_metric(value);
|
||||||
|
// @@protoc_insertion_point(field_set:greptime.v1.index.VectorIndexMeta.metric)
|
||||||
|
}
|
||||||
|
|
||||||
|
// uint32 connectivity = 4;
|
||||||
|
inline void VectorIndexMeta::clear_connectivity() {
|
||||||
|
_impl_.connectivity_ = 0u;
|
||||||
|
}
|
||||||
|
inline uint32_t VectorIndexMeta::_internal_connectivity() const {
|
||||||
|
return _impl_.connectivity_;
|
||||||
|
}
|
||||||
|
inline uint32_t VectorIndexMeta::connectivity() const {
|
||||||
|
// @@protoc_insertion_point(field_get:greptime.v1.index.VectorIndexMeta.connectivity)
|
||||||
|
return _internal_connectivity();
|
||||||
|
}
|
||||||
|
inline void VectorIndexMeta::_internal_set_connectivity(uint32_t value) {
|
||||||
|
|
||||||
|
_impl_.connectivity_ = value;
|
||||||
|
}
|
||||||
|
inline void VectorIndexMeta::set_connectivity(uint32_t value) {
|
||||||
|
_internal_set_connectivity(value);
|
||||||
|
// @@protoc_insertion_point(field_set:greptime.v1.index.VectorIndexMeta.connectivity)
|
||||||
|
}
|
||||||
|
|
||||||
|
// uint32 expansion_add = 5;
|
||||||
|
inline void VectorIndexMeta::clear_expansion_add() {
|
||||||
|
_impl_.expansion_add_ = 0u;
|
||||||
|
}
|
||||||
|
inline uint32_t VectorIndexMeta::_internal_expansion_add() const {
|
||||||
|
return _impl_.expansion_add_;
|
||||||
|
}
|
||||||
|
inline uint32_t VectorIndexMeta::expansion_add() const {
|
||||||
|
// @@protoc_insertion_point(field_get:greptime.v1.index.VectorIndexMeta.expansion_add)
|
||||||
|
return _internal_expansion_add();
|
||||||
|
}
|
||||||
|
inline void VectorIndexMeta::_internal_set_expansion_add(uint32_t value) {
|
||||||
|
|
||||||
|
_impl_.expansion_add_ = value;
|
||||||
|
}
|
||||||
|
inline void VectorIndexMeta::set_expansion_add(uint32_t value) {
|
||||||
|
_internal_set_expansion_add(value);
|
||||||
|
// @@protoc_insertion_point(field_set:greptime.v1.index.VectorIndexMeta.expansion_add)
|
||||||
|
}
|
||||||
|
|
||||||
|
// uint32 expansion_search = 6;
|
||||||
|
inline void VectorIndexMeta::clear_expansion_search() {
|
||||||
|
_impl_.expansion_search_ = 0u;
|
||||||
|
}
|
||||||
|
inline uint32_t VectorIndexMeta::_internal_expansion_search() const {
|
||||||
|
return _impl_.expansion_search_;
|
||||||
|
}
|
||||||
|
inline uint32_t VectorIndexMeta::expansion_search() const {
|
||||||
|
// @@protoc_insertion_point(field_get:greptime.v1.index.VectorIndexMeta.expansion_search)
|
||||||
|
return _internal_expansion_search();
|
||||||
|
}
|
||||||
|
inline void VectorIndexMeta::_internal_set_expansion_search(uint32_t value) {
|
||||||
|
|
||||||
|
_impl_.expansion_search_ = value;
|
||||||
|
}
|
||||||
|
inline void VectorIndexMeta::set_expansion_search(uint32_t value) {
|
||||||
|
_internal_set_expansion_search(value);
|
||||||
|
// @@protoc_insertion_point(field_set:greptime.v1.index.VectorIndexMeta.expansion_search)
|
||||||
|
}
|
||||||
|
|
||||||
|
// uint32 null_bitmap_size = 7;
|
||||||
|
inline void VectorIndexMeta::clear_null_bitmap_size() {
|
||||||
|
_impl_.null_bitmap_size_ = 0u;
|
||||||
|
}
|
||||||
|
inline uint32_t VectorIndexMeta::_internal_null_bitmap_size() const {
|
||||||
|
return _impl_.null_bitmap_size_;
|
||||||
|
}
|
||||||
|
inline uint32_t VectorIndexMeta::null_bitmap_size() const {
|
||||||
|
// @@protoc_insertion_point(field_get:greptime.v1.index.VectorIndexMeta.null_bitmap_size)
|
||||||
|
return _internal_null_bitmap_size();
|
||||||
|
}
|
||||||
|
inline void VectorIndexMeta::_internal_set_null_bitmap_size(uint32_t value) {
|
||||||
|
|
||||||
|
_impl_.null_bitmap_size_ = value;
|
||||||
|
}
|
||||||
|
inline void VectorIndexMeta::set_null_bitmap_size(uint32_t value) {
|
||||||
|
_internal_set_null_bitmap_size(value);
|
||||||
|
// @@protoc_insertion_point(field_set:greptime.v1.index.VectorIndexMeta.null_bitmap_size)
|
||||||
|
}
|
||||||
|
|
||||||
|
// uint64 index_size = 8;
|
||||||
|
inline void VectorIndexMeta::clear_index_size() {
|
||||||
|
_impl_.index_size_ = uint64_t{0u};
|
||||||
|
}
|
||||||
|
inline uint64_t VectorIndexMeta::_internal_index_size() const {
|
||||||
|
return _impl_.index_size_;
|
||||||
|
}
|
||||||
|
inline uint64_t VectorIndexMeta::index_size() const {
|
||||||
|
// @@protoc_insertion_point(field_get:greptime.v1.index.VectorIndexMeta.index_size)
|
||||||
|
return _internal_index_size();
|
||||||
|
}
|
||||||
|
inline void VectorIndexMeta::_internal_set_index_size(uint64_t value) {
|
||||||
|
|
||||||
|
_impl_.index_size_ = value;
|
||||||
|
}
|
||||||
|
inline void VectorIndexMeta::set_index_size(uint64_t value) {
|
||||||
|
_internal_set_index_size(value);
|
||||||
|
// @@protoc_insertion_point(field_set:greptime.v1.index.VectorIndexMeta.index_size)
|
||||||
|
}
|
||||||
|
|
||||||
|
// .greptime.v1.index.VectorIndexStats stats = 9;
|
||||||
|
inline bool VectorIndexMeta::_internal_has_stats() const {
|
||||||
|
return this != internal_default_instance() && _impl_.stats_ != nullptr;
|
||||||
|
}
|
||||||
|
inline bool VectorIndexMeta::has_stats() const {
|
||||||
|
return _internal_has_stats();
|
||||||
|
}
|
||||||
|
inline void VectorIndexMeta::clear_stats() {
|
||||||
|
if (GetArenaForAllocation() == nullptr && _impl_.stats_ != nullptr) {
|
||||||
|
delete _impl_.stats_;
|
||||||
|
}
|
||||||
|
_impl_.stats_ = nullptr;
|
||||||
|
}
|
||||||
|
inline const ::greptime::v1::index::VectorIndexStats& VectorIndexMeta::_internal_stats() const {
|
||||||
|
const ::greptime::v1::index::VectorIndexStats* p = _impl_.stats_;
|
||||||
|
return p != nullptr ? *p : reinterpret_cast<const ::greptime::v1::index::VectorIndexStats&>(
|
||||||
|
::greptime::v1::index::_VectorIndexStats_default_instance_);
|
||||||
|
}
|
||||||
|
inline const ::greptime::v1::index::VectorIndexStats& VectorIndexMeta::stats() const {
|
||||||
|
// @@protoc_insertion_point(field_get:greptime.v1.index.VectorIndexMeta.stats)
|
||||||
|
return _internal_stats();
|
||||||
|
}
|
||||||
|
inline void VectorIndexMeta::unsafe_arena_set_allocated_stats(
|
||||||
|
::greptime::v1::index::VectorIndexStats* stats) {
|
||||||
|
if (GetArenaForAllocation() == nullptr) {
|
||||||
|
delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.stats_);
|
||||||
|
}
|
||||||
|
_impl_.stats_ = stats;
|
||||||
|
if (stats) {
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
}
|
||||||
|
// @@protoc_insertion_point(field_unsafe_arena_set_allocated:greptime.v1.index.VectorIndexMeta.stats)
|
||||||
|
}
|
||||||
|
inline ::greptime::v1::index::VectorIndexStats* VectorIndexMeta::release_stats() {
|
||||||
|
|
||||||
|
::greptime::v1::index::VectorIndexStats* temp = _impl_.stats_;
|
||||||
|
_impl_.stats_ = nullptr;
|
||||||
|
#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE
|
||||||
|
auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp);
|
||||||
|
temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp);
|
||||||
|
if (GetArenaForAllocation() == nullptr) { delete old; }
|
||||||
|
#else // PROTOBUF_FORCE_COPY_IN_RELEASE
|
||||||
|
if (GetArenaForAllocation() != nullptr) {
|
||||||
|
temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp);
|
||||||
|
}
|
||||||
|
#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE
|
||||||
|
return temp;
|
||||||
|
}
|
||||||
|
inline ::greptime::v1::index::VectorIndexStats* VectorIndexMeta::unsafe_arena_release_stats() {
|
||||||
|
// @@protoc_insertion_point(field_release:greptime.v1.index.VectorIndexMeta.stats)
|
||||||
|
|
||||||
|
::greptime::v1::index::VectorIndexStats* temp = _impl_.stats_;
|
||||||
|
_impl_.stats_ = nullptr;
|
||||||
|
return temp;
|
||||||
|
}
|
||||||
|
inline ::greptime::v1::index::VectorIndexStats* VectorIndexMeta::_internal_mutable_stats() {
|
||||||
|
|
||||||
|
if (_impl_.stats_ == nullptr) {
|
||||||
|
auto* p = CreateMaybeMessage<::greptime::v1::index::VectorIndexStats>(GetArenaForAllocation());
|
||||||
|
_impl_.stats_ = p;
|
||||||
|
}
|
||||||
|
return _impl_.stats_;
|
||||||
|
}
|
||||||
|
inline ::greptime::v1::index::VectorIndexStats* VectorIndexMeta::mutable_stats() {
|
||||||
|
::greptime::v1::index::VectorIndexStats* _msg = _internal_mutable_stats();
|
||||||
|
// @@protoc_insertion_point(field_mutable:greptime.v1.index.VectorIndexMeta.stats)
|
||||||
|
return _msg;
|
||||||
|
}
|
||||||
|
inline void VectorIndexMeta::set_allocated_stats(::greptime::v1::index::VectorIndexStats* stats) {
|
||||||
|
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
|
||||||
|
if (message_arena == nullptr) {
|
||||||
|
delete _impl_.stats_;
|
||||||
|
}
|
||||||
|
if (stats) {
|
||||||
|
::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
|
||||||
|
::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(stats);
|
||||||
|
if (message_arena != submessage_arena) {
|
||||||
|
stats = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
|
||||||
|
message_arena, stats, submessage_arena);
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
}
|
||||||
|
_impl_.stats_ = stats;
|
||||||
|
// @@protoc_insertion_point(field_set_allocated:greptime.v1.index.VectorIndexMeta.stats)
|
||||||
|
}
|
||||||
|
|
||||||
|
// -------------------------------------------------------------------
|
||||||
|
|
||||||
|
// VectorIndexStats
|
||||||
|
|
||||||
|
// uint64 total_row_count = 1;
|
||||||
|
inline void VectorIndexStats::clear_total_row_count() {
|
||||||
|
_impl_.total_row_count_ = uint64_t{0u};
|
||||||
|
}
|
||||||
|
inline uint64_t VectorIndexStats::_internal_total_row_count() const {
|
||||||
|
return _impl_.total_row_count_;
|
||||||
|
}
|
||||||
|
inline uint64_t VectorIndexStats::total_row_count() const {
|
||||||
|
// @@protoc_insertion_point(field_get:greptime.v1.index.VectorIndexStats.total_row_count)
|
||||||
|
return _internal_total_row_count();
|
||||||
|
}
|
||||||
|
inline void VectorIndexStats::_internal_set_total_row_count(uint64_t value) {
|
||||||
|
|
||||||
|
_impl_.total_row_count_ = value;
|
||||||
|
}
|
||||||
|
inline void VectorIndexStats::set_total_row_count(uint64_t value) {
|
||||||
|
_internal_set_total_row_count(value);
|
||||||
|
// @@protoc_insertion_point(field_set:greptime.v1.index.VectorIndexStats.total_row_count)
|
||||||
|
}
|
||||||
|
|
||||||
|
// uint64 indexed_row_count = 2;
|
||||||
|
inline void VectorIndexStats::clear_indexed_row_count() {
|
||||||
|
_impl_.indexed_row_count_ = uint64_t{0u};
|
||||||
|
}
|
||||||
|
inline uint64_t VectorIndexStats::_internal_indexed_row_count() const {
|
||||||
|
return _impl_.indexed_row_count_;
|
||||||
|
}
|
||||||
|
inline uint64_t VectorIndexStats::indexed_row_count() const {
|
||||||
|
// @@protoc_insertion_point(field_get:greptime.v1.index.VectorIndexStats.indexed_row_count)
|
||||||
|
return _internal_indexed_row_count();
|
||||||
|
}
|
||||||
|
inline void VectorIndexStats::_internal_set_indexed_row_count(uint64_t value) {
|
||||||
|
|
||||||
|
_impl_.indexed_row_count_ = value;
|
||||||
|
}
|
||||||
|
inline void VectorIndexStats::set_indexed_row_count(uint64_t value) {
|
||||||
|
_internal_set_indexed_row_count(value);
|
||||||
|
// @@protoc_insertion_point(field_set:greptime.v1.index.VectorIndexStats.indexed_row_count)
|
||||||
|
}
|
||||||
|
|
||||||
|
// uint64 null_count = 3;
|
||||||
|
inline void VectorIndexStats::clear_null_count() {
|
||||||
|
_impl_.null_count_ = uint64_t{0u};
|
||||||
|
}
|
||||||
|
inline uint64_t VectorIndexStats::_internal_null_count() const {
|
||||||
|
return _impl_.null_count_;
|
||||||
|
}
|
||||||
|
inline uint64_t VectorIndexStats::null_count() const {
|
||||||
|
// @@protoc_insertion_point(field_get:greptime.v1.index.VectorIndexStats.null_count)
|
||||||
|
return _internal_null_count();
|
||||||
|
}
|
||||||
|
inline void VectorIndexStats::_internal_set_null_count(uint64_t value) {
|
||||||
|
|
||||||
|
_impl_.null_count_ = value;
|
||||||
|
}
|
||||||
|
inline void VectorIndexStats::set_null_count(uint64_t value) {
|
||||||
|
_internal_set_null_count(value);
|
||||||
|
// @@protoc_insertion_point(field_set:greptime.v1.index.VectorIndexStats.null_count)
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef __GNUC__
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
|
#endif // __GNUC__
|
||||||
|
// -------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
// @@protoc_insertion_point(namespace_scope)
|
||||||
|
|
||||||
|
} // namespace index
|
||||||
|
} // namespace v1
|
||||||
|
} // namespace greptime
|
||||||
|
|
||||||
|
PROTOBUF_NAMESPACE_OPEN
|
||||||
|
|
||||||
|
template <> struct is_proto_enum< ::greptime::v1::index::VectorIndexEngine> : ::std::true_type {};
|
||||||
|
template <>
|
||||||
|
inline const EnumDescriptor* GetEnumDescriptor< ::greptime::v1::index::VectorIndexEngine>() {
|
||||||
|
return ::greptime::v1::index::VectorIndexEngine_descriptor();
|
||||||
|
}
|
||||||
|
template <> struct is_proto_enum< ::greptime::v1::index::VectorDistanceMetric> : ::std::true_type {};
|
||||||
|
template <>
|
||||||
|
inline const EnumDescriptor* GetEnumDescriptor< ::greptime::v1::index::VectorDistanceMetric>() {
|
||||||
|
return ::greptime::v1::index::VectorDistanceMetric_descriptor();
|
||||||
|
}
|
||||||
|
|
||||||
|
PROTOBUF_NAMESPACE_CLOSE
|
||||||
|
|
||||||
|
// @@protoc_insertion_point(global_scope)
|
||||||
|
|
||||||
|
#include <google/protobuf/port_undef.inc>
|
||||||
|
#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_greptime_2fv1_2findex_2fvector_5findex_2eproto
|
||||||
@@ -0,0 +1,460 @@
|
|||||||
|
// Copyright 2023 Greptime Team
|
||||||
|
//
|
||||||
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
// you may not use this file except in compliance with the License.
|
||||||
|
// You may obtain a copy of the License at
|
||||||
|
//
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
//
|
||||||
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
// See the License for the specific language governing permissions and
|
||||||
|
// limitations under the License.
|
||||||
|
|
||||||
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
|
// versions:
|
||||||
|
// protoc-gen-go v1.28.1
|
||||||
|
// protoc v3.21.6
|
||||||
|
// source: greptime/v1/index/vector_index.proto
|
||||||
|
|
||||||
|
package index
|
||||||
|
|
||||||
|
import (
|
||||||
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||||
|
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||||
|
reflect "reflect"
|
||||||
|
sync "sync"
|
||||||
|
)
|
||||||
|
|
||||||
|
const (
|
||||||
|
// Verify that this generated code is sufficiently up-to-date.
|
||||||
|
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||||
|
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||||
|
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||||
|
)
|
||||||
|
|
||||||
|
// Vector index engine types.
|
||||||
|
type VectorIndexEngine int32
|
||||||
|
|
||||||
|
const (
|
||||||
|
VectorIndexEngine_VECTOR_INDEX_ENGINE_USEARCH VectorIndexEngine = 0
|
||||||
|
)
|
||||||
|
|
||||||
|
// Enum value maps for VectorIndexEngine.
|
||||||
|
var (
|
||||||
|
VectorIndexEngine_name = map[int32]string{
|
||||||
|
0: "VECTOR_INDEX_ENGINE_USEARCH",
|
||||||
|
}
|
||||||
|
VectorIndexEngine_value = map[string]int32{
|
||||||
|
"VECTOR_INDEX_ENGINE_USEARCH": 0,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
func (x VectorIndexEngine) Enum() *VectorIndexEngine {
|
||||||
|
p := new(VectorIndexEngine)
|
||||||
|
*p = x
|
||||||
|
return p
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x VectorIndexEngine) String() string {
|
||||||
|
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
||||||
|
}
|
||||||
|
|
||||||
|
func (VectorIndexEngine) Descriptor() protoreflect.EnumDescriptor {
|
||||||
|
return file_greptime_v1_index_vector_index_proto_enumTypes[0].Descriptor()
|
||||||
|
}
|
||||||
|
|
||||||
|
func (VectorIndexEngine) Type() protoreflect.EnumType {
|
||||||
|
return &file_greptime_v1_index_vector_index_proto_enumTypes[0]
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x VectorIndexEngine) Number() protoreflect.EnumNumber {
|
||||||
|
return protoreflect.EnumNumber(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use VectorIndexEngine.Descriptor instead.
|
||||||
|
func (VectorIndexEngine) EnumDescriptor() ([]byte, []int) {
|
||||||
|
return file_greptime_v1_index_vector_index_proto_rawDescGZIP(), []int{0}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Vector distance metrics.
|
||||||
|
type VectorDistanceMetric int32
|
||||||
|
|
||||||
|
const (
|
||||||
|
VectorDistanceMetric_VECTOR_DISTANCE_METRIC_L2SQ VectorDistanceMetric = 0
|
||||||
|
VectorDistanceMetric_VECTOR_DISTANCE_METRIC_COSINE VectorDistanceMetric = 1
|
||||||
|
VectorDistanceMetric_VECTOR_DISTANCE_METRIC_INNER_PRODUCT VectorDistanceMetric = 2
|
||||||
|
)
|
||||||
|
|
||||||
|
// Enum value maps for VectorDistanceMetric.
|
||||||
|
var (
|
||||||
|
VectorDistanceMetric_name = map[int32]string{
|
||||||
|
0: "VECTOR_DISTANCE_METRIC_L2SQ",
|
||||||
|
1: "VECTOR_DISTANCE_METRIC_COSINE",
|
||||||
|
2: "VECTOR_DISTANCE_METRIC_INNER_PRODUCT",
|
||||||
|
}
|
||||||
|
VectorDistanceMetric_value = map[string]int32{
|
||||||
|
"VECTOR_DISTANCE_METRIC_L2SQ": 0,
|
||||||
|
"VECTOR_DISTANCE_METRIC_COSINE": 1,
|
||||||
|
"VECTOR_DISTANCE_METRIC_INNER_PRODUCT": 2,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
func (x VectorDistanceMetric) Enum() *VectorDistanceMetric {
|
||||||
|
p := new(VectorDistanceMetric)
|
||||||
|
*p = x
|
||||||
|
return p
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x VectorDistanceMetric) String() string {
|
||||||
|
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
||||||
|
}
|
||||||
|
|
||||||
|
func (VectorDistanceMetric) Descriptor() protoreflect.EnumDescriptor {
|
||||||
|
return file_greptime_v1_index_vector_index_proto_enumTypes[1].Descriptor()
|
||||||
|
}
|
||||||
|
|
||||||
|
func (VectorDistanceMetric) Type() protoreflect.EnumType {
|
||||||
|
return &file_greptime_v1_index_vector_index_proto_enumTypes[1]
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x VectorDistanceMetric) Number() protoreflect.EnumNumber {
|
||||||
|
return protoreflect.EnumNumber(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use VectorDistanceMetric.Descriptor instead.
|
||||||
|
func (VectorDistanceMetric) EnumDescriptor() ([]byte, []int) {
|
||||||
|
return file_greptime_v1_index_vector_index_proto_rawDescGZIP(), []int{1}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Metadata for a vector index blob (stored as footer).
|
||||||
|
type VectorIndexMeta struct {
|
||||||
|
state protoimpl.MessageState
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
|
// Index engine type.
|
||||||
|
Engine VectorIndexEngine `protobuf:"varint,1,opt,name=engine,proto3,enum=greptime.v1.index.VectorIndexEngine" json:"engine,omitempty"`
|
||||||
|
// Vector dimension.
|
||||||
|
Dim uint32 `protobuf:"varint,2,opt,name=dim,proto3" json:"dim,omitempty"`
|
||||||
|
// Distance metric.
|
||||||
|
Metric VectorDistanceMetric `protobuf:"varint,3,opt,name=metric,proto3,enum=greptime.v1.index.VectorDistanceMetric" json:"metric,omitempty"`
|
||||||
|
// HNSW connectivity parameter.
|
||||||
|
Connectivity uint32 `protobuf:"varint,4,opt,name=connectivity,proto3" json:"connectivity,omitempty"`
|
||||||
|
// HNSW expansion factor during index construction.
|
||||||
|
ExpansionAdd uint32 `protobuf:"varint,5,opt,name=expansion_add,json=expansionAdd,proto3" json:"expansion_add,omitempty"`
|
||||||
|
// HNSW expansion factor during search.
|
||||||
|
ExpansionSearch uint32 `protobuf:"varint,6,opt,name=expansion_search,json=expansionSearch,proto3" json:"expansion_search,omitempty"`
|
||||||
|
// Byte length of the null bitmap (RoaringBitmap serialized).
|
||||||
|
NullBitmapSize uint32 `protobuf:"varint,7,opt,name=null_bitmap_size,json=nullBitmapSize,proto3" json:"null_bitmap_size,omitempty"`
|
||||||
|
// Byte length of the vector index data (engine-specific serialized format).
|
||||||
|
IndexSize uint64 `protobuf:"varint,8,opt,name=index_size,json=indexSize,proto3" json:"index_size,omitempty"`
|
||||||
|
// Statistics about the vector index.
|
||||||
|
Stats *VectorIndexStats `protobuf:"bytes,9,opt,name=stats,proto3" json:"stats,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *VectorIndexMeta) Reset() {
|
||||||
|
*x = VectorIndexMeta{}
|
||||||
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_greptime_v1_index_vector_index_proto_msgTypes[0]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *VectorIndexMeta) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*VectorIndexMeta) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *VectorIndexMeta) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_greptime_v1_index_vector_index_proto_msgTypes[0]
|
||||||
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use VectorIndexMeta.ProtoReflect.Descriptor instead.
|
||||||
|
func (*VectorIndexMeta) Descriptor() ([]byte, []int) {
|
||||||
|
return file_greptime_v1_index_vector_index_proto_rawDescGZIP(), []int{0}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *VectorIndexMeta) GetEngine() VectorIndexEngine {
|
||||||
|
if x != nil {
|
||||||
|
return x.Engine
|
||||||
|
}
|
||||||
|
return VectorIndexEngine_VECTOR_INDEX_ENGINE_USEARCH
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *VectorIndexMeta) GetDim() uint32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.Dim
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *VectorIndexMeta) GetMetric() VectorDistanceMetric {
|
||||||
|
if x != nil {
|
||||||
|
return x.Metric
|
||||||
|
}
|
||||||
|
return VectorDistanceMetric_VECTOR_DISTANCE_METRIC_L2SQ
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *VectorIndexMeta) GetConnectivity() uint32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.Connectivity
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *VectorIndexMeta) GetExpansionAdd() uint32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.ExpansionAdd
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *VectorIndexMeta) GetExpansionSearch() uint32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.ExpansionSearch
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *VectorIndexMeta) GetNullBitmapSize() uint32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.NullBitmapSize
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *VectorIndexMeta) GetIndexSize() uint64 {
|
||||||
|
if x != nil {
|
||||||
|
return x.IndexSize
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *VectorIndexMeta) GetStats() *VectorIndexStats {
|
||||||
|
if x != nil {
|
||||||
|
return x.Stats
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// Statistics for a vector index.
|
||||||
|
type VectorIndexStats struct {
|
||||||
|
state protoimpl.MessageState
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
|
// Total number of rows in the SST.
|
||||||
|
TotalRowCount uint64 `protobuf:"varint,1,opt,name=total_row_count,json=totalRowCount,proto3" json:"total_row_count,omitempty"`
|
||||||
|
// Number of rows with valid vectors (indexed).
|
||||||
|
IndexedRowCount uint64 `protobuf:"varint,2,opt,name=indexed_row_count,json=indexedRowCount,proto3" json:"indexed_row_count,omitempty"`
|
||||||
|
// Number of null vectors.
|
||||||
|
NullCount uint64 `protobuf:"varint,3,opt,name=null_count,json=nullCount,proto3" json:"null_count,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *VectorIndexStats) Reset() {
|
||||||
|
*x = VectorIndexStats{}
|
||||||
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_greptime_v1_index_vector_index_proto_msgTypes[1]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *VectorIndexStats) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*VectorIndexStats) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *VectorIndexStats) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_greptime_v1_index_vector_index_proto_msgTypes[1]
|
||||||
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use VectorIndexStats.ProtoReflect.Descriptor instead.
|
||||||
|
func (*VectorIndexStats) Descriptor() ([]byte, []int) {
|
||||||
|
return file_greptime_v1_index_vector_index_proto_rawDescGZIP(), []int{1}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *VectorIndexStats) GetTotalRowCount() uint64 {
|
||||||
|
if x != nil {
|
||||||
|
return x.TotalRowCount
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *VectorIndexStats) GetIndexedRowCount() uint64 {
|
||||||
|
if x != nil {
|
||||||
|
return x.IndexedRowCount
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *VectorIndexStats) GetNullCount() uint64 {
|
||||||
|
if x != nil {
|
||||||
|
return x.NullCount
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
var File_greptime_v1_index_vector_index_proto protoreflect.FileDescriptor
|
||||||
|
|
||||||
|
var file_greptime_v1_index_vector_index_proto_rawDesc = []byte{
|
||||||
|
0x0a, 0x24, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x69, 0x6e,
|
||||||
|
0x64, 0x65, 0x78, 0x2f, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78,
|
||||||
|
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x11, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65,
|
||||||
|
0x2e, 0x76, 0x31, 0x2e, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x9a, 0x03, 0x0a, 0x0f, 0x56, 0x65,
|
||||||
|
0x63, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x3c, 0x0a,
|
||||||
|
0x06, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e,
|
||||||
|
0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x69, 0x6e, 0x64, 0x65,
|
||||||
|
0x78, 0x2e, 0x56, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x45, 0x6e, 0x67,
|
||||||
|
0x69, 0x6e, 0x65, 0x52, 0x06, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x64,
|
||||||
|
0x69, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, 0x64, 0x69, 0x6d, 0x12, 0x3f, 0x0a,
|
||||||
|
0x06, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x27, 0x2e,
|
||||||
|
0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x69, 0x6e, 0x64, 0x65,
|
||||||
|
0x78, 0x2e, 0x56, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x44, 0x69, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65,
|
||||||
|
0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x12, 0x22,
|
||||||
|
0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x18, 0x04,
|
||||||
|
0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x76, 0x69,
|
||||||
|
0x74, 0x79, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x78, 0x70, 0x61, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f,
|
||||||
|
0x61, 0x64, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x65, 0x78, 0x70, 0x61, 0x6e,
|
||||||
|
0x73, 0x69, 0x6f, 0x6e, 0x41, 0x64, 0x64, 0x12, 0x29, 0x0a, 0x10, 0x65, 0x78, 0x70, 0x61, 0x6e,
|
||||||
|
0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28,
|
||||||
|
0x0d, 0x52, 0x0f, 0x65, 0x78, 0x70, 0x61, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x61, 0x72,
|
||||||
|
0x63, 0x68, 0x12, 0x28, 0x0a, 0x10, 0x6e, 0x75, 0x6c, 0x6c, 0x5f, 0x62, 0x69, 0x74, 0x6d, 0x61,
|
||||||
|
0x70, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0e, 0x6e, 0x75,
|
||||||
|
0x6c, 0x6c, 0x42, 0x69, 0x74, 0x6d, 0x61, 0x70, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a,
|
||||||
|
0x69, 0x6e, 0x64, 0x65, 0x78, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04,
|
||||||
|
0x52, 0x09, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x39, 0x0a, 0x05, 0x73,
|
||||||
|
0x74, 0x61, 0x74, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x72, 0x65,
|
||||||
|
0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x2e, 0x56,
|
||||||
|
0x65, 0x63, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52,
|
||||||
|
0x05, 0x73, 0x74, 0x61, 0x74, 0x73, 0x22, 0x85, 0x01, 0x0a, 0x10, 0x56, 0x65, 0x63, 0x74, 0x6f,
|
||||||
|
0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x74,
|
||||||
|
0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x72, 0x6f, 0x77, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01,
|
||||||
|
0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x52, 0x6f, 0x77, 0x43, 0x6f,
|
||||||
|
0x75, 0x6e, 0x74, 0x12, 0x2a, 0x0a, 0x11, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x5f, 0x72,
|
||||||
|
0x6f, 0x77, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f,
|
||||||
|
0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x52, 0x6f, 0x77, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12,
|
||||||
|
0x1d, 0x0a, 0x0a, 0x6e, 0x75, 0x6c, 0x6c, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20,
|
||||||
|
0x01, 0x28, 0x04, 0x52, 0x09, 0x6e, 0x75, 0x6c, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x2a, 0x34,
|
||||||
|
0x0a, 0x11, 0x56, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x45, 0x6e, 0x67,
|
||||||
|
0x69, 0x6e, 0x65, 0x12, 0x1f, 0x0a, 0x1b, 0x56, 0x45, 0x43, 0x54, 0x4f, 0x52, 0x5f, 0x49, 0x4e,
|
||||||
|
0x44, 0x45, 0x58, 0x5f, 0x45, 0x4e, 0x47, 0x49, 0x4e, 0x45, 0x5f, 0x55, 0x53, 0x45, 0x41, 0x52,
|
||||||
|
0x43, 0x48, 0x10, 0x00, 0x2a, 0x84, 0x01, 0x0a, 0x14, 0x56, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x44,
|
||||||
|
0x69, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x12, 0x1f, 0x0a,
|
||||||
|
0x1b, 0x56, 0x45, 0x43, 0x54, 0x4f, 0x52, 0x5f, 0x44, 0x49, 0x53, 0x54, 0x41, 0x4e, 0x43, 0x45,
|
||||||
|
0x5f, 0x4d, 0x45, 0x54, 0x52, 0x49, 0x43, 0x5f, 0x4c, 0x32, 0x53, 0x51, 0x10, 0x00, 0x12, 0x21,
|
||||||
|
0x0a, 0x1d, 0x56, 0x45, 0x43, 0x54, 0x4f, 0x52, 0x5f, 0x44, 0x49, 0x53, 0x54, 0x41, 0x4e, 0x43,
|
||||||
|
0x45, 0x5f, 0x4d, 0x45, 0x54, 0x52, 0x49, 0x43, 0x5f, 0x43, 0x4f, 0x53, 0x49, 0x4e, 0x45, 0x10,
|
||||||
|
0x01, 0x12, 0x28, 0x0a, 0x24, 0x56, 0x45, 0x43, 0x54, 0x4f, 0x52, 0x5f, 0x44, 0x49, 0x53, 0x54,
|
||||||
|
0x41, 0x4e, 0x43, 0x45, 0x5f, 0x4d, 0x45, 0x54, 0x52, 0x49, 0x43, 0x5f, 0x49, 0x4e, 0x4e, 0x45,
|
||||||
|
0x52, 0x5f, 0x50, 0x52, 0x4f, 0x44, 0x55, 0x43, 0x54, 0x10, 0x02, 0x42, 0x3d, 0x5a, 0x3b, 0x67,
|
||||||
|
0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x70, 0x74, 0x69,
|
||||||
|
0x6d, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2d,
|
||||||
|
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d,
|
||||||
|
0x65, 0x2f, 0x76, 0x31, 0x2f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
|
||||||
|
0x6f, 0x33,
|
||||||
|
}
|
||||||
|
|
||||||
|
var (
|
||||||
|
file_greptime_v1_index_vector_index_proto_rawDescOnce sync.Once
|
||||||
|
file_greptime_v1_index_vector_index_proto_rawDescData = file_greptime_v1_index_vector_index_proto_rawDesc
|
||||||
|
)
|
||||||
|
|
||||||
|
func file_greptime_v1_index_vector_index_proto_rawDescGZIP() []byte {
|
||||||
|
file_greptime_v1_index_vector_index_proto_rawDescOnce.Do(func() {
|
||||||
|
file_greptime_v1_index_vector_index_proto_rawDescData = protoimpl.X.CompressGZIP(file_greptime_v1_index_vector_index_proto_rawDescData)
|
||||||
|
})
|
||||||
|
return file_greptime_v1_index_vector_index_proto_rawDescData
|
||||||
|
}
|
||||||
|
|
||||||
|
var file_greptime_v1_index_vector_index_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
|
||||||
|
var file_greptime_v1_index_vector_index_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
||||||
|
var file_greptime_v1_index_vector_index_proto_goTypes = []interface{}{
|
||||||
|
(VectorIndexEngine)(0), // 0: greptime.v1.index.VectorIndexEngine
|
||||||
|
(VectorDistanceMetric)(0), // 1: greptime.v1.index.VectorDistanceMetric
|
||||||
|
(*VectorIndexMeta)(nil), // 2: greptime.v1.index.VectorIndexMeta
|
||||||
|
(*VectorIndexStats)(nil), // 3: greptime.v1.index.VectorIndexStats
|
||||||
|
}
|
||||||
|
var file_greptime_v1_index_vector_index_proto_depIdxs = []int32{
|
||||||
|
0, // 0: greptime.v1.index.VectorIndexMeta.engine:type_name -> greptime.v1.index.VectorIndexEngine
|
||||||
|
1, // 1: greptime.v1.index.VectorIndexMeta.metric:type_name -> greptime.v1.index.VectorDistanceMetric
|
||||||
|
3, // 2: greptime.v1.index.VectorIndexMeta.stats:type_name -> greptime.v1.index.VectorIndexStats
|
||||||
|
3, // [3:3] is the sub-list for method output_type
|
||||||
|
3, // [3:3] is the sub-list for method input_type
|
||||||
|
3, // [3:3] is the sub-list for extension type_name
|
||||||
|
3, // [3:3] is the sub-list for extension extendee
|
||||||
|
0, // [0:3] is the sub-list for field type_name
|
||||||
|
}
|
||||||
|
|
||||||
|
func init() { file_greptime_v1_index_vector_index_proto_init() }
|
||||||
|
func file_greptime_v1_index_vector_index_proto_init() {
|
||||||
|
if File_greptime_v1_index_vector_index_proto != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if !protoimpl.UnsafeEnabled {
|
||||||
|
file_greptime_v1_index_vector_index_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*VectorIndexMeta); i {
|
||||||
|
case 0:
|
||||||
|
return &v.state
|
||||||
|
case 1:
|
||||||
|
return &v.sizeCache
|
||||||
|
case 2:
|
||||||
|
return &v.unknownFields
|
||||||
|
default:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
file_greptime_v1_index_vector_index_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*VectorIndexStats); i {
|
||||||
|
case 0:
|
||||||
|
return &v.state
|
||||||
|
case 1:
|
||||||
|
return &v.sizeCache
|
||||||
|
case 2:
|
||||||
|
return &v.unknownFields
|
||||||
|
default:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
type x struct{}
|
||||||
|
out := protoimpl.TypeBuilder{
|
||||||
|
File: protoimpl.DescBuilder{
|
||||||
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||||
|
RawDescriptor: file_greptime_v1_index_vector_index_proto_rawDesc,
|
||||||
|
NumEnums: 2,
|
||||||
|
NumMessages: 2,
|
||||||
|
NumExtensions: 0,
|
||||||
|
NumServices: 0,
|
||||||
|
},
|
||||||
|
GoTypes: file_greptime_v1_index_vector_index_proto_goTypes,
|
||||||
|
DependencyIndexes: file_greptime_v1_index_vector_index_proto_depIdxs,
|
||||||
|
EnumInfos: file_greptime_v1_index_vector_index_proto_enumTypes,
|
||||||
|
MessageInfos: file_greptime_v1_index_vector_index_proto_msgTypes,
|
||||||
|
}.Build()
|
||||||
|
File_greptime_v1_index_vector_index_proto = out.File
|
||||||
|
file_greptime_v1_index_vector_index_proto_rawDesc = nil
|
||||||
|
file_greptime_v1_index_vector_index_proto_goTypes = nil
|
||||||
|
file_greptime_v1_index_vector_index_proto_depIdxs = nil
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,73 @@
|
|||||||
|
// Copyright 2023 Greptime Team
|
||||||
|
//
|
||||||
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
// you may not use this file except in compliance with the License.
|
||||||
|
// You may obtain a copy of the License at
|
||||||
|
//
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
//
|
||||||
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
// See the License for the specific language governing permissions and
|
||||||
|
// limitations under the License.
|
||||||
|
|
||||||
|
syntax = "proto3";
|
||||||
|
|
||||||
|
package greptime.v1.index;
|
||||||
|
|
||||||
|
option go_package = "github.com/GreptimeTeam/greptime-proto/go/greptime/v1/index";
|
||||||
|
|
||||||
|
// Vector index engine types.
|
||||||
|
enum VectorIndexEngine {
|
||||||
|
VECTOR_INDEX_ENGINE_USEARCH = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Vector distance metrics.
|
||||||
|
enum VectorDistanceMetric {
|
||||||
|
VECTOR_DISTANCE_METRIC_L2SQ = 0;
|
||||||
|
VECTOR_DISTANCE_METRIC_COSINE = 1;
|
||||||
|
VECTOR_DISTANCE_METRIC_INNER_PRODUCT = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Metadata for a vector index blob (stored as footer).
|
||||||
|
message VectorIndexMeta {
|
||||||
|
// Index engine type.
|
||||||
|
VectorIndexEngine engine = 1;
|
||||||
|
|
||||||
|
// Vector dimension.
|
||||||
|
uint32 dim = 2;
|
||||||
|
|
||||||
|
// Distance metric.
|
||||||
|
VectorDistanceMetric metric = 3;
|
||||||
|
|
||||||
|
// HNSW connectivity parameter.
|
||||||
|
uint32 connectivity = 4;
|
||||||
|
|
||||||
|
// HNSW expansion factor during index construction.
|
||||||
|
uint32 expansion_add = 5;
|
||||||
|
|
||||||
|
// HNSW expansion factor during search.
|
||||||
|
uint32 expansion_search = 6;
|
||||||
|
|
||||||
|
// Byte length of the null bitmap (RoaringBitmap serialized).
|
||||||
|
uint32 null_bitmap_size = 7;
|
||||||
|
|
||||||
|
// Byte length of the vector index data (engine-specific serialized format).
|
||||||
|
uint64 index_size = 8;
|
||||||
|
|
||||||
|
// Statistics about the vector index.
|
||||||
|
VectorIndexStats stats = 9;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Statistics for a vector index.
|
||||||
|
message VectorIndexStats {
|
||||||
|
// Total number of rows in the SST.
|
||||||
|
uint64 total_row_count = 1;
|
||||||
|
|
||||||
|
// Number of rows with valid vectors (indexed).
|
||||||
|
uint64 indexed_row_count = 2;
|
||||||
|
|
||||||
|
// Number of null vectors.
|
||||||
|
uint64 null_count = 3;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user