feat: introduce roaring bitmap to inverted index (#219)
This commit is contained in:
@@ -59,6 +59,7 @@ PROTOBUF_CONSTEXPR InvertedIndexMeta::InvertedIndexMeta(
|
||||
, /*decltype(_impl_.fst_size_)*/0u
|
||||
, /*decltype(_impl_.relative_null_bitmap_offset_)*/0u
|
||||
, /*decltype(_impl_.null_bitmap_size_)*/0u
|
||||
, /*decltype(_impl_.bitmap_type_)*/0
|
||||
, /*decltype(_impl_._cached_size_)*/{}} {}
|
||||
struct InvertedIndexMetaDefaultTypeInternal {
|
||||
PROTOBUF_CONSTEXPR InvertedIndexMetaDefaultTypeInternal()
|
||||
@@ -89,7 +90,7 @@ PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORIT
|
||||
} // 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 const ::_pb::EnumDescriptor* file_level_enum_descriptors_greptime_2fv1_2findex_2finverted_5findex_2eproto[1];
|
||||
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) = {
|
||||
@@ -126,6 +127,7 @@ const uint32_t TableStruct_greptime_2fv1_2findex_2finverted_5findex_2eproto::off
|
||||
PROTOBUF_FIELD_OFFSET(::greptime::v1::index::InvertedIndexMeta, _impl_.relative_null_bitmap_offset_),
|
||||
PROTOBUF_FIELD_OFFSET(::greptime::v1::index::InvertedIndexMeta, _impl_.null_bitmap_size_),
|
||||
PROTOBUF_FIELD_OFFSET(::greptime::v1::index::InvertedIndexMeta, _impl_.stats_),
|
||||
PROTOBUF_FIELD_OFFSET(::greptime::v1::index::InvertedIndexMeta, _impl_.bitmap_type_),
|
||||
~0u, // no _has_bits_
|
||||
PROTOBUF_FIELD_OFFSET(::greptime::v1::index::InvertedIndexStats, _internal_metadata_),
|
||||
~0u, // no _extensions_
|
||||
@@ -141,7 +143,7 @@ static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protode
|
||||
{ 0, 8, -1, sizeof(::greptime::v1::index::InvertedIndexMetas_MetasEntry_DoNotUse)},
|
||||
{ 10, -1, -1, sizeof(::greptime::v1::index::InvertedIndexMetas)},
|
||||
{ 19, -1, -1, sizeof(::greptime::v1::index::InvertedIndexMeta)},
|
||||
{ 33, -1, -1, sizeof(::greptime::v1::index::InvertedIndexStats)},
|
||||
{ 34, -1, -1, sizeof(::greptime::v1::index::InvertedIndexStats)},
|
||||
};
|
||||
|
||||
static const ::_pb::Message* const file_default_instances[] = {
|
||||
@@ -159,21 +161,23 @@ const char descriptor_table_protodef_greptime_2fv1_2findex_2finverted_5findex_2e
|
||||
"_count\030\002 \001(\004\022\031\n\021segment_row_count\030\003 \001(\004\032"
|
||||
"R\n\nMetasEntry\022\013\n\003key\030\001 \001(\t\0223\n\005value\030\002 \001("
|
||||
"\0132$.greptime.v1.index.InvertedIndexMeta:"
|
||||
"\0028\001\"\367\001\n\021InvertedIndexMeta\022\014\n\004name\030\001 \001(\t\022"
|
||||
"\0028\001\"\253\002\n\021InvertedIndexMeta\022\014\n\004name\030\001 \001(\t\022"
|
||||
"\023\n\013base_offset\030\002 \001(\004\022\033\n\023inverted_index_s"
|
||||
"ize\030\003 \001(\004\022\033\n\023relative_fst_offset\030\004 \001(\r\022\020"
|
||||
"\n\010fst_size\030\005 \001(\r\022#\n\033relative_null_bitmap"
|
||||
"_offset\030\006 \001(\r\022\030\n\020null_bitmap_size\030\007 \001(\r\022"
|
||||
"4\n\005stats\030\010 \001(\0132%.greptime.v1.index.Inver"
|
||||
"tedIndexStats\"f\n\022InvertedIndexStats\022\022\n\nn"
|
||||
"ull_count\030\001 \001(\004\022\026\n\016distinct_count\030\002 \001(\004\022"
|
||||
"\021\n\tmin_value\030\003 \001(\014\022\021\n\tmax_value\030\004 \001(\014B=Z"
|
||||
";github.com/GreptimeTeam/greptime-proto/"
|
||||
"go/greptime/v1/indexb\006proto3"
|
||||
"tedIndexStats\0222\n\013bitmap_type\030\t \001(\0162\035.gre"
|
||||
"ptime.v1.index.BitmapType\"f\n\022InvertedInd"
|
||||
"exStats\022\022\n\nnull_count\030\001 \001(\004\022\026\n\016distinct_"
|
||||
"count\030\002 \001(\004\022\021\n\tmin_value\030\003 \001(\014\022\021\n\tmax_va"
|
||||
"lue\030\004 \001(\014*%\n\nBitmapType\022\n\n\006BitVec\020\000\022\013\n\007R"
|
||||
"oaring\020\001B=Z;github.com/GreptimeTeam/grep"
|
||||
"time-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, 708, descriptor_table_protodef_greptime_2fv1_2findex_2finverted_5findex_2eproto,
|
||||
false, false, 799, 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,
|
||||
@@ -189,6 +193,20 @@ PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::_pbi::AddDescriptorsRunner dynamic_in
|
||||
namespace greptime {
|
||||
namespace v1 {
|
||||
namespace index {
|
||||
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* BitmapType_descriptor() {
|
||||
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_greptime_2fv1_2findex_2finverted_5findex_2eproto);
|
||||
return file_level_enum_descriptors_greptime_2fv1_2findex_2finverted_5findex_2eproto[0];
|
||||
}
|
||||
bool BitmapType_IsValid(int value) {
|
||||
switch (value) {
|
||||
case 0:
|
||||
case 1:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ===================================================================
|
||||
|
||||
@@ -508,6 +526,7 @@ InvertedIndexMeta::InvertedIndexMeta(const InvertedIndexMeta& from)
|
||||
, decltype(_impl_.fst_size_){}
|
||||
, decltype(_impl_.relative_null_bitmap_offset_){}
|
||||
, decltype(_impl_.null_bitmap_size_){}
|
||||
, decltype(_impl_.bitmap_type_){}
|
||||
, /*decltype(_impl_._cached_size_)*/{}};
|
||||
|
||||
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
|
||||
@@ -523,8 +542,8 @@ InvertedIndexMeta::InvertedIndexMeta(const InvertedIndexMeta& from)
|
||||
_this->_impl_.stats_ = new ::greptime::v1::index::InvertedIndexStats(*from._impl_.stats_);
|
||||
}
|
||||
::memcpy(&_impl_.base_offset_, &from._impl_.base_offset_,
|
||||
static_cast<size_t>(reinterpret_cast<char*>(&_impl_.null_bitmap_size_) -
|
||||
reinterpret_cast<char*>(&_impl_.base_offset_)) + sizeof(_impl_.null_bitmap_size_));
|
||||
static_cast<size_t>(reinterpret_cast<char*>(&_impl_.bitmap_type_) -
|
||||
reinterpret_cast<char*>(&_impl_.base_offset_)) + sizeof(_impl_.bitmap_type_));
|
||||
// @@protoc_insertion_point(copy_constructor:greptime.v1.index.InvertedIndexMeta)
|
||||
}
|
||||
|
||||
@@ -541,6 +560,7 @@ inline void InvertedIndexMeta::SharedCtor(
|
||||
, decltype(_impl_.fst_size_){0u}
|
||||
, decltype(_impl_.relative_null_bitmap_offset_){0u}
|
||||
, decltype(_impl_.null_bitmap_size_){0u}
|
||||
, decltype(_impl_.bitmap_type_){0}
|
||||
, /*decltype(_impl_._cached_size_)*/{}
|
||||
};
|
||||
_impl_.name_.InitDefault();
|
||||
@@ -580,8 +600,8 @@ void InvertedIndexMeta::Clear() {
|
||||
}
|
||||
_impl_.stats_ = nullptr;
|
||||
::memset(&_impl_.base_offset_, 0, static_cast<size_t>(
|
||||
reinterpret_cast<char*>(&_impl_.null_bitmap_size_) -
|
||||
reinterpret_cast<char*>(&_impl_.base_offset_)) + sizeof(_impl_.null_bitmap_size_));
|
||||
reinterpret_cast<char*>(&_impl_.bitmap_type_) -
|
||||
reinterpret_cast<char*>(&_impl_.base_offset_)) + sizeof(_impl_.bitmap_type_));
|
||||
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
|
||||
}
|
||||
|
||||
@@ -657,6 +677,15 @@ const char* InvertedIndexMeta::_InternalParse(const char* ptr, ::_pbi::ParseCont
|
||||
} else
|
||||
goto handle_unusual;
|
||||
continue;
|
||||
// .greptime.v1.index.BitmapType bitmap_type = 9;
|
||||
case 9:
|
||||
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 72)) {
|
||||
uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
|
||||
CHK_(ptr);
|
||||
_internal_set_bitmap_type(static_cast<::greptime::v1::index::BitmapType>(val));
|
||||
} else
|
||||
goto handle_unusual;
|
||||
continue;
|
||||
default:
|
||||
goto handle_unusual;
|
||||
} // switch
|
||||
@@ -739,6 +768,13 @@ uint8_t* InvertedIndexMeta::_InternalSerialize(
|
||||
_Internal::stats(this).GetCachedSize(), target, stream);
|
||||
}
|
||||
|
||||
// .greptime.v1.index.BitmapType bitmap_type = 9;
|
||||
if (this->_internal_bitmap_type() != 0) {
|
||||
target = stream->EnsureSpace(target);
|
||||
target = ::_pbi::WireFormatLite::WriteEnumToArray(
|
||||
9, this->_internal_bitmap_type(), 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);
|
||||
@@ -799,6 +835,12 @@ size_t InvertedIndexMeta::ByteSizeLong() const {
|
||||
total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_null_bitmap_size());
|
||||
}
|
||||
|
||||
// .greptime.v1.index.BitmapType bitmap_type = 9;
|
||||
if (this->_internal_bitmap_type() != 0) {
|
||||
total_size += 1 +
|
||||
::_pbi::WireFormatLite::EnumSize(this->_internal_bitmap_type());
|
||||
}
|
||||
|
||||
return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
|
||||
}
|
||||
|
||||
@@ -842,6 +884,9 @@ void InvertedIndexMeta::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, cons
|
||||
if (from._internal_null_bitmap_size() != 0) {
|
||||
_this->_internal_set_null_bitmap_size(from._internal_null_bitmap_size());
|
||||
}
|
||||
if (from._internal_bitmap_type() != 0) {
|
||||
_this->_internal_set_bitmap_type(from._internal_bitmap_type());
|
||||
}
|
||||
_this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
|
||||
}
|
||||
|
||||
@@ -866,8 +911,8 @@ void InvertedIndexMeta::InternalSwap(InvertedIndexMeta* other) {
|
||||
&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_.bitmap_type_)
|
||||
+ sizeof(InvertedIndexMeta::_impl_.bitmap_type_)
|
||||
- PROTOBUF_FIELD_OFFSET(InvertedIndexMeta, _impl_.stats_)>(
|
||||
reinterpret_cast<char*>(&_impl_.stats_),
|
||||
reinterpret_cast<char*>(&other->_impl_.stats_));
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
#include <google/protobuf/map.h> // IWYU pragma: export
|
||||
#include <google/protobuf/map_entry.h>
|
||||
#include <google/protobuf/map_field_inl.h>
|
||||
#include <google/protobuf/generated_enum_reflection.h>
|
||||
#include <google/protobuf/unknown_field_set.h>
|
||||
// @@protoc_insertion_point(includes)
|
||||
#include <google/protobuf/port_def.inc>
|
||||
@@ -75,6 +76,31 @@ namespace greptime {
|
||||
namespace v1 {
|
||||
namespace index {
|
||||
|
||||
enum BitmapType : int {
|
||||
BitVec = 0,
|
||||
Roaring = 1,
|
||||
BitmapType_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<int32_t>::min(),
|
||||
BitmapType_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<int32_t>::max()
|
||||
};
|
||||
bool BitmapType_IsValid(int value);
|
||||
constexpr BitmapType BitmapType_MIN = BitVec;
|
||||
constexpr BitmapType BitmapType_MAX = Roaring;
|
||||
constexpr int BitmapType_ARRAYSIZE = BitmapType_MAX + 1;
|
||||
|
||||
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* BitmapType_descriptor();
|
||||
template<typename T>
|
||||
inline const std::string& BitmapType_Name(T enum_t_value) {
|
||||
static_assert(::std::is_same<T, BitmapType>::value ||
|
||||
::std::is_integral<T>::value,
|
||||
"Incorrect type passed to function BitmapType_Name.");
|
||||
return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum(
|
||||
BitmapType_descriptor(), enum_t_value);
|
||||
}
|
||||
inline bool BitmapType_Parse(
|
||||
::PROTOBUF_NAMESPACE_ID::ConstStringParam name, BitmapType* value) {
|
||||
return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum<BitmapType>(
|
||||
BitmapType_descriptor(), name, value);
|
||||
}
|
||||
// ===================================================================
|
||||
|
||||
class InvertedIndexMetas_MetasEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal::MapEntry<InvertedIndexMetas_MetasEntry_DoNotUse,
|
||||
@@ -417,6 +443,7 @@ class InvertedIndexMeta final :
|
||||
kFstSizeFieldNumber = 5,
|
||||
kRelativeNullBitmapOffsetFieldNumber = 6,
|
||||
kNullBitmapSizeFieldNumber = 7,
|
||||
kBitmapTypeFieldNumber = 9,
|
||||
};
|
||||
// string name = 1;
|
||||
void clear_name();
|
||||
@@ -504,6 +531,15 @@ class InvertedIndexMeta final :
|
||||
void _internal_set_null_bitmap_size(uint32_t value);
|
||||
public:
|
||||
|
||||
// .greptime.v1.index.BitmapType bitmap_type = 9;
|
||||
void clear_bitmap_type();
|
||||
::greptime::v1::index::BitmapType bitmap_type() const;
|
||||
void set_bitmap_type(::greptime::v1::index::BitmapType value);
|
||||
private:
|
||||
::greptime::v1::index::BitmapType _internal_bitmap_type() const;
|
||||
void _internal_set_bitmap_type(::greptime::v1::index::BitmapType value);
|
||||
public:
|
||||
|
||||
// @@protoc_insertion_point(class_scope:greptime.v1.index.InvertedIndexMeta)
|
||||
private:
|
||||
class _Internal;
|
||||
@@ -520,6 +556,7 @@ class InvertedIndexMeta final :
|
||||
uint32_t fst_size_;
|
||||
uint32_t relative_null_bitmap_offset_;
|
||||
uint32_t null_bitmap_size_;
|
||||
int bitmap_type_;
|
||||
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
|
||||
};
|
||||
union { Impl_ _impl_; };
|
||||
@@ -1062,6 +1099,26 @@ inline void InvertedIndexMeta::set_allocated_stats(::greptime::v1::index::Invert
|
||||
// @@protoc_insertion_point(field_set_allocated:greptime.v1.index.InvertedIndexMeta.stats)
|
||||
}
|
||||
|
||||
// .greptime.v1.index.BitmapType bitmap_type = 9;
|
||||
inline void InvertedIndexMeta::clear_bitmap_type() {
|
||||
_impl_.bitmap_type_ = 0;
|
||||
}
|
||||
inline ::greptime::v1::index::BitmapType InvertedIndexMeta::_internal_bitmap_type() const {
|
||||
return static_cast< ::greptime::v1::index::BitmapType >(_impl_.bitmap_type_);
|
||||
}
|
||||
inline ::greptime::v1::index::BitmapType InvertedIndexMeta::bitmap_type() const {
|
||||
// @@protoc_insertion_point(field_get:greptime.v1.index.InvertedIndexMeta.bitmap_type)
|
||||
return _internal_bitmap_type();
|
||||
}
|
||||
inline void InvertedIndexMeta::_internal_set_bitmap_type(::greptime::v1::index::BitmapType value) {
|
||||
|
||||
_impl_.bitmap_type_ = value;
|
||||
}
|
||||
inline void InvertedIndexMeta::set_bitmap_type(::greptime::v1::index::BitmapType value) {
|
||||
_internal_set_bitmap_type(value);
|
||||
// @@protoc_insertion_point(field_set:greptime.v1.index.InvertedIndexMeta.bitmap_type)
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
// InvertedIndexStats
|
||||
@@ -1222,6 +1279,16 @@ inline void InvertedIndexStats::set_allocated_max_value(std::string* max_value)
|
||||
} // namespace v1
|
||||
} // namespace greptime
|
||||
|
||||
PROTOBUF_NAMESPACE_OPEN
|
||||
|
||||
template <> struct is_proto_enum< ::greptime::v1::index::BitmapType> : ::std::true_type {};
|
||||
template <>
|
||||
inline const EnumDescriptor* GetEnumDescriptor< ::greptime::v1::index::BitmapType>() {
|
||||
return ::greptime::v1::index::BitmapType_descriptor();
|
||||
}
|
||||
|
||||
PROTOBUF_NAMESPACE_CLOSE
|
||||
|
||||
// @@protoc_insertion_point(global_scope)
|
||||
|
||||
#include <google/protobuf/port_undef.inc>
|
||||
|
||||
@@ -218,6 +218,7 @@ PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORIT
|
||||
PROTOBUF_CONSTEXPR DropRequest::DropRequest(
|
||||
::_pbi::ConstantInitialized): _impl_{
|
||||
/*decltype(_impl_.region_id_)*/uint64_t{0u}
|
||||
, /*decltype(_impl_.fast_path_)*/false
|
||||
, /*decltype(_impl_._cached_size_)*/{}} {}
|
||||
struct DropRequestDefaultTypeInternal {
|
||||
PROTOBUF_CONSTEXPR DropRequestDefaultTypeInternal()
|
||||
@@ -578,6 +579,7 @@ const uint32_t TableStruct_greptime_2fv1_2fregion_2fserver_2eproto::offsets[] PR
|
||||
~0u, // no _weak_field_map_
|
||||
~0u, // no _inlined_string_donated_
|
||||
PROTOBUF_FIELD_OFFSET(::greptime::v1::region::DropRequest, _impl_.region_id_),
|
||||
PROTOBUF_FIELD_OFFSET(::greptime::v1::region::DropRequest, _impl_.fast_path_),
|
||||
PROTOBUF_FIELD_OFFSET(::greptime::v1::region::OpenRequest_OptionsEntry_DoNotUse, _has_bits_),
|
||||
PROTOBUF_FIELD_OFFSET(::greptime::v1::region::OpenRequest_OptionsEntry_DoNotUse, _internal_metadata_),
|
||||
~0u, // no _extensions_
|
||||
@@ -719,21 +721,21 @@ static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protode
|
||||
{ 115, -1, -1, sizeof(::greptime::v1::region::CreateRequest)},
|
||||
{ 127, -1, -1, sizeof(::greptime::v1::region::DropRequests)},
|
||||
{ 134, -1, -1, sizeof(::greptime::v1::region::DropRequest)},
|
||||
{ 141, 149, -1, sizeof(::greptime::v1::region::OpenRequest_OptionsEntry_DoNotUse)},
|
||||
{ 151, -1, -1, sizeof(::greptime::v1::region::OpenRequest)},
|
||||
{ 161, -1, -1, sizeof(::greptime::v1::region::CloseRequest)},
|
||||
{ 168, -1, -1, sizeof(::greptime::v1::region::AlterRequests)},
|
||||
{ 175, -1, -1, sizeof(::greptime::v1::region::AlterRequest)},
|
||||
{ 191, -1, -1, sizeof(::greptime::v1::region::AddColumns)},
|
||||
{ 198, -1, -1, sizeof(::greptime::v1::region::DropColumns)},
|
||||
{ 205, -1, -1, sizeof(::greptime::v1::region::AddColumn)},
|
||||
{ 213, -1, -1, sizeof(::greptime::v1::region::DropColumn)},
|
||||
{ 220, -1, -1, sizeof(::greptime::v1::region::FlushRequest)},
|
||||
{ 227, -1, -1, sizeof(::greptime::v1::region::Regular)},
|
||||
{ 233, -1, -1, sizeof(::greptime::v1::region::StrictWindow)},
|
||||
{ 240, -1, -1, sizeof(::greptime::v1::region::CompactRequest)},
|
||||
{ 250, -1, -1, sizeof(::greptime::v1::region::TruncateRequest)},
|
||||
{ 257, -1, -1, sizeof(::greptime::v1::region::RegionColumnDef)},
|
||||
{ 142, 150, -1, sizeof(::greptime::v1::region::OpenRequest_OptionsEntry_DoNotUse)},
|
||||
{ 152, -1, -1, sizeof(::greptime::v1::region::OpenRequest)},
|
||||
{ 162, -1, -1, sizeof(::greptime::v1::region::CloseRequest)},
|
||||
{ 169, -1, -1, sizeof(::greptime::v1::region::AlterRequests)},
|
||||
{ 176, -1, -1, sizeof(::greptime::v1::region::AlterRequest)},
|
||||
{ 192, -1, -1, sizeof(::greptime::v1::region::AddColumns)},
|
||||
{ 199, -1, -1, sizeof(::greptime::v1::region::DropColumns)},
|
||||
{ 206, -1, -1, sizeof(::greptime::v1::region::AddColumn)},
|
||||
{ 214, -1, -1, sizeof(::greptime::v1::region::DropColumn)},
|
||||
{ 221, -1, -1, sizeof(::greptime::v1::region::FlushRequest)},
|
||||
{ 228, -1, -1, sizeof(::greptime::v1::region::Regular)},
|
||||
{ 234, -1, -1, sizeof(::greptime::v1::region::StrictWindow)},
|
||||
{ 241, -1, -1, sizeof(::greptime::v1::region::CompactRequest)},
|
||||
{ 251, -1, -1, sizeof(::greptime::v1::region::TruncateRequest)},
|
||||
{ 258, -1, -1, sizeof(::greptime::v1::region::RegionColumnDef)},
|
||||
};
|
||||
|
||||
static const ::_pb::Message* const file_default_instances[] = {
|
||||
@@ -822,48 +824,48 @@ const char descriptor_table_protodef_greptime_2fv1_2fregion_2fserver_2eproto[] P
|
||||
"ptime.v1.region.CreateRequest.OptionsEnt"
|
||||
"ry\032.\n\014OptionsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value"
|
||||
"\030\002 \001(\t:\0028\001\"A\n\014DropRequests\0221\n\010requests\030\001"
|
||||
" \003(\0132\037.greptime.v1.region.DropRequest\" \n"
|
||||
"\013DropRequest\022\021\n\tregion_id\030\001 \001(\004\"\255\001\n\013Open"
|
||||
"Request\022\021\n\tregion_id\030\001 \001(\004\022\016\n\006engine\030\002 \001"
|
||||
"(\t\022\014\n\004path\030\003 \001(\t\022=\n\007options\030\004 \003(\0132,.grep"
|
||||
"time.v1.region.OpenRequest.OptionsEntry\032"
|
||||
".\n\014OptionsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 "
|
||||
"\001(\t:\0028\001\"!\n\014CloseRequest\022\021\n\tregion_id\030\001 \001"
|
||||
"(\004\"C\n\rAlterRequests\0222\n\010requests\030\001 \003(\0132 ."
|
||||
"greptime.v1.region.AlterRequest\"\306\003\n\014Alte"
|
||||
"rRequest\022\021\n\tregion_id\030\001 \001(\004\0225\n\013add_colum"
|
||||
"ns\030\002 \001(\0132\036.greptime.v1.region.AddColumns"
|
||||
"H\000\0227\n\014drop_columns\030\003 \001(\0132\037.greptime.v1.r"
|
||||
"egion.DropColumnsH\000\022=\n\023modify_column_typ"
|
||||
"es\030\005 \001(\0132\036.greptime.v1.ModifyColumnTypes"
|
||||
"H\000\0229\n\021set_table_options\030\006 \001(\0132\034.greptime"
|
||||
".v1.SetTableOptionsH\000\022=\n\023unset_table_opt"
|
||||
"ions\030\t \001(\0132\036.greptime.v1.UnsetTableOptio"
|
||||
"nsH\000\022*\n\tset_index\030\n \001(\0132\025.greptime.v1.Se"
|
||||
"tIndexH\000\022.\n\013unset_index\030\013 \001(\0132\027.greptime"
|
||||
".v1.UnsetIndexH\000\022\026\n\016schema_version\030\004 \001(\004"
|
||||
"B\006\n\004kind\"@\n\nAddColumns\0222\n\013add_columns\030\001 "
|
||||
"\003(\0132\035.greptime.v1.region.AddColumn\"C\n\013Dr"
|
||||
"opColumns\0224\n\014drop_columns\030\001 \003(\0132\036.grepti"
|
||||
"me.v1.region.DropColumn\"v\n\tAddColumn\0227\n\n"
|
||||
"column_def\030\001 \001(\0132#.greptime.v1.region.Re"
|
||||
"gionColumnDef\0220\n\010location\030\003 \001(\0132\036.grepti"
|
||||
"me.v1.AddColumnLocation\"\032\n\nDropColumn\022\014\n"
|
||||
"\004name\030\001 \001(\t\"!\n\014FlushRequest\022\021\n\tregion_id"
|
||||
"\030\001 \001(\004\"\t\n\007Regular\"&\n\014StrictWindow\022\026\n\016win"
|
||||
"dow_seconds\030\001 \001(\003\"\231\001\n\016CompactRequest\022\021\n\t"
|
||||
"region_id\030\001 \001(\004\022.\n\007regular\030\002 \001(\0132\033.grept"
|
||||
"ime.v1.region.RegularH\000\0229\n\rstrict_window"
|
||||
"\030\003 \001(\0132 .greptime.v1.region.StrictWindow"
|
||||
"H\000B\t\n\007options\"$\n\017TruncateRequest\022\021\n\tregi"
|
||||
"on_id\030\001 \001(\004\"P\n\017RegionColumnDef\022*\n\ncolumn"
|
||||
"_def\030\001 \001(\0132\026.greptime.v1.ColumnDef\022\021\n\tco"
|
||||
"lumn_id\030\002 \001(\r2Y\n\006Region\022O\n\006Handle\022!.grep"
|
||||
"time.v1.region.RegionRequest\032\".greptime."
|
||||
"v1.region.RegionResponseB]\n\025io.greptime."
|
||||
"v1.regionB\006ServerZ<github.com/GreptimeTe"
|
||||
"am/greptime-proto/go/greptime/v1/regionb"
|
||||
"\006proto3"
|
||||
" \003(\0132\037.greptime.v1.region.DropRequest\"3\n"
|
||||
"\013DropRequest\022\021\n\tregion_id\030\001 \001(\004\022\021\n\tfast_"
|
||||
"path\030\002 \001(\010\"\255\001\n\013OpenRequest\022\021\n\tregion_id\030"
|
||||
"\001 \001(\004\022\016\n\006engine\030\002 \001(\t\022\014\n\004path\030\003 \001(\t\022=\n\007o"
|
||||
"ptions\030\004 \003(\0132,.greptime.v1.region.OpenRe"
|
||||
"quest.OptionsEntry\032.\n\014OptionsEntry\022\013\n\003ke"
|
||||
"y\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"!\n\014CloseReque"
|
||||
"st\022\021\n\tregion_id\030\001 \001(\004\"C\n\rAlterRequests\0222"
|
||||
"\n\010requests\030\001 \003(\0132 .greptime.v1.region.Al"
|
||||
"terRequest\"\306\003\n\014AlterRequest\022\021\n\tregion_id"
|
||||
"\030\001 \001(\004\0225\n\013add_columns\030\002 \001(\0132\036.greptime.v"
|
||||
"1.region.AddColumnsH\000\0227\n\014drop_columns\030\003 "
|
||||
"\001(\0132\037.greptime.v1.region.DropColumnsH\000\022="
|
||||
"\n\023modify_column_types\030\005 \001(\0132\036.greptime.v"
|
||||
"1.ModifyColumnTypesH\000\0229\n\021set_table_optio"
|
||||
"ns\030\006 \001(\0132\034.greptime.v1.SetTableOptionsH\000"
|
||||
"\022=\n\023unset_table_options\030\t \001(\0132\036.greptime"
|
||||
".v1.UnsetTableOptionsH\000\022*\n\tset_index\030\n \001"
|
||||
"(\0132\025.greptime.v1.SetIndexH\000\022.\n\013unset_ind"
|
||||
"ex\030\013 \001(\0132\027.greptime.v1.UnsetIndexH\000\022\026\n\016s"
|
||||
"chema_version\030\004 \001(\004B\006\n\004kind\"@\n\nAddColumn"
|
||||
"s\0222\n\013add_columns\030\001 \003(\0132\035.greptime.v1.reg"
|
||||
"ion.AddColumn\"C\n\013DropColumns\0224\n\014drop_col"
|
||||
"umns\030\001 \003(\0132\036.greptime.v1.region.DropColu"
|
||||
"mn\"v\n\tAddColumn\0227\n\ncolumn_def\030\001 \001(\0132#.gr"
|
||||
"eptime.v1.region.RegionColumnDef\0220\n\010loca"
|
||||
"tion\030\003 \001(\0132\036.greptime.v1.AddColumnLocati"
|
||||
"on\"\032\n\nDropColumn\022\014\n\004name\030\001 \001(\t\"!\n\014FlushR"
|
||||
"equest\022\021\n\tregion_id\030\001 \001(\004\"\t\n\007Regular\"&\n\014"
|
||||
"StrictWindow\022\026\n\016window_seconds\030\001 \001(\003\"\231\001\n"
|
||||
"\016CompactRequest\022\021\n\tregion_id\030\001 \001(\004\022.\n\007re"
|
||||
"gular\030\002 \001(\0132\033.greptime.v1.region.Regular"
|
||||
"H\000\0229\n\rstrict_window\030\003 \001(\0132 .greptime.v1."
|
||||
"region.StrictWindowH\000B\t\n\007options\"$\n\017Trun"
|
||||
"cateRequest\022\021\n\tregion_id\030\001 \001(\004\"P\n\017Region"
|
||||
"ColumnDef\022*\n\ncolumn_def\030\001 \001(\0132\026.greptime"
|
||||
".v1.ColumnDef\022\021\n\tcolumn_id\030\002 \001(\r2Y\n\006Regi"
|
||||
"on\022O\n\006Handle\022!.greptime.v1.region.Region"
|
||||
"Request\032\".greptime.v1.region.RegionRespo"
|
||||
"nseB]\n\025io.greptime.v1.regionB\006ServerZ<gi"
|
||||
"thub.com/GreptimeTeam/greptime-proto/go/"
|
||||
"greptime/v1/regionb\006proto3"
|
||||
;
|
||||
static const ::_pbi::DescriptorTable* const descriptor_table_greptime_2fv1_2fregion_2fserver_2eproto_deps[3] = {
|
||||
&::descriptor_table_greptime_2fv1_2fcommon_2eproto,
|
||||
@@ -872,7 +874,7 @@ static const ::_pbi::DescriptorTable* const descriptor_table_greptime_2fv1_2freg
|
||||
};
|
||||
static ::_pbi::once_flag descriptor_table_greptime_2fv1_2fregion_2fserver_2eproto_once;
|
||||
const ::_pbi::DescriptorTable descriptor_table_greptime_2fv1_2fregion_2fserver_2eproto = {
|
||||
false, false, 3727, descriptor_table_protodef_greptime_2fv1_2fregion_2fserver_2eproto,
|
||||
false, false, 3746, descriptor_table_protodef_greptime_2fv1_2fregion_2fserver_2eproto,
|
||||
"greptime/v1/region/server.proto",
|
||||
&descriptor_table_greptime_2fv1_2fregion_2fserver_2eproto_once, descriptor_table_greptime_2fv1_2fregion_2fserver_2eproto_deps, 3, 30,
|
||||
schemas, file_default_instances, TableStruct_greptime_2fv1_2fregion_2fserver_2eproto::offsets,
|
||||
@@ -4441,10 +4443,13 @@ DropRequest::DropRequest(const DropRequest& from)
|
||||
DropRequest* const _this = this; (void)_this;
|
||||
new (&_impl_) Impl_{
|
||||
decltype(_impl_.region_id_){}
|
||||
, decltype(_impl_.fast_path_){}
|
||||
, /*decltype(_impl_._cached_size_)*/{}};
|
||||
|
||||
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
|
||||
_this->_impl_.region_id_ = from._impl_.region_id_;
|
||||
::memcpy(&_impl_.region_id_, &from._impl_.region_id_,
|
||||
static_cast<size_t>(reinterpret_cast<char*>(&_impl_.fast_path_) -
|
||||
reinterpret_cast<char*>(&_impl_.region_id_)) + sizeof(_impl_.fast_path_));
|
||||
// @@protoc_insertion_point(copy_constructor:greptime.v1.region.DropRequest)
|
||||
}
|
||||
|
||||
@@ -4454,6 +4459,7 @@ inline void DropRequest::SharedCtor(
|
||||
(void)is_message_owned;
|
||||
new (&_impl_) Impl_{
|
||||
decltype(_impl_.region_id_){uint64_t{0u}}
|
||||
, decltype(_impl_.fast_path_){false}
|
||||
, /*decltype(_impl_._cached_size_)*/{}
|
||||
};
|
||||
}
|
||||
@@ -4481,7 +4487,9 @@ void DropRequest::Clear() {
|
||||
// Prevent compiler warnings about cached_has_bits being unused
|
||||
(void) cached_has_bits;
|
||||
|
||||
_impl_.region_id_ = uint64_t{0u};
|
||||
::memset(&_impl_.region_id_, 0, static_cast<size_t>(
|
||||
reinterpret_cast<char*>(&_impl_.fast_path_) -
|
||||
reinterpret_cast<char*>(&_impl_.region_id_)) + sizeof(_impl_.fast_path_));
|
||||
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
|
||||
}
|
||||
|
||||
@@ -4499,6 +4507,14 @@ const char* DropRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* c
|
||||
} else
|
||||
goto handle_unusual;
|
||||
continue;
|
||||
// bool fast_path = 2;
|
||||
case 2:
|
||||
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
|
||||
_impl_.fast_path_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
|
||||
CHK_(ptr);
|
||||
} else
|
||||
goto handle_unusual;
|
||||
continue;
|
||||
default:
|
||||
goto handle_unusual;
|
||||
} // switch
|
||||
@@ -4534,6 +4550,12 @@ uint8_t* DropRequest::_InternalSerialize(
|
||||
target = ::_pbi::WireFormatLite::WriteUInt64ToArray(1, this->_internal_region_id(), target);
|
||||
}
|
||||
|
||||
// bool fast_path = 2;
|
||||
if (this->_internal_fast_path() != 0) {
|
||||
target = stream->EnsureSpace(target);
|
||||
target = ::_pbi::WireFormatLite::WriteBoolToArray(2, this->_internal_fast_path(), 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);
|
||||
@@ -4555,6 +4577,11 @@ size_t DropRequest::ByteSizeLong() const {
|
||||
total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_region_id());
|
||||
}
|
||||
|
||||
// bool fast_path = 2;
|
||||
if (this->_internal_fast_path() != 0) {
|
||||
total_size += 1 + 1;
|
||||
}
|
||||
|
||||
return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
|
||||
}
|
||||
|
||||
@@ -4576,6 +4603,9 @@ void DropRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PR
|
||||
if (from._internal_region_id() != 0) {
|
||||
_this->_internal_set_region_id(from._internal_region_id());
|
||||
}
|
||||
if (from._internal_fast_path() != 0) {
|
||||
_this->_internal_set_fast_path(from._internal_fast_path());
|
||||
}
|
||||
_this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
|
||||
}
|
||||
|
||||
@@ -4593,7 +4623,12 @@ bool DropRequest::IsInitialized() const {
|
||||
void DropRequest::InternalSwap(DropRequest* other) {
|
||||
using std::swap;
|
||||
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
|
||||
swap(_impl_.region_id_, other->_impl_.region_id_);
|
||||
::PROTOBUF_NAMESPACE_ID::internal::memswap<
|
||||
PROTOBUF_FIELD_OFFSET(DropRequest, _impl_.fast_path_)
|
||||
+ sizeof(DropRequest::_impl_.fast_path_)
|
||||
- PROTOBUF_FIELD_OFFSET(DropRequest, _impl_.region_id_)>(
|
||||
reinterpret_cast<char*>(&_impl_.region_id_),
|
||||
reinterpret_cast<char*>(&other->_impl_.region_id_));
|
||||
}
|
||||
|
||||
::PROTOBUF_NAMESPACE_ID::Metadata DropRequest::GetMetadata() const {
|
||||
|
||||
@@ -2639,6 +2639,7 @@ class DropRequest final :
|
||||
|
||||
enum : int {
|
||||
kRegionIdFieldNumber = 1,
|
||||
kFastPathFieldNumber = 2,
|
||||
};
|
||||
// uint64 region_id = 1;
|
||||
void clear_region_id();
|
||||
@@ -2649,6 +2650,15 @@ class DropRequest final :
|
||||
void _internal_set_region_id(uint64_t value);
|
||||
public:
|
||||
|
||||
// bool fast_path = 2;
|
||||
void clear_fast_path();
|
||||
bool fast_path() const;
|
||||
void set_fast_path(bool value);
|
||||
private:
|
||||
bool _internal_fast_path() const;
|
||||
void _internal_set_fast_path(bool value);
|
||||
public:
|
||||
|
||||
// @@protoc_insertion_point(class_scope:greptime.v1.region.DropRequest)
|
||||
private:
|
||||
class _Internal;
|
||||
@@ -2658,6 +2668,7 @@ class DropRequest final :
|
||||
typedef void DestructorSkippable_;
|
||||
struct Impl_ {
|
||||
uint64_t region_id_;
|
||||
bool fast_path_;
|
||||
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
|
||||
};
|
||||
union { Impl_ _impl_; };
|
||||
@@ -7317,6 +7328,26 @@ inline void DropRequest::set_region_id(uint64_t value) {
|
||||
// @@protoc_insertion_point(field_set:greptime.v1.region.DropRequest.region_id)
|
||||
}
|
||||
|
||||
// bool fast_path = 2;
|
||||
inline void DropRequest::clear_fast_path() {
|
||||
_impl_.fast_path_ = false;
|
||||
}
|
||||
inline bool DropRequest::_internal_fast_path() const {
|
||||
return _impl_.fast_path_;
|
||||
}
|
||||
inline bool DropRequest::fast_path() const {
|
||||
// @@protoc_insertion_point(field_get:greptime.v1.region.DropRequest.fast_path)
|
||||
return _internal_fast_path();
|
||||
}
|
||||
inline void DropRequest::_internal_set_fast_path(bool value) {
|
||||
|
||||
_impl_.fast_path_ = value;
|
||||
}
|
||||
inline void DropRequest::set_fast_path(bool value) {
|
||||
_internal_set_fast_path(value);
|
||||
// @@protoc_insertion_point(field_set:greptime.v1.region.DropRequest.fast_path)
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user