From 2ffdcae9f9816e41f261b24502e6603d68442466 Mon Sep 17 00:00:00 2001 From: Zhenchi Date: Thu, 23 Nov 2023 12:31:40 +0800 Subject: [PATCH] feat: add `InvertedIndexMetas` (#121) * feat: add `InvertedIndexFooter` Signed-off-by: Zhenchi * feat: map instead of list Signed-off-by: Zhenchi * fix: add rust mod Signed-off-by: Zhenchi * chore: rename InvertedIndexFooter to InvertedIndexMetas Signed-off-by: Zhenchi * chore: add java outer classname option Signed-off-by: Zhenchi --------- Signed-off-by: Zhenchi --- build.rs | 1 + .../v1/index/inverted_index.grpc.pb.cc | 29 + .../v1/index/inverted_index.grpc.pb.h | 52 + c++/greptime/v1/index/inverted_index.pb.cc | 1117 ++++++ c++/greptime/v1/index/inverted_index.pb.h | 1135 ++++++ .../io/greptime/v1/index/InvertedIndex.java | 3089 +++++++++++++++++ proto/greptime/v1/index/inverted_index.proto | 74 + src/v1.rs | 1 + src/v1/index.rs | 15 + 9 files changed, 5513 insertions(+) create mode 100644 c++/greptime/v1/index/inverted_index.grpc.pb.cc create mode 100644 c++/greptime/v1/index/inverted_index.grpc.pb.h create mode 100644 c++/greptime/v1/index/inverted_index.pb.cc create mode 100644 c++/greptime/v1/index/inverted_index.pb.h create mode 100644 java/src/main/java/io/greptime/v1/index/InvertedIndex.java create mode 100644 proto/greptime/v1/index/inverted_index.proto create mode 100644 src/v1/index.rs diff --git a/build.rs b/build.rs index 337b81f6..dd4f0976 100644 --- a/build.rs +++ b/build.rs @@ -43,6 +43,7 @@ fn main() { "proto/greptime/v1/meta/lock.proto", "proto/greptime/v1/meta/cluster.proto", "proto/greptime/v1/region/server.proto", + "proto/greptime/v1/index/inverted_index.proto", "proto/prometheus/remote/remote.proto", "proto/substrait_extension/promql_plan.proto", ], diff --git a/c++/greptime/v1/index/inverted_index.grpc.pb.cc b/c++/greptime/v1/index/inverted_index.grpc.pb.cc new file mode 100644 index 00000000..b0d82a09 --- /dev/null +++ b/c++/greptime/v1/index/inverted_index.grpc.pb.cc @@ -0,0 +1,29 @@ +// Generated by the gRPC C++ plugin. +// If you make any local change, they will be lost. +// source: greptime/v1/index/inverted_index.proto + +#include "greptime/v1/index/inverted_index.pb.h" +#include "greptime/v1/index/inverted_index.grpc.pb.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +namespace greptime { +namespace v1 { +namespace index { + +} // namespace greptime +} // namespace v1 +} // namespace index + diff --git a/c++/greptime/v1/index/inverted_index.grpc.pb.h b/c++/greptime/v1/index/inverted_index.grpc.pb.h new file mode 100644 index 00000000..292cf858 --- /dev/null +++ b/c++/greptime/v1/index/inverted_index.grpc.pb.h @@ -0,0 +1,52 @@ +// Generated by the gRPC C++ plugin. +// If you make any local change, they will be lost. +// source: greptime/v1/index/inverted_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_2finverted_5findex_2eproto__INCLUDED +#define GRPC_greptime_2fv1_2findex_2finverted_5findex_2eproto__INCLUDED + +#include "greptime/v1/index/inverted_index.pb.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace greptime { +namespace v1 { +namespace index { + +} // namespace index +} // namespace v1 +} // namespace greptime + + +#endif // GRPC_greptime_2fv1_2findex_2finverted_5findex_2eproto__INCLUDED diff --git a/c++/greptime/v1/index/inverted_index.pb.cc b/c++/greptime/v1/index/inverted_index.pb.cc new file mode 100644 index 00000000..1d16ef1c --- /dev/null +++ b/c++/greptime/v1/index/inverted_index.pb.cc @@ -0,0 +1,1117 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: greptime/v1/index/inverted_index.proto + +#include "greptime/v1/index/inverted_index.pb.h" + +#include + +#include +#include +#include +#include +#include +#include +#include +// @@protoc_insertion_point(includes) +#include + +PROTOBUF_PRAGMA_INIT_SEG + +namespace _pb = ::PROTOBUF_NAMESPACE_ID; +namespace _pbi = _pb::internal; + +namespace greptime { +namespace v1 { +namespace index { +PROTOBUF_CONSTEXPR InvertedIndexFooter_MetasEntry_DoNotUse::InvertedIndexFooter_MetasEntry_DoNotUse( + ::_pbi::ConstantInitialized) {} +struct InvertedIndexFooter_MetasEntry_DoNotUseDefaultTypeInternal { + PROTOBUF_CONSTEXPR InvertedIndexFooter_MetasEntry_DoNotUseDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~InvertedIndexFooter_MetasEntry_DoNotUseDefaultTypeInternal() {} + union { + InvertedIndexFooter_MetasEntry_DoNotUse _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 InvertedIndexFooter_MetasEntry_DoNotUseDefaultTypeInternal _InvertedIndexFooter_MetasEntry_DoNotUse_default_instance_; +PROTOBUF_CONSTEXPR InvertedIndexFooter::InvertedIndexFooter( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.metas_)*/{::_pbi::ConstantInitialized()} + , /*decltype(_impl_._cached_size_)*/{}} {} +struct InvertedIndexFooterDefaultTypeInternal { + PROTOBUF_CONSTEXPR InvertedIndexFooterDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~InvertedIndexFooterDefaultTypeInternal() {} + union { + InvertedIndexFooter _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 InvertedIndexFooterDefaultTypeInternal _InvertedIndexFooter_default_instance_; +PROTOBUF_CONSTEXPR InvertedIndexMeta::InvertedIndexMeta( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.stats_)*/nullptr + , /*decltype(_impl_.row_count_in_group_)*/uint64_t{0u} + , /*decltype(_impl_.fst_offset_)*/uint64_t{0u} + , /*decltype(_impl_.fst_size_)*/uint64_t{0u} + , /*decltype(_impl_.null_bitmap_offset_)*/uint64_t{0u} + , /*decltype(_impl_.null_bitmap_size_)*/uint64_t{0u} + , /*decltype(_impl_._cached_size_)*/{}} {} +struct InvertedIndexMetaDefaultTypeInternal { + PROTOBUF_CONSTEXPR InvertedIndexMetaDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~InvertedIndexMetaDefaultTypeInternal() {} + union { + InvertedIndexMeta _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 InvertedIndexMetaDefaultTypeInternal _InvertedIndexMeta_default_instance_; +PROTOBUF_CONSTEXPR InvertedIndexStats::InvertedIndexStats( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.min_value_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.max_value_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.null_count_)*/uint64_t{0u} + , /*decltype(_impl_.distinct_count_)*/uint64_t{0u} + , /*decltype(_impl_._cached_size_)*/{}} {} +struct InvertedIndexStatsDefaultTypeInternal { + PROTOBUF_CONSTEXPR InvertedIndexStatsDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~InvertedIndexStatsDefaultTypeInternal() {} + union { + InvertedIndexStats _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 InvertedIndexStatsDefaultTypeInternal _InvertedIndexStats_default_instance_; +} // namespace index +} // namespace v1 +} // namespace greptime +static ::_pb::Metadata file_level_metadata_greptime_2fv1_2findex_2finverted_5findex_2eproto[4]; +static constexpr ::_pb::EnumDescriptor const** file_level_enum_descriptors_greptime_2fv1_2findex_2finverted_5findex_2eproto = nullptr; +static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_greptime_2fv1_2findex_2finverted_5findex_2eproto = nullptr; + +const uint32_t TableStruct_greptime_2fv1_2findex_2finverted_5findex_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + PROTOBUF_FIELD_OFFSET(::greptime::v1::index::InvertedIndexFooter_MetasEntry_DoNotUse, _has_bits_), + PROTOBUF_FIELD_OFFSET(::greptime::v1::index::InvertedIndexFooter_MetasEntry_DoNotUse, _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::InvertedIndexFooter_MetasEntry_DoNotUse, key_), + PROTOBUF_FIELD_OFFSET(::greptime::v1::index::InvertedIndexFooter_MetasEntry_DoNotUse, value_), + 0, + 1, + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::greptime::v1::index::InvertedIndexFooter, _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::InvertedIndexFooter, _impl_.metas_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::greptime::v1::index::InvertedIndexMeta, _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::InvertedIndexMeta, _impl_.name_), + PROTOBUF_FIELD_OFFSET(::greptime::v1::index::InvertedIndexMeta, _impl_.row_count_in_group_), + PROTOBUF_FIELD_OFFSET(::greptime::v1::index::InvertedIndexMeta, _impl_.fst_offset_), + PROTOBUF_FIELD_OFFSET(::greptime::v1::index::InvertedIndexMeta, _impl_.fst_size_), + PROTOBUF_FIELD_OFFSET(::greptime::v1::index::InvertedIndexMeta, _impl_.null_bitmap_offset_), + PROTOBUF_FIELD_OFFSET(::greptime::v1::index::InvertedIndexMeta, _impl_.null_bitmap_size_), + PROTOBUF_FIELD_OFFSET(::greptime::v1::index::InvertedIndexMeta, _impl_.stats_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::greptime::v1::index::InvertedIndexStats, _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::InvertedIndexStats, _impl_.null_count_), + PROTOBUF_FIELD_OFFSET(::greptime::v1::index::InvertedIndexStats, _impl_.distinct_count_), + PROTOBUF_FIELD_OFFSET(::greptime::v1::index::InvertedIndexStats, _impl_.min_value_), + PROTOBUF_FIELD_OFFSET(::greptime::v1::index::InvertedIndexStats, _impl_.max_value_), +}; +static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + { 0, 8, -1, sizeof(::greptime::v1::index::InvertedIndexFooter_MetasEntry_DoNotUse)}, + { 10, -1, -1, sizeof(::greptime::v1::index::InvertedIndexFooter)}, + { 17, -1, -1, sizeof(::greptime::v1::index::InvertedIndexMeta)}, + { 30, -1, -1, sizeof(::greptime::v1::index::InvertedIndexStats)}, +}; + +static const ::_pb::Message* const file_default_instances[] = { + &::greptime::v1::index::_InvertedIndexFooter_MetasEntry_DoNotUse_default_instance_._instance, + &::greptime::v1::index::_InvertedIndexFooter_default_instance_._instance, + &::greptime::v1::index::_InvertedIndexMeta_default_instance_._instance, + &::greptime::v1::index::_InvertedIndexStats_default_instance_._instance, +}; + +const char descriptor_table_protodef_greptime_2fv1_2findex_2finverted_5findex_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = + "\n&greptime/v1/index/inverted_index.proto" + "\022\021greptime.v1.index\"\253\001\n\023InvertedIndexFoo" + "ter\022@\n\005metas\030\001 \003(\01321.greptime.v1.index.I" + "nvertedIndexFooter.MetasEntry\032R\n\nMetasEn" + "try\022\013\n\003key\030\001 \001(\t\0223\n\005value\030\002 \001(\0132$.grepti" + "me.v1.index.InvertedIndexMeta:\0028\001\"\317\001\n\021In" + "vertedIndexMeta\022\014\n\004name\030\001 \001(\t\022\032\n\022row_cou" + "nt_in_group\030\002 \001(\004\022\022\n\nfst_offset\030\003 \001(\004\022\020\n" + "\010fst_size\030\004 \001(\004\022\032\n\022null_bitmap_offset\030\005 " + "\001(\004\022\030\n\020null_bitmap_size\030\006 \001(\004\0224\n\005stats\030\007" + " \001(\0132%.greptime.v1.index.InvertedIndexSt" + "ats\"f\n\022InvertedIndexStats\022\022\n\nnull_count\030" + "\001 \001(\004\022\026\n\016distinct_count\030\002 \001(\004\022\021\n\tmin_val" + "ue\030\003 \001(\014\022\021\n\tmax_value\030\004 \001(\014BS\n\024io.grepti" + "me.v1.indexZ;github.com/GreptimeTeam/gre" + "ptime-proto/go/greptime/v1/indexb\006proto3" + ; +static ::_pbi::once_flag descriptor_table_greptime_2fv1_2findex_2finverted_5findex_2eproto_once; +const ::_pbi::DescriptorTable descriptor_table_greptime_2fv1_2findex_2finverted_5findex_2eproto = { + false, false, 640, descriptor_table_protodef_greptime_2fv1_2findex_2finverted_5findex_2eproto, + "greptime/v1/index/inverted_index.proto", + &descriptor_table_greptime_2fv1_2findex_2finverted_5findex_2eproto_once, nullptr, 0, 4, + schemas, file_default_instances, TableStruct_greptime_2fv1_2findex_2finverted_5findex_2eproto::offsets, + file_level_metadata_greptime_2fv1_2findex_2finverted_5findex_2eproto, file_level_enum_descriptors_greptime_2fv1_2findex_2finverted_5findex_2eproto, + file_level_service_descriptors_greptime_2fv1_2findex_2finverted_5findex_2eproto, +}; +PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_greptime_2fv1_2findex_2finverted_5findex_2eproto_getter() { + return &descriptor_table_greptime_2fv1_2findex_2finverted_5findex_2eproto; +} + +// Force running AddDescriptors() at dynamic initialization time. +PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_greptime_2fv1_2findex_2finverted_5findex_2eproto(&descriptor_table_greptime_2fv1_2findex_2finverted_5findex_2eproto); +namespace greptime { +namespace v1 { +namespace index { + +// =================================================================== + +InvertedIndexFooter_MetasEntry_DoNotUse::InvertedIndexFooter_MetasEntry_DoNotUse() {} +InvertedIndexFooter_MetasEntry_DoNotUse::InvertedIndexFooter_MetasEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : SuperType(arena) {} +void InvertedIndexFooter_MetasEntry_DoNotUse::MergeFrom(const InvertedIndexFooter_MetasEntry_DoNotUse& other) { + MergeFromInternal(other); +} +::PROTOBUF_NAMESPACE_ID::Metadata InvertedIndexFooter_MetasEntry_DoNotUse::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_greptime_2fv1_2findex_2finverted_5findex_2eproto_getter, &descriptor_table_greptime_2fv1_2findex_2finverted_5findex_2eproto_once, + file_level_metadata_greptime_2fv1_2findex_2finverted_5findex_2eproto[0]); +} + +// =================================================================== + +class InvertedIndexFooter::_Internal { + public: +}; + +InvertedIndexFooter::InvertedIndexFooter(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + if (arena != nullptr && !is_message_owned) { + arena->OwnCustomDestructor(this, &InvertedIndexFooter::ArenaDtor); + } + // @@protoc_insertion_point(arena_constructor:greptime.v1.index.InvertedIndexFooter) +} +InvertedIndexFooter::InvertedIndexFooter(const InvertedIndexFooter& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + InvertedIndexFooter* const _this = this; (void)_this; + new (&_impl_) Impl_{ + /*decltype(_impl_.metas_)*/{} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _this->_impl_.metas_.MergeFrom(from._impl_.metas_); + // @@protoc_insertion_point(copy_constructor:greptime.v1.index.InvertedIndexFooter) +} + +inline void InvertedIndexFooter::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + /*decltype(_impl_.metas_)*/{::_pbi::ArenaInitialized(), arena} + , /*decltype(_impl_._cached_size_)*/{} + }; +} + +InvertedIndexFooter::~InvertedIndexFooter() { + // @@protoc_insertion_point(destructor:greptime.v1.index.InvertedIndexFooter) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + ArenaDtor(this); + return; + } + SharedDtor(); +} + +inline void InvertedIndexFooter::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.metas_.Destruct(); + _impl_.metas_.~MapField(); +} + +void InvertedIndexFooter::ArenaDtor(void* object) { + InvertedIndexFooter* _this = reinterpret_cast< InvertedIndexFooter* >(object); + _this->_impl_.metas_.Destruct(); +} +void InvertedIndexFooter::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void InvertedIndexFooter::Clear() { +// @@protoc_insertion_point(message_clear_start:greptime.v1.index.InvertedIndexFooter) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.metas_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* InvertedIndexFooter::_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) { + // map metas = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(&_impl_.metas_, ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(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* InvertedIndexFooter::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:greptime.v1.index.InvertedIndexFooter) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // map metas = 1; + if (!this->_internal_metas().empty()) { + using MapType = ::_pb::Map; + using WireHelper = InvertedIndexFooter_MetasEntry_DoNotUse::Funcs; + const auto& map_field = this->_internal_metas(); + auto check_utf8 = [](const MapType::value_type& entry) { + (void)entry; + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + entry.first.data(), static_cast(entry.first.length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "greptime.v1.index.InvertedIndexFooter.MetasEntry.key"); + }; + + if (stream->IsSerializationDeterministic() && map_field.size() > 1) { + for (const auto& entry : ::_pbi::MapSorterPtr(map_field)) { + target = WireHelper::InternalSerialize(1, entry.first, entry.second, target, stream); + check_utf8(entry); + } + } else { + for (const auto& entry : map_field) { + target = WireHelper::InternalSerialize(1, entry.first, entry.second, target, stream); + check_utf8(entry); + } + } + } + + 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.InvertedIndexFooter) + return target; +} + +size_t InvertedIndexFooter::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:greptime.v1.index.InvertedIndexFooter) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // map metas = 1; + total_size += 1 * + ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_metas_size()); + for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::greptime::v1::index::InvertedIndexMeta >::const_iterator + it = this->_internal_metas().begin(); + it != this->_internal_metas().end(); ++it) { + total_size += InvertedIndexFooter_MetasEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData InvertedIndexFooter::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + InvertedIndexFooter::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*InvertedIndexFooter::GetClassData() const { return &_class_data_; } + + +void InvertedIndexFooter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:greptime.v1.index.InvertedIndexFooter) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + _this->_impl_.metas_.MergeFrom(from._impl_.metas_); + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void InvertedIndexFooter::CopyFrom(const InvertedIndexFooter& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:greptime.v1.index.InvertedIndexFooter) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool InvertedIndexFooter::IsInitialized() const { + return true; +} + +void InvertedIndexFooter::InternalSwap(InvertedIndexFooter* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + _impl_.metas_.InternalSwap(&other->_impl_.metas_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata InvertedIndexFooter::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_greptime_2fv1_2findex_2finverted_5findex_2eproto_getter, &descriptor_table_greptime_2fv1_2findex_2finverted_5findex_2eproto_once, + file_level_metadata_greptime_2fv1_2findex_2finverted_5findex_2eproto[1]); +} + +// =================================================================== + +class InvertedIndexMeta::_Internal { + public: + static const ::greptime::v1::index::InvertedIndexStats& stats(const InvertedIndexMeta* msg); +}; + +const ::greptime::v1::index::InvertedIndexStats& +InvertedIndexMeta::_Internal::stats(const InvertedIndexMeta* msg) { + return *msg->_impl_.stats_; +} +InvertedIndexMeta::InvertedIndexMeta(::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.InvertedIndexMeta) +} +InvertedIndexMeta::InvertedIndexMeta(const InvertedIndexMeta& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + InvertedIndexMeta* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.name_){} + , decltype(_impl_.stats_){nullptr} + , decltype(_impl_.row_count_in_group_){} + , decltype(_impl_.fst_offset_){} + , decltype(_impl_.fst_size_){} + , decltype(_impl_.null_bitmap_offset_){} + , decltype(_impl_.null_bitmap_size_){} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _impl_.name_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.name_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_name().empty()) { + _this->_impl_.name_.Set(from._internal_name(), + _this->GetArenaForAllocation()); + } + if (from._internal_has_stats()) { + _this->_impl_.stats_ = new ::greptime::v1::index::InvertedIndexStats(*from._impl_.stats_); + } + ::memcpy(&_impl_.row_count_in_group_, &from._impl_.row_count_in_group_, + static_cast(reinterpret_cast(&_impl_.null_bitmap_size_) - + reinterpret_cast(&_impl_.row_count_in_group_)) + sizeof(_impl_.null_bitmap_size_)); + // @@protoc_insertion_point(copy_constructor:greptime.v1.index.InvertedIndexMeta) +} + +inline void InvertedIndexMeta::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.name_){} + , decltype(_impl_.stats_){nullptr} + , decltype(_impl_.row_count_in_group_){uint64_t{0u}} + , decltype(_impl_.fst_offset_){uint64_t{0u}} + , decltype(_impl_.fst_size_){uint64_t{0u}} + , decltype(_impl_.null_bitmap_offset_){uint64_t{0u}} + , decltype(_impl_.null_bitmap_size_){uint64_t{0u}} + , /*decltype(_impl_._cached_size_)*/{} + }; + _impl_.name_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.name_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +InvertedIndexMeta::~InvertedIndexMeta() { + // @@protoc_insertion_point(destructor:greptime.v1.index.InvertedIndexMeta) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void InvertedIndexMeta::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.name_.Destroy(); + if (this != internal_default_instance()) delete _impl_.stats_; +} + +void InvertedIndexMeta::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void InvertedIndexMeta::Clear() { +// @@protoc_insertion_point(message_clear_start:greptime.v1.index.InvertedIndexMeta) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.name_.ClearToEmpty(); + if (GetArenaForAllocation() == nullptr && _impl_.stats_ != nullptr) { + delete _impl_.stats_; + } + _impl_.stats_ = nullptr; + ::memset(&_impl_.row_count_in_group_, 0, static_cast( + reinterpret_cast(&_impl_.null_bitmap_size_) - + reinterpret_cast(&_impl_.row_count_in_group_)) + sizeof(_impl_.null_bitmap_size_)); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* InvertedIndexMeta::_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) { + // string name = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_name(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "greptime.v1.index.InvertedIndexMeta.name")); + } else + goto handle_unusual; + continue; + // uint64 row_count_in_group = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { + _impl_.row_count_in_group_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // uint64 fst_offset = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 24)) { + _impl_.fst_offset_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // uint64 fst_size = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 32)) { + _impl_.fst_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // uint64 null_bitmap_offset = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 40)) { + _impl_.null_bitmap_offset_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // uint64 null_bitmap_size = 6; + case 6: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 48)) { + _impl_.null_bitmap_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // .greptime.v1.index.InvertedIndexStats stats = 7; + case 7: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 58)) { + 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* InvertedIndexMeta::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:greptime.v1.index.InvertedIndexMeta) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // string name = 1; + if (!this->_internal_name().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_name().data(), static_cast(this->_internal_name().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "greptime.v1.index.InvertedIndexMeta.name"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_name(), target); + } + + // uint64 row_count_in_group = 2; + if (this->_internal_row_count_in_group() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray(2, this->_internal_row_count_in_group(), target); + } + + // uint64 fst_offset = 3; + if (this->_internal_fst_offset() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray(3, this->_internal_fst_offset(), target); + } + + // uint64 fst_size = 4; + if (this->_internal_fst_size() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray(4, this->_internal_fst_size(), target); + } + + // uint64 null_bitmap_offset = 5; + if (this->_internal_null_bitmap_offset() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray(5, this->_internal_null_bitmap_offset(), target); + } + + // uint64 null_bitmap_size = 6; + if (this->_internal_null_bitmap_size() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray(6, this->_internal_null_bitmap_size(), target); + } + + // .greptime.v1.index.InvertedIndexStats stats = 7; + if (this->_internal_has_stats()) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(7, _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.InvertedIndexMeta) + return target; +} + +size_t InvertedIndexMeta::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:greptime.v1.index.InvertedIndexMeta) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // string name = 1; + if (!this->_internal_name().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_name()); + } + + // .greptime.v1.index.InvertedIndexStats stats = 7; + if (this->_internal_has_stats()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *_impl_.stats_); + } + + // uint64 row_count_in_group = 2; + if (this->_internal_row_count_in_group() != 0) { + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_row_count_in_group()); + } + + // uint64 fst_offset = 3; + if (this->_internal_fst_offset() != 0) { + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_fst_offset()); + } + + // uint64 fst_size = 4; + if (this->_internal_fst_size() != 0) { + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_fst_size()); + } + + // uint64 null_bitmap_offset = 5; + if (this->_internal_null_bitmap_offset() != 0) { + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_null_bitmap_offset()); + } + + // uint64 null_bitmap_size = 6; + if (this->_internal_null_bitmap_size() != 0) { + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_null_bitmap_size()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData InvertedIndexMeta::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + InvertedIndexMeta::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*InvertedIndexMeta::GetClassData() const { return &_class_data_; } + + +void InvertedIndexMeta::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:greptime.v1.index.InvertedIndexMeta) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (!from._internal_name().empty()) { + _this->_internal_set_name(from._internal_name()); + } + if (from._internal_has_stats()) { + _this->_internal_mutable_stats()->::greptime::v1::index::InvertedIndexStats::MergeFrom( + from._internal_stats()); + } + if (from._internal_row_count_in_group() != 0) { + _this->_internal_set_row_count_in_group(from._internal_row_count_in_group()); + } + if (from._internal_fst_offset() != 0) { + _this->_internal_set_fst_offset(from._internal_fst_offset()); + } + if (from._internal_fst_size() != 0) { + _this->_internal_set_fst_size(from._internal_fst_size()); + } + if (from._internal_null_bitmap_offset() != 0) { + _this->_internal_set_null_bitmap_offset(from._internal_null_bitmap_offset()); + } + 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 InvertedIndexMeta::CopyFrom(const InvertedIndexMeta& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:greptime.v1.index.InvertedIndexMeta) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool InvertedIndexMeta::IsInitialized() const { + return true; +} + +void InvertedIndexMeta::InternalSwap(InvertedIndexMeta* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.name_, lhs_arena, + &other->_impl_.name_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(InvertedIndexMeta, _impl_.null_bitmap_size_) + + sizeof(InvertedIndexMeta::_impl_.null_bitmap_size_) + - PROTOBUF_FIELD_OFFSET(InvertedIndexMeta, _impl_.stats_)>( + reinterpret_cast(&_impl_.stats_), + reinterpret_cast(&other->_impl_.stats_)); +} + +::PROTOBUF_NAMESPACE_ID::Metadata InvertedIndexMeta::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_greptime_2fv1_2findex_2finverted_5findex_2eproto_getter, &descriptor_table_greptime_2fv1_2findex_2finverted_5findex_2eproto_once, + file_level_metadata_greptime_2fv1_2findex_2finverted_5findex_2eproto[2]); +} + +// =================================================================== + +class InvertedIndexStats::_Internal { + public: +}; + +InvertedIndexStats::InvertedIndexStats(::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.InvertedIndexStats) +} +InvertedIndexStats::InvertedIndexStats(const InvertedIndexStats& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + InvertedIndexStats* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.min_value_){} + , decltype(_impl_.max_value_){} + , decltype(_impl_.null_count_){} + , decltype(_impl_.distinct_count_){} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _impl_.min_value_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.min_value_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_min_value().empty()) { + _this->_impl_.min_value_.Set(from._internal_min_value(), + _this->GetArenaForAllocation()); + } + _impl_.max_value_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.max_value_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_max_value().empty()) { + _this->_impl_.max_value_.Set(from._internal_max_value(), + _this->GetArenaForAllocation()); + } + ::memcpy(&_impl_.null_count_, &from._impl_.null_count_, + static_cast(reinterpret_cast(&_impl_.distinct_count_) - + reinterpret_cast(&_impl_.null_count_)) + sizeof(_impl_.distinct_count_)); + // @@protoc_insertion_point(copy_constructor:greptime.v1.index.InvertedIndexStats) +} + +inline void InvertedIndexStats::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.min_value_){} + , decltype(_impl_.max_value_){} + , decltype(_impl_.null_count_){uint64_t{0u}} + , decltype(_impl_.distinct_count_){uint64_t{0u}} + , /*decltype(_impl_._cached_size_)*/{} + }; + _impl_.min_value_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.min_value_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.max_value_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.max_value_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +InvertedIndexStats::~InvertedIndexStats() { + // @@protoc_insertion_point(destructor:greptime.v1.index.InvertedIndexStats) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void InvertedIndexStats::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.min_value_.Destroy(); + _impl_.max_value_.Destroy(); +} + +void InvertedIndexStats::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void InvertedIndexStats::Clear() { +// @@protoc_insertion_point(message_clear_start:greptime.v1.index.InvertedIndexStats) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.min_value_.ClearToEmpty(); + _impl_.max_value_.ClearToEmpty(); + ::memset(&_impl_.null_count_, 0, static_cast( + reinterpret_cast(&_impl_.distinct_count_) - + reinterpret_cast(&_impl_.null_count_)) + sizeof(_impl_.distinct_count_)); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* InvertedIndexStats::_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 null_count = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + _impl_.null_count_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // uint64 distinct_count = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { + _impl_.distinct_count_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // bytes min_value = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { + auto str = _internal_mutable_min_value(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // bytes max_value = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 34)) { + auto str = _internal_mutable_max_value(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + 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* InvertedIndexStats::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:greptime.v1.index.InvertedIndexStats) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // uint64 null_count = 1; + if (this->_internal_null_count() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray(1, this->_internal_null_count(), target); + } + + // uint64 distinct_count = 2; + if (this->_internal_distinct_count() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray(2, this->_internal_distinct_count(), target); + } + + // bytes min_value = 3; + if (!this->_internal_min_value().empty()) { + target = stream->WriteBytesMaybeAliased( + 3, this->_internal_min_value(), target); + } + + // bytes max_value = 4; + if (!this->_internal_max_value().empty()) { + target = stream->WriteBytesMaybeAliased( + 4, this->_internal_max_value(), 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.InvertedIndexStats) + return target; +} + +size_t InvertedIndexStats::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:greptime.v1.index.InvertedIndexStats) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // bytes min_value = 3; + if (!this->_internal_min_value().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_min_value()); + } + + // bytes max_value = 4; + if (!this->_internal_max_value().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_max_value()); + } + + // uint64 null_count = 1; + if (this->_internal_null_count() != 0) { + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_null_count()); + } + + // uint64 distinct_count = 2; + if (this->_internal_distinct_count() != 0) { + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_distinct_count()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData InvertedIndexStats::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + InvertedIndexStats::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*InvertedIndexStats::GetClassData() const { return &_class_data_; } + + +void InvertedIndexStats::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:greptime.v1.index.InvertedIndexStats) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (!from._internal_min_value().empty()) { + _this->_internal_set_min_value(from._internal_min_value()); + } + if (!from._internal_max_value().empty()) { + _this->_internal_set_max_value(from._internal_max_value()); + } + if (from._internal_null_count() != 0) { + _this->_internal_set_null_count(from._internal_null_count()); + } + if (from._internal_distinct_count() != 0) { + _this->_internal_set_distinct_count(from._internal_distinct_count()); + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void InvertedIndexStats::CopyFrom(const InvertedIndexStats& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:greptime.v1.index.InvertedIndexStats) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool InvertedIndexStats::IsInitialized() const { + return true; +} + +void InvertedIndexStats::InternalSwap(InvertedIndexStats* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.min_value_, lhs_arena, + &other->_impl_.min_value_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.max_value_, lhs_arena, + &other->_impl_.max_value_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(InvertedIndexStats, _impl_.distinct_count_) + + sizeof(InvertedIndexStats::_impl_.distinct_count_) + - PROTOBUF_FIELD_OFFSET(InvertedIndexStats, _impl_.null_count_)>( + reinterpret_cast(&_impl_.null_count_), + reinterpret_cast(&other->_impl_.null_count_)); +} + +::PROTOBUF_NAMESPACE_ID::Metadata InvertedIndexStats::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_greptime_2fv1_2findex_2finverted_5findex_2eproto_getter, &descriptor_table_greptime_2fv1_2findex_2finverted_5findex_2eproto_once, + file_level_metadata_greptime_2fv1_2findex_2finverted_5findex_2eproto[3]); +} + +// @@protoc_insertion_point(namespace_scope) +} // namespace index +} // namespace v1 +} // namespace greptime +PROTOBUF_NAMESPACE_OPEN +template<> PROTOBUF_NOINLINE ::greptime::v1::index::InvertedIndexFooter_MetasEntry_DoNotUse* +Arena::CreateMaybeMessage< ::greptime::v1::index::InvertedIndexFooter_MetasEntry_DoNotUse >(Arena* arena) { + return Arena::CreateMessageInternal< ::greptime::v1::index::InvertedIndexFooter_MetasEntry_DoNotUse >(arena); +} +template<> PROTOBUF_NOINLINE ::greptime::v1::index::InvertedIndexFooter* +Arena::CreateMaybeMessage< ::greptime::v1::index::InvertedIndexFooter >(Arena* arena) { + return Arena::CreateMessageInternal< ::greptime::v1::index::InvertedIndexFooter >(arena); +} +template<> PROTOBUF_NOINLINE ::greptime::v1::index::InvertedIndexMeta* +Arena::CreateMaybeMessage< ::greptime::v1::index::InvertedIndexMeta >(Arena* arena) { + return Arena::CreateMessageInternal< ::greptime::v1::index::InvertedIndexMeta >(arena); +} +template<> PROTOBUF_NOINLINE ::greptime::v1::index::InvertedIndexStats* +Arena::CreateMaybeMessage< ::greptime::v1::index::InvertedIndexStats >(Arena* arena) { + return Arena::CreateMessageInternal< ::greptime::v1::index::InvertedIndexStats >(arena); +} +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) +#include diff --git a/c++/greptime/v1/index/inverted_index.pb.h b/c++/greptime/v1/index/inverted_index.pb.h new file mode 100644 index 00000000..475c9e41 --- /dev/null +++ b/c++/greptime/v1/index/inverted_index.pb.h @@ -0,0 +1,1135 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: greptime/v1/index/inverted_index.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_greptime_2fv1_2findex_2finverted_5findex_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_greptime_2fv1_2findex_2finverted_5findex_2eproto + +#include +#include + +#include +#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 +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include // IWYU pragma: export +#include +#include +#include +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_greptime_2fv1_2findex_2finverted_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_2finverted_5findex_2eproto { + static const uint32_t offsets[]; +}; +extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_greptime_2fv1_2findex_2finverted_5findex_2eproto; +namespace greptime { +namespace v1 { +namespace index { +class InvertedIndexFooter; +struct InvertedIndexFooterDefaultTypeInternal; +extern InvertedIndexFooterDefaultTypeInternal _InvertedIndexFooter_default_instance_; +class InvertedIndexFooter_MetasEntry_DoNotUse; +struct InvertedIndexFooter_MetasEntry_DoNotUseDefaultTypeInternal; +extern InvertedIndexFooter_MetasEntry_DoNotUseDefaultTypeInternal _InvertedIndexFooter_MetasEntry_DoNotUse_default_instance_; +class InvertedIndexMeta; +struct InvertedIndexMetaDefaultTypeInternal; +extern InvertedIndexMetaDefaultTypeInternal _InvertedIndexMeta_default_instance_; +class InvertedIndexStats; +struct InvertedIndexStatsDefaultTypeInternal; +extern InvertedIndexStatsDefaultTypeInternal _InvertedIndexStats_default_instance_; +} // namespace index +} // namespace v1 +} // namespace greptime +PROTOBUF_NAMESPACE_OPEN +template<> ::greptime::v1::index::InvertedIndexFooter* Arena::CreateMaybeMessage<::greptime::v1::index::InvertedIndexFooter>(Arena*); +template<> ::greptime::v1::index::InvertedIndexFooter_MetasEntry_DoNotUse* Arena::CreateMaybeMessage<::greptime::v1::index::InvertedIndexFooter_MetasEntry_DoNotUse>(Arena*); +template<> ::greptime::v1::index::InvertedIndexMeta* Arena::CreateMaybeMessage<::greptime::v1::index::InvertedIndexMeta>(Arena*); +template<> ::greptime::v1::index::InvertedIndexStats* Arena::CreateMaybeMessage<::greptime::v1::index::InvertedIndexStats>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace greptime { +namespace v1 { +namespace index { + +// =================================================================== + +class InvertedIndexFooter_MetasEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal::MapEntry { +public: + typedef ::PROTOBUF_NAMESPACE_ID::internal::MapEntry SuperType; + InvertedIndexFooter_MetasEntry_DoNotUse(); + explicit PROTOBUF_CONSTEXPR InvertedIndexFooter_MetasEntry_DoNotUse( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + explicit InvertedIndexFooter_MetasEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena); + void MergeFrom(const InvertedIndexFooter_MetasEntry_DoNotUse& other); + static const InvertedIndexFooter_MetasEntry_DoNotUse* internal_default_instance() { return reinterpret_cast(&_InvertedIndexFooter_MetasEntry_DoNotUse_default_instance_); } + static bool ValidateKey(std::string* s) { + return ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(s->data(), static_cast(s->size()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "greptime.v1.index.InvertedIndexFooter.MetasEntry.key"); + } + static bool ValidateValue(void*) { return true; } + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + friend struct ::TableStruct_greptime_2fv1_2findex_2finverted_5findex_2eproto; +}; + +// ------------------------------------------------------------------- + +class InvertedIndexFooter final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:greptime.v1.index.InvertedIndexFooter) */ { + public: + inline InvertedIndexFooter() : InvertedIndexFooter(nullptr) {} + ~InvertedIndexFooter() override; + explicit PROTOBUF_CONSTEXPR InvertedIndexFooter(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + InvertedIndexFooter(const InvertedIndexFooter& from); + InvertedIndexFooter(InvertedIndexFooter&& from) noexcept + : InvertedIndexFooter() { + *this = ::std::move(from); + } + + inline InvertedIndexFooter& operator=(const InvertedIndexFooter& from) { + CopyFrom(from); + return *this; + } + inline InvertedIndexFooter& operator=(InvertedIndexFooter&& 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 InvertedIndexFooter& default_instance() { + return *internal_default_instance(); + } + static inline const InvertedIndexFooter* internal_default_instance() { + return reinterpret_cast( + &_InvertedIndexFooter_default_instance_); + } + static constexpr int kIndexInFileMessages = + 1; + + friend void swap(InvertedIndexFooter& a, InvertedIndexFooter& b) { + a.Swap(&b); + } + inline void Swap(InvertedIndexFooter* 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(InvertedIndexFooter* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + InvertedIndexFooter* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const InvertedIndexFooter& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const InvertedIndexFooter& from) { + InvertedIndexFooter::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(InvertedIndexFooter* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "greptime.v1.index.InvertedIndexFooter"; + } + protected: + explicit InvertedIndexFooter(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + 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 { + kMetasFieldNumber = 1, + }; + // map metas = 1; + int metas_size() const; + private: + int _internal_metas_size() const; + public: + void clear_metas(); + private: + const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::greptime::v1::index::InvertedIndexMeta >& + _internal_metas() const; + ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::greptime::v1::index::InvertedIndexMeta >* + _internal_mutable_metas(); + public: + const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::greptime::v1::index::InvertedIndexMeta >& + metas() const; + ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::greptime::v1::index::InvertedIndexMeta >* + mutable_metas(); + + // @@protoc_insertion_point(class_scope:greptime.v1.index.InvertedIndexFooter) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::MapField< + InvertedIndexFooter_MetasEntry_DoNotUse, + std::string, ::greptime::v1::index::InvertedIndexMeta, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_MESSAGE> metas_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_greptime_2fv1_2findex_2finverted_5findex_2eproto; +}; +// ------------------------------------------------------------------- + +class InvertedIndexMeta final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:greptime.v1.index.InvertedIndexMeta) */ { + public: + inline InvertedIndexMeta() : InvertedIndexMeta(nullptr) {} + ~InvertedIndexMeta() override; + explicit PROTOBUF_CONSTEXPR InvertedIndexMeta(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + InvertedIndexMeta(const InvertedIndexMeta& from); + InvertedIndexMeta(InvertedIndexMeta&& from) noexcept + : InvertedIndexMeta() { + *this = ::std::move(from); + } + + inline InvertedIndexMeta& operator=(const InvertedIndexMeta& from) { + CopyFrom(from); + return *this; + } + inline InvertedIndexMeta& operator=(InvertedIndexMeta&& 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 InvertedIndexMeta& default_instance() { + return *internal_default_instance(); + } + static inline const InvertedIndexMeta* internal_default_instance() { + return reinterpret_cast( + &_InvertedIndexMeta_default_instance_); + } + static constexpr int kIndexInFileMessages = + 2; + + friend void swap(InvertedIndexMeta& a, InvertedIndexMeta& b) { + a.Swap(&b); + } + inline void Swap(InvertedIndexMeta* 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(InvertedIndexMeta* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + InvertedIndexMeta* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const InvertedIndexMeta& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const InvertedIndexMeta& from) { + InvertedIndexMeta::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(InvertedIndexMeta* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "greptime.v1.index.InvertedIndexMeta"; + } + protected: + explicit InvertedIndexMeta(::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 { + kNameFieldNumber = 1, + kStatsFieldNumber = 7, + kRowCountInGroupFieldNumber = 2, + kFstOffsetFieldNumber = 3, + kFstSizeFieldNumber = 4, + kNullBitmapOffsetFieldNumber = 5, + kNullBitmapSizeFieldNumber = 6, + }; + // string name = 1; + void clear_name(); + const std::string& name() const; + template + void set_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_name(); + PROTOBUF_NODISCARD std::string* release_name(); + void set_allocated_name(std::string* name); + private: + const std::string& _internal_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_name(const std::string& value); + std::string* _internal_mutable_name(); + public: + + // .greptime.v1.index.InvertedIndexStats stats = 7; + bool has_stats() const; + private: + bool _internal_has_stats() const; + public: + void clear_stats(); + const ::greptime::v1::index::InvertedIndexStats& stats() const; + PROTOBUF_NODISCARD ::greptime::v1::index::InvertedIndexStats* release_stats(); + ::greptime::v1::index::InvertedIndexStats* mutable_stats(); + void set_allocated_stats(::greptime::v1::index::InvertedIndexStats* stats); + private: + const ::greptime::v1::index::InvertedIndexStats& _internal_stats() const; + ::greptime::v1::index::InvertedIndexStats* _internal_mutable_stats(); + public: + void unsafe_arena_set_allocated_stats( + ::greptime::v1::index::InvertedIndexStats* stats); + ::greptime::v1::index::InvertedIndexStats* unsafe_arena_release_stats(); + + // uint64 row_count_in_group = 2; + void clear_row_count_in_group(); + uint64_t row_count_in_group() const; + void set_row_count_in_group(uint64_t value); + private: + uint64_t _internal_row_count_in_group() const; + void _internal_set_row_count_in_group(uint64_t value); + public: + + // uint64 fst_offset = 3; + void clear_fst_offset(); + uint64_t fst_offset() const; + void set_fst_offset(uint64_t value); + private: + uint64_t _internal_fst_offset() const; + void _internal_set_fst_offset(uint64_t value); + public: + + // uint64 fst_size = 4; + void clear_fst_size(); + uint64_t fst_size() const; + void set_fst_size(uint64_t value); + private: + uint64_t _internal_fst_size() const; + void _internal_set_fst_size(uint64_t value); + public: + + // uint64 null_bitmap_offset = 5; + void clear_null_bitmap_offset(); + uint64_t null_bitmap_offset() const; + void set_null_bitmap_offset(uint64_t value); + private: + uint64_t _internal_null_bitmap_offset() const; + void _internal_set_null_bitmap_offset(uint64_t value); + public: + + // uint64 null_bitmap_size = 6; + void clear_null_bitmap_size(); + uint64_t null_bitmap_size() const; + void set_null_bitmap_size(uint64_t value); + private: + uint64_t _internal_null_bitmap_size() const; + void _internal_set_null_bitmap_size(uint64_t value); + public: + + // @@protoc_insertion_point(class_scope:greptime.v1.index.InvertedIndexMeta) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; + ::greptime::v1::index::InvertedIndexStats* stats_; + uint64_t row_count_in_group_; + uint64_t fst_offset_; + uint64_t fst_size_; + uint64_t null_bitmap_offset_; + uint64_t null_bitmap_size_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_greptime_2fv1_2findex_2finverted_5findex_2eproto; +}; +// ------------------------------------------------------------------- + +class InvertedIndexStats final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:greptime.v1.index.InvertedIndexStats) */ { + public: + inline InvertedIndexStats() : InvertedIndexStats(nullptr) {} + ~InvertedIndexStats() override; + explicit PROTOBUF_CONSTEXPR InvertedIndexStats(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + InvertedIndexStats(const InvertedIndexStats& from); + InvertedIndexStats(InvertedIndexStats&& from) noexcept + : InvertedIndexStats() { + *this = ::std::move(from); + } + + inline InvertedIndexStats& operator=(const InvertedIndexStats& from) { + CopyFrom(from); + return *this; + } + inline InvertedIndexStats& operator=(InvertedIndexStats&& 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 InvertedIndexStats& default_instance() { + return *internal_default_instance(); + } + static inline const InvertedIndexStats* internal_default_instance() { + return reinterpret_cast( + &_InvertedIndexStats_default_instance_); + } + static constexpr int kIndexInFileMessages = + 3; + + friend void swap(InvertedIndexStats& a, InvertedIndexStats& b) { + a.Swap(&b); + } + inline void Swap(InvertedIndexStats* 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(InvertedIndexStats* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + InvertedIndexStats* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const InvertedIndexStats& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const InvertedIndexStats& from) { + InvertedIndexStats::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(InvertedIndexStats* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "greptime.v1.index.InvertedIndexStats"; + } + protected: + explicit InvertedIndexStats(::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 { + kMinValueFieldNumber = 3, + kMaxValueFieldNumber = 4, + kNullCountFieldNumber = 1, + kDistinctCountFieldNumber = 2, + }; + // bytes min_value = 3; + void clear_min_value(); + const std::string& min_value() const; + template + void set_min_value(ArgT0&& arg0, ArgT... args); + std::string* mutable_min_value(); + PROTOBUF_NODISCARD std::string* release_min_value(); + void set_allocated_min_value(std::string* min_value); + private: + const std::string& _internal_min_value() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_min_value(const std::string& value); + std::string* _internal_mutable_min_value(); + public: + + // bytes max_value = 4; + void clear_max_value(); + const std::string& max_value() const; + template + void set_max_value(ArgT0&& arg0, ArgT... args); + std::string* mutable_max_value(); + PROTOBUF_NODISCARD std::string* release_max_value(); + void set_allocated_max_value(std::string* max_value); + private: + const std::string& _internal_max_value() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_max_value(const std::string& value); + std::string* _internal_mutable_max_value(); + public: + + // uint64 null_count = 1; + 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: + + // uint64 distinct_count = 2; + void clear_distinct_count(); + uint64_t distinct_count() const; + void set_distinct_count(uint64_t value); + private: + uint64_t _internal_distinct_count() const; + void _internal_set_distinct_count(uint64_t value); + public: + + // @@protoc_insertion_point(class_scope:greptime.v1.index.InvertedIndexStats) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr min_value_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr max_value_; + uint64_t null_count_; + uint64_t distinct_count_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_greptime_2fv1_2findex_2finverted_5findex_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// ------------------------------------------------------------------- + +// InvertedIndexFooter + +// map metas = 1; +inline int InvertedIndexFooter::_internal_metas_size() const { + return _impl_.metas_.size(); +} +inline int InvertedIndexFooter::metas_size() const { + return _internal_metas_size(); +} +inline void InvertedIndexFooter::clear_metas() { + _impl_.metas_.Clear(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::greptime::v1::index::InvertedIndexMeta >& +InvertedIndexFooter::_internal_metas() const { + return _impl_.metas_.GetMap(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::greptime::v1::index::InvertedIndexMeta >& +InvertedIndexFooter::metas() const { + // @@protoc_insertion_point(field_map:greptime.v1.index.InvertedIndexFooter.metas) + return _internal_metas(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::greptime::v1::index::InvertedIndexMeta >* +InvertedIndexFooter::_internal_mutable_metas() { + return _impl_.metas_.MutableMap(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::greptime::v1::index::InvertedIndexMeta >* +InvertedIndexFooter::mutable_metas() { + // @@protoc_insertion_point(field_mutable_map:greptime.v1.index.InvertedIndexFooter.metas) + return _internal_mutable_metas(); +} + +// ------------------------------------------------------------------- + +// InvertedIndexMeta + +// string name = 1; +inline void InvertedIndexMeta::clear_name() { + _impl_.name_.ClearToEmpty(); +} +inline const std::string& InvertedIndexMeta::name() const { + // @@protoc_insertion_point(field_get:greptime.v1.index.InvertedIndexMeta.name) + return _internal_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void InvertedIndexMeta::set_name(ArgT0&& arg0, ArgT... args) { + + _impl_.name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:greptime.v1.index.InvertedIndexMeta.name) +} +inline std::string* InvertedIndexMeta::mutable_name() { + std::string* _s = _internal_mutable_name(); + // @@protoc_insertion_point(field_mutable:greptime.v1.index.InvertedIndexMeta.name) + return _s; +} +inline const std::string& InvertedIndexMeta::_internal_name() const { + return _impl_.name_.Get(); +} +inline void InvertedIndexMeta::_internal_set_name(const std::string& value) { + + _impl_.name_.Set(value, GetArenaForAllocation()); +} +inline std::string* InvertedIndexMeta::_internal_mutable_name() { + + return _impl_.name_.Mutable(GetArenaForAllocation()); +} +inline std::string* InvertedIndexMeta::release_name() { + // @@protoc_insertion_point(field_release:greptime.v1.index.InvertedIndexMeta.name) + return _impl_.name_.Release(); +} +inline void InvertedIndexMeta::set_allocated_name(std::string* name) { + if (name != nullptr) { + + } else { + + } + _impl_.name_.SetAllocated(name, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.name_.IsDefault()) { + _impl_.name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:greptime.v1.index.InvertedIndexMeta.name) +} + +// uint64 row_count_in_group = 2; +inline void InvertedIndexMeta::clear_row_count_in_group() { + _impl_.row_count_in_group_ = uint64_t{0u}; +} +inline uint64_t InvertedIndexMeta::_internal_row_count_in_group() const { + return _impl_.row_count_in_group_; +} +inline uint64_t InvertedIndexMeta::row_count_in_group() const { + // @@protoc_insertion_point(field_get:greptime.v1.index.InvertedIndexMeta.row_count_in_group) + return _internal_row_count_in_group(); +} +inline void InvertedIndexMeta::_internal_set_row_count_in_group(uint64_t value) { + + _impl_.row_count_in_group_ = value; +} +inline void InvertedIndexMeta::set_row_count_in_group(uint64_t value) { + _internal_set_row_count_in_group(value); + // @@protoc_insertion_point(field_set:greptime.v1.index.InvertedIndexMeta.row_count_in_group) +} + +// uint64 fst_offset = 3; +inline void InvertedIndexMeta::clear_fst_offset() { + _impl_.fst_offset_ = uint64_t{0u}; +} +inline uint64_t InvertedIndexMeta::_internal_fst_offset() const { + return _impl_.fst_offset_; +} +inline uint64_t InvertedIndexMeta::fst_offset() const { + // @@protoc_insertion_point(field_get:greptime.v1.index.InvertedIndexMeta.fst_offset) + return _internal_fst_offset(); +} +inline void InvertedIndexMeta::_internal_set_fst_offset(uint64_t value) { + + _impl_.fst_offset_ = value; +} +inline void InvertedIndexMeta::set_fst_offset(uint64_t value) { + _internal_set_fst_offset(value); + // @@protoc_insertion_point(field_set:greptime.v1.index.InvertedIndexMeta.fst_offset) +} + +// uint64 fst_size = 4; +inline void InvertedIndexMeta::clear_fst_size() { + _impl_.fst_size_ = uint64_t{0u}; +} +inline uint64_t InvertedIndexMeta::_internal_fst_size() const { + return _impl_.fst_size_; +} +inline uint64_t InvertedIndexMeta::fst_size() const { + // @@protoc_insertion_point(field_get:greptime.v1.index.InvertedIndexMeta.fst_size) + return _internal_fst_size(); +} +inline void InvertedIndexMeta::_internal_set_fst_size(uint64_t value) { + + _impl_.fst_size_ = value; +} +inline void InvertedIndexMeta::set_fst_size(uint64_t value) { + _internal_set_fst_size(value); + // @@protoc_insertion_point(field_set:greptime.v1.index.InvertedIndexMeta.fst_size) +} + +// uint64 null_bitmap_offset = 5; +inline void InvertedIndexMeta::clear_null_bitmap_offset() { + _impl_.null_bitmap_offset_ = uint64_t{0u}; +} +inline uint64_t InvertedIndexMeta::_internal_null_bitmap_offset() const { + return _impl_.null_bitmap_offset_; +} +inline uint64_t InvertedIndexMeta::null_bitmap_offset() const { + // @@protoc_insertion_point(field_get:greptime.v1.index.InvertedIndexMeta.null_bitmap_offset) + return _internal_null_bitmap_offset(); +} +inline void InvertedIndexMeta::_internal_set_null_bitmap_offset(uint64_t value) { + + _impl_.null_bitmap_offset_ = value; +} +inline void InvertedIndexMeta::set_null_bitmap_offset(uint64_t value) { + _internal_set_null_bitmap_offset(value); + // @@protoc_insertion_point(field_set:greptime.v1.index.InvertedIndexMeta.null_bitmap_offset) +} + +// uint64 null_bitmap_size = 6; +inline void InvertedIndexMeta::clear_null_bitmap_size() { + _impl_.null_bitmap_size_ = uint64_t{0u}; +} +inline uint64_t InvertedIndexMeta::_internal_null_bitmap_size() const { + return _impl_.null_bitmap_size_; +} +inline uint64_t InvertedIndexMeta::null_bitmap_size() const { + // @@protoc_insertion_point(field_get:greptime.v1.index.InvertedIndexMeta.null_bitmap_size) + return _internal_null_bitmap_size(); +} +inline void InvertedIndexMeta::_internal_set_null_bitmap_size(uint64_t value) { + + _impl_.null_bitmap_size_ = value; +} +inline void InvertedIndexMeta::set_null_bitmap_size(uint64_t value) { + _internal_set_null_bitmap_size(value); + // @@protoc_insertion_point(field_set:greptime.v1.index.InvertedIndexMeta.null_bitmap_size) +} + +// .greptime.v1.index.InvertedIndexStats stats = 7; +inline bool InvertedIndexMeta::_internal_has_stats() const { + return this != internal_default_instance() && _impl_.stats_ != nullptr; +} +inline bool InvertedIndexMeta::has_stats() const { + return _internal_has_stats(); +} +inline void InvertedIndexMeta::clear_stats() { + if (GetArenaForAllocation() == nullptr && _impl_.stats_ != nullptr) { + delete _impl_.stats_; + } + _impl_.stats_ = nullptr; +} +inline const ::greptime::v1::index::InvertedIndexStats& InvertedIndexMeta::_internal_stats() const { + const ::greptime::v1::index::InvertedIndexStats* p = _impl_.stats_; + return p != nullptr ? *p : reinterpret_cast( + ::greptime::v1::index::_InvertedIndexStats_default_instance_); +} +inline const ::greptime::v1::index::InvertedIndexStats& InvertedIndexMeta::stats() const { + // @@protoc_insertion_point(field_get:greptime.v1.index.InvertedIndexMeta.stats) + return _internal_stats(); +} +inline void InvertedIndexMeta::unsafe_arena_set_allocated_stats( + ::greptime::v1::index::InvertedIndexStats* 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.InvertedIndexMeta.stats) +} +inline ::greptime::v1::index::InvertedIndexStats* InvertedIndexMeta::release_stats() { + + ::greptime::v1::index::InvertedIndexStats* 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::InvertedIndexStats* InvertedIndexMeta::unsafe_arena_release_stats() { + // @@protoc_insertion_point(field_release:greptime.v1.index.InvertedIndexMeta.stats) + + ::greptime::v1::index::InvertedIndexStats* temp = _impl_.stats_; + _impl_.stats_ = nullptr; + return temp; +} +inline ::greptime::v1::index::InvertedIndexStats* InvertedIndexMeta::_internal_mutable_stats() { + + if (_impl_.stats_ == nullptr) { + auto* p = CreateMaybeMessage<::greptime::v1::index::InvertedIndexStats>(GetArenaForAllocation()); + _impl_.stats_ = p; + } + return _impl_.stats_; +} +inline ::greptime::v1::index::InvertedIndexStats* InvertedIndexMeta::mutable_stats() { + ::greptime::v1::index::InvertedIndexStats* _msg = _internal_mutable_stats(); + // @@protoc_insertion_point(field_mutable:greptime.v1.index.InvertedIndexMeta.stats) + return _msg; +} +inline void InvertedIndexMeta::set_allocated_stats(::greptime::v1::index::InvertedIndexStats* 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.InvertedIndexMeta.stats) +} + +// ------------------------------------------------------------------- + +// InvertedIndexStats + +// uint64 null_count = 1; +inline void InvertedIndexStats::clear_null_count() { + _impl_.null_count_ = uint64_t{0u}; +} +inline uint64_t InvertedIndexStats::_internal_null_count() const { + return _impl_.null_count_; +} +inline uint64_t InvertedIndexStats::null_count() const { + // @@protoc_insertion_point(field_get:greptime.v1.index.InvertedIndexStats.null_count) + return _internal_null_count(); +} +inline void InvertedIndexStats::_internal_set_null_count(uint64_t value) { + + _impl_.null_count_ = value; +} +inline void InvertedIndexStats::set_null_count(uint64_t value) { + _internal_set_null_count(value); + // @@protoc_insertion_point(field_set:greptime.v1.index.InvertedIndexStats.null_count) +} + +// uint64 distinct_count = 2; +inline void InvertedIndexStats::clear_distinct_count() { + _impl_.distinct_count_ = uint64_t{0u}; +} +inline uint64_t InvertedIndexStats::_internal_distinct_count() const { + return _impl_.distinct_count_; +} +inline uint64_t InvertedIndexStats::distinct_count() const { + // @@protoc_insertion_point(field_get:greptime.v1.index.InvertedIndexStats.distinct_count) + return _internal_distinct_count(); +} +inline void InvertedIndexStats::_internal_set_distinct_count(uint64_t value) { + + _impl_.distinct_count_ = value; +} +inline void InvertedIndexStats::set_distinct_count(uint64_t value) { + _internal_set_distinct_count(value); + // @@protoc_insertion_point(field_set:greptime.v1.index.InvertedIndexStats.distinct_count) +} + +// bytes min_value = 3; +inline void InvertedIndexStats::clear_min_value() { + _impl_.min_value_.ClearToEmpty(); +} +inline const std::string& InvertedIndexStats::min_value() const { + // @@protoc_insertion_point(field_get:greptime.v1.index.InvertedIndexStats.min_value) + return _internal_min_value(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void InvertedIndexStats::set_min_value(ArgT0&& arg0, ArgT... args) { + + _impl_.min_value_.SetBytes(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:greptime.v1.index.InvertedIndexStats.min_value) +} +inline std::string* InvertedIndexStats::mutable_min_value() { + std::string* _s = _internal_mutable_min_value(); + // @@protoc_insertion_point(field_mutable:greptime.v1.index.InvertedIndexStats.min_value) + return _s; +} +inline const std::string& InvertedIndexStats::_internal_min_value() const { + return _impl_.min_value_.Get(); +} +inline void InvertedIndexStats::_internal_set_min_value(const std::string& value) { + + _impl_.min_value_.Set(value, GetArenaForAllocation()); +} +inline std::string* InvertedIndexStats::_internal_mutable_min_value() { + + return _impl_.min_value_.Mutable(GetArenaForAllocation()); +} +inline std::string* InvertedIndexStats::release_min_value() { + // @@protoc_insertion_point(field_release:greptime.v1.index.InvertedIndexStats.min_value) + return _impl_.min_value_.Release(); +} +inline void InvertedIndexStats::set_allocated_min_value(std::string* min_value) { + if (min_value != nullptr) { + + } else { + + } + _impl_.min_value_.SetAllocated(min_value, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.min_value_.IsDefault()) { + _impl_.min_value_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:greptime.v1.index.InvertedIndexStats.min_value) +} + +// bytes max_value = 4; +inline void InvertedIndexStats::clear_max_value() { + _impl_.max_value_.ClearToEmpty(); +} +inline const std::string& InvertedIndexStats::max_value() const { + // @@protoc_insertion_point(field_get:greptime.v1.index.InvertedIndexStats.max_value) + return _internal_max_value(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void InvertedIndexStats::set_max_value(ArgT0&& arg0, ArgT... args) { + + _impl_.max_value_.SetBytes(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:greptime.v1.index.InvertedIndexStats.max_value) +} +inline std::string* InvertedIndexStats::mutable_max_value() { + std::string* _s = _internal_mutable_max_value(); + // @@protoc_insertion_point(field_mutable:greptime.v1.index.InvertedIndexStats.max_value) + return _s; +} +inline const std::string& InvertedIndexStats::_internal_max_value() const { + return _impl_.max_value_.Get(); +} +inline void InvertedIndexStats::_internal_set_max_value(const std::string& value) { + + _impl_.max_value_.Set(value, GetArenaForAllocation()); +} +inline std::string* InvertedIndexStats::_internal_mutable_max_value() { + + return _impl_.max_value_.Mutable(GetArenaForAllocation()); +} +inline std::string* InvertedIndexStats::release_max_value() { + // @@protoc_insertion_point(field_release:greptime.v1.index.InvertedIndexStats.max_value) + return _impl_.max_value_.Release(); +} +inline void InvertedIndexStats::set_allocated_max_value(std::string* max_value) { + if (max_value != nullptr) { + + } else { + + } + _impl_.max_value_.SetAllocated(max_value, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.max_value_.IsDefault()) { + _impl_.max_value_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:greptime.v1.index.InvertedIndexStats.max_value) +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace index +} // namespace v1 +} // namespace greptime + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_greptime_2fv1_2findex_2finverted_5findex_2eproto diff --git a/java/src/main/java/io/greptime/v1/index/InvertedIndex.java b/java/src/main/java/io/greptime/v1/index/InvertedIndex.java new file mode 100644 index 00000000..8f6bc2b3 --- /dev/null +++ b/java/src/main/java/io/greptime/v1/index/InvertedIndex.java @@ -0,0 +1,3089 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: greptime/v1/index/inverted_index.proto + +package io.greptime.v1.index; + +public final class InvertedIndex { + private InvertedIndex() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface InvertedIndexFooterOrBuilder extends + // @@protoc_insertion_point(interface_extends:greptime.v1.index.InvertedIndexFooter) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * A map of tag names to their respective metadata corresponding to an individual
+     * inverted index within the SST file.
+     * 
+ * + * map<string, .greptime.v1.index.InvertedIndexMeta> metas = 1; + */ + int getMetasCount(); + /** + *
+     * A map of tag names to their respective metadata corresponding to an individual
+     * inverted index within the SST file.
+     * 
+ * + * map<string, .greptime.v1.index.InvertedIndexMeta> metas = 1; + */ + boolean containsMetas( + java.lang.String key); + /** + * Use {@link #getMetasMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getMetas(); + /** + *
+     * A map of tag names to their respective metadata corresponding to an individual
+     * inverted index within the SST file.
+     * 
+ * + * map<string, .greptime.v1.index.InvertedIndexMeta> metas = 1; + */ + java.util.Map + getMetasMap(); + /** + *
+     * A map of tag names to their respective metadata corresponding to an individual
+     * inverted index within the SST file.
+     * 
+ * + * map<string, .greptime.v1.index.InvertedIndexMeta> metas = 1; + */ + + /* nullable */ +io.greptime.v1.index.InvertedIndex.InvertedIndexMeta getMetasOrDefault( + java.lang.String key, + /* nullable */ +io.greptime.v1.index.InvertedIndex.InvertedIndexMeta defaultValue); + /** + *
+     * A map of tag names to their respective metadata corresponding to an individual
+     * inverted index within the SST file.
+     * 
+ * + * map<string, .greptime.v1.index.InvertedIndexMeta> metas = 1; + */ + + io.greptime.v1.index.InvertedIndex.InvertedIndexMeta getMetasOrThrow( + java.lang.String key); + } + /** + *
+   * InvertedIndexFooter defines the metadata for an inverted index
+   * within an SST file.
+   * 
+ * + * Protobuf type {@code greptime.v1.index.InvertedIndexFooter} + */ + public static final class InvertedIndexFooter extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:greptime.v1.index.InvertedIndexFooter) + InvertedIndexFooterOrBuilder { + private static final long serialVersionUID = 0L; + // Use InvertedIndexFooter.newBuilder() to construct. + private InvertedIndexFooter(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private InvertedIndexFooter() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new InvertedIndexFooter(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private InvertedIndexFooter( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + metas_ = com.google.protobuf.MapField.newMapField( + MetasDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry + metas__ = input.readMessage( + MetasDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + metas_.getMutableMap().put( + metas__.getKey(), metas__.getValue()); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.greptime.v1.index.InvertedIndex.internal_static_greptime_v1_index_InvertedIndexFooter_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 1: + return internalGetMetas(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.greptime.v1.index.InvertedIndex.internal_static_greptime_v1_index_InvertedIndexFooter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.greptime.v1.index.InvertedIndex.InvertedIndexFooter.class, io.greptime.v1.index.InvertedIndex.InvertedIndexFooter.Builder.class); + } + + public static final int METAS_FIELD_NUMBER = 1; + private static final class MetasDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, io.greptime.v1.index.InvertedIndex.InvertedIndexMeta> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + io.greptime.v1.index.InvertedIndex.internal_static_greptime_v1_index_InvertedIndexFooter_MetasEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + io.greptime.v1.index.InvertedIndex.InvertedIndexMeta.getDefaultInstance()); + } + private com.google.protobuf.MapField< + java.lang.String, io.greptime.v1.index.InvertedIndex.InvertedIndexMeta> metas_; + private com.google.protobuf.MapField + internalGetMetas() { + if (metas_ == null) { + return com.google.protobuf.MapField.emptyMapField( + MetasDefaultEntryHolder.defaultEntry); + } + return metas_; + } + + public int getMetasCount() { + return internalGetMetas().getMap().size(); + } + /** + *
+     * A map of tag names to their respective metadata corresponding to an individual
+     * inverted index within the SST file.
+     * 
+ * + * map<string, .greptime.v1.index.InvertedIndexMeta> metas = 1; + */ + + @java.lang.Override + public boolean containsMetas( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetMetas().getMap().containsKey(key); + } + /** + * Use {@link #getMetasMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getMetas() { + return getMetasMap(); + } + /** + *
+     * A map of tag names to their respective metadata corresponding to an individual
+     * inverted index within the SST file.
+     * 
+ * + * map<string, .greptime.v1.index.InvertedIndexMeta> metas = 1; + */ + @java.lang.Override + + public java.util.Map getMetasMap() { + return internalGetMetas().getMap(); + } + /** + *
+     * A map of tag names to their respective metadata corresponding to an individual
+     * inverted index within the SST file.
+     * 
+ * + * map<string, .greptime.v1.index.InvertedIndexMeta> metas = 1; + */ + @java.lang.Override + + public io.greptime.v1.index.InvertedIndex.InvertedIndexMeta getMetasOrDefault( + java.lang.String key, + io.greptime.v1.index.InvertedIndex.InvertedIndexMeta defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetMetas().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * A map of tag names to their respective metadata corresponding to an individual
+     * inverted index within the SST file.
+     * 
+ * + * map<string, .greptime.v1.index.InvertedIndexMeta> metas = 1; + */ + @java.lang.Override + + public io.greptime.v1.index.InvertedIndex.InvertedIndexMeta getMetasOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetMetas().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetMetas(), + MetasDefaultEntryHolder.defaultEntry, + 1); + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (java.util.Map.Entry entry + : internalGetMetas().getMap().entrySet()) { + com.google.protobuf.MapEntry + metas__ = MetasDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, metas__); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.greptime.v1.index.InvertedIndex.InvertedIndexFooter)) { + return super.equals(obj); + } + io.greptime.v1.index.InvertedIndex.InvertedIndexFooter other = (io.greptime.v1.index.InvertedIndex.InvertedIndexFooter) obj; + + if (!internalGetMetas().equals( + other.internalGetMetas())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (!internalGetMetas().getMap().isEmpty()) { + hash = (37 * hash) + METAS_FIELD_NUMBER; + hash = (53 * hash) + internalGetMetas().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.greptime.v1.index.InvertedIndex.InvertedIndexFooter parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.greptime.v1.index.InvertedIndex.InvertedIndexFooter parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.greptime.v1.index.InvertedIndex.InvertedIndexFooter parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.greptime.v1.index.InvertedIndex.InvertedIndexFooter parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.greptime.v1.index.InvertedIndex.InvertedIndexFooter parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.greptime.v1.index.InvertedIndex.InvertedIndexFooter parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.greptime.v1.index.InvertedIndex.InvertedIndexFooter parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.greptime.v1.index.InvertedIndex.InvertedIndexFooter parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.greptime.v1.index.InvertedIndex.InvertedIndexFooter parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.greptime.v1.index.InvertedIndex.InvertedIndexFooter parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.greptime.v1.index.InvertedIndex.InvertedIndexFooter parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.greptime.v1.index.InvertedIndex.InvertedIndexFooter parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.greptime.v1.index.InvertedIndex.InvertedIndexFooter prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * InvertedIndexFooter defines the metadata for an inverted index
+     * within an SST file.
+     * 
+ * + * Protobuf type {@code greptime.v1.index.InvertedIndexFooter} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:greptime.v1.index.InvertedIndexFooter) + io.greptime.v1.index.InvertedIndex.InvertedIndexFooterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.greptime.v1.index.InvertedIndex.internal_static_greptime_v1_index_InvertedIndexFooter_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 1: + return internalGetMetas(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 1: + return internalGetMutableMetas(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.greptime.v1.index.InvertedIndex.internal_static_greptime_v1_index_InvertedIndexFooter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.greptime.v1.index.InvertedIndex.InvertedIndexFooter.class, io.greptime.v1.index.InvertedIndex.InvertedIndexFooter.Builder.class); + } + + // Construct using io.greptime.v1.index.InvertedIndex.InvertedIndexFooter.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + internalGetMutableMetas().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.greptime.v1.index.InvertedIndex.internal_static_greptime_v1_index_InvertedIndexFooter_descriptor; + } + + @java.lang.Override + public io.greptime.v1.index.InvertedIndex.InvertedIndexFooter getDefaultInstanceForType() { + return io.greptime.v1.index.InvertedIndex.InvertedIndexFooter.getDefaultInstance(); + } + + @java.lang.Override + public io.greptime.v1.index.InvertedIndex.InvertedIndexFooter build() { + io.greptime.v1.index.InvertedIndex.InvertedIndexFooter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.greptime.v1.index.InvertedIndex.InvertedIndexFooter buildPartial() { + io.greptime.v1.index.InvertedIndex.InvertedIndexFooter result = new io.greptime.v1.index.InvertedIndex.InvertedIndexFooter(this); + int from_bitField0_ = bitField0_; + result.metas_ = internalGetMetas(); + result.metas_.makeImmutable(); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.greptime.v1.index.InvertedIndex.InvertedIndexFooter) { + return mergeFrom((io.greptime.v1.index.InvertedIndex.InvertedIndexFooter)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.greptime.v1.index.InvertedIndex.InvertedIndexFooter other) { + if (other == io.greptime.v1.index.InvertedIndex.InvertedIndexFooter.getDefaultInstance()) return this; + internalGetMutableMetas().mergeFrom( + other.internalGetMetas()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + io.greptime.v1.index.InvertedIndex.InvertedIndexFooter parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (io.greptime.v1.index.InvertedIndex.InvertedIndexFooter) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.protobuf.MapField< + java.lang.String, io.greptime.v1.index.InvertedIndex.InvertedIndexMeta> metas_; + private com.google.protobuf.MapField + internalGetMetas() { + if (metas_ == null) { + return com.google.protobuf.MapField.emptyMapField( + MetasDefaultEntryHolder.defaultEntry); + } + return metas_; + } + private com.google.protobuf.MapField + internalGetMutableMetas() { + onChanged();; + if (metas_ == null) { + metas_ = com.google.protobuf.MapField.newMapField( + MetasDefaultEntryHolder.defaultEntry); + } + if (!metas_.isMutable()) { + metas_ = metas_.copy(); + } + return metas_; + } + + public int getMetasCount() { + return internalGetMetas().getMap().size(); + } + /** + *
+       * A map of tag names to their respective metadata corresponding to an individual
+       * inverted index within the SST file.
+       * 
+ * + * map<string, .greptime.v1.index.InvertedIndexMeta> metas = 1; + */ + + @java.lang.Override + public boolean containsMetas( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetMetas().getMap().containsKey(key); + } + /** + * Use {@link #getMetasMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getMetas() { + return getMetasMap(); + } + /** + *
+       * A map of tag names to their respective metadata corresponding to an individual
+       * inverted index within the SST file.
+       * 
+ * + * map<string, .greptime.v1.index.InvertedIndexMeta> metas = 1; + */ + @java.lang.Override + + public java.util.Map getMetasMap() { + return internalGetMetas().getMap(); + } + /** + *
+       * A map of tag names to their respective metadata corresponding to an individual
+       * inverted index within the SST file.
+       * 
+ * + * map<string, .greptime.v1.index.InvertedIndexMeta> metas = 1; + */ + @java.lang.Override + + public io.greptime.v1.index.InvertedIndex.InvertedIndexMeta getMetasOrDefault( + java.lang.String key, + io.greptime.v1.index.InvertedIndex.InvertedIndexMeta defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetMetas().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+       * A map of tag names to their respective metadata corresponding to an individual
+       * inverted index within the SST file.
+       * 
+ * + * map<string, .greptime.v1.index.InvertedIndexMeta> metas = 1; + */ + @java.lang.Override + + public io.greptime.v1.index.InvertedIndex.InvertedIndexMeta getMetasOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetMetas().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearMetas() { + internalGetMutableMetas().getMutableMap() + .clear(); + return this; + } + /** + *
+       * A map of tag names to their respective metadata corresponding to an individual
+       * inverted index within the SST file.
+       * 
+ * + * map<string, .greptime.v1.index.InvertedIndexMeta> metas = 1; + */ + + public Builder removeMetas( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableMetas().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableMetas() { + return internalGetMutableMetas().getMutableMap(); + } + /** + *
+       * A map of tag names to their respective metadata corresponding to an individual
+       * inverted index within the SST file.
+       * 
+ * + * map<string, .greptime.v1.index.InvertedIndexMeta> metas = 1; + */ + public Builder putMetas( + java.lang.String key, + io.greptime.v1.index.InvertedIndex.InvertedIndexMeta value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { + throw new NullPointerException("map value"); +} + + internalGetMutableMetas().getMutableMap() + .put(key, value); + return this; + } + /** + *
+       * A map of tag names to their respective metadata corresponding to an individual
+       * inverted index within the SST file.
+       * 
+ * + * map<string, .greptime.v1.index.InvertedIndexMeta> metas = 1; + */ + + public Builder putAllMetas( + java.util.Map values) { + internalGetMutableMetas().getMutableMap() + .putAll(values); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:greptime.v1.index.InvertedIndexFooter) + } + + // @@protoc_insertion_point(class_scope:greptime.v1.index.InvertedIndexFooter) + private static final io.greptime.v1.index.InvertedIndex.InvertedIndexFooter DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.greptime.v1.index.InvertedIndex.InvertedIndexFooter(); + } + + public static io.greptime.v1.index.InvertedIndex.InvertedIndexFooter getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public InvertedIndexFooter parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new InvertedIndexFooter(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.greptime.v1.index.InvertedIndex.InvertedIndexFooter getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface InvertedIndexMetaOrBuilder extends + // @@protoc_insertion_point(interface_extends:greptime.v1.index.InvertedIndexMeta) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Name of the tag associated with the inverted index.
+     * 
+ * + * string name = 1; + * @return The name. + */ + java.lang.String getName(); + /** + *
+     * Name of the tag associated with the inverted index.
+     * 
+ * + * string name = 1; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+     * Defines the number of rows per group for bitmap indexing. It determines how rows
+     * are batched for indexing, with each batch corresponding to a segment in the bitmap.
+     * The groups are usually of uniform size, with the exception of the final group which
+     * may contain fewer rows if the total row count is not a multiple of 'row_count_in_group'.
+     * Segmenting allows indexed values in the tag column to be quickly located within
+     * their respective groups during a query, reducing the search space and improving
+     * retrieval efficiency.
+     * 
+ * + * uint64 row_count_in_group = 2; + * @return The rowCountInGroup. + */ + long getRowCountInGroup(); + + /** + *
+     * The byte offset of the Finite State Transducer (FST) within the SST file.
+     * 
+ * + * uint64 fst_offset = 3; + * @return The fstOffset. + */ + long getFstOffset(); + + /** + *
+     * The size in bytes of the FST data.
+     * 
+ * + * uint64 fst_size = 4; + * @return The fstSize. + */ + long getFstSize(); + + /** + *
+     * The byte offset where the null bitmap for this tag starts.
+     * 
+ * + * uint64 null_bitmap_offset = 5; + * @return The nullBitmapOffset. + */ + long getNullBitmapOffset(); + + /** + *
+     * The size in bytes of the null bitmap.
+     * 
+ * + * uint64 null_bitmap_size = 6; + * @return The nullBitmapSize. + */ + long getNullBitmapSize(); + + /** + *
+     * Statistical information about the tag's inverted index.
+     * 
+ * + * .greptime.v1.index.InvertedIndexStats stats = 7; + * @return Whether the stats field is set. + */ + boolean hasStats(); + /** + *
+     * Statistical information about the tag's inverted index.
+     * 
+ * + * .greptime.v1.index.InvertedIndexStats stats = 7; + * @return The stats. + */ + io.greptime.v1.index.InvertedIndex.InvertedIndexStats getStats(); + /** + *
+     * Statistical information about the tag's inverted index.
+     * 
+ * + * .greptime.v1.index.InvertedIndexStats stats = 7; + */ + io.greptime.v1.index.InvertedIndex.InvertedIndexStatsOrBuilder getStatsOrBuilder(); + } + /** + *
+   * InvertedIndexMeta contains the metadata for a specific tag's inverted index.
+   * 
+ * + * Protobuf type {@code greptime.v1.index.InvertedIndexMeta} + */ + public static final class InvertedIndexMeta extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:greptime.v1.index.InvertedIndexMeta) + InvertedIndexMetaOrBuilder { + private static final long serialVersionUID = 0L; + // Use InvertedIndexMeta.newBuilder() to construct. + private InvertedIndexMeta(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private InvertedIndexMeta() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new InvertedIndexMeta(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private InvertedIndexMeta( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 16: { + + rowCountInGroup_ = input.readUInt64(); + break; + } + case 24: { + + fstOffset_ = input.readUInt64(); + break; + } + case 32: { + + fstSize_ = input.readUInt64(); + break; + } + case 40: { + + nullBitmapOffset_ = input.readUInt64(); + break; + } + case 48: { + + nullBitmapSize_ = input.readUInt64(); + break; + } + case 58: { + io.greptime.v1.index.InvertedIndex.InvertedIndexStats.Builder subBuilder = null; + if (stats_ != null) { + subBuilder = stats_.toBuilder(); + } + stats_ = input.readMessage(io.greptime.v1.index.InvertedIndex.InvertedIndexStats.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(stats_); + stats_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.greptime.v1.index.InvertedIndex.internal_static_greptime_v1_index_InvertedIndexMeta_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.greptime.v1.index.InvertedIndex.internal_static_greptime_v1_index_InvertedIndexMeta_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.greptime.v1.index.InvertedIndex.InvertedIndexMeta.class, io.greptime.v1.index.InvertedIndex.InvertedIndexMeta.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+     * Name of the tag associated with the inverted index.
+     * 
+ * + * string name = 1; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + *
+     * Name of the tag associated with the inverted index.
+     * 
+ * + * string name = 1; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ROW_COUNT_IN_GROUP_FIELD_NUMBER = 2; + private long rowCountInGroup_; + /** + *
+     * Defines the number of rows per group for bitmap indexing. It determines how rows
+     * are batched for indexing, with each batch corresponding to a segment in the bitmap.
+     * The groups are usually of uniform size, with the exception of the final group which
+     * may contain fewer rows if the total row count is not a multiple of 'row_count_in_group'.
+     * Segmenting allows indexed values in the tag column to be quickly located within
+     * their respective groups during a query, reducing the search space and improving
+     * retrieval efficiency.
+     * 
+ * + * uint64 row_count_in_group = 2; + * @return The rowCountInGroup. + */ + @java.lang.Override + public long getRowCountInGroup() { + return rowCountInGroup_; + } + + public static final int FST_OFFSET_FIELD_NUMBER = 3; + private long fstOffset_; + /** + *
+     * The byte offset of the Finite State Transducer (FST) within the SST file.
+     * 
+ * + * uint64 fst_offset = 3; + * @return The fstOffset. + */ + @java.lang.Override + public long getFstOffset() { + return fstOffset_; + } + + public static final int FST_SIZE_FIELD_NUMBER = 4; + private long fstSize_; + /** + *
+     * The size in bytes of the FST data.
+     * 
+ * + * uint64 fst_size = 4; + * @return The fstSize. + */ + @java.lang.Override + public long getFstSize() { + return fstSize_; + } + + public static final int NULL_BITMAP_OFFSET_FIELD_NUMBER = 5; + private long nullBitmapOffset_; + /** + *
+     * The byte offset where the null bitmap for this tag starts.
+     * 
+ * + * uint64 null_bitmap_offset = 5; + * @return The nullBitmapOffset. + */ + @java.lang.Override + public long getNullBitmapOffset() { + return nullBitmapOffset_; + } + + public static final int NULL_BITMAP_SIZE_FIELD_NUMBER = 6; + private long nullBitmapSize_; + /** + *
+     * The size in bytes of the null bitmap.
+     * 
+ * + * uint64 null_bitmap_size = 6; + * @return The nullBitmapSize. + */ + @java.lang.Override + public long getNullBitmapSize() { + return nullBitmapSize_; + } + + public static final int STATS_FIELD_NUMBER = 7; + private io.greptime.v1.index.InvertedIndex.InvertedIndexStats stats_; + /** + *
+     * Statistical information about the tag's inverted index.
+     * 
+ * + * .greptime.v1.index.InvertedIndexStats stats = 7; + * @return Whether the stats field is set. + */ + @java.lang.Override + public boolean hasStats() { + return stats_ != null; + } + /** + *
+     * Statistical information about the tag's inverted index.
+     * 
+ * + * .greptime.v1.index.InvertedIndexStats stats = 7; + * @return The stats. + */ + @java.lang.Override + public io.greptime.v1.index.InvertedIndex.InvertedIndexStats getStats() { + return stats_ == null ? io.greptime.v1.index.InvertedIndex.InvertedIndexStats.getDefaultInstance() : stats_; + } + /** + *
+     * Statistical information about the tag's inverted index.
+     * 
+ * + * .greptime.v1.index.InvertedIndexStats stats = 7; + */ + @java.lang.Override + public io.greptime.v1.index.InvertedIndex.InvertedIndexStatsOrBuilder getStatsOrBuilder() { + return getStats(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (rowCountInGroup_ != 0L) { + output.writeUInt64(2, rowCountInGroup_); + } + if (fstOffset_ != 0L) { + output.writeUInt64(3, fstOffset_); + } + if (fstSize_ != 0L) { + output.writeUInt64(4, fstSize_); + } + if (nullBitmapOffset_ != 0L) { + output.writeUInt64(5, nullBitmapOffset_); + } + if (nullBitmapSize_ != 0L) { + output.writeUInt64(6, nullBitmapSize_); + } + if (stats_ != null) { + output.writeMessage(7, getStats()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (rowCountInGroup_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(2, rowCountInGroup_); + } + if (fstOffset_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(3, fstOffset_); + } + if (fstSize_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(4, fstSize_); + } + if (nullBitmapOffset_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(5, nullBitmapOffset_); + } + if (nullBitmapSize_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(6, nullBitmapSize_); + } + if (stats_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, getStats()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.greptime.v1.index.InvertedIndex.InvertedIndexMeta)) { + return super.equals(obj); + } + io.greptime.v1.index.InvertedIndex.InvertedIndexMeta other = (io.greptime.v1.index.InvertedIndex.InvertedIndexMeta) obj; + + if (!getName() + .equals(other.getName())) return false; + if (getRowCountInGroup() + != other.getRowCountInGroup()) return false; + if (getFstOffset() + != other.getFstOffset()) return false; + if (getFstSize() + != other.getFstSize()) return false; + if (getNullBitmapOffset() + != other.getNullBitmapOffset()) return false; + if (getNullBitmapSize() + != other.getNullBitmapSize()) return false; + if (hasStats() != other.hasStats()) return false; + if (hasStats()) { + if (!getStats() + .equals(other.getStats())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + ROW_COUNT_IN_GROUP_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getRowCountInGroup()); + hash = (37 * hash) + FST_OFFSET_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getFstOffset()); + hash = (37 * hash) + FST_SIZE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getFstSize()); + hash = (37 * hash) + NULL_BITMAP_OFFSET_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getNullBitmapOffset()); + hash = (37 * hash) + NULL_BITMAP_SIZE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getNullBitmapSize()); + if (hasStats()) { + hash = (37 * hash) + STATS_FIELD_NUMBER; + hash = (53 * hash) + getStats().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.greptime.v1.index.InvertedIndex.InvertedIndexMeta parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.greptime.v1.index.InvertedIndex.InvertedIndexMeta parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.greptime.v1.index.InvertedIndex.InvertedIndexMeta parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.greptime.v1.index.InvertedIndex.InvertedIndexMeta parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.greptime.v1.index.InvertedIndex.InvertedIndexMeta parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.greptime.v1.index.InvertedIndex.InvertedIndexMeta parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.greptime.v1.index.InvertedIndex.InvertedIndexMeta parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.greptime.v1.index.InvertedIndex.InvertedIndexMeta parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.greptime.v1.index.InvertedIndex.InvertedIndexMeta parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.greptime.v1.index.InvertedIndex.InvertedIndexMeta parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.greptime.v1.index.InvertedIndex.InvertedIndexMeta parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.greptime.v1.index.InvertedIndex.InvertedIndexMeta parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.greptime.v1.index.InvertedIndex.InvertedIndexMeta prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * InvertedIndexMeta contains the metadata for a specific tag's inverted index.
+     * 
+ * + * Protobuf type {@code greptime.v1.index.InvertedIndexMeta} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:greptime.v1.index.InvertedIndexMeta) + io.greptime.v1.index.InvertedIndex.InvertedIndexMetaOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.greptime.v1.index.InvertedIndex.internal_static_greptime_v1_index_InvertedIndexMeta_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.greptime.v1.index.InvertedIndex.internal_static_greptime_v1_index_InvertedIndexMeta_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.greptime.v1.index.InvertedIndex.InvertedIndexMeta.class, io.greptime.v1.index.InvertedIndex.InvertedIndexMeta.Builder.class); + } + + // Construct using io.greptime.v1.index.InvertedIndex.InvertedIndexMeta.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + rowCountInGroup_ = 0L; + + fstOffset_ = 0L; + + fstSize_ = 0L; + + nullBitmapOffset_ = 0L; + + nullBitmapSize_ = 0L; + + if (statsBuilder_ == null) { + stats_ = null; + } else { + stats_ = null; + statsBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.greptime.v1.index.InvertedIndex.internal_static_greptime_v1_index_InvertedIndexMeta_descriptor; + } + + @java.lang.Override + public io.greptime.v1.index.InvertedIndex.InvertedIndexMeta getDefaultInstanceForType() { + return io.greptime.v1.index.InvertedIndex.InvertedIndexMeta.getDefaultInstance(); + } + + @java.lang.Override + public io.greptime.v1.index.InvertedIndex.InvertedIndexMeta build() { + io.greptime.v1.index.InvertedIndex.InvertedIndexMeta result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.greptime.v1.index.InvertedIndex.InvertedIndexMeta buildPartial() { + io.greptime.v1.index.InvertedIndex.InvertedIndexMeta result = new io.greptime.v1.index.InvertedIndex.InvertedIndexMeta(this); + result.name_ = name_; + result.rowCountInGroup_ = rowCountInGroup_; + result.fstOffset_ = fstOffset_; + result.fstSize_ = fstSize_; + result.nullBitmapOffset_ = nullBitmapOffset_; + result.nullBitmapSize_ = nullBitmapSize_; + if (statsBuilder_ == null) { + result.stats_ = stats_; + } else { + result.stats_ = statsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.greptime.v1.index.InvertedIndex.InvertedIndexMeta) { + return mergeFrom((io.greptime.v1.index.InvertedIndex.InvertedIndexMeta)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.greptime.v1.index.InvertedIndex.InvertedIndexMeta other) { + if (other == io.greptime.v1.index.InvertedIndex.InvertedIndexMeta.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.getRowCountInGroup() != 0L) { + setRowCountInGroup(other.getRowCountInGroup()); + } + if (other.getFstOffset() != 0L) { + setFstOffset(other.getFstOffset()); + } + if (other.getFstSize() != 0L) { + setFstSize(other.getFstSize()); + } + if (other.getNullBitmapOffset() != 0L) { + setNullBitmapOffset(other.getNullBitmapOffset()); + } + if (other.getNullBitmapSize() != 0L) { + setNullBitmapSize(other.getNullBitmapSize()); + } + if (other.hasStats()) { + mergeStats(other.getStats()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + io.greptime.v1.index.InvertedIndex.InvertedIndexMeta parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (io.greptime.v1.index.InvertedIndex.InvertedIndexMeta) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+       * Name of the tag associated with the inverted index.
+       * 
+ * + * string name = 1; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Name of the tag associated with the inverted index.
+       * 
+ * + * string name = 1; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Name of the tag associated with the inverted index.
+       * 
+ * + * string name = 1; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+       * Name of the tag associated with the inverted index.
+       * 
+ * + * string name = 1; + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+       * Name of the tag associated with the inverted index.
+       * 
+ * + * string name = 1; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private long rowCountInGroup_ ; + /** + *
+       * Defines the number of rows per group for bitmap indexing. It determines how rows
+       * are batched for indexing, with each batch corresponding to a segment in the bitmap.
+       * The groups are usually of uniform size, with the exception of the final group which
+       * may contain fewer rows if the total row count is not a multiple of 'row_count_in_group'.
+       * Segmenting allows indexed values in the tag column to be quickly located within
+       * their respective groups during a query, reducing the search space and improving
+       * retrieval efficiency.
+       * 
+ * + * uint64 row_count_in_group = 2; + * @return The rowCountInGroup. + */ + @java.lang.Override + public long getRowCountInGroup() { + return rowCountInGroup_; + } + /** + *
+       * Defines the number of rows per group for bitmap indexing. It determines how rows
+       * are batched for indexing, with each batch corresponding to a segment in the bitmap.
+       * The groups are usually of uniform size, with the exception of the final group which
+       * may contain fewer rows if the total row count is not a multiple of 'row_count_in_group'.
+       * Segmenting allows indexed values in the tag column to be quickly located within
+       * their respective groups during a query, reducing the search space and improving
+       * retrieval efficiency.
+       * 
+ * + * uint64 row_count_in_group = 2; + * @param value The rowCountInGroup to set. + * @return This builder for chaining. + */ + public Builder setRowCountInGroup(long value) { + + rowCountInGroup_ = value; + onChanged(); + return this; + } + /** + *
+       * Defines the number of rows per group for bitmap indexing. It determines how rows
+       * are batched for indexing, with each batch corresponding to a segment in the bitmap.
+       * The groups are usually of uniform size, with the exception of the final group which
+       * may contain fewer rows if the total row count is not a multiple of 'row_count_in_group'.
+       * Segmenting allows indexed values in the tag column to be quickly located within
+       * their respective groups during a query, reducing the search space and improving
+       * retrieval efficiency.
+       * 
+ * + * uint64 row_count_in_group = 2; + * @return This builder for chaining. + */ + public Builder clearRowCountInGroup() { + + rowCountInGroup_ = 0L; + onChanged(); + return this; + } + + private long fstOffset_ ; + /** + *
+       * The byte offset of the Finite State Transducer (FST) within the SST file.
+       * 
+ * + * uint64 fst_offset = 3; + * @return The fstOffset. + */ + @java.lang.Override + public long getFstOffset() { + return fstOffset_; + } + /** + *
+       * The byte offset of the Finite State Transducer (FST) within the SST file.
+       * 
+ * + * uint64 fst_offset = 3; + * @param value The fstOffset to set. + * @return This builder for chaining. + */ + public Builder setFstOffset(long value) { + + fstOffset_ = value; + onChanged(); + return this; + } + /** + *
+       * The byte offset of the Finite State Transducer (FST) within the SST file.
+       * 
+ * + * uint64 fst_offset = 3; + * @return This builder for chaining. + */ + public Builder clearFstOffset() { + + fstOffset_ = 0L; + onChanged(); + return this; + } + + private long fstSize_ ; + /** + *
+       * The size in bytes of the FST data.
+       * 
+ * + * uint64 fst_size = 4; + * @return The fstSize. + */ + @java.lang.Override + public long getFstSize() { + return fstSize_; + } + /** + *
+       * The size in bytes of the FST data.
+       * 
+ * + * uint64 fst_size = 4; + * @param value The fstSize to set. + * @return This builder for chaining. + */ + public Builder setFstSize(long value) { + + fstSize_ = value; + onChanged(); + return this; + } + /** + *
+       * The size in bytes of the FST data.
+       * 
+ * + * uint64 fst_size = 4; + * @return This builder for chaining. + */ + public Builder clearFstSize() { + + fstSize_ = 0L; + onChanged(); + return this; + } + + private long nullBitmapOffset_ ; + /** + *
+       * The byte offset where the null bitmap for this tag starts.
+       * 
+ * + * uint64 null_bitmap_offset = 5; + * @return The nullBitmapOffset. + */ + @java.lang.Override + public long getNullBitmapOffset() { + return nullBitmapOffset_; + } + /** + *
+       * The byte offset where the null bitmap for this tag starts.
+       * 
+ * + * uint64 null_bitmap_offset = 5; + * @param value The nullBitmapOffset to set. + * @return This builder for chaining. + */ + public Builder setNullBitmapOffset(long value) { + + nullBitmapOffset_ = value; + onChanged(); + return this; + } + /** + *
+       * The byte offset where the null bitmap for this tag starts.
+       * 
+ * + * uint64 null_bitmap_offset = 5; + * @return This builder for chaining. + */ + public Builder clearNullBitmapOffset() { + + nullBitmapOffset_ = 0L; + onChanged(); + return this; + } + + private long nullBitmapSize_ ; + /** + *
+       * The size in bytes of the null bitmap.
+       * 
+ * + * uint64 null_bitmap_size = 6; + * @return The nullBitmapSize. + */ + @java.lang.Override + public long getNullBitmapSize() { + return nullBitmapSize_; + } + /** + *
+       * The size in bytes of the null bitmap.
+       * 
+ * + * uint64 null_bitmap_size = 6; + * @param value The nullBitmapSize to set. + * @return This builder for chaining. + */ + public Builder setNullBitmapSize(long value) { + + nullBitmapSize_ = value; + onChanged(); + return this; + } + /** + *
+       * The size in bytes of the null bitmap.
+       * 
+ * + * uint64 null_bitmap_size = 6; + * @return This builder for chaining. + */ + public Builder clearNullBitmapSize() { + + nullBitmapSize_ = 0L; + onChanged(); + return this; + } + + private io.greptime.v1.index.InvertedIndex.InvertedIndexStats stats_; + private com.google.protobuf.SingleFieldBuilderV3< + io.greptime.v1.index.InvertedIndex.InvertedIndexStats, io.greptime.v1.index.InvertedIndex.InvertedIndexStats.Builder, io.greptime.v1.index.InvertedIndex.InvertedIndexStatsOrBuilder> statsBuilder_; + /** + *
+       * Statistical information about the tag's inverted index.
+       * 
+ * + * .greptime.v1.index.InvertedIndexStats stats = 7; + * @return Whether the stats field is set. + */ + public boolean hasStats() { + return statsBuilder_ != null || stats_ != null; + } + /** + *
+       * Statistical information about the tag's inverted index.
+       * 
+ * + * .greptime.v1.index.InvertedIndexStats stats = 7; + * @return The stats. + */ + public io.greptime.v1.index.InvertedIndex.InvertedIndexStats getStats() { + if (statsBuilder_ == null) { + return stats_ == null ? io.greptime.v1.index.InvertedIndex.InvertedIndexStats.getDefaultInstance() : stats_; + } else { + return statsBuilder_.getMessage(); + } + } + /** + *
+       * Statistical information about the tag's inverted index.
+       * 
+ * + * .greptime.v1.index.InvertedIndexStats stats = 7; + */ + public Builder setStats(io.greptime.v1.index.InvertedIndex.InvertedIndexStats value) { + if (statsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + stats_ = value; + onChanged(); + } else { + statsBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * Statistical information about the tag's inverted index.
+       * 
+ * + * .greptime.v1.index.InvertedIndexStats stats = 7; + */ + public Builder setStats( + io.greptime.v1.index.InvertedIndex.InvertedIndexStats.Builder builderForValue) { + if (statsBuilder_ == null) { + stats_ = builderForValue.build(); + onChanged(); + } else { + statsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * Statistical information about the tag's inverted index.
+       * 
+ * + * .greptime.v1.index.InvertedIndexStats stats = 7; + */ + public Builder mergeStats(io.greptime.v1.index.InvertedIndex.InvertedIndexStats value) { + if (statsBuilder_ == null) { + if (stats_ != null) { + stats_ = + io.greptime.v1.index.InvertedIndex.InvertedIndexStats.newBuilder(stats_).mergeFrom(value).buildPartial(); + } else { + stats_ = value; + } + onChanged(); + } else { + statsBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * Statistical information about the tag's inverted index.
+       * 
+ * + * .greptime.v1.index.InvertedIndexStats stats = 7; + */ + public Builder clearStats() { + if (statsBuilder_ == null) { + stats_ = null; + onChanged(); + } else { + stats_ = null; + statsBuilder_ = null; + } + + return this; + } + /** + *
+       * Statistical information about the tag's inverted index.
+       * 
+ * + * .greptime.v1.index.InvertedIndexStats stats = 7; + */ + public io.greptime.v1.index.InvertedIndex.InvertedIndexStats.Builder getStatsBuilder() { + + onChanged(); + return getStatsFieldBuilder().getBuilder(); + } + /** + *
+       * Statistical information about the tag's inverted index.
+       * 
+ * + * .greptime.v1.index.InvertedIndexStats stats = 7; + */ + public io.greptime.v1.index.InvertedIndex.InvertedIndexStatsOrBuilder getStatsOrBuilder() { + if (statsBuilder_ != null) { + return statsBuilder_.getMessageOrBuilder(); + } else { + return stats_ == null ? + io.greptime.v1.index.InvertedIndex.InvertedIndexStats.getDefaultInstance() : stats_; + } + } + /** + *
+       * Statistical information about the tag's inverted index.
+       * 
+ * + * .greptime.v1.index.InvertedIndexStats stats = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.greptime.v1.index.InvertedIndex.InvertedIndexStats, io.greptime.v1.index.InvertedIndex.InvertedIndexStats.Builder, io.greptime.v1.index.InvertedIndex.InvertedIndexStatsOrBuilder> + getStatsFieldBuilder() { + if (statsBuilder_ == null) { + statsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.greptime.v1.index.InvertedIndex.InvertedIndexStats, io.greptime.v1.index.InvertedIndex.InvertedIndexStats.Builder, io.greptime.v1.index.InvertedIndex.InvertedIndexStatsOrBuilder>( + getStats(), + getParentForChildren(), + isClean()); + stats_ = null; + } + return statsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:greptime.v1.index.InvertedIndexMeta) + } + + // @@protoc_insertion_point(class_scope:greptime.v1.index.InvertedIndexMeta) + private static final io.greptime.v1.index.InvertedIndex.InvertedIndexMeta DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.greptime.v1.index.InvertedIndex.InvertedIndexMeta(); + } + + public static io.greptime.v1.index.InvertedIndex.InvertedIndexMeta getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public InvertedIndexMeta parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new InvertedIndexMeta(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.greptime.v1.index.InvertedIndex.InvertedIndexMeta getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface InvertedIndexStatsOrBuilder extends + // @@protoc_insertion_point(interface_extends:greptime.v1.index.InvertedIndexStats) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The count of null entries within the tag's column.
+     * 
+ * + * uint64 null_count = 1; + * @return The nullCount. + */ + long getNullCount(); + + /** + *
+     * The number of distinct values within the tag's column.
+     * 
+ * + * uint64 distinct_count = 2; + * @return The distinctCount. + */ + long getDistinctCount(); + + /** + *
+     * The minimum value found within the tag's column, encoded as bytes.
+     * 
+ * + * bytes min_value = 3; + * @return The minValue. + */ + com.google.protobuf.ByteString getMinValue(); + + /** + *
+     * The maximum value found within the tag's column, encoded as bytes.
+     * 
+ * + * bytes max_value = 4; + * @return The maxValue. + */ + com.google.protobuf.ByteString getMaxValue(); + } + /** + *
+   * InvertedIndexStats provides statistical data on a tag's inverted index.
+   * 
+ * + * Protobuf type {@code greptime.v1.index.InvertedIndexStats} + */ + public static final class InvertedIndexStats extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:greptime.v1.index.InvertedIndexStats) + InvertedIndexStatsOrBuilder { + private static final long serialVersionUID = 0L; + // Use InvertedIndexStats.newBuilder() to construct. + private InvertedIndexStats(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private InvertedIndexStats() { + minValue_ = com.google.protobuf.ByteString.EMPTY; + maxValue_ = com.google.protobuf.ByteString.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new InvertedIndexStats(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private InvertedIndexStats( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + + nullCount_ = input.readUInt64(); + break; + } + case 16: { + + distinctCount_ = input.readUInt64(); + break; + } + case 26: { + + minValue_ = input.readBytes(); + break; + } + case 34: { + + maxValue_ = input.readBytes(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.greptime.v1.index.InvertedIndex.internal_static_greptime_v1_index_InvertedIndexStats_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.greptime.v1.index.InvertedIndex.internal_static_greptime_v1_index_InvertedIndexStats_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.greptime.v1.index.InvertedIndex.InvertedIndexStats.class, io.greptime.v1.index.InvertedIndex.InvertedIndexStats.Builder.class); + } + + public static final int NULL_COUNT_FIELD_NUMBER = 1; + private long nullCount_; + /** + *
+     * The count of null entries within the tag's column.
+     * 
+ * + * uint64 null_count = 1; + * @return The nullCount. + */ + @java.lang.Override + public long getNullCount() { + return nullCount_; + } + + public static final int DISTINCT_COUNT_FIELD_NUMBER = 2; + private long distinctCount_; + /** + *
+     * The number of distinct values within the tag's column.
+     * 
+ * + * uint64 distinct_count = 2; + * @return The distinctCount. + */ + @java.lang.Override + public long getDistinctCount() { + return distinctCount_; + } + + public static final int MIN_VALUE_FIELD_NUMBER = 3; + private com.google.protobuf.ByteString minValue_; + /** + *
+     * The minimum value found within the tag's column, encoded as bytes.
+     * 
+ * + * bytes min_value = 3; + * @return The minValue. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMinValue() { + return minValue_; + } + + public static final int MAX_VALUE_FIELD_NUMBER = 4; + private com.google.protobuf.ByteString maxValue_; + /** + *
+     * The maximum value found within the tag's column, encoded as bytes.
+     * 
+ * + * bytes max_value = 4; + * @return The maxValue. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMaxValue() { + return maxValue_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (nullCount_ != 0L) { + output.writeUInt64(1, nullCount_); + } + if (distinctCount_ != 0L) { + output.writeUInt64(2, distinctCount_); + } + if (!minValue_.isEmpty()) { + output.writeBytes(3, minValue_); + } + if (!maxValue_.isEmpty()) { + output.writeBytes(4, maxValue_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (nullCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(1, nullCount_); + } + if (distinctCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(2, distinctCount_); + } + if (!minValue_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(3, minValue_); + } + if (!maxValue_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(4, maxValue_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.greptime.v1.index.InvertedIndex.InvertedIndexStats)) { + return super.equals(obj); + } + io.greptime.v1.index.InvertedIndex.InvertedIndexStats other = (io.greptime.v1.index.InvertedIndex.InvertedIndexStats) obj; + + if (getNullCount() + != other.getNullCount()) return false; + if (getDistinctCount() + != other.getDistinctCount()) return false; + if (!getMinValue() + .equals(other.getMinValue())) return false; + if (!getMaxValue() + .equals(other.getMaxValue())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NULL_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getNullCount()); + hash = (37 * hash) + DISTINCT_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getDistinctCount()); + hash = (37 * hash) + MIN_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getMinValue().hashCode(); + hash = (37 * hash) + MAX_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getMaxValue().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.greptime.v1.index.InvertedIndex.InvertedIndexStats parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.greptime.v1.index.InvertedIndex.InvertedIndexStats parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.greptime.v1.index.InvertedIndex.InvertedIndexStats parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.greptime.v1.index.InvertedIndex.InvertedIndexStats parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.greptime.v1.index.InvertedIndex.InvertedIndexStats parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.greptime.v1.index.InvertedIndex.InvertedIndexStats parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.greptime.v1.index.InvertedIndex.InvertedIndexStats parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.greptime.v1.index.InvertedIndex.InvertedIndexStats parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.greptime.v1.index.InvertedIndex.InvertedIndexStats parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.greptime.v1.index.InvertedIndex.InvertedIndexStats parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.greptime.v1.index.InvertedIndex.InvertedIndexStats parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.greptime.v1.index.InvertedIndex.InvertedIndexStats parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.greptime.v1.index.InvertedIndex.InvertedIndexStats prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * InvertedIndexStats provides statistical data on a tag's inverted index.
+     * 
+ * + * Protobuf type {@code greptime.v1.index.InvertedIndexStats} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:greptime.v1.index.InvertedIndexStats) + io.greptime.v1.index.InvertedIndex.InvertedIndexStatsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.greptime.v1.index.InvertedIndex.internal_static_greptime_v1_index_InvertedIndexStats_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.greptime.v1.index.InvertedIndex.internal_static_greptime_v1_index_InvertedIndexStats_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.greptime.v1.index.InvertedIndex.InvertedIndexStats.class, io.greptime.v1.index.InvertedIndex.InvertedIndexStats.Builder.class); + } + + // Construct using io.greptime.v1.index.InvertedIndex.InvertedIndexStats.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + nullCount_ = 0L; + + distinctCount_ = 0L; + + minValue_ = com.google.protobuf.ByteString.EMPTY; + + maxValue_ = com.google.protobuf.ByteString.EMPTY; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.greptime.v1.index.InvertedIndex.internal_static_greptime_v1_index_InvertedIndexStats_descriptor; + } + + @java.lang.Override + public io.greptime.v1.index.InvertedIndex.InvertedIndexStats getDefaultInstanceForType() { + return io.greptime.v1.index.InvertedIndex.InvertedIndexStats.getDefaultInstance(); + } + + @java.lang.Override + public io.greptime.v1.index.InvertedIndex.InvertedIndexStats build() { + io.greptime.v1.index.InvertedIndex.InvertedIndexStats result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.greptime.v1.index.InvertedIndex.InvertedIndexStats buildPartial() { + io.greptime.v1.index.InvertedIndex.InvertedIndexStats result = new io.greptime.v1.index.InvertedIndex.InvertedIndexStats(this); + result.nullCount_ = nullCount_; + result.distinctCount_ = distinctCount_; + result.minValue_ = minValue_; + result.maxValue_ = maxValue_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.greptime.v1.index.InvertedIndex.InvertedIndexStats) { + return mergeFrom((io.greptime.v1.index.InvertedIndex.InvertedIndexStats)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.greptime.v1.index.InvertedIndex.InvertedIndexStats other) { + if (other == io.greptime.v1.index.InvertedIndex.InvertedIndexStats.getDefaultInstance()) return this; + if (other.getNullCount() != 0L) { + setNullCount(other.getNullCount()); + } + if (other.getDistinctCount() != 0L) { + setDistinctCount(other.getDistinctCount()); + } + if (other.getMinValue() != com.google.protobuf.ByteString.EMPTY) { + setMinValue(other.getMinValue()); + } + if (other.getMaxValue() != com.google.protobuf.ByteString.EMPTY) { + setMaxValue(other.getMaxValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + io.greptime.v1.index.InvertedIndex.InvertedIndexStats parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (io.greptime.v1.index.InvertedIndex.InvertedIndexStats) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private long nullCount_ ; + /** + *
+       * The count of null entries within the tag's column.
+       * 
+ * + * uint64 null_count = 1; + * @return The nullCount. + */ + @java.lang.Override + public long getNullCount() { + return nullCount_; + } + /** + *
+       * The count of null entries within the tag's column.
+       * 
+ * + * uint64 null_count = 1; + * @param value The nullCount to set. + * @return This builder for chaining. + */ + public Builder setNullCount(long value) { + + nullCount_ = value; + onChanged(); + return this; + } + /** + *
+       * The count of null entries within the tag's column.
+       * 
+ * + * uint64 null_count = 1; + * @return This builder for chaining. + */ + public Builder clearNullCount() { + + nullCount_ = 0L; + onChanged(); + return this; + } + + private long distinctCount_ ; + /** + *
+       * The number of distinct values within the tag's column.
+       * 
+ * + * uint64 distinct_count = 2; + * @return The distinctCount. + */ + @java.lang.Override + public long getDistinctCount() { + return distinctCount_; + } + /** + *
+       * The number of distinct values within the tag's column.
+       * 
+ * + * uint64 distinct_count = 2; + * @param value The distinctCount to set. + * @return This builder for chaining. + */ + public Builder setDistinctCount(long value) { + + distinctCount_ = value; + onChanged(); + return this; + } + /** + *
+       * The number of distinct values within the tag's column.
+       * 
+ * + * uint64 distinct_count = 2; + * @return This builder for chaining. + */ + public Builder clearDistinctCount() { + + distinctCount_ = 0L; + onChanged(); + return this; + } + + private com.google.protobuf.ByteString minValue_ = com.google.protobuf.ByteString.EMPTY; + /** + *
+       * The minimum value found within the tag's column, encoded as bytes.
+       * 
+ * + * bytes min_value = 3; + * @return The minValue. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMinValue() { + return minValue_; + } + /** + *
+       * The minimum value found within the tag's column, encoded as bytes.
+       * 
+ * + * bytes min_value = 3; + * @param value The minValue to set. + * @return This builder for chaining. + */ + public Builder setMinValue(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + minValue_ = value; + onChanged(); + return this; + } + /** + *
+       * The minimum value found within the tag's column, encoded as bytes.
+       * 
+ * + * bytes min_value = 3; + * @return This builder for chaining. + */ + public Builder clearMinValue() { + + minValue_ = getDefaultInstance().getMinValue(); + onChanged(); + return this; + } + + private com.google.protobuf.ByteString maxValue_ = com.google.protobuf.ByteString.EMPTY; + /** + *
+       * The maximum value found within the tag's column, encoded as bytes.
+       * 
+ * + * bytes max_value = 4; + * @return The maxValue. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMaxValue() { + return maxValue_; + } + /** + *
+       * The maximum value found within the tag's column, encoded as bytes.
+       * 
+ * + * bytes max_value = 4; + * @param value The maxValue to set. + * @return This builder for chaining. + */ + public Builder setMaxValue(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + maxValue_ = value; + onChanged(); + return this; + } + /** + *
+       * The maximum value found within the tag's column, encoded as bytes.
+       * 
+ * + * bytes max_value = 4; + * @return This builder for chaining. + */ + public Builder clearMaxValue() { + + maxValue_ = getDefaultInstance().getMaxValue(); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:greptime.v1.index.InvertedIndexStats) + } + + // @@protoc_insertion_point(class_scope:greptime.v1.index.InvertedIndexStats) + private static final io.greptime.v1.index.InvertedIndex.InvertedIndexStats DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.greptime.v1.index.InvertedIndex.InvertedIndexStats(); + } + + public static io.greptime.v1.index.InvertedIndex.InvertedIndexStats getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public InvertedIndexStats parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new InvertedIndexStats(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.greptime.v1.index.InvertedIndex.InvertedIndexStats getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_greptime_v1_index_InvertedIndexFooter_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_greptime_v1_index_InvertedIndexFooter_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_greptime_v1_index_InvertedIndexFooter_MetasEntry_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_greptime_v1_index_InvertedIndexFooter_MetasEntry_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_greptime_v1_index_InvertedIndexMeta_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_greptime_v1_index_InvertedIndexMeta_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_greptime_v1_index_InvertedIndexStats_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_greptime_v1_index_InvertedIndexStats_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n&greptime/v1/index/inverted_index.proto" + + "\022\021greptime.v1.index\"\253\001\n\023InvertedIndexFoo" + + "ter\022@\n\005metas\030\001 \003(\01321.greptime.v1.index.I" + + "nvertedIndexFooter.MetasEntry\032R\n\nMetasEn" + + "try\022\013\n\003key\030\001 \001(\t\0223\n\005value\030\002 \001(\0132$.grepti" + + "me.v1.index.InvertedIndexMeta:\0028\001\"\317\001\n\021In" + + "vertedIndexMeta\022\014\n\004name\030\001 \001(\t\022\032\n\022row_cou" + + "nt_in_group\030\002 \001(\004\022\022\n\nfst_offset\030\003 \001(\004\022\020\n" + + "\010fst_size\030\004 \001(\004\022\032\n\022null_bitmap_offset\030\005 " + + "\001(\004\022\030\n\020null_bitmap_size\030\006 \001(\004\0224\n\005stats\030\007" + + " \001(\0132%.greptime.v1.index.InvertedIndexSt" + + "ats\"f\n\022InvertedIndexStats\022\022\n\nnull_count\030" + + "\001 \001(\004\022\026\n\016distinct_count\030\002 \001(\004\022\021\n\tmin_val" + + "ue\030\003 \001(\014\022\021\n\tmax_value\030\004 \001(\014BS\n\024io.grepti" + + "me.v1.indexZ;github.com/GreptimeTeam/gre" + + "ptime-proto/go/greptime/v1/indexb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_greptime_v1_index_InvertedIndexFooter_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_greptime_v1_index_InvertedIndexFooter_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_greptime_v1_index_InvertedIndexFooter_descriptor, + new java.lang.String[] { "Metas", }); + internal_static_greptime_v1_index_InvertedIndexFooter_MetasEntry_descriptor = + internal_static_greptime_v1_index_InvertedIndexFooter_descriptor.getNestedTypes().get(0); + internal_static_greptime_v1_index_InvertedIndexFooter_MetasEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_greptime_v1_index_InvertedIndexFooter_MetasEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_greptime_v1_index_InvertedIndexMeta_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_greptime_v1_index_InvertedIndexMeta_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_greptime_v1_index_InvertedIndexMeta_descriptor, + new java.lang.String[] { "Name", "RowCountInGroup", "FstOffset", "FstSize", "NullBitmapOffset", "NullBitmapSize", "Stats", }); + internal_static_greptime_v1_index_InvertedIndexStats_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_greptime_v1_index_InvertedIndexStats_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_greptime_v1_index_InvertedIndexStats_descriptor, + new java.lang.String[] { "NullCount", "DistinctCount", "MinValue", "MaxValue", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto/greptime/v1/index/inverted_index.proto b/proto/greptime/v1/index/inverted_index.proto new file mode 100644 index 00000000..28dec70b --- /dev/null +++ b/proto/greptime/v1/index/inverted_index.proto @@ -0,0 +1,74 @@ +// 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 java_package = "io.greptime.v1.index"; +option java_outer_classname = "Index"; +option go_package = "github.com/GreptimeTeam/greptime-proto/go/greptime/v1/index"; + +// InvertedIndexMetas defines the metadata for an inverted index +// within an SST file. +message InvertedIndexMetas { + // A map of tag names to their respective metadata corresponding to an individual + // inverted index within the SST file. + map metas = 1; +} + +// InvertedIndexMeta contains the metadata for a specific tag's inverted index. +message InvertedIndexMeta { + // Name of the tag associated with the inverted index. + string name = 1; + + // Defines the number of rows per group for bitmap indexing. It determines how rows + // are batched for indexing, with each batch corresponding to a segment in the bitmap. + // The groups are usually of uniform size, with the exception of the final group which + // may contain fewer rows if the total row count is not a multiple of 'row_count_in_group'. + // Segmenting allows indexed values in the tag column to be quickly located within + // their respective groups during a query, reducing the search space and improving + // retrieval efficiency. + uint64 row_count_in_group = 2; + + // The byte offset of the Finite State Transducer (FST) within the SST file. + uint64 fst_offset = 3; + + // The size in bytes of the FST data. + uint64 fst_size = 4; + + // The byte offset where the null bitmap for this tag starts. + uint64 null_bitmap_offset = 5; + + // The size in bytes of the null bitmap. + uint64 null_bitmap_size = 6; + + // Statistical information about the tag's inverted index. + InvertedIndexStats stats = 7; +} + +// InvertedIndexStats provides statistical data on a tag's inverted index. +message InvertedIndexStats { + // The count of null entries within the tag's column. + uint64 null_count = 1; + + // The number of distinct values within the tag's column. + uint64 distinct_count = 2; + + // The minimum value found within the tag's column, encoded as bytes. + bytes min_value = 3; + + // The maximum value found within the tag's column, encoded as bytes. + bytes max_value = 4; +} diff --git a/src/v1.rs b/src/v1.rs index f1e820cc..1913ddea 100644 --- a/src/v1.rs +++ b/src/v1.rs @@ -18,6 +18,7 @@ use crate::v1::value::ValueData; pub const GREPTIME_GRPC_DESC: &[u8] = tonic::include_file_descriptor_set!("greptime_grpc_desc"); +pub mod index; pub mod meta; pub mod region; diff --git a/src/v1/index.rs b/src/v1/index.rs new file mode 100644 index 00000000..ebcd148c --- /dev/null +++ b/src/v1/index.rs @@ -0,0 +1,15 @@ +// 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. + +tonic::include_proto!("greptime.v1.index");