From e8e228b026e89f43e5a2d65f4ff4543d8fdae719 Mon Sep 17 00:00:00 2001 From: zyy17 Date: Wed, 30 Aug 2023 11:08:14 +0800 Subject: [PATCH] refactor: remove **all** unnecessary 'optional' notation (#91) --- c++/greptime/v1/common.pb.cc | 183 +++++------ c++/greptime/v1/common.pb.h | 39 +-- c++/greptime/v1/ddl.pb.cc | 170 ++++------ c++/greptime/v1/ddl.pb.h | 42 +-- c++/greptime/v1/region/server.pb.cc | 236 +++++++------- c++/greptime/v1/region/server.pb.h | 39 +-- go/greptime/v1/common.pb.go | 191 ++++++------ go/greptime/v1/ddl.pb.go | 173 +++++------ java/src/main/java/io/greptime/v1/Common.java | 227 ++++---------- java/src/main/java/io/greptime/v1/Ddl.java | 193 ++++-------- .../java/io/greptime/v1/region/Server.java | 294 ++++++------------ proto/greptime/v1/common.proto | 4 +- proto/greptime/v1/ddl.proto | 4 +- proto/greptime/v1/region/server.proto | 4 +- 14 files changed, 685 insertions(+), 1114 deletions(-) diff --git a/c++/greptime/v1/common.pb.cc b/c++/greptime/v1/common.pb.cc index 001ab2a..0bfe334 100644 --- a/c++/greptime/v1/common.pb.cc +++ b/c++/greptime/v1/common.pb.cc @@ -24,14 +24,13 @@ namespace greptime { namespace v1 { PROTOBUF_CONSTEXPR RequestHeader::RequestHeader( ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_._has_bits_)*/{} - , /*decltype(_impl_._cached_size_)*/{} - , /*decltype(_impl_.catalog_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + /*decltype(_impl_.catalog_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} , /*decltype(_impl_.schema_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} , /*decltype(_impl_.dbname_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} , /*decltype(_impl_.authorization_)*/nullptr , /*decltype(_impl_.trace_id_)*/uint64_t{0u} - , /*decltype(_impl_.span_id_)*/uint64_t{0u}} {} + , /*decltype(_impl_.span_id_)*/uint64_t{0u} + , /*decltype(_impl_._cached_size_)*/{}} {} struct RequestHeaderDefaultTypeInternal { PROTOBUF_CONSTEXPR RequestHeaderDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} @@ -173,7 +172,7 @@ static const ::_pb::EnumDescriptor* file_level_enum_descriptors_greptime_2fv1_2f static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_greptime_2fv1_2fcommon_2eproto = nullptr; const uint32_t TableStruct_greptime_2fv1_2fcommon_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { - PROTOBUF_FIELD_OFFSET(::greptime::v1::RequestHeader, _impl_._has_bits_), + ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::greptime::v1::RequestHeader, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ @@ -185,12 +184,6 @@ const uint32_t TableStruct_greptime_2fv1_2fcommon_2eproto::offsets[] PROTOBUF_SE PROTOBUF_FIELD_OFFSET(::greptime::v1::RequestHeader, _impl_.dbname_), PROTOBUF_FIELD_OFFSET(::greptime::v1::RequestHeader, _impl_.trace_id_), PROTOBUF_FIELD_OFFSET(::greptime::v1::RequestHeader, _impl_.span_id_), - ~0u, - ~0u, - ~0u, - ~0u, - 0, - 1, ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::greptime::v1::ResponseHeader, _internal_metadata_), ~0u, // no _extensions_ @@ -265,16 +258,16 @@ const uint32_t TableStruct_greptime_2fv1_2fcommon_2eproto::offsets[] PROTOBUF_SE PROTOBUF_FIELD_OFFSET(::greptime::v1::IntervalMonthDayNano, _impl_.nanoseconds_), }; static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { - { 0, 12, -1, sizeof(::greptime::v1::RequestHeader)}, - { 18, -1, -1, sizeof(::greptime::v1::ResponseHeader)}, - { 25, -1, -1, sizeof(::greptime::v1::Status)}, - { 33, -1, -1, sizeof(::greptime::v1::AuthHeader)}, - { 42, -1, -1, sizeof(::greptime::v1::Basic)}, - { 50, -1, -1, sizeof(::greptime::v1::Token)}, - { 57, -1, -1, sizeof(::greptime::v1::AffectedRows)}, - { 64, -1, -1, sizeof(::greptime::v1::FlightMetadata)}, - { 71, -1, -1, sizeof(::greptime::v1::ColumnDef)}, - { 81, -1, -1, sizeof(::greptime::v1::IntervalMonthDayNano)}, + { 0, -1, -1, sizeof(::greptime::v1::RequestHeader)}, + { 12, -1, -1, sizeof(::greptime::v1::ResponseHeader)}, + { 19, -1, -1, sizeof(::greptime::v1::Status)}, + { 27, -1, -1, sizeof(::greptime::v1::AuthHeader)}, + { 36, -1, -1, sizeof(::greptime::v1::Basic)}, + { 44, -1, -1, sizeof(::greptime::v1::Token)}, + { 51, -1, -1, sizeof(::greptime::v1::AffectedRows)}, + { 58, -1, -1, sizeof(::greptime::v1::FlightMetadata)}, + { 65, -1, -1, sizeof(::greptime::v1::ColumnDef)}, + { 75, -1, -1, sizeof(::greptime::v1::IntervalMonthDayNano)}, }; static const ::_pb::Message* const file_default_instances[] = { @@ -292,44 +285,43 @@ static const ::_pb::Message* const file_default_instances[] = { const char descriptor_table_protodef_greptime_2fv1_2fcommon_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = "\n\030greptime/v1/common.proto\022\013greptime.v1\"" - "\266\001\n\rRequestHeader\022\017\n\007catalog\030\001 \001(\t\022\016\n\006sc" + "\223\001\n\rRequestHeader\022\017\n\007catalog\030\001 \001(\t\022\016\n\006sc" "hema\030\002 \001(\t\022.\n\rauthorization\030\003 \001(\0132\027.grep" - "time.v1.AuthHeader\022\016\n\006dbname\030\004 \001(\t\022\025\n\010tr" - "ace_id\030\005 \001(\004H\000\210\001\001\022\024\n\007span_id\030\006 \001(\004H\001\210\001\001B" - "\013\n\t_trace_idB\n\n\010_span_id\"5\n\016ResponseHead" - "er\022#\n\006status\030\001 \001(\0132\023.greptime.v1.Status\"" - ".\n\006Status\022\023\n\013status_code\030\001 \001(\r\022\017\n\007err_ms" - "g\030\002 \001(\t\"e\n\nAuthHeader\022#\n\005basic\030\001 \001(\0132\022.g" - "reptime.v1.BasicH\000\022#\n\005token\030\002 \001(\0132\022.grep" - "time.v1.TokenH\000B\r\n\013auth_scheme\"+\n\005Basic\022" - "\020\n\010username\030\001 \001(\t\022\020\n\010password\030\002 \001(\t\"\026\n\005T" - "oken\022\r\n\005token\030\001 \001(\t\"\035\n\014AffectedRows\022\r\n\005v" - "alue\030\001 \001(\r\"B\n\016FlightMetadata\0220\n\raffected" - "_rows\030\001 \001(\0132\031.greptime.v1.AffectedRows\"y" - "\n\tColumnDef\022\014\n\004name\030\001 \001(\t\022-\n\010datatype\030\002 " - "\001(\0162\033.greptime.v1.ColumnDataType\022\023\n\013is_n" - "ullable\030\003 \001(\010\022\032\n\022default_constraint\030\004 \001(" - "\014\"I\n\024IntervalMonthDayNano\022\016\n\006months\030\001 \001(" - "\005\022\014\n\004days\030\002 \001(\005\022\023\n\013nanoseconds\030\003 \001(\003*1\n\014" - "SemanticType\022\007\n\003TAG\020\000\022\t\n\005FIELD\020\001\022\r\n\tTIME" - "STAMP\020\002*\306\003\n\016ColumnDataType\022\013\n\007BOOLEAN\020\000\022" - "\010\n\004INT8\020\001\022\t\n\005INT16\020\002\022\t\n\005INT32\020\003\022\t\n\005INT64" - "\020\004\022\t\n\005UINT8\020\005\022\n\n\006UINT16\020\006\022\n\n\006UINT32\020\007\022\n\n" - "\006UINT64\020\010\022\013\n\007FLOAT32\020\t\022\013\n\007FLOAT64\020\n\022\n\n\006B" - "INARY\020\013\022\n\n\006STRING\020\014\022\010\n\004DATE\020\r\022\014\n\010DATETIM" - "E\020\016\022\024\n\020TIMESTAMP_SECOND\020\017\022\031\n\025TIMESTAMP_M" - "ILLISECOND\020\020\022\031\n\025TIMESTAMP_MICROSECOND\020\021\022" - "\030\n\024TIMESTAMP_NANOSECOND\020\022\022\017\n\013TIME_SECOND" - "\020\023\022\024\n\020TIME_MILLISECOND\020\024\022\024\n\020TIME_MICROSE" - "COND\020\025\022\023\n\017TIME_NANOSECOND\020\026\022\027\n\023INTERVAL_" - "YEAR_MONTH\020\027\022\025\n\021INTERVAL_DAY_TIME\020\030\022\033\n\027I" - "NTERVAL_MONTH_DAY_NANO\020\031BO\n\016io.greptime." - "v1B\006CommonZ5github.com/GreptimeTeam/grep" - "time-proto/go/greptime/v1b\006proto3" + "time.v1.AuthHeader\022\016\n\006dbname\030\004 \001(\t\022\020\n\010tr" + "ace_id\030\005 \001(\004\022\017\n\007span_id\030\006 \001(\004\"5\n\016Respons" + "eHeader\022#\n\006status\030\001 \001(\0132\023.greptime.v1.St" + "atus\".\n\006Status\022\023\n\013status_code\030\001 \001(\r\022\017\n\007e" + "rr_msg\030\002 \001(\t\"e\n\nAuthHeader\022#\n\005basic\030\001 \001(" + "\0132\022.greptime.v1.BasicH\000\022#\n\005token\030\002 \001(\0132\022" + ".greptime.v1.TokenH\000B\r\n\013auth_scheme\"+\n\005B" + "asic\022\020\n\010username\030\001 \001(\t\022\020\n\010password\030\002 \001(\t" + "\"\026\n\005Token\022\r\n\005token\030\001 \001(\t\"\035\n\014AffectedRows" + "\022\r\n\005value\030\001 \001(\r\"B\n\016FlightMetadata\0220\n\raff" + "ected_rows\030\001 \001(\0132\031.greptime.v1.AffectedR" + "ows\"y\n\tColumnDef\022\014\n\004name\030\001 \001(\t\022-\n\010dataty" + "pe\030\002 \001(\0162\033.greptime.v1.ColumnDataType\022\023\n" + "\013is_nullable\030\003 \001(\010\022\032\n\022default_constraint" + "\030\004 \001(\014\"I\n\024IntervalMonthDayNano\022\016\n\006months" + "\030\001 \001(\005\022\014\n\004days\030\002 \001(\005\022\023\n\013nanoseconds\030\003 \001(" + "\003*1\n\014SemanticType\022\007\n\003TAG\020\000\022\t\n\005FIELD\020\001\022\r\n" + "\tTIMESTAMP\020\002*\306\003\n\016ColumnDataType\022\013\n\007BOOLE" + "AN\020\000\022\010\n\004INT8\020\001\022\t\n\005INT16\020\002\022\t\n\005INT32\020\003\022\t\n\005" + "INT64\020\004\022\t\n\005UINT8\020\005\022\n\n\006UINT16\020\006\022\n\n\006UINT32" + "\020\007\022\n\n\006UINT64\020\010\022\013\n\007FLOAT32\020\t\022\013\n\007FLOAT64\020\n" + "\022\n\n\006BINARY\020\013\022\n\n\006STRING\020\014\022\010\n\004DATE\020\r\022\014\n\010DA" + "TETIME\020\016\022\024\n\020TIMESTAMP_SECOND\020\017\022\031\n\025TIMEST" + "AMP_MILLISECOND\020\020\022\031\n\025TIMESTAMP_MICROSECO" + "ND\020\021\022\030\n\024TIMESTAMP_NANOSECOND\020\022\022\017\n\013TIME_S" + "ECOND\020\023\022\024\n\020TIME_MILLISECOND\020\024\022\024\n\020TIME_MI" + "CROSECOND\020\025\022\023\n\017TIME_NANOSECOND\020\026\022\027\n\023INTE" + "RVAL_YEAR_MONTH\020\027\022\025\n\021INTERVAL_DAY_TIME\020\030" + "\022\033\n\027INTERVAL_MONTH_DAY_NANO\020\031BO\n\016io.grep" + "time.v1B\006CommonZ5github.com/GreptimeTeam" + "/greptime-proto/go/greptime/v1b\006proto3" ; static ::_pbi::once_flag descriptor_table_greptime_2fv1_2fcommon_2eproto_once; const ::_pbi::DescriptorTable descriptor_table_greptime_2fv1_2fcommon_2eproto = { - false, false, 1393, descriptor_table_protodef_greptime_2fv1_2fcommon_2eproto, + false, false, 1358, descriptor_table_protodef_greptime_2fv1_2fcommon_2eproto, "greptime/v1/common.proto", &descriptor_table_greptime_2fv1_2fcommon_2eproto_once, nullptr, 0, 10, schemas, file_default_instances, TableStruct_greptime_2fv1_2fcommon_2eproto::offsets, @@ -402,14 +394,7 @@ bool ColumnDataType_IsValid(int value) { class RequestHeader::_Internal { public: - using HasBits = decltype(std::declval()._impl_._has_bits_); static const ::greptime::v1::AuthHeader& authorization(const RequestHeader* msg); - static void set_has_trace_id(HasBits* has_bits) { - (*has_bits)[0] |= 1u; - } - static void set_has_span_id(HasBits* has_bits) { - (*has_bits)[0] |= 2u; - } }; const ::greptime::v1::AuthHeader& @@ -426,14 +411,13 @@ RequestHeader::RequestHeader(const RequestHeader& from) : ::PROTOBUF_NAMESPACE_ID::Message() { RequestHeader* const _this = this; (void)_this; new (&_impl_) Impl_{ - decltype(_impl_._has_bits_){from._impl_._has_bits_} - , /*decltype(_impl_._cached_size_)*/{} - , decltype(_impl_.catalog_){} + decltype(_impl_.catalog_){} , decltype(_impl_.schema_){} , decltype(_impl_.dbname_){} , decltype(_impl_.authorization_){nullptr} , decltype(_impl_.trace_id_){} - , decltype(_impl_.span_id_){}}; + , decltype(_impl_.span_id_){} + , /*decltype(_impl_._cached_size_)*/{}}; _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); _impl_.catalog_.InitDefault(); @@ -474,14 +458,13 @@ inline void RequestHeader::SharedCtor( (void)arena; (void)is_message_owned; new (&_impl_) Impl_{ - decltype(_impl_._has_bits_){} - , /*decltype(_impl_._cached_size_)*/{} - , decltype(_impl_.catalog_){} + decltype(_impl_.catalog_){} , decltype(_impl_.schema_){} , decltype(_impl_.dbname_){} , decltype(_impl_.authorization_){nullptr} , decltype(_impl_.trace_id_){uint64_t{0u}} , decltype(_impl_.span_id_){uint64_t{0u}} + , /*decltype(_impl_._cached_size_)*/{} }; _impl_.catalog_.InitDefault(); #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING @@ -531,19 +514,14 @@ void RequestHeader::Clear() { delete _impl_.authorization_; } _impl_.authorization_ = nullptr; - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x00000003u) { - ::memset(&_impl_.trace_id_, 0, static_cast( - reinterpret_cast(&_impl_.span_id_) - - reinterpret_cast(&_impl_.trace_id_)) + sizeof(_impl_.span_id_)); - } - _impl_._has_bits_.Clear(); + ::memset(&_impl_.trace_id_, 0, static_cast( + reinterpret_cast(&_impl_.span_id_) - + reinterpret_cast(&_impl_.trace_id_)) + sizeof(_impl_.span_id_)); _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } const char* RequestHeader::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - _Internal::HasBits has_bits{}; while (!ctx->Done(&ptr)) { uint32_t tag; ptr = ::_pbi::ReadTag(ptr, &tag); @@ -586,19 +564,17 @@ const char* RequestHeader::_InternalParse(const char* ptr, ::_pbi::ParseContext* } else goto handle_unusual; continue; - // optional uint64 trace_id = 5; + // uint64 trace_id = 5; case 5: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 40)) { - _Internal::set_has_trace_id(&has_bits); _impl_.trace_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; - // optional uint64 span_id = 6; + // uint64 span_id = 6; case 6: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 48)) { - _Internal::set_has_span_id(&has_bits); _impl_.span_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else @@ -620,7 +596,6 @@ const char* RequestHeader::_InternalParse(const char* ptr, ::_pbi::ParseContext* CHK_(ptr != nullptr); } // while message_done: - _impl_._has_bits_.Or(has_bits); return ptr; failure: ptr = nullptr; @@ -671,14 +646,14 @@ uint8_t* RequestHeader::_InternalSerialize( 4, this->_internal_dbname(), target); } - // optional uint64 trace_id = 5; - if (_internal_has_trace_id()) { + // uint64 trace_id = 5; + if (this->_internal_trace_id() != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteUInt64ToArray(5, this->_internal_trace_id(), target); } - // optional uint64 span_id = 6; - if (_internal_has_span_id()) { + // uint64 span_id = 6; + if (this->_internal_span_id() != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteUInt64ToArray(6, this->_internal_span_id(), target); } @@ -727,19 +702,16 @@ size_t RequestHeader::ByteSizeLong() const { *_impl_.authorization_); } - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x00000003u) { - // optional uint64 trace_id = 5; - if (cached_has_bits & 0x00000001u) { - total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_trace_id()); - } - - // optional uint64 span_id = 6; - if (cached_has_bits & 0x00000002u) { - total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_span_id()); - } - + // uint64 trace_id = 5; + if (this->_internal_trace_id() != 0) { + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_trace_id()); } + + // uint64 span_id = 6; + if (this->_internal_span_id() != 0) { + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_span_id()); + } + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); } @@ -771,15 +743,11 @@ void RequestHeader::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const :: _this->_internal_mutable_authorization()->::greptime::v1::AuthHeader::MergeFrom( from._internal_authorization()); } - cached_has_bits = from._impl_._has_bits_[0]; - if (cached_has_bits & 0x00000003u) { - if (cached_has_bits & 0x00000001u) { - _this->_impl_.trace_id_ = from._impl_.trace_id_; - } - if (cached_has_bits & 0x00000002u) { - _this->_impl_.span_id_ = from._impl_.span_id_; - } - _this->_impl_._has_bits_[0] |= cached_has_bits; + if (from._internal_trace_id() != 0) { + _this->_internal_set_trace_id(from._internal_trace_id()); + } + if (from._internal_span_id() != 0) { + _this->_internal_set_span_id(from._internal_span_id()); } _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); } @@ -800,7 +768,6 @@ void RequestHeader::InternalSwap(RequestHeader* other) { auto* lhs_arena = GetArenaForAllocation(); auto* rhs_arena = other->GetArenaForAllocation(); _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( &_impl_.catalog_, lhs_arena, &other->_impl_.catalog_, rhs_arena diff --git a/c++/greptime/v1/common.pb.h b/c++/greptime/v1/common.pb.h index f573599..7850714 100644 --- a/c++/greptime/v1/common.pb.h +++ b/c++/greptime/v1/common.pb.h @@ -359,11 +359,7 @@ class RequestHeader final : ::greptime::v1::AuthHeader* authorization); ::greptime::v1::AuthHeader* unsafe_arena_release_authorization(); - // optional uint64 trace_id = 5; - bool has_trace_id() const; - private: - bool _internal_has_trace_id() const; - public: + // uint64 trace_id = 5; void clear_trace_id(); uint64_t trace_id() const; void set_trace_id(uint64_t value); @@ -372,11 +368,7 @@ class RequestHeader final : void _internal_set_trace_id(uint64_t value); public: - // optional uint64 span_id = 6; - bool has_span_id() const; - private: - bool _internal_has_span_id() const; - public: + // uint64 span_id = 6; void clear_span_id(); uint64_t span_id() const; void set_span_id(uint64_t value); @@ -393,14 +385,13 @@ class RequestHeader final : typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr catalog_; ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr schema_; ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr dbname_; ::greptime::v1::AuthHeader* authorization_; uint64_t trace_id_; uint64_t span_id_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; }; union { Impl_ _impl_; }; friend struct ::TableStruct_greptime_2fv1_2fcommon_2eproto; @@ -2161,17 +2152,9 @@ inline void RequestHeader::set_allocated_dbname(std::string* dbname) { // @@protoc_insertion_point(field_set_allocated:greptime.v1.RequestHeader.dbname) } -// optional uint64 trace_id = 5; -inline bool RequestHeader::_internal_has_trace_id() const { - bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; - return value; -} -inline bool RequestHeader::has_trace_id() const { - return _internal_has_trace_id(); -} +// uint64 trace_id = 5; inline void RequestHeader::clear_trace_id() { _impl_.trace_id_ = uint64_t{0u}; - _impl_._has_bits_[0] &= ~0x00000001u; } inline uint64_t RequestHeader::_internal_trace_id() const { return _impl_.trace_id_; @@ -2181,7 +2164,7 @@ inline uint64_t RequestHeader::trace_id() const { return _internal_trace_id(); } inline void RequestHeader::_internal_set_trace_id(uint64_t value) { - _impl_._has_bits_[0] |= 0x00000001u; + _impl_.trace_id_ = value; } inline void RequestHeader::set_trace_id(uint64_t value) { @@ -2189,17 +2172,9 @@ inline void RequestHeader::set_trace_id(uint64_t value) { // @@protoc_insertion_point(field_set:greptime.v1.RequestHeader.trace_id) } -// optional uint64 span_id = 6; -inline bool RequestHeader::_internal_has_span_id() const { - bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0; - return value; -} -inline bool RequestHeader::has_span_id() const { - return _internal_has_span_id(); -} +// uint64 span_id = 6; inline void RequestHeader::clear_span_id() { _impl_.span_id_ = uint64_t{0u}; - _impl_._has_bits_[0] &= ~0x00000002u; } inline uint64_t RequestHeader::_internal_span_id() const { return _impl_.span_id_; @@ -2209,7 +2184,7 @@ inline uint64_t RequestHeader::span_id() const { return _internal_span_id(); } inline void RequestHeader::_internal_set_span_id(uint64_t value) { - _impl_._has_bits_[0] |= 0x00000002u; + _impl_.span_id_ = value; } inline void RequestHeader::set_span_id(uint64_t value) { diff --git a/c++/greptime/v1/ddl.pb.cc b/c++/greptime/v1/ddl.pb.cc index 9f27f34..8ef9d32 100644 --- a/c++/greptime/v1/ddl.pb.cc +++ b/c++/greptime/v1/ddl.pb.cc @@ -109,13 +109,12 @@ struct DropTableExprDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 DropTableExprDefaultTypeInternal _DropTableExpr_default_instance_; PROTOBUF_CONSTEXPR FlushTableExpr::FlushTableExpr( ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_._has_bits_)*/{} - , /*decltype(_impl_._cached_size_)*/{} - , /*decltype(_impl_.catalog_name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + /*decltype(_impl_.catalog_name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} , /*decltype(_impl_.schema_name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} , /*decltype(_impl_.table_name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} , /*decltype(_impl_.table_id_)*/nullptr - , /*decltype(_impl_.region_number_)*/0u} {} + , /*decltype(_impl_.region_number_)*/0u + , /*decltype(_impl_._cached_size_)*/{}} {} struct FlushTableExprDefaultTypeInternal { PROTOBUF_CONSTEXPR FlushTableExprDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} @@ -127,12 +126,11 @@ struct FlushTableExprDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 FlushTableExprDefaultTypeInternal _FlushTableExpr_default_instance_; PROTOBUF_CONSTEXPR CompactTableExpr::CompactTableExpr( ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_._has_bits_)*/{} - , /*decltype(_impl_._cached_size_)*/{} - , /*decltype(_impl_.catalog_name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + /*decltype(_impl_.catalog_name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} , /*decltype(_impl_.schema_name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} , /*decltype(_impl_.table_name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.region_number_)*/0u} {} + , /*decltype(_impl_.region_number_)*/0u + , /*decltype(_impl_._cached_size_)*/{}} {} struct CompactTableExprDefaultTypeInternal { PROTOBUF_CONSTEXPR CompactTableExprDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} @@ -340,7 +338,7 @@ const uint32_t TableStruct_greptime_2fv1_2fddl_2eproto::offsets[] PROTOBUF_SECTI PROTOBUF_FIELD_OFFSET(::greptime::v1::DropTableExpr, _impl_.schema_name_), PROTOBUF_FIELD_OFFSET(::greptime::v1::DropTableExpr, _impl_.table_name_), PROTOBUF_FIELD_OFFSET(::greptime::v1::DropTableExpr, _impl_.table_id_), - PROTOBUF_FIELD_OFFSET(::greptime::v1::FlushTableExpr, _impl_._has_bits_), + ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::greptime::v1::FlushTableExpr, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ @@ -351,12 +349,7 @@ const uint32_t TableStruct_greptime_2fv1_2fddl_2eproto::offsets[] PROTOBUF_SECTI PROTOBUF_FIELD_OFFSET(::greptime::v1::FlushTableExpr, _impl_.table_name_), PROTOBUF_FIELD_OFFSET(::greptime::v1::FlushTableExpr, _impl_.region_number_), PROTOBUF_FIELD_OFFSET(::greptime::v1::FlushTableExpr, _impl_.table_id_), - ~0u, - ~0u, - ~0u, - 0, - ~0u, - PROTOBUF_FIELD_OFFSET(::greptime::v1::CompactTableExpr, _impl_._has_bits_), + ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::greptime::v1::CompactTableExpr, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ @@ -366,10 +359,6 @@ const uint32_t TableStruct_greptime_2fv1_2fddl_2eproto::offsets[] PROTOBUF_SECTI PROTOBUF_FIELD_OFFSET(::greptime::v1::CompactTableExpr, _impl_.schema_name_), PROTOBUF_FIELD_OFFSET(::greptime::v1::CompactTableExpr, _impl_.table_name_), PROTOBUF_FIELD_OFFSET(::greptime::v1::CompactTableExpr, _impl_.region_number_), - ~0u, - ~0u, - ~0u, - 0, ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::greptime::v1::CreateDatabaseExpr, _internal_metadata_), ~0u, // no _extensions_ @@ -447,17 +436,17 @@ static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protode { 24, -1, -1, sizeof(::greptime::v1::CreateTableExpr)}, { 42, -1, -1, sizeof(::greptime::v1::AlterExpr)}, { 57, -1, -1, sizeof(::greptime::v1::DropTableExpr)}, - { 67, 78, -1, sizeof(::greptime::v1::FlushTableExpr)}, - { 83, 93, -1, sizeof(::greptime::v1::CompactTableExpr)}, - { 97, -1, -1, sizeof(::greptime::v1::CreateDatabaseExpr)}, - { 105, -1, -1, sizeof(::greptime::v1::TruncateTableExpr)}, - { 115, -1, -1, sizeof(::greptime::v1::AddColumns)}, - { 122, -1, -1, sizeof(::greptime::v1::DropColumns)}, - { 129, -1, -1, sizeof(::greptime::v1::RenameTable)}, - { 136, -1, -1, sizeof(::greptime::v1::AddColumn_Location)}, - { 144, -1, -1, sizeof(::greptime::v1::AddColumn)}, - { 153, -1, -1, sizeof(::greptime::v1::DropColumn)}, - { 160, -1, -1, sizeof(::greptime::v1::TableId)}, + { 67, -1, -1, sizeof(::greptime::v1::FlushTableExpr)}, + { 78, -1, -1, sizeof(::greptime::v1::CompactTableExpr)}, + { 88, -1, -1, sizeof(::greptime::v1::CreateDatabaseExpr)}, + { 96, -1, -1, sizeof(::greptime::v1::TruncateTableExpr)}, + { 106, -1, -1, sizeof(::greptime::v1::AddColumns)}, + { 113, -1, -1, sizeof(::greptime::v1::DropColumns)}, + { 120, -1, -1, sizeof(::greptime::v1::RenameTable)}, + { 127, -1, -1, sizeof(::greptime::v1::AddColumn_Location)}, + { 135, -1, -1, sizeof(::greptime::v1::AddColumn)}, + { 144, -1, -1, sizeof(::greptime::v1::DropColumn)}, + { 151, -1, -1, sizeof(::greptime::v1::TableId)}, }; static const ::_pb::Message* const file_default_instances[] = { @@ -512,40 +501,39 @@ const char descriptor_table_protodef_greptime_2fv1_2fddl_2eproto[] PROTOBUF_SECT "(\004B\006\n\004kind\"v\n\rDropTableExpr\022\024\n\014catalog_n" "ame\030\001 \001(\t\022\023\n\013schema_name\030\002 \001(\t\022\022\n\ntable_" "name\030\003 \001(\t\022&\n\010table_id\030\004 \001(\0132\024.greptime." - "v1.TableId\"\245\001\n\016FlushTableExpr\022\024\n\014catalog" + "v1.TableId\"\216\001\n\016FlushTableExpr\022\024\n\014catalog" "_name\030\001 \001(\t\022\023\n\013schema_name\030\002 \001(\t\022\022\n\ntabl" - "e_name\030\003 \001(\t\022\032\n\rregion_number\030\004 \001(\rH\000\210\001\001" - "\022&\n\010table_id\030\005 \001(\0132\024.greptime.v1.TableId" - "B\020\n\016_region_number\"\177\n\020CompactTableExpr\022\024" - "\n\014catalog_name\030\001 \001(\t\022\023\n\013schema_name\030\002 \001(" - "\t\022\022\n\ntable_name\030\003 \001(\t\022\032\n\rregion_number\030\004" - " \001(\rH\000\210\001\001B\020\n\016_region_number\"I\n\022CreateDat" - "abaseExpr\022\025\n\rdatabase_name\030\001 \001(\t\022\034\n\024crea" - "te_if_not_exists\030\002 \001(\010\"z\n\021TruncateTableE" - "xpr\022\024\n\014catalog_name\030\001 \001(\t\022\023\n\013schema_name" - "\030\002 \001(\t\022\022\n\ntable_name\030\003 \001(\t\022&\n\010table_id\030\004" - " \001(\0132\024.greptime.v1.TableId\"9\n\nAddColumns" - "\022+\n\013add_columns\030\001 \003(\0132\026.greptime.v1.AddC" - "olumn\"<\n\013DropColumns\022-\n\014drop_columns\030\001 \003" - "(\0132\027.greptime.v1.DropColumn\"%\n\013RenameTab" - "le\022\026\n\016new_table_name\030\001 \001(\t\"\215\002\n\tAddColumn" - "\022*\n\ncolumn_def\030\001 \001(\0132\026.greptime.v1.Colum" - "nDef\022\016\n\006is_key\030\002 \001(\010\0221\n\010location\030\003 \001(\0132\037" - ".greptime.v1.AddColumn.Location\032\220\001\n\010Loca" - "tion\022C\n\rlocation_type\030\001 \001(\0162,.greptime.v" - "1.AddColumn.Location.LocationType\022\031\n\021aft" - "er_cloumn_name\030\002 \001(\t\"$\n\014LocationType\022\t\n\005" - "FIRST\020\000\022\t\n\005AFTER\020\001\"\032\n\nDropColumn\022\014\n\004name" - "\030\001 \001(\t\"\025\n\007TableId\022\n\n\002id\030\001 \001(\rBL\n\016io.grep" - "time.v1B\003DdlZ5github.com/GreptimeTeam/gr" - "eptime-proto/go/greptime/v1b\006proto3" + "e_name\030\003 \001(\t\022\025\n\rregion_number\030\004 \001(\r\022&\n\010t" + "able_id\030\005 \001(\0132\024.greptime.v1.TableId\"h\n\020C" + "ompactTableExpr\022\024\n\014catalog_name\030\001 \001(\t\022\023\n" + "\013schema_name\030\002 \001(\t\022\022\n\ntable_name\030\003 \001(\t\022\025" + "\n\rregion_number\030\004 \001(\r\"I\n\022CreateDatabaseE" + "xpr\022\025\n\rdatabase_name\030\001 \001(\t\022\034\n\024create_if_" + "not_exists\030\002 \001(\010\"z\n\021TruncateTableExpr\022\024\n" + "\014catalog_name\030\001 \001(\t\022\023\n\013schema_name\030\002 \001(\t" + "\022\022\n\ntable_name\030\003 \001(\t\022&\n\010table_id\030\004 \001(\0132\024" + ".greptime.v1.TableId\"9\n\nAddColumns\022+\n\013ad" + "d_columns\030\001 \003(\0132\026.greptime.v1.AddColumn\"" + "<\n\013DropColumns\022-\n\014drop_columns\030\001 \003(\0132\027.g" + "reptime.v1.DropColumn\"%\n\013RenameTable\022\026\n\016" + "new_table_name\030\001 \001(\t\"\215\002\n\tAddColumn\022*\n\nco" + "lumn_def\030\001 \001(\0132\026.greptime.v1.ColumnDef\022\016" + "\n\006is_key\030\002 \001(\010\0221\n\010location\030\003 \001(\0132\037.grept" + "ime.v1.AddColumn.Location\032\220\001\n\010Location\022C" + "\n\rlocation_type\030\001 \001(\0162,.greptime.v1.AddC" + "olumn.Location.LocationType\022\031\n\021after_clo" + "umn_name\030\002 \001(\t\"$\n\014LocationType\022\t\n\005FIRST\020" + "\000\022\t\n\005AFTER\020\001\"\032\n\nDropColumn\022\014\n\004name\030\001 \001(\t" + "\"\025\n\007TableId\022\n\n\002id\030\001 \001(\rBL\n\016io.greptime.v" + "1B\003DdlZ5github.com/GreptimeTeam/greptime" + "-proto/go/greptime/v1b\006proto3" ; static const ::_pbi::DescriptorTable* const descriptor_table_greptime_2fv1_2fddl_2eproto_deps[1] = { &::descriptor_table_greptime_2fv1_2fcommon_2eproto, }; static ::_pbi::once_flag descriptor_table_greptime_2fv1_2fddl_2eproto_once; const ::_pbi::DescriptorTable descriptor_table_greptime_2fv1_2fddl_2eproto = { - false, false, 2355, descriptor_table_protodef_greptime_2fv1_2fddl_2eproto, + false, false, 2309, descriptor_table_protodef_greptime_2fv1_2fddl_2eproto, "greptime/v1/ddl.proto", &descriptor_table_greptime_2fv1_2fddl_2eproto_once, descriptor_table_greptime_2fv1_2fddl_2eproto_deps, 1, 16, schemas, file_default_instances, TableStruct_greptime_2fv1_2fddl_2eproto::offsets, @@ -2840,10 +2828,6 @@ void DropTableExpr::InternalSwap(DropTableExpr* other) { class FlushTableExpr::_Internal { public: - using HasBits = decltype(std::declval()._impl_._has_bits_); - static void set_has_region_number(HasBits* has_bits) { - (*has_bits)[0] |= 1u; - } static const ::greptime::v1::TableId& table_id(const FlushTableExpr* msg); }; @@ -2861,13 +2845,12 @@ FlushTableExpr::FlushTableExpr(const FlushTableExpr& from) : ::PROTOBUF_NAMESPACE_ID::Message() { FlushTableExpr* const _this = this; (void)_this; new (&_impl_) Impl_{ - decltype(_impl_._has_bits_){from._impl_._has_bits_} - , /*decltype(_impl_._cached_size_)*/{} - , decltype(_impl_.catalog_name_){} + decltype(_impl_.catalog_name_){} , decltype(_impl_.schema_name_){} , decltype(_impl_.table_name_){} , decltype(_impl_.table_id_){nullptr} - , decltype(_impl_.region_number_){}}; + , decltype(_impl_.region_number_){} + , /*decltype(_impl_._cached_size_)*/{}}; _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); _impl_.catalog_name_.InitDefault(); @@ -2906,13 +2889,12 @@ inline void FlushTableExpr::SharedCtor( (void)arena; (void)is_message_owned; new (&_impl_) Impl_{ - decltype(_impl_._has_bits_){} - , /*decltype(_impl_._cached_size_)*/{} - , decltype(_impl_.catalog_name_){} + decltype(_impl_.catalog_name_){} , decltype(_impl_.schema_name_){} , decltype(_impl_.table_name_){} , decltype(_impl_.table_id_){nullptr} , decltype(_impl_.region_number_){0u} + , /*decltype(_impl_._cached_size_)*/{} }; _impl_.catalog_name_.InitDefault(); #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING @@ -2963,13 +2945,11 @@ void FlushTableExpr::Clear() { } _impl_.table_id_ = nullptr; _impl_.region_number_ = 0u; - _impl_._has_bits_.Clear(); _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } const char* FlushTableExpr::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - _Internal::HasBits has_bits{}; while (!ctx->Done(&ptr)) { uint32_t tag; ptr = ::_pbi::ReadTag(ptr, &tag); @@ -3004,10 +2984,9 @@ const char* FlushTableExpr::_InternalParse(const char* ptr, ::_pbi::ParseContext } else goto handle_unusual; continue; - // optional uint32 region_number = 4; + // uint32 region_number = 4; case 4: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 32)) { - _Internal::set_has_region_number(&has_bits); _impl_.region_number_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); CHK_(ptr); } else @@ -3037,7 +3016,6 @@ const char* FlushTableExpr::_InternalParse(const char* ptr, ::_pbi::ParseContext CHK_(ptr != nullptr); } // while message_done: - _impl_._has_bits_.Or(has_bits); return ptr; failure: ptr = nullptr; @@ -3081,8 +3059,8 @@ uint8_t* FlushTableExpr::_InternalSerialize( 3, this->_internal_table_name(), target); } - // optional uint32 region_number = 4; - if (_internal_has_region_number()) { + // uint32 region_number = 4; + if (this->_internal_region_number() != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteUInt32ToArray(4, this->_internal_region_number(), target); } @@ -3138,9 +3116,8 @@ size_t FlushTableExpr::ByteSizeLong() const { *_impl_.table_id_); } - // optional uint32 region_number = 4; - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x00000001u) { + // uint32 region_number = 4; + if (this->_internal_region_number() != 0) { total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_region_number()); } @@ -3175,7 +3152,7 @@ void FlushTableExpr::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const : _this->_internal_mutable_table_id()->::greptime::v1::TableId::MergeFrom( from._internal_table_id()); } - if (from._internal_has_region_number()) { + if (from._internal_region_number() != 0) { _this->_internal_set_region_number(from._internal_region_number()); } _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); @@ -3197,7 +3174,6 @@ void FlushTableExpr::InternalSwap(FlushTableExpr* other) { auto* lhs_arena = GetArenaForAllocation(); auto* rhs_arena = other->GetArenaForAllocation(); _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( &_impl_.catalog_name_, lhs_arena, &other->_impl_.catalog_name_, rhs_arena @@ -3228,10 +3204,6 @@ void FlushTableExpr::InternalSwap(FlushTableExpr* other) { class CompactTableExpr::_Internal { public: - using HasBits = decltype(std::declval()._impl_._has_bits_); - static void set_has_region_number(HasBits* has_bits) { - (*has_bits)[0] |= 1u; - } }; CompactTableExpr::CompactTableExpr(::PROTOBUF_NAMESPACE_ID::Arena* arena, @@ -3244,12 +3216,11 @@ CompactTableExpr::CompactTableExpr(const CompactTableExpr& from) : ::PROTOBUF_NAMESPACE_ID::Message() { CompactTableExpr* const _this = this; (void)_this; new (&_impl_) Impl_{ - decltype(_impl_._has_bits_){from._impl_._has_bits_} - , /*decltype(_impl_._cached_size_)*/{} - , decltype(_impl_.catalog_name_){} + decltype(_impl_.catalog_name_){} , decltype(_impl_.schema_name_){} , decltype(_impl_.table_name_){} - , decltype(_impl_.region_number_){}}; + , decltype(_impl_.region_number_){} + , /*decltype(_impl_._cached_size_)*/{}}; _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); _impl_.catalog_name_.InitDefault(); @@ -3285,12 +3256,11 @@ inline void CompactTableExpr::SharedCtor( (void)arena; (void)is_message_owned; new (&_impl_) Impl_{ - decltype(_impl_._has_bits_){} - , /*decltype(_impl_._cached_size_)*/{} - , decltype(_impl_.catalog_name_){} + decltype(_impl_.catalog_name_){} , decltype(_impl_.schema_name_){} , decltype(_impl_.table_name_){} , decltype(_impl_.region_number_){0u} + , /*decltype(_impl_._cached_size_)*/{} }; _impl_.catalog_name_.InitDefault(); #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING @@ -3336,13 +3306,11 @@ void CompactTableExpr::Clear() { _impl_.schema_name_.ClearToEmpty(); _impl_.table_name_.ClearToEmpty(); _impl_.region_number_ = 0u; - _impl_._has_bits_.Clear(); _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } const char* CompactTableExpr::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - _Internal::HasBits has_bits{}; while (!ctx->Done(&ptr)) { uint32_t tag; ptr = ::_pbi::ReadTag(ptr, &tag); @@ -3377,10 +3345,9 @@ const char* CompactTableExpr::_InternalParse(const char* ptr, ::_pbi::ParseConte } else goto handle_unusual; continue; - // optional uint32 region_number = 4; + // uint32 region_number = 4; case 4: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 32)) { - _Internal::set_has_region_number(&has_bits); _impl_.region_number_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); CHK_(ptr); } else @@ -3402,7 +3369,6 @@ const char* CompactTableExpr::_InternalParse(const char* ptr, ::_pbi::ParseConte CHK_(ptr != nullptr); } // while message_done: - _impl_._has_bits_.Or(has_bits); return ptr; failure: ptr = nullptr; @@ -3446,8 +3412,8 @@ uint8_t* CompactTableExpr::_InternalSerialize( 3, this->_internal_table_name(), target); } - // optional uint32 region_number = 4; - if (_internal_has_region_number()) { + // uint32 region_number = 4; + if (this->_internal_region_number() != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteUInt32ToArray(4, this->_internal_region_number(), target); } @@ -3489,9 +3455,8 @@ size_t CompactTableExpr::ByteSizeLong() const { this->_internal_table_name()); } - // optional uint32 region_number = 4; - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x00000001u) { + // uint32 region_number = 4; + if (this->_internal_region_number() != 0) { total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_region_number()); } @@ -3522,7 +3487,7 @@ void CompactTableExpr::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const if (!from._internal_table_name().empty()) { _this->_internal_set_table_name(from._internal_table_name()); } - if (from._internal_has_region_number()) { + if (from._internal_region_number() != 0) { _this->_internal_set_region_number(from._internal_region_number()); } _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); @@ -3544,7 +3509,6 @@ void CompactTableExpr::InternalSwap(CompactTableExpr* other) { auto* lhs_arena = GetArenaForAllocation(); auto* rhs_arena = other->GetArenaForAllocation(); _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( &_impl_.catalog_name_, lhs_arena, &other->_impl_.catalog_name_, rhs_arena diff --git a/c++/greptime/v1/ddl.pb.h b/c++/greptime/v1/ddl.pb.h index 1a4179a..a225748 100644 --- a/c++/greptime/v1/ddl.pb.h +++ b/c++/greptime/v1/ddl.pb.h @@ -1533,11 +1533,7 @@ class FlushTableExpr final : ::greptime::v1::TableId* table_id); ::greptime::v1::TableId* unsafe_arena_release_table_id(); - // optional uint32 region_number = 4; - bool has_region_number() const; - private: - bool _internal_has_region_number() const; - public: + // uint32 region_number = 4; void clear_region_number(); uint32_t region_number() const; void set_region_number(uint32_t value); @@ -1554,13 +1550,12 @@ class FlushTableExpr final : typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr catalog_name_; ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr schema_name_; ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr table_name_; ::greptime::v1::TableId* table_id_; uint32_t region_number_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; }; union { Impl_ _impl_; }; friend struct ::TableStruct_greptime_2fv1_2fddl_2eproto; @@ -1735,11 +1730,7 @@ class CompactTableExpr final : std::string* _internal_mutable_table_name(); public: - // optional uint32 region_number = 4; - bool has_region_number() const; - private: - bool _internal_has_region_number() const; - public: + // uint32 region_number = 4; void clear_region_number(); uint32_t region_number() const; void set_region_number(uint32_t value); @@ -1756,12 +1747,11 @@ class CompactTableExpr final : typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr catalog_name_; ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr schema_name_; ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr table_name_; uint32_t region_number_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; }; union { Impl_ _impl_; }; friend struct ::TableStruct_greptime_2fv1_2fddl_2eproto; @@ -5322,17 +5312,9 @@ inline void FlushTableExpr::set_allocated_table_name(std::string* table_name) { // @@protoc_insertion_point(field_set_allocated:greptime.v1.FlushTableExpr.table_name) } -// optional uint32 region_number = 4; -inline bool FlushTableExpr::_internal_has_region_number() const { - bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; - return value; -} -inline bool FlushTableExpr::has_region_number() const { - return _internal_has_region_number(); -} +// uint32 region_number = 4; inline void FlushTableExpr::clear_region_number() { _impl_.region_number_ = 0u; - _impl_._has_bits_[0] &= ~0x00000001u; } inline uint32_t FlushTableExpr::_internal_region_number() const { return _impl_.region_number_; @@ -5342,7 +5324,7 @@ inline uint32_t FlushTableExpr::region_number() const { return _internal_region_number(); } inline void FlushTableExpr::_internal_set_region_number(uint32_t value) { - _impl_._has_bits_[0] |= 0x00000001u; + _impl_.region_number_ = value; } inline void FlushTableExpr::set_region_number(uint32_t value) { @@ -5594,17 +5576,9 @@ inline void CompactTableExpr::set_allocated_table_name(std::string* table_name) // @@protoc_insertion_point(field_set_allocated:greptime.v1.CompactTableExpr.table_name) } -// optional uint32 region_number = 4; -inline bool CompactTableExpr::_internal_has_region_number() const { - bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; - return value; -} -inline bool CompactTableExpr::has_region_number() const { - return _internal_has_region_number(); -} +// uint32 region_number = 4; inline void CompactTableExpr::clear_region_number() { _impl_.region_number_ = 0u; - _impl_._has_bits_[0] &= ~0x00000001u; } inline uint32_t CompactTableExpr::_internal_region_number() const { return _impl_.region_number_; @@ -5614,7 +5588,7 @@ inline uint32_t CompactTableExpr::region_number() const { return _internal_region_number(); } inline void CompactTableExpr::_internal_set_region_number(uint32_t value) { - _impl_._has_bits_[0] |= 0x00000001u; + _impl_.region_number_ = value; } inline void CompactTableExpr::set_region_number(uint32_t value) { diff --git a/c++/greptime/v1/region/server.pb.cc b/c++/greptime/v1/region/server.pb.cc index ecd2e4a..1a94be2 100644 --- a/c++/greptime/v1/region/server.pb.cc +++ b/c++/greptime/v1/region/server.pb.cc @@ -25,10 +25,9 @@ namespace v1 { namespace region { PROTOBUF_CONSTEXPR RegionRequestHeader::RegionRequestHeader( ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_._has_bits_)*/{} - , /*decltype(_impl_._cached_size_)*/{} - , /*decltype(_impl_.trace_id_)*/uint64_t{0u} - , /*decltype(_impl_.span_id_)*/uint64_t{0u}} {} + /*decltype(_impl_.trace_id_)*/uint64_t{0u} + , /*decltype(_impl_.span_id_)*/uint64_t{0u} + , /*decltype(_impl_._cached_size_)*/{}} {} struct RegionRequestHeaderDefaultTypeInternal { PROTOBUF_CONSTEXPR RegionRequestHeaderDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} @@ -284,7 +283,7 @@ static constexpr ::_pb::EnumDescriptor const** file_level_enum_descriptors_grept static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_greptime_2fv1_2fregion_2fserver_2eproto = nullptr; const uint32_t TableStruct_greptime_2fv1_2fregion_2fserver_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { - PROTOBUF_FIELD_OFFSET(::greptime::v1::region::RegionRequestHeader, _impl_._has_bits_), + ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::greptime::v1::region::RegionRequestHeader, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ @@ -292,8 +291,6 @@ const uint32_t TableStruct_greptime_2fv1_2fregion_2fserver_2eproto::offsets[] PR ~0u, // no _inlined_string_donated_ PROTOBUF_FIELD_OFFSET(::greptime::v1::region::RegionRequestHeader, _impl_.trace_id_), PROTOBUF_FIELD_OFFSET(::greptime::v1::region::RegionRequestHeader, _impl_.span_id_), - 0, - 1, ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::greptime::v1::region::RegionRequest, _internal_metadata_), ~0u, // no _extensions_ @@ -449,24 +446,24 @@ const uint32_t TableStruct_greptime_2fv1_2fregion_2fserver_2eproto::offsets[] PR PROTOBUF_FIELD_OFFSET(::greptime::v1::region::ColumnDef, _impl_.semantic_type_), }; static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { - { 0, 8, -1, sizeof(::greptime::v1::region::RegionRequestHeader)}, - { 10, -1, -1, sizeof(::greptime::v1::region::RegionRequest)}, - { 27, -1, -1, sizeof(::greptime::v1::region::RegionResponse)}, - { 35, -1, -1, sizeof(::greptime::v1::region::InsertRequests)}, - { 42, -1, -1, sizeof(::greptime::v1::region::DeleteRequests)}, - { 49, -1, -1, sizeof(::greptime::v1::region::InsertRequest)}, - { 57, -1, -1, sizeof(::greptime::v1::region::DeleteRequest)}, - { 65, -1, -1, sizeof(::greptime::v1::region::QueryRequest)}, - { 73, 81, -1, sizeof(::greptime::v1::region::CreateRequest_OptionsEntry_DoNotUse)}, - { 83, -1, -1, sizeof(::greptime::v1::region::CreateRequest)}, - { 96, -1, -1, sizeof(::greptime::v1::region::DropRequest)}, - { 103, 111, -1, sizeof(::greptime::v1::region::OpenRequest_OptionsEntry_DoNotUse)}, - { 113, -1, -1, sizeof(::greptime::v1::region::OpenRequest)}, - { 123, -1, -1, sizeof(::greptime::v1::region::CloseRequest)}, - { 130, -1, -1, sizeof(::greptime::v1::region::AlterRequest)}, - { 137, -1, -1, sizeof(::greptime::v1::region::FlushRequest)}, - { 144, -1, -1, sizeof(::greptime::v1::region::CompactRequest)}, - { 151, -1, -1, sizeof(::greptime::v1::region::ColumnDef)}, + { 0, -1, -1, sizeof(::greptime::v1::region::RegionRequestHeader)}, + { 8, -1, -1, sizeof(::greptime::v1::region::RegionRequest)}, + { 25, -1, -1, sizeof(::greptime::v1::region::RegionResponse)}, + { 33, -1, -1, sizeof(::greptime::v1::region::InsertRequests)}, + { 40, -1, -1, sizeof(::greptime::v1::region::DeleteRequests)}, + { 47, -1, -1, sizeof(::greptime::v1::region::InsertRequest)}, + { 55, -1, -1, sizeof(::greptime::v1::region::DeleteRequest)}, + { 63, -1, -1, sizeof(::greptime::v1::region::QueryRequest)}, + { 71, 79, -1, sizeof(::greptime::v1::region::CreateRequest_OptionsEntry_DoNotUse)}, + { 81, -1, -1, sizeof(::greptime::v1::region::CreateRequest)}, + { 94, -1, -1, sizeof(::greptime::v1::region::DropRequest)}, + { 101, 109, -1, sizeof(::greptime::v1::region::OpenRequest_OptionsEntry_DoNotUse)}, + { 111, -1, -1, sizeof(::greptime::v1::region::OpenRequest)}, + { 121, -1, -1, sizeof(::greptime::v1::region::CloseRequest)}, + { 128, -1, -1, sizeof(::greptime::v1::region::AlterRequest)}, + { 135, -1, -1, sizeof(::greptime::v1::region::FlushRequest)}, + { 142, -1, -1, sizeof(::greptime::v1::region::CompactRequest)}, + { 149, -1, -1, sizeof(::greptime::v1::region::ColumnDef)}, }; static const ::_pb::Message* const file_default_instances[] = { @@ -493,59 +490,59 @@ static const ::_pb::Message* const file_default_instances[] = { const char descriptor_table_protodef_greptime_2fv1_2fregion_2fserver_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = "\n\037greptime/v1/region/server.proto\022\022grept" "ime.v1.region\032\030greptime/v1/common.proto\032" - "\025greptime/v1/row.proto\"[\n\023RegionRequestH" - "eader\022\025\n\010trace_id\030\001 \001(\004H\000\210\001\001\022\024\n\007span_id\030" - "\002 \001(\004H\001\210\001\001B\013\n\t_trace_idB\n\n\010_span_id\"\245\004\n\r" - "RegionRequest\0227\n\006header\030\001 \001(\0132\'.greptime" - ".v1.region.RegionRequestHeader\0225\n\007insert" - "s\030\003 \001(\0132\".greptime.v1.region.InsertReque" - "stsH\000\0225\n\007deletes\030\004 \001(\0132\".greptime.v1.reg" - "ion.DeleteRequestsH\000\0223\n\006create\030\005 \001(\0132!.g" - "reptime.v1.region.CreateRequestH\000\022/\n\004dro" - "p\030\006 \001(\0132\037.greptime.v1.region.DropRequest" - "H\000\022/\n\004open\030\007 \001(\0132\037.greptime.v1.region.Op" - "enRequestH\000\0221\n\005close\030\010 \001(\0132 .greptime.v1" - ".region.CloseRequestH\000\0221\n\005alter\030\t \001(\0132 ." - "greptime.v1.region.AlterRequestH\000\0221\n\005flu" - "sh\030\n \001(\0132 .greptime.v1.region.FlushReque" - "stH\000\0225\n\007compact\030\013 \001(\0132\".greptime.v1.regi" - "on.CompactRequestH\000B\006\n\004body\"T\n\016RegionRes" - "ponse\022+\n\006header\030\001 \001(\0132\033.greptime.v1.Resp" - "onseHeader\022\025\n\raffected_rows\030\002 \001(\004\"E\n\016Ins" - "ertRequests\0223\n\010requests\030\001 \003(\0132!.greptime" - ".v1.region.InsertRequest\"E\n\016DeleteReques" - "ts\0223\n\010requests\030\001 \003(\0132!.greptime.v1.regio" - "n.DeleteRequest\"C\n\rInsertRequest\022\021\n\tregi" - "on_id\030\001 \001(\004\022\037\n\004rows\030\002 \001(\0132\021.greptime.v1." - "Rows\"C\n\rDeleteRequest\022\021\n\tregion_id\030\001 \001(\004" - "\022\037\n\004rows\030\002 \001(\0132\021.greptime.v1.Rows\"/\n\014Que" - "ryRequest\022\021\n\tregion_id\030\001 \001(\004\022\014\n\004plan\030\002 \001" - "(\014\"\236\002\n\rCreateRequest\022\021\n\tregion_id\030\001 \001(\004\022" - "\016\n\006engine\030\002 \001(\t\0222\n\013column_defs\030\003 \003(\0132\035.g" - "reptime.v1.region.ColumnDef\022\023\n\013primary_k" - "ey\030\004 \003(\r\022\034\n\024create_if_not_exists\030\005 \001(\010\022\022" - "\n\nregion_dir\030\006 \001(\t\022\?\n\007options\030\007 \003(\0132..gr" - "eptime.v1.region.CreateRequest.OptionsEn" - "try\032.\n\014OptionsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005valu" - "e\030\002 \001(\t:\0028\001\" \n\013DropRequest\022\021\n\tregion_id\030" - "\001 \001(\004\"\263\001\n\013OpenRequest\022\021\n\tregion_id\030\001 \001(\004" - "\022\016\n\006engine\030\002 \001(\t\022\022\n\nregion_dir\030\003 \001(\t\022=\n\007" - "options\030\004 \003(\0132,.greptime.v1.region.OpenR" - "equest.OptionsEntry\032.\n\014OptionsEntry\022\013\n\003k" - "ey\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"!\n\014CloseRequ" - "est\022\021\n\tregion_id\030\001 \001(\004\"!\n\014AlterRequest\022\021" - "\n\tregion_id\030\001 \001(\004\"!\n\014FlushRequest\022\021\n\treg" - "ion_id\030\001 \001(\004\"#\n\016CompactRequest\022\021\n\tregion" - "_id\030\001 \001(\004\"\276\001\n\tColumnDef\022\014\n\004name\030\001 \001(\t\022\021\n" - "\tcolumn_id\030\002 \001(\r\022-\n\010datatype\030\003 \001(\0162\033.gre" - "ptime.v1.ColumnDataType\022\023\n\013is_nullable\030\004" - " \001(\010\022\032\n\022default_constraint\030\005 \001(\014\0220\n\rsema" - "ntic_type\030\006 \001(\0162\031.greptime.v1.SemanticTy" - "pe2Y\n\006Region\022O\n\006Handle\022!.greptime.v1.reg" - "ion.RegionRequest\032\".greptime.v1.region.R" - "egionResponseB]\n\025io.greptime.v1.regionB\006" - "ServerZ()._impl_._has_bits_); - static void set_has_trace_id(HasBits* has_bits) { - (*has_bits)[0] |= 1u; - } - static void set_has_span_id(HasBits* has_bits) { - (*has_bits)[0] |= 2u; - } }; RegionRequestHeader::RegionRequestHeader(::PROTOBUF_NAMESPACE_ID::Arena* arena, @@ -593,10 +583,9 @@ RegionRequestHeader::RegionRequestHeader(const RegionRequestHeader& from) : ::PROTOBUF_NAMESPACE_ID::Message() { RegionRequestHeader* const _this = this; (void)_this; new (&_impl_) Impl_{ - decltype(_impl_._has_bits_){from._impl_._has_bits_} - , /*decltype(_impl_._cached_size_)*/{} - , decltype(_impl_.trace_id_){} - , decltype(_impl_.span_id_){}}; + decltype(_impl_.trace_id_){} + , decltype(_impl_.span_id_){} + , /*decltype(_impl_._cached_size_)*/{}}; _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::memcpy(&_impl_.trace_id_, &from._impl_.trace_id_, @@ -610,10 +599,9 @@ inline void RegionRequestHeader::SharedCtor( (void)arena; (void)is_message_owned; new (&_impl_) Impl_{ - decltype(_impl_._has_bits_){} - , /*decltype(_impl_._cached_size_)*/{} - , decltype(_impl_.trace_id_){uint64_t{0u}} + decltype(_impl_.trace_id_){uint64_t{0u}} , decltype(_impl_.span_id_){uint64_t{0u}} + , /*decltype(_impl_._cached_size_)*/{} }; } @@ -640,36 +628,29 @@ void RegionRequestHeader::Clear() { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x00000003u) { - ::memset(&_impl_.trace_id_, 0, static_cast( - reinterpret_cast(&_impl_.span_id_) - - reinterpret_cast(&_impl_.trace_id_)) + sizeof(_impl_.span_id_)); - } - _impl_._has_bits_.Clear(); + ::memset(&_impl_.trace_id_, 0, static_cast( + reinterpret_cast(&_impl_.span_id_) - + reinterpret_cast(&_impl_.trace_id_)) + sizeof(_impl_.span_id_)); _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } const char* RegionRequestHeader::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - _Internal::HasBits has_bits{}; while (!ctx->Done(&ptr)) { uint32_t tag; ptr = ::_pbi::ReadTag(ptr, &tag); switch (tag >> 3) { - // optional uint64 trace_id = 1; + // uint64 trace_id = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { - _Internal::set_has_trace_id(&has_bits); _impl_.trace_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; - // optional uint64 span_id = 2; + // uint64 span_id = 2; case 2: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { - _Internal::set_has_span_id(&has_bits); _impl_.span_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else @@ -691,7 +672,6 @@ const char* RegionRequestHeader::_InternalParse(const char* ptr, ::_pbi::ParseCo CHK_(ptr != nullptr); } // while message_done: - _impl_._has_bits_.Or(has_bits); return ptr; failure: ptr = nullptr; @@ -705,14 +685,14 @@ uint8_t* RegionRequestHeader::_InternalSerialize( uint32_t cached_has_bits = 0; (void) cached_has_bits; - // optional uint64 trace_id = 1; - if (_internal_has_trace_id()) { + // uint64 trace_id = 1; + if (this->_internal_trace_id() != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteUInt64ToArray(1, this->_internal_trace_id(), target); } - // optional uint64 span_id = 2; - if (_internal_has_span_id()) { + // uint64 span_id = 2; + if (this->_internal_span_id() != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteUInt64ToArray(2, this->_internal_span_id(), target); } @@ -733,19 +713,16 @@ size_t RegionRequestHeader::ByteSizeLong() const { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x00000003u) { - // optional uint64 trace_id = 1; - if (cached_has_bits & 0x00000001u) { - total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_trace_id()); - } - - // optional uint64 span_id = 2; - if (cached_has_bits & 0x00000002u) { - total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_span_id()); - } - + // uint64 trace_id = 1; + if (this->_internal_trace_id() != 0) { + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_trace_id()); } + + // uint64 span_id = 2; + if (this->_internal_span_id() != 0) { + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_span_id()); + } + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); } @@ -764,15 +741,11 @@ void RegionRequestHeader::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, co uint32_t cached_has_bits = 0; (void) cached_has_bits; - cached_has_bits = from._impl_._has_bits_[0]; - if (cached_has_bits & 0x00000003u) { - if (cached_has_bits & 0x00000001u) { - _this->_impl_.trace_id_ = from._impl_.trace_id_; - } - if (cached_has_bits & 0x00000002u) { - _this->_impl_.span_id_ = from._impl_.span_id_; - } - _this->_impl_._has_bits_[0] |= cached_has_bits; + if (from._internal_trace_id() != 0) { + _this->_internal_set_trace_id(from._internal_trace_id()); + } + if (from._internal_span_id() != 0) { + _this->_internal_set_span_id(from._internal_span_id()); } _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); } @@ -791,7 +764,6 @@ bool RegionRequestHeader::IsInitialized() const { void RegionRequestHeader::InternalSwap(RegionRequestHeader* other) { using std::swap; _internal_metadata_.InternalSwap(&other->_internal_metadata_); - swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); ::PROTOBUF_NAMESPACE_ID::internal::memswap< PROTOBUF_FIELD_OFFSET(RegionRequestHeader, _impl_.span_id_) + sizeof(RegionRequestHeader::_impl_.span_id_) diff --git a/c++/greptime/v1/region/server.pb.h b/c++/greptime/v1/region/server.pb.h index 2e5ed80..250fab5 100644 --- a/c++/greptime/v1/region/server.pb.h +++ b/c++/greptime/v1/region/server.pb.h @@ -259,11 +259,7 @@ class RegionRequestHeader final : kTraceIdFieldNumber = 1, kSpanIdFieldNumber = 2, }; - // optional uint64 trace_id = 1; - bool has_trace_id() const; - private: - bool _internal_has_trace_id() const; - public: + // uint64 trace_id = 1; void clear_trace_id(); uint64_t trace_id() const; void set_trace_id(uint64_t value); @@ -272,11 +268,7 @@ class RegionRequestHeader final : void _internal_set_trace_id(uint64_t value); public: - // optional uint64 span_id = 2; - bool has_span_id() const; - private: - bool _internal_has_span_id() const; - public: + // uint64 span_id = 2; void clear_span_id(); uint64_t span_id() const; void set_span_id(uint64_t value); @@ -293,10 +285,9 @@ class RegionRequestHeader final : typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; uint64_t trace_id_; uint64_t span_id_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; }; union { Impl_ _impl_; }; friend struct ::TableStruct_greptime_2fv1_2fregion_2fserver_2eproto; @@ -3141,17 +3132,9 @@ class ColumnDef final : #endif // __GNUC__ // RegionRequestHeader -// optional uint64 trace_id = 1; -inline bool RegionRequestHeader::_internal_has_trace_id() const { - bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; - return value; -} -inline bool RegionRequestHeader::has_trace_id() const { - return _internal_has_trace_id(); -} +// uint64 trace_id = 1; inline void RegionRequestHeader::clear_trace_id() { _impl_.trace_id_ = uint64_t{0u}; - _impl_._has_bits_[0] &= ~0x00000001u; } inline uint64_t RegionRequestHeader::_internal_trace_id() const { return _impl_.trace_id_; @@ -3161,7 +3144,7 @@ inline uint64_t RegionRequestHeader::trace_id() const { return _internal_trace_id(); } inline void RegionRequestHeader::_internal_set_trace_id(uint64_t value) { - _impl_._has_bits_[0] |= 0x00000001u; + _impl_.trace_id_ = value; } inline void RegionRequestHeader::set_trace_id(uint64_t value) { @@ -3169,17 +3152,9 @@ inline void RegionRequestHeader::set_trace_id(uint64_t value) { // @@protoc_insertion_point(field_set:greptime.v1.region.RegionRequestHeader.trace_id) } -// optional uint64 span_id = 2; -inline bool RegionRequestHeader::_internal_has_span_id() const { - bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0; - return value; -} -inline bool RegionRequestHeader::has_span_id() const { - return _internal_has_span_id(); -} +// uint64 span_id = 2; inline void RegionRequestHeader::clear_span_id() { _impl_.span_id_ = uint64_t{0u}; - _impl_._has_bits_[0] &= ~0x00000002u; } inline uint64_t RegionRequestHeader::_internal_span_id() const { return _impl_.span_id_; @@ -3189,7 +3164,7 @@ inline uint64_t RegionRequestHeader::span_id() const { return _internal_span_id(); } inline void RegionRequestHeader::_internal_set_span_id(uint64_t value) { - _impl_._has_bits_[0] |= 0x00000002u; + _impl_.span_id_ = value; } inline void RegionRequestHeader::set_span_id(uint64_t value) { diff --git a/go/greptime/v1/common.pb.go b/go/greptime/v1/common.pb.go index bb047c2..c1266fa 100644 --- a/go/greptime/v1/common.pb.go +++ b/go/greptime/v1/common.pb.go @@ -215,9 +215,9 @@ type RequestHeader struct { // The `dbname` for the request Dbname string `protobuf:"bytes,4,opt,name=dbname,proto3" json:"dbname,omitempty"` // TraceID of request - TraceId *uint64 `protobuf:"varint,5,opt,name=trace_id,json=traceId,proto3,oneof" json:"trace_id,omitempty"` + TraceId uint64 `protobuf:"varint,5,opt,name=trace_id,json=traceId,proto3" json:"trace_id,omitempty"` // SpanID of request - SpanId *uint64 `protobuf:"varint,6,opt,name=span_id,json=spanId,proto3,oneof" json:"span_id,omitempty"` + SpanId uint64 `protobuf:"varint,6,opt,name=span_id,json=spanId,proto3" json:"span_id,omitempty"` } func (x *RequestHeader) Reset() { @@ -281,15 +281,15 @@ func (x *RequestHeader) GetDbname() string { } func (x *RequestHeader) GetTraceId() uint64 { - if x != nil && x.TraceId != nil { - return *x.TraceId + if x != nil { + return x.TraceId } return 0 } func (x *RequestHeader) GetSpanId() uint64 { - if x != nil && x.SpanId != nil { - return *x.SpanId + if x != nil { + return x.SpanId } return 0 } @@ -814,7 +814,7 @@ var File_greptime_v1_common_proto protoreflect.FileDescriptor var file_greptime_v1_common_proto_rawDesc = []byte{ 0x0a, 0x18, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x67, 0x72, 0x65, 0x70, - 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x22, 0xef, 0x01, 0x0a, 0x0d, 0x52, 0x65, 0x71, 0x75, + 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x22, 0xcc, 0x01, 0x0a, 0x0d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x02, 0x20, @@ -824,95 +824,93 @@ var file_greptime_v1_common_proto_rawDesc = []byte{ 0x2e, 0x41, 0x75, 0x74, 0x68, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x0d, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x62, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x62, 0x6e, 0x61, - 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x08, 0x74, 0x72, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x04, 0x48, 0x00, 0x52, 0x07, 0x74, 0x72, 0x61, 0x63, 0x65, 0x49, 0x64, 0x88, - 0x01, 0x01, 0x12, 0x1c, 0x0a, 0x07, 0x73, 0x70, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x04, 0x48, 0x01, 0x52, 0x06, 0x73, 0x70, 0x61, 0x6e, 0x49, 0x64, 0x88, 0x01, 0x01, - 0x42, 0x0b, 0x0a, 0x09, 0x5f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x42, 0x0a, 0x0a, - 0x08, 0x5f, 0x73, 0x70, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x22, 0x3d, 0x0a, 0x0e, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x2b, 0x0a, 0x06, 0x73, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x67, 0x72, - 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x42, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x5f, 0x63, 0x6f, 0x64, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x43, - 0x6f, 0x64, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x65, 0x72, 0x72, 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x65, 0x72, 0x72, 0x4d, 0x73, 0x67, 0x22, 0x73, 0x0a, 0x0a, - 0x41, 0x75, 0x74, 0x68, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x2a, 0x0a, 0x05, 0x62, 0x61, - 0x73, 0x69, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x72, 0x65, 0x70, - 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x73, 0x69, 0x63, 0x48, 0x00, 0x52, - 0x05, 0x62, 0x61, 0x73, 0x69, 0x63, 0x12, 0x2a, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, - 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x48, 0x00, 0x52, 0x05, 0x74, 0x6f, 0x6b, - 0x65, 0x6e, 0x42, 0x0d, 0x0a, 0x0b, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, - 0x65, 0x22, 0x3f, 0x0a, 0x05, 0x42, 0x61, 0x73, 0x69, 0x63, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, - 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, - 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, - 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, - 0x72, 0x64, 0x22, 0x1d, 0x0a, 0x05, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x74, - 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, - 0x6e, 0x22, 0x24, 0x0a, 0x0c, 0x41, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x52, 0x6f, 0x77, - 0x73, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x50, 0x0a, 0x0e, 0x46, 0x6c, 0x69, 0x67, 0x68, - 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x3e, 0x0a, 0x0d, 0x61, 0x66, 0x66, - 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x72, 0x6f, 0x77, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x19, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, - 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x52, 0x6f, 0x77, 0x73, 0x52, 0x0c, 0x61, 0x66, 0x66, - 0x65, 0x63, 0x74, 0x65, 0x64, 0x52, 0x6f, 0x77, 0x73, 0x22, 0xa8, 0x01, 0x0a, 0x09, 0x43, 0x6f, - 0x6c, 0x75, 0x6d, 0x6e, 0x44, 0x65, 0x66, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x37, 0x0a, 0x08, 0x64, - 0x61, 0x74, 0x61, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, - 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6c, 0x75, - 0x6d, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x64, 0x61, 0x74, 0x61, - 0x74, 0x79, 0x70, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x73, 0x5f, 0x6e, 0x75, 0x6c, 0x6c, 0x61, - 0x62, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x73, 0x4e, 0x75, 0x6c, - 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x2d, 0x0a, 0x12, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, - 0x5f, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x0c, 0x52, 0x11, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, - 0x61, 0x69, 0x6e, 0x74, 0x22, 0x64, 0x0a, 0x14, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, - 0x4d, 0x6f, 0x6e, 0x74, 0x68, 0x44, 0x61, 0x79, 0x4e, 0x61, 0x6e, 0x6f, 0x12, 0x16, 0x0a, 0x06, - 0x6d, 0x6f, 0x6e, 0x74, 0x68, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6d, 0x6f, - 0x6e, 0x74, 0x68, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x79, 0x73, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x04, 0x64, 0x61, 0x79, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x6e, 0x61, 0x6e, 0x6f, - 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x6e, - 0x61, 0x6e, 0x6f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x2a, 0x31, 0x0a, 0x0c, 0x53, 0x65, - 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x54, 0x79, 0x70, 0x65, 0x12, 0x07, 0x0a, 0x03, 0x54, 0x41, - 0x47, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x10, 0x01, 0x12, 0x0d, - 0x0a, 0x09, 0x54, 0x49, 0x4d, 0x45, 0x53, 0x54, 0x41, 0x4d, 0x50, 0x10, 0x02, 0x2a, 0xc6, 0x03, - 0x0a, 0x0e, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, - 0x12, 0x0b, 0x0a, 0x07, 0x42, 0x4f, 0x4f, 0x4c, 0x45, 0x41, 0x4e, 0x10, 0x00, 0x12, 0x08, 0x0a, - 0x04, 0x49, 0x4e, 0x54, 0x38, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x49, 0x4e, 0x54, 0x31, 0x36, - 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x49, 0x4e, 0x54, 0x33, 0x32, 0x10, 0x03, 0x12, 0x09, 0x0a, - 0x05, 0x49, 0x4e, 0x54, 0x36, 0x34, 0x10, 0x04, 0x12, 0x09, 0x0a, 0x05, 0x55, 0x49, 0x4e, 0x54, - 0x38, 0x10, 0x05, 0x12, 0x0a, 0x0a, 0x06, 0x55, 0x49, 0x4e, 0x54, 0x31, 0x36, 0x10, 0x06, 0x12, - 0x0a, 0x0a, 0x06, 0x55, 0x49, 0x4e, 0x54, 0x33, 0x32, 0x10, 0x07, 0x12, 0x0a, 0x0a, 0x06, 0x55, - 0x49, 0x4e, 0x54, 0x36, 0x34, 0x10, 0x08, 0x12, 0x0b, 0x0a, 0x07, 0x46, 0x4c, 0x4f, 0x41, 0x54, - 0x33, 0x32, 0x10, 0x09, 0x12, 0x0b, 0x0a, 0x07, 0x46, 0x4c, 0x4f, 0x41, 0x54, 0x36, 0x34, 0x10, - 0x0a, 0x12, 0x0a, 0x0a, 0x06, 0x42, 0x49, 0x4e, 0x41, 0x52, 0x59, 0x10, 0x0b, 0x12, 0x0a, 0x0a, - 0x06, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x0c, 0x12, 0x08, 0x0a, 0x04, 0x44, 0x41, 0x54, - 0x45, 0x10, 0x0d, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x41, 0x54, 0x45, 0x54, 0x49, 0x4d, 0x45, 0x10, - 0x0e, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x49, 0x4d, 0x45, 0x53, 0x54, 0x41, 0x4d, 0x50, 0x5f, 0x53, - 0x45, 0x43, 0x4f, 0x4e, 0x44, 0x10, 0x0f, 0x12, 0x19, 0x0a, 0x15, 0x54, 0x49, 0x4d, 0x45, 0x53, - 0x54, 0x41, 0x4d, 0x50, 0x5f, 0x4d, 0x49, 0x4c, 0x4c, 0x49, 0x53, 0x45, 0x43, 0x4f, 0x4e, 0x44, - 0x10, 0x10, 0x12, 0x19, 0x0a, 0x15, 0x54, 0x49, 0x4d, 0x45, 0x53, 0x54, 0x41, 0x4d, 0x50, 0x5f, - 0x4d, 0x49, 0x43, 0x52, 0x4f, 0x53, 0x45, 0x43, 0x4f, 0x4e, 0x44, 0x10, 0x11, 0x12, 0x18, 0x0a, - 0x14, 0x54, 0x49, 0x4d, 0x45, 0x53, 0x54, 0x41, 0x4d, 0x50, 0x5f, 0x4e, 0x41, 0x4e, 0x4f, 0x53, - 0x45, 0x43, 0x4f, 0x4e, 0x44, 0x10, 0x12, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x49, 0x4d, 0x45, 0x5f, - 0x53, 0x45, 0x43, 0x4f, 0x4e, 0x44, 0x10, 0x13, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x49, 0x4d, 0x45, - 0x5f, 0x4d, 0x49, 0x4c, 0x4c, 0x49, 0x53, 0x45, 0x43, 0x4f, 0x4e, 0x44, 0x10, 0x14, 0x12, 0x14, - 0x0a, 0x10, 0x54, 0x49, 0x4d, 0x45, 0x5f, 0x4d, 0x49, 0x43, 0x52, 0x4f, 0x53, 0x45, 0x43, 0x4f, - 0x4e, 0x44, 0x10, 0x15, 0x12, 0x13, 0x0a, 0x0f, 0x54, 0x49, 0x4d, 0x45, 0x5f, 0x4e, 0x41, 0x4e, - 0x4f, 0x53, 0x45, 0x43, 0x4f, 0x4e, 0x44, 0x10, 0x16, 0x12, 0x17, 0x0a, 0x13, 0x49, 0x4e, 0x54, - 0x45, 0x52, 0x56, 0x41, 0x4c, 0x5f, 0x59, 0x45, 0x41, 0x52, 0x5f, 0x4d, 0x4f, 0x4e, 0x54, 0x48, - 0x10, 0x17, 0x12, 0x15, 0x0a, 0x11, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x56, 0x41, 0x4c, 0x5f, 0x44, - 0x41, 0x59, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x10, 0x18, 0x12, 0x1b, 0x0a, 0x17, 0x49, 0x4e, 0x54, - 0x45, 0x52, 0x56, 0x41, 0x4c, 0x5f, 0x4d, 0x4f, 0x4e, 0x54, 0x48, 0x5f, 0x44, 0x41, 0x59, 0x5f, - 0x4e, 0x41, 0x4e, 0x4f, 0x10, 0x19, 0x42, 0x4f, 0x0a, 0x0e, 0x69, 0x6f, 0x2e, 0x67, 0x72, 0x65, - 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x06, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, - 0x5a, 0x35, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, - 0x70, 0x74, 0x69, 0x6d, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, - 0x6d, 0x65, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x72, 0x65, 0x70, - 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x72, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x74, 0x72, 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, 0x17, 0x0a, + 0x07, 0x73, 0x70, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, + 0x73, 0x70, 0x61, 0x6e, 0x49, 0x64, 0x22, 0x3d, 0x0a, 0x0e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x2b, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, + 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x42, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, + 0x1f, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x43, 0x6f, 0x64, 0x65, + 0x12, 0x17, 0x0a, 0x07, 0x65, 0x72, 0x72, 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x65, 0x72, 0x72, 0x4d, 0x73, 0x67, 0x22, 0x73, 0x0a, 0x0a, 0x41, 0x75, 0x74, + 0x68, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x2a, 0x0a, 0x05, 0x62, 0x61, 0x73, 0x69, 0x63, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x73, 0x69, 0x63, 0x48, 0x00, 0x52, 0x05, 0x62, 0x61, + 0x73, 0x69, 0x63, 0x12, 0x2a, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, + 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x48, 0x00, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x42, + 0x0d, 0x0a, 0x0b, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x22, 0x3f, + 0x0a, 0x05, 0x42, 0x61, 0x73, 0x69, 0x63, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, + 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x22, + 0x1d, 0x0a, 0x05, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, + 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x24, + 0x0a, 0x0c, 0x41, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x52, 0x6f, 0x77, 0x73, 0x12, 0x14, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x22, 0x50, 0x0a, 0x0e, 0x46, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x3e, 0x0a, 0x0d, 0x61, 0x66, 0x66, 0x65, 0x63, 0x74, + 0x65, 0x64, 0x5f, 0x72, 0x6f, 0x77, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, + 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x66, 0x66, 0x65, + 0x63, 0x74, 0x65, 0x64, 0x52, 0x6f, 0x77, 0x73, 0x52, 0x0c, 0x61, 0x66, 0x66, 0x65, 0x63, 0x74, + 0x65, 0x64, 0x52, 0x6f, 0x77, 0x73, 0x22, 0xa8, 0x01, 0x0a, 0x09, 0x43, 0x6f, 0x6c, 0x75, 0x6d, + 0x6e, 0x44, 0x65, 0x66, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x37, 0x0a, 0x08, 0x64, 0x61, 0x74, 0x61, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x67, 0x72, 0x65, + 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x44, + 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x64, 0x61, 0x74, 0x61, 0x74, 0x79, 0x70, + 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x73, 0x5f, 0x6e, 0x75, 0x6c, 0x6c, 0x61, 0x62, 0x6c, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x73, 0x4e, 0x75, 0x6c, 0x6c, 0x61, 0x62, + 0x6c, 0x65, 0x12, 0x2d, 0x0a, 0x12, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x63, 0x6f, + 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x11, + 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, + 0x74, 0x22, 0x64, 0x0a, 0x14, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x4d, 0x6f, 0x6e, + 0x74, 0x68, 0x44, 0x61, 0x79, 0x4e, 0x61, 0x6e, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x6f, 0x6e, + 0x74, 0x68, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6d, 0x6f, 0x6e, 0x74, 0x68, + 0x73, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x79, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x04, 0x64, 0x61, 0x79, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x6e, 0x61, 0x6e, 0x6f, 0x73, 0x65, 0x63, + 0x6f, 0x6e, 0x64, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x6e, 0x61, 0x6e, 0x6f, + 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x2a, 0x31, 0x0a, 0x0c, 0x53, 0x65, 0x6d, 0x61, 0x6e, + 0x74, 0x69, 0x63, 0x54, 0x79, 0x70, 0x65, 0x12, 0x07, 0x0a, 0x03, 0x54, 0x41, 0x47, 0x10, 0x00, + 0x12, 0x09, 0x0a, 0x05, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x54, + 0x49, 0x4d, 0x45, 0x53, 0x54, 0x41, 0x4d, 0x50, 0x10, 0x02, 0x2a, 0xc6, 0x03, 0x0a, 0x0e, 0x43, + 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, + 0x07, 0x42, 0x4f, 0x4f, 0x4c, 0x45, 0x41, 0x4e, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x49, 0x4e, + 0x54, 0x38, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x49, 0x4e, 0x54, 0x31, 0x36, 0x10, 0x02, 0x12, + 0x09, 0x0a, 0x05, 0x49, 0x4e, 0x54, 0x33, 0x32, 0x10, 0x03, 0x12, 0x09, 0x0a, 0x05, 0x49, 0x4e, + 0x54, 0x36, 0x34, 0x10, 0x04, 0x12, 0x09, 0x0a, 0x05, 0x55, 0x49, 0x4e, 0x54, 0x38, 0x10, 0x05, + 0x12, 0x0a, 0x0a, 0x06, 0x55, 0x49, 0x4e, 0x54, 0x31, 0x36, 0x10, 0x06, 0x12, 0x0a, 0x0a, 0x06, + 0x55, 0x49, 0x4e, 0x54, 0x33, 0x32, 0x10, 0x07, 0x12, 0x0a, 0x0a, 0x06, 0x55, 0x49, 0x4e, 0x54, + 0x36, 0x34, 0x10, 0x08, 0x12, 0x0b, 0x0a, 0x07, 0x46, 0x4c, 0x4f, 0x41, 0x54, 0x33, 0x32, 0x10, + 0x09, 0x12, 0x0b, 0x0a, 0x07, 0x46, 0x4c, 0x4f, 0x41, 0x54, 0x36, 0x34, 0x10, 0x0a, 0x12, 0x0a, + 0x0a, 0x06, 0x42, 0x49, 0x4e, 0x41, 0x52, 0x59, 0x10, 0x0b, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x54, + 0x52, 0x49, 0x4e, 0x47, 0x10, 0x0c, 0x12, 0x08, 0x0a, 0x04, 0x44, 0x41, 0x54, 0x45, 0x10, 0x0d, + 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x41, 0x54, 0x45, 0x54, 0x49, 0x4d, 0x45, 0x10, 0x0e, 0x12, 0x14, + 0x0a, 0x10, 0x54, 0x49, 0x4d, 0x45, 0x53, 0x54, 0x41, 0x4d, 0x50, 0x5f, 0x53, 0x45, 0x43, 0x4f, + 0x4e, 0x44, 0x10, 0x0f, 0x12, 0x19, 0x0a, 0x15, 0x54, 0x49, 0x4d, 0x45, 0x53, 0x54, 0x41, 0x4d, + 0x50, 0x5f, 0x4d, 0x49, 0x4c, 0x4c, 0x49, 0x53, 0x45, 0x43, 0x4f, 0x4e, 0x44, 0x10, 0x10, 0x12, + 0x19, 0x0a, 0x15, 0x54, 0x49, 0x4d, 0x45, 0x53, 0x54, 0x41, 0x4d, 0x50, 0x5f, 0x4d, 0x49, 0x43, + 0x52, 0x4f, 0x53, 0x45, 0x43, 0x4f, 0x4e, 0x44, 0x10, 0x11, 0x12, 0x18, 0x0a, 0x14, 0x54, 0x49, + 0x4d, 0x45, 0x53, 0x54, 0x41, 0x4d, 0x50, 0x5f, 0x4e, 0x41, 0x4e, 0x4f, 0x53, 0x45, 0x43, 0x4f, + 0x4e, 0x44, 0x10, 0x12, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x49, 0x4d, 0x45, 0x5f, 0x53, 0x45, 0x43, + 0x4f, 0x4e, 0x44, 0x10, 0x13, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x49, 0x4d, 0x45, 0x5f, 0x4d, 0x49, + 0x4c, 0x4c, 0x49, 0x53, 0x45, 0x43, 0x4f, 0x4e, 0x44, 0x10, 0x14, 0x12, 0x14, 0x0a, 0x10, 0x54, + 0x49, 0x4d, 0x45, 0x5f, 0x4d, 0x49, 0x43, 0x52, 0x4f, 0x53, 0x45, 0x43, 0x4f, 0x4e, 0x44, 0x10, + 0x15, 0x12, 0x13, 0x0a, 0x0f, 0x54, 0x49, 0x4d, 0x45, 0x5f, 0x4e, 0x41, 0x4e, 0x4f, 0x53, 0x45, + 0x43, 0x4f, 0x4e, 0x44, 0x10, 0x16, 0x12, 0x17, 0x0a, 0x13, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x56, + 0x41, 0x4c, 0x5f, 0x59, 0x45, 0x41, 0x52, 0x5f, 0x4d, 0x4f, 0x4e, 0x54, 0x48, 0x10, 0x17, 0x12, + 0x15, 0x0a, 0x11, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x56, 0x41, 0x4c, 0x5f, 0x44, 0x41, 0x59, 0x5f, + 0x54, 0x49, 0x4d, 0x45, 0x10, 0x18, 0x12, 0x1b, 0x0a, 0x17, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x56, + 0x41, 0x4c, 0x5f, 0x4d, 0x4f, 0x4e, 0x54, 0x48, 0x5f, 0x44, 0x41, 0x59, 0x5f, 0x4e, 0x41, 0x4e, + 0x4f, 0x10, 0x19, 0x42, 0x4f, 0x0a, 0x0e, 0x69, 0x6f, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, + 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x06, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5a, 0x35, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x70, 0x74, 0x69, + 0x6d, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2d, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, + 0x65, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1084,7 +1082,6 @@ func file_greptime_v1_common_proto_init() { } } } - file_greptime_v1_common_proto_msgTypes[0].OneofWrappers = []interface{}{} file_greptime_v1_common_proto_msgTypes[3].OneofWrappers = []interface{}{ (*AuthHeader_Basic)(nil), (*AuthHeader_Token)(nil), diff --git a/go/greptime/v1/ddl.pb.go b/go/greptime/v1/ddl.pb.go index c39d3f0..b3e7533 100644 --- a/go/greptime/v1/ddl.pb.go +++ b/go/greptime/v1/ddl.pb.go @@ -585,7 +585,7 @@ type FlushTableExpr struct { CatalogName string `protobuf:"bytes,1,opt,name=catalog_name,json=catalogName,proto3" json:"catalog_name,omitempty"` SchemaName string `protobuf:"bytes,2,opt,name=schema_name,json=schemaName,proto3" json:"schema_name,omitempty"` TableName string `protobuf:"bytes,3,opt,name=table_name,json=tableName,proto3" json:"table_name,omitempty"` - RegionNumber *uint32 `protobuf:"varint,4,opt,name=region_number,json=regionNumber,proto3,oneof" json:"region_number,omitempty"` + RegionNumber uint32 `protobuf:"varint,4,opt,name=region_number,json=regionNumber,proto3" json:"region_number,omitempty"` TableId *TableId `protobuf:"bytes,5,opt,name=table_id,json=tableId,proto3" json:"table_id,omitempty"` } @@ -643,8 +643,8 @@ func (x *FlushTableExpr) GetTableName() string { } func (x *FlushTableExpr) GetRegionNumber() uint32 { - if x != nil && x.RegionNumber != nil { - return *x.RegionNumber + if x != nil { + return x.RegionNumber } return 0 } @@ -661,10 +661,10 @@ type CompactTableExpr struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - CatalogName string `protobuf:"bytes,1,opt,name=catalog_name,json=catalogName,proto3" json:"catalog_name,omitempty"` - SchemaName string `protobuf:"bytes,2,opt,name=schema_name,json=schemaName,proto3" json:"schema_name,omitempty"` - TableName string `protobuf:"bytes,3,opt,name=table_name,json=tableName,proto3" json:"table_name,omitempty"` - RegionNumber *uint32 `protobuf:"varint,4,opt,name=region_number,json=regionNumber,proto3,oneof" json:"region_number,omitempty"` + CatalogName string `protobuf:"bytes,1,opt,name=catalog_name,json=catalogName,proto3" json:"catalog_name,omitempty"` + SchemaName string `protobuf:"bytes,2,opt,name=schema_name,json=schemaName,proto3" json:"schema_name,omitempty"` + TableName string `protobuf:"bytes,3,opt,name=table_name,json=tableName,proto3" json:"table_name,omitempty"` + RegionNumber uint32 `protobuf:"varint,4,opt,name=region_number,json=regionNumber,proto3" json:"region_number,omitempty"` } func (x *CompactTableExpr) Reset() { @@ -721,8 +721,8 @@ func (x *CompactTableExpr) GetTableName() string { } func (x *CompactTableExpr) GetRegionNumber() uint32 { - if x != nil && x.RegionNumber != nil { - return *x.RegionNumber + if x != nil { + return x.RegionNumber } return 0 } @@ -1313,7 +1313,7 @@ var file_greptime_v1_ddl_proto_rawDesc = []byte{ 0x52, 0x09, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2f, 0x0a, 0x08, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x62, 0x6c, - 0x65, 0x49, 0x64, 0x52, 0x07, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x49, 0x64, 0x22, 0xe0, 0x01, 0x0a, + 0x65, 0x49, 0x64, 0x52, 0x07, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x49, 0x64, 0x22, 0xc9, 0x01, 0x0a, 0x0e, 0x46, 0x6c, 0x75, 0x73, 0x68, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x45, 0x78, 0x70, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x4e, 0x61, @@ -1321,84 +1321,81 @@ var file_greptime_v1_ddl_proto_rawDesc = []byte{ 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x61, - 0x6d, 0x65, 0x12, 0x28, 0x0a, 0x0d, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x75, 0x6d, - 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x0c, 0x72, 0x65, 0x67, - 0x69, 0x6f, 0x6e, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x88, 0x01, 0x01, 0x12, 0x2f, 0x0a, 0x08, - 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, - 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x62, - 0x6c, 0x65, 0x49, 0x64, 0x52, 0x07, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x49, 0x64, 0x42, 0x10, 0x0a, - 0x0e, 0x5f, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, - 0xb1, 0x01, 0x0a, 0x10, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x63, 0x74, 0x54, 0x61, 0x62, 0x6c, 0x65, - 0x45, 0x78, 0x70, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x5f, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x61, 0x74, 0x61, - 0x6c, 0x6f, 0x67, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x63, 0x68, 0x65, 0x6d, - 0x61, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x63, - 0x68, 0x65, 0x6d, 0x61, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x61, 0x62, 0x6c, - 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x61, - 0x62, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x28, 0x0a, 0x0d, 0x72, 0x65, 0x67, 0x69, 0x6f, - 0x6e, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, - 0x52, 0x0c, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x88, 0x01, - 0x01, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x75, 0x6d, - 0x62, 0x65, 0x72, 0x22, 0x6a, 0x0a, 0x12, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, - 0x61, 0x62, 0x61, 0x73, 0x65, 0x45, 0x78, 0x70, 0x72, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x61, 0x74, - 0x61, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0c, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2f, - 0x0a, 0x14, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x69, 0x66, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, - 0x65, 0x78, 0x69, 0x73, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x63, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x49, 0x66, 0x4e, 0x6f, 0x74, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x22, - 0xa7, 0x01, 0x0a, 0x11, 0x54, 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65, 0x54, 0x61, 0x62, 0x6c, - 0x65, 0x45, 0x78, 0x70, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, - 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x61, 0x74, - 0x61, 0x6c, 0x6f, 0x67, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x63, 0x68, 0x65, - 0x6d, 0x61, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, - 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x61, 0x62, - 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, - 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2f, 0x0a, 0x08, 0x74, 0x61, 0x62, 0x6c, - 0x65, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x72, 0x65, - 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x49, 0x64, - 0x52, 0x07, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x49, 0x64, 0x22, 0x45, 0x0a, 0x0a, 0x41, 0x64, 0x64, - 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x12, 0x37, 0x0a, 0x0b, 0x61, 0x64, 0x64, 0x5f, 0x63, - 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, - 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x43, 0x6f, - 0x6c, 0x75, 0x6d, 0x6e, 0x52, 0x0a, 0x61, 0x64, 0x64, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, - 0x22, 0x49, 0x0a, 0x0b, 0x44, 0x72, 0x6f, 0x70, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x12, - 0x3a, 0x0a, 0x0c, 0x64, 0x72, 0x6f, 0x70, 0x5f, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, - 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x72, 0x6f, 0x70, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x52, 0x0b, - 0x64, 0x72, 0x6f, 0x70, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x22, 0x33, 0x0a, 0x0b, 0x52, - 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x6e, 0x65, - 0x77, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0c, 0x6e, 0x65, 0x77, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, - 0x22, 0xc8, 0x02, 0x0a, 0x09, 0x41, 0x64, 0x64, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x12, 0x35, - 0x0a, 0x0a, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x5f, 0x64, 0x65, 0x66, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, - 0x2e, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x44, 0x65, 0x66, 0x52, 0x09, 0x63, 0x6f, 0x6c, 0x75, - 0x6d, 0x6e, 0x44, 0x65, 0x66, 0x12, 0x15, 0x0a, 0x06, 0x69, 0x73, 0x5f, 0x6b, 0x65, 0x79, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x69, 0x73, 0x4b, 0x65, 0x79, 0x12, 0x3b, 0x0a, 0x08, - 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, + 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x75, 0x6d, + 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x72, 0x65, 0x67, 0x69, 0x6f, + 0x6e, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x2f, 0x0a, 0x08, 0x74, 0x61, 0x62, 0x6c, 0x65, + 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x72, 0x65, 0x70, + 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x49, 0x64, 0x52, + 0x07, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x49, 0x64, 0x22, 0x9a, 0x01, 0x0a, 0x10, 0x43, 0x6f, 0x6d, + 0x70, 0x61, 0x63, 0x74, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x45, 0x78, 0x70, 0x72, 0x12, 0x21, 0x0a, + 0x0c, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x4e, 0x61, 0x6d, 0x65, + 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4e, 0x61, 0x6d, + 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, + 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, + 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x4e, + 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0x6a, 0x0a, 0x12, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, + 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x45, 0x78, 0x70, 0x72, 0x12, 0x23, 0x0a, 0x0d, 0x64, + 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0c, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x4e, 0x61, 0x6d, 0x65, + 0x12, 0x2f, 0x0a, 0x14, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x69, 0x66, 0x5f, 0x6e, 0x6f, + 0x74, 0x5f, 0x65, 0x78, 0x69, 0x73, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, + 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x66, 0x4e, 0x6f, 0x74, 0x45, 0x78, 0x69, 0x73, 0x74, + 0x73, 0x22, 0xa7, 0x01, 0x0a, 0x11, 0x54, 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65, 0x54, 0x61, + 0x62, 0x6c, 0x65, 0x45, 0x78, 0x70, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x61, 0x74, 0x61, 0x6c, + 0x6f, 0x67, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, + 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x63, + 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0a, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x74, + 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2f, 0x0a, 0x08, 0x74, 0x61, + 0x62, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, + 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, + 0x49, 0x64, 0x52, 0x07, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x49, 0x64, 0x22, 0x45, 0x0a, 0x0a, 0x41, + 0x64, 0x64, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x12, 0x37, 0x0a, 0x0b, 0x61, 0x64, 0x64, + 0x5f, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, - 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0xaf, 0x01, 0x0a, 0x08, 0x4c, 0x6f, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x51, 0x0a, 0x0d, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, - 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x43, - 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4c, - 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0c, 0x6c, 0x6f, 0x63, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2a, 0x0a, 0x11, 0x61, 0x66, 0x74, - 0x65, 0x72, 0x5f, 0x63, 0x6c, 0x6f, 0x75, 0x6d, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x61, 0x66, 0x74, 0x65, 0x72, 0x43, 0x6c, 0x6f, 0x75, 0x6d, - 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x24, 0x0a, 0x0c, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x09, 0x0a, 0x05, 0x46, 0x49, 0x52, 0x53, 0x54, 0x10, 0x00, - 0x12, 0x09, 0x0a, 0x05, 0x41, 0x46, 0x54, 0x45, 0x52, 0x10, 0x01, 0x22, 0x20, 0x0a, 0x0a, 0x44, - 0x72, 0x6f, 0x70, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x19, 0x0a, - 0x07, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0d, 0x52, 0x02, 0x69, 0x64, 0x42, 0x4c, 0x0a, 0x0e, 0x69, 0x6f, 0x2e, 0x67, - 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x03, 0x44, 0x64, 0x6c, 0x5a, - 0x35, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x70, - 0x74, 0x69, 0x6d, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, - 0x65, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74, - 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x52, 0x0a, 0x61, 0x64, 0x64, 0x43, 0x6f, 0x6c, 0x75, 0x6d, + 0x6e, 0x73, 0x22, 0x49, 0x0a, 0x0b, 0x44, 0x72, 0x6f, 0x70, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, + 0x73, 0x12, 0x3a, 0x0a, 0x0c, 0x64, 0x72, 0x6f, 0x70, 0x5f, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, + 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x72, 0x6f, 0x70, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, + 0x52, 0x0b, 0x64, 0x72, 0x6f, 0x70, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x22, 0x33, 0x0a, + 0x0b, 0x52, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x24, 0x0a, 0x0e, + 0x6e, 0x65, 0x77, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6e, 0x65, 0x77, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x61, + 0x6d, 0x65, 0x22, 0xc8, 0x02, 0x0a, 0x09, 0x41, 0x64, 0x64, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, + 0x12, 0x35, 0x0a, 0x0a, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x5f, 0x64, 0x65, 0x66, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, + 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x44, 0x65, 0x66, 0x52, 0x09, 0x63, 0x6f, + 0x6c, 0x75, 0x6d, 0x6e, 0x44, 0x65, 0x66, 0x12, 0x15, 0x0a, 0x06, 0x69, 0x73, 0x5f, 0x6b, 0x65, + 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x69, 0x73, 0x4b, 0x65, 0x79, 0x12, 0x3b, + 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1f, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, + 0x64, 0x64, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0xaf, 0x01, 0x0a, 0x08, + 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x51, 0x0a, 0x0d, 0x6c, 0x6f, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x2c, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, + 0x64, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0c, 0x6c, + 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2a, 0x0a, 0x11, 0x61, + 0x66, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x6c, 0x6f, 0x75, 0x6d, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x61, 0x66, 0x74, 0x65, 0x72, 0x43, 0x6c, 0x6f, + 0x75, 0x6d, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x24, 0x0a, 0x0c, 0x4c, 0x6f, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x09, 0x0a, 0x05, 0x46, 0x49, 0x52, 0x53, 0x54, + 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x41, 0x46, 0x54, 0x45, 0x52, 0x10, 0x01, 0x22, 0x20, 0x0a, + 0x0a, 0x44, 0x72, 0x6f, 0x70, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, + 0x19, 0x0a, 0x07, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x02, 0x69, 0x64, 0x42, 0x4c, 0x0a, 0x0e, 0x69, 0x6f, + 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x03, 0x44, 0x64, + 0x6c, 0x5a, 0x35, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, + 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74, + 0x69, 0x6d, 0x65, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x72, 0x65, + 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1667,8 +1664,6 @@ func file_greptime_v1_ddl_proto_init() { (*AlterExpr_DropColumns)(nil), (*AlterExpr_RenameTable)(nil), } - file_greptime_v1_ddl_proto_msgTypes[4].OneofWrappers = []interface{}{} - file_greptime_v1_ddl_proto_msgTypes[5].OneofWrappers = []interface{}{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/java/src/main/java/io/greptime/v1/Common.java b/java/src/main/java/io/greptime/v1/Common.java index dae1629..30e0491 100644 --- a/java/src/main/java/io/greptime/v1/Common.java +++ b/java/src/main/java/io/greptime/v1/Common.java @@ -551,16 +551,7 @@ public final class Common { * TraceID of request * * - * optional uint64 trace_id = 5; - * @return Whether the traceId field is set. - */ - boolean hasTraceId(); - /** - *
-     * TraceID of request
-     * 
- * - * optional uint64 trace_id = 5; + * uint64 trace_id = 5; * @return The traceId. */ long getTraceId(); @@ -570,16 +561,7 @@ public final class Common { * SpanID of request * * - * optional uint64 span_id = 6; - * @return Whether the spanId field is set. - */ - boolean hasSpanId(); - /** - *
-     * SpanID of request
-     * 
- * - * optional uint64 span_id = 6; + * uint64 span_id = 6; * @return The spanId. */ long getSpanId(); @@ -622,7 +604,6 @@ public final class Common { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } - int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { @@ -665,12 +646,12 @@ public final class Common { break; } case 40: { - bitField0_ |= 0x00000001; + traceId_ = input.readUInt64(); break; } case 48: { - bitField0_ |= 0x00000002; + spanId_ = input.readUInt64(); break; } @@ -708,7 +689,6 @@ public final class Common { io.greptime.v1.Common.RequestHeader.class, io.greptime.v1.Common.RequestHeader.Builder.class); } - private int bitField0_; public static final int CATALOG_FIELD_NUMBER = 1; private volatile java.lang.Object catalog_; /** @@ -892,19 +872,7 @@ public final class Common { * TraceID of request * * - * optional uint64 trace_id = 5; - * @return Whether the traceId field is set. - */ - @java.lang.Override - public boolean hasTraceId() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-     * TraceID of request
-     * 
- * - * optional uint64 trace_id = 5; + * uint64 trace_id = 5; * @return The traceId. */ @java.lang.Override @@ -919,19 +887,7 @@ public final class Common { * SpanID of request * * - * optional uint64 span_id = 6; - * @return Whether the spanId field is set. - */ - @java.lang.Override - public boolean hasSpanId() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - *
-     * SpanID of request
-     * 
- * - * optional uint64 span_id = 6; + * uint64 span_id = 6; * @return The spanId. */ @java.lang.Override @@ -965,10 +921,10 @@ public final class Common { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dbname_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, dbname_); } - if (((bitField0_ & 0x00000001) != 0)) { + if (traceId_ != 0L) { output.writeUInt64(5, traceId_); } - if (((bitField0_ & 0x00000002) != 0)) { + if (spanId_ != 0L) { output.writeUInt64(6, spanId_); } unknownFields.writeTo(output); @@ -993,11 +949,11 @@ public final class Common { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dbname_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, dbname_); } - if (((bitField0_ & 0x00000001) != 0)) { + if (traceId_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeUInt64Size(5, traceId_); } - if (((bitField0_ & 0x00000002) != 0)) { + if (spanId_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeUInt64Size(6, spanId_); } @@ -1027,16 +983,10 @@ public final class Common { } if (!getDbname() .equals(other.getDbname())) return false; - if (hasTraceId() != other.hasTraceId()) return false; - if (hasTraceId()) { - if (getTraceId() - != other.getTraceId()) return false; - } - if (hasSpanId() != other.hasSpanId()) return false; - if (hasSpanId()) { - if (getSpanId() - != other.getSpanId()) return false; - } + if (getTraceId() + != other.getTraceId()) return false; + if (getSpanId() + != other.getSpanId()) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -1058,16 +1008,12 @@ public final class Common { } hash = (37 * hash) + DBNAME_FIELD_NUMBER; hash = (53 * hash) + getDbname().hashCode(); - if (hasTraceId()) { - hash = (37 * hash) + TRACE_ID_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getTraceId()); - } - if (hasSpanId()) { - hash = (37 * hash) + SPAN_ID_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getSpanId()); - } + hash = (37 * hash) + TRACE_ID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTraceId()); + hash = (37 * hash) + SPAN_ID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getSpanId()); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -1214,9 +1160,9 @@ public final class Common { dbname_ = ""; traceId_ = 0L; - bitField0_ = (bitField0_ & ~0x00000001); + spanId_ = 0L; - bitField0_ = (bitField0_ & ~0x00000002); + return this; } @@ -1243,8 +1189,6 @@ public final class Common { @java.lang.Override public io.greptime.v1.Common.RequestHeader buildPartial() { io.greptime.v1.Common.RequestHeader result = new io.greptime.v1.Common.RequestHeader(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; result.catalog_ = catalog_; result.schema_ = schema_; if (authorizationBuilder_ == null) { @@ -1253,15 +1197,8 @@ public final class Common { result.authorization_ = authorizationBuilder_.build(); } result.dbname_ = dbname_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.traceId_ = traceId_; - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.spanId_ = spanId_; - to_bitField0_ |= 0x00000002; - } - result.bitField0_ = to_bitField0_; + result.traceId_ = traceId_; + result.spanId_ = spanId_; onBuilt(); return result; } @@ -1325,10 +1262,10 @@ public final class Common { dbname_ = other.dbname_; onChanged(); } - if (other.hasTraceId()) { + if (other.getTraceId() != 0L) { setTraceId(other.getTraceId()); } - if (other.hasSpanId()) { + if (other.getSpanId() != 0L) { setSpanId(other.getSpanId()); } this.mergeUnknownFields(other.unknownFields); @@ -1359,7 +1296,6 @@ public final class Common { } return this; } - private int bitField0_; private java.lang.Object catalog_ = ""; /** @@ -1810,19 +1746,7 @@ public final class Common { * TraceID of request * * - * optional uint64 trace_id = 5; - * @return Whether the traceId field is set. - */ - @java.lang.Override - public boolean hasTraceId() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-       * TraceID of request
-       * 
- * - * optional uint64 trace_id = 5; + * uint64 trace_id = 5; * @return The traceId. */ @java.lang.Override @@ -1834,12 +1758,12 @@ public final class Common { * TraceID of request * * - * optional uint64 trace_id = 5; + * uint64 trace_id = 5; * @param value The traceId to set. * @return This builder for chaining. */ public Builder setTraceId(long value) { - bitField0_ |= 0x00000001; + traceId_ = value; onChanged(); return this; @@ -1849,11 +1773,11 @@ public final class Common { * TraceID of request * * - * optional uint64 trace_id = 5; + * uint64 trace_id = 5; * @return This builder for chaining. */ public Builder clearTraceId() { - bitField0_ = (bitField0_ & ~0x00000001); + traceId_ = 0L; onChanged(); return this; @@ -1865,19 +1789,7 @@ public final class Common { * SpanID of request * * - * optional uint64 span_id = 6; - * @return Whether the spanId field is set. - */ - @java.lang.Override - public boolean hasSpanId() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - *
-       * SpanID of request
-       * 
- * - * optional uint64 span_id = 6; + * uint64 span_id = 6; * @return The spanId. */ @java.lang.Override @@ -1889,12 +1801,12 @@ public final class Common { * SpanID of request * * - * optional uint64 span_id = 6; + * uint64 span_id = 6; * @param value The spanId to set. * @return This builder for chaining. */ public Builder setSpanId(long value) { - bitField0_ |= 0x00000002; + spanId_ = value; onChanged(); return this; @@ -1904,11 +1816,11 @@ public final class Common { * SpanID of request * * - * optional uint64 span_id = 6; + * uint64 span_id = 6; * @return This builder for chaining. */ public Builder clearSpanId() { - bitField0_ = (bitField0_ & ~0x00000002); + spanId_ = 0L; onChanged(); return this; @@ -8124,40 +8036,39 @@ public final class Common { static { java.lang.String[] descriptorData = { "\n\030greptime/v1/common.proto\022\013greptime.v1\"" + - "\266\001\n\rRequestHeader\022\017\n\007catalog\030\001 \001(\t\022\016\n\006sc" + + "\223\001\n\rRequestHeader\022\017\n\007catalog\030\001 \001(\t\022\016\n\006sc" + "hema\030\002 \001(\t\022.\n\rauthorization\030\003 \001(\0132\027.grep" + - "time.v1.AuthHeader\022\016\n\006dbname\030\004 \001(\t\022\025\n\010tr" + - "ace_id\030\005 \001(\004H\000\210\001\001\022\024\n\007span_id\030\006 \001(\004H\001\210\001\001B" + - "\013\n\t_trace_idB\n\n\010_span_id\"5\n\016ResponseHead" + - "er\022#\n\006status\030\001 \001(\0132\023.greptime.v1.Status\"" + - ".\n\006Status\022\023\n\013status_code\030\001 \001(\r\022\017\n\007err_ms" + - "g\030\002 \001(\t\"e\n\nAuthHeader\022#\n\005basic\030\001 \001(\0132\022.g" + - "reptime.v1.BasicH\000\022#\n\005token\030\002 \001(\0132\022.grep" + - "time.v1.TokenH\000B\r\n\013auth_scheme\"+\n\005Basic\022" + - "\020\n\010username\030\001 \001(\t\022\020\n\010password\030\002 \001(\t\"\026\n\005T" + - "oken\022\r\n\005token\030\001 \001(\t\"\035\n\014AffectedRows\022\r\n\005v" + - "alue\030\001 \001(\r\"B\n\016FlightMetadata\0220\n\raffected" + - "_rows\030\001 \001(\0132\031.greptime.v1.AffectedRows\"y" + - "\n\tColumnDef\022\014\n\004name\030\001 \001(\t\022-\n\010datatype\030\002 " + - "\001(\0162\033.greptime.v1.ColumnDataType\022\023\n\013is_n" + - "ullable\030\003 \001(\010\022\032\n\022default_constraint\030\004 \001(" + - "\014\"I\n\024IntervalMonthDayNano\022\016\n\006months\030\001 \001(" + - "\005\022\014\n\004days\030\002 \001(\005\022\023\n\013nanoseconds\030\003 \001(\003*1\n\014" + - "SemanticType\022\007\n\003TAG\020\000\022\t\n\005FIELD\020\001\022\r\n\tTIME" + - "STAMP\020\002*\306\003\n\016ColumnDataType\022\013\n\007BOOLEAN\020\000\022" + - "\010\n\004INT8\020\001\022\t\n\005INT16\020\002\022\t\n\005INT32\020\003\022\t\n\005INT64" + - "\020\004\022\t\n\005UINT8\020\005\022\n\n\006UINT16\020\006\022\n\n\006UINT32\020\007\022\n\n" + - "\006UINT64\020\010\022\013\n\007FLOAT32\020\t\022\013\n\007FLOAT64\020\n\022\n\n\006B" + - "INARY\020\013\022\n\n\006STRING\020\014\022\010\n\004DATE\020\r\022\014\n\010DATETIM" + - "E\020\016\022\024\n\020TIMESTAMP_SECOND\020\017\022\031\n\025TIMESTAMP_M" + - "ILLISECOND\020\020\022\031\n\025TIMESTAMP_MICROSECOND\020\021\022" + - "\030\n\024TIMESTAMP_NANOSECOND\020\022\022\017\n\013TIME_SECOND" + - "\020\023\022\024\n\020TIME_MILLISECOND\020\024\022\024\n\020TIME_MICROSE" + - "COND\020\025\022\023\n\017TIME_NANOSECOND\020\026\022\027\n\023INTERVAL_" + - "YEAR_MONTH\020\027\022\025\n\021INTERVAL_DAY_TIME\020\030\022\033\n\027I" + - "NTERVAL_MONTH_DAY_NANO\020\031BO\n\016io.greptime." + - "v1B\006CommonZ5github.com/GreptimeTeam/grep" + - "time-proto/go/greptime/v1b\006proto3" + "time.v1.AuthHeader\022\016\n\006dbname\030\004 \001(\t\022\020\n\010tr" + + "ace_id\030\005 \001(\004\022\017\n\007span_id\030\006 \001(\004\"5\n\016Respons" + + "eHeader\022#\n\006status\030\001 \001(\0132\023.greptime.v1.St" + + "atus\".\n\006Status\022\023\n\013status_code\030\001 \001(\r\022\017\n\007e" + + "rr_msg\030\002 \001(\t\"e\n\nAuthHeader\022#\n\005basic\030\001 \001(" + + "\0132\022.greptime.v1.BasicH\000\022#\n\005token\030\002 \001(\0132\022" + + ".greptime.v1.TokenH\000B\r\n\013auth_scheme\"+\n\005B" + + "asic\022\020\n\010username\030\001 \001(\t\022\020\n\010password\030\002 \001(\t" + + "\"\026\n\005Token\022\r\n\005token\030\001 \001(\t\"\035\n\014AffectedRows" + + "\022\r\n\005value\030\001 \001(\r\"B\n\016FlightMetadata\0220\n\raff" + + "ected_rows\030\001 \001(\0132\031.greptime.v1.AffectedR" + + "ows\"y\n\tColumnDef\022\014\n\004name\030\001 \001(\t\022-\n\010dataty" + + "pe\030\002 \001(\0162\033.greptime.v1.ColumnDataType\022\023\n" + + "\013is_nullable\030\003 \001(\010\022\032\n\022default_constraint" + + "\030\004 \001(\014\"I\n\024IntervalMonthDayNano\022\016\n\006months" + + "\030\001 \001(\005\022\014\n\004days\030\002 \001(\005\022\023\n\013nanoseconds\030\003 \001(" + + "\003*1\n\014SemanticType\022\007\n\003TAG\020\000\022\t\n\005FIELD\020\001\022\r\n" + + "\tTIMESTAMP\020\002*\306\003\n\016ColumnDataType\022\013\n\007BOOLE" + + "AN\020\000\022\010\n\004INT8\020\001\022\t\n\005INT16\020\002\022\t\n\005INT32\020\003\022\t\n\005" + + "INT64\020\004\022\t\n\005UINT8\020\005\022\n\n\006UINT16\020\006\022\n\n\006UINT32" + + "\020\007\022\n\n\006UINT64\020\010\022\013\n\007FLOAT32\020\t\022\013\n\007FLOAT64\020\n" + + "\022\n\n\006BINARY\020\013\022\n\n\006STRING\020\014\022\010\n\004DATE\020\r\022\014\n\010DA" + + "TETIME\020\016\022\024\n\020TIMESTAMP_SECOND\020\017\022\031\n\025TIMEST" + + "AMP_MILLISECOND\020\020\022\031\n\025TIMESTAMP_MICROSECO" + + "ND\020\021\022\030\n\024TIMESTAMP_NANOSECOND\020\022\022\017\n\013TIME_S" + + "ECOND\020\023\022\024\n\020TIME_MILLISECOND\020\024\022\024\n\020TIME_MI" + + "CROSECOND\020\025\022\023\n\017TIME_NANOSECOND\020\026\022\027\n\023INTE" + + "RVAL_YEAR_MONTH\020\027\022\025\n\021INTERVAL_DAY_TIME\020\030" + + "\022\033\n\027INTERVAL_MONTH_DAY_NANO\020\031BO\n\016io.grep" + + "time.v1B\006CommonZ5github.com/GreptimeTeam" + + "/greptime-proto/go/greptime/v1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, @@ -8168,7 +8079,7 @@ public final class Common { internal_static_greptime_v1_RequestHeader_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_greptime_v1_RequestHeader_descriptor, - new java.lang.String[] { "Catalog", "Schema", "Authorization", "Dbname", "TraceId", "SpanId", "TraceId", "SpanId", }); + new java.lang.String[] { "Catalog", "Schema", "Authorization", "Dbname", "TraceId", "SpanId", }); internal_static_greptime_v1_ResponseHeader_descriptor = getDescriptor().getMessageTypes().get(1); internal_static_greptime_v1_ResponseHeader_fieldAccessorTable = new diff --git a/java/src/main/java/io/greptime/v1/Ddl.java b/java/src/main/java/io/greptime/v1/Ddl.java index f45c889..e18b406 100644 --- a/java/src/main/java/io/greptime/v1/Ddl.java +++ b/java/src/main/java/io/greptime/v1/Ddl.java @@ -7870,12 +7870,7 @@ java.lang.String defaultValue); getTableNameBytes(); /** - * optional uint32 region_number = 4; - * @return Whether the regionNumber field is set. - */ - boolean hasRegionNumber(); - /** - * optional uint32 region_number = 4; + * uint32 region_number = 4; * @return The regionNumber. */ int getRegionNumber(); @@ -7933,7 +7928,6 @@ java.lang.String defaultValue); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } - int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { @@ -7963,7 +7957,7 @@ java.lang.String defaultValue); break; } case 32: { - bitField0_ |= 0x00000001; + regionNumber_ = input.readUInt32(); break; } @@ -8014,7 +8008,6 @@ java.lang.String defaultValue); io.greptime.v1.Ddl.FlushTableExpr.class, io.greptime.v1.Ddl.FlushTableExpr.Builder.class); } - private int bitField0_; public static final int CATALOG_NAME_FIELD_NUMBER = 1; private volatile java.lang.Object catalogName_; /** @@ -8132,15 +8125,7 @@ java.lang.String defaultValue); public static final int REGION_NUMBER_FIELD_NUMBER = 4; private int regionNumber_; /** - * optional uint32 region_number = 4; - * @return Whether the regionNumber field is set. - */ - @java.lang.Override - public boolean hasRegionNumber() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * optional uint32 region_number = 4; + * uint32 region_number = 4; * @return The regionNumber. */ @java.lang.Override @@ -8197,7 +8182,7 @@ java.lang.String defaultValue); if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tableName_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, tableName_); } - if (((bitField0_ & 0x00000001) != 0)) { + if (regionNumber_ != 0) { output.writeUInt32(4, regionNumber_); } if (tableId_ != null) { @@ -8221,7 +8206,7 @@ java.lang.String defaultValue); if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tableName_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, tableName_); } - if (((bitField0_ & 0x00000001) != 0)) { + if (regionNumber_ != 0) { size += com.google.protobuf.CodedOutputStream .computeUInt32Size(4, regionNumber_); } @@ -8250,11 +8235,8 @@ java.lang.String defaultValue); .equals(other.getSchemaName())) return false; if (!getTableName() .equals(other.getTableName())) return false; - if (hasRegionNumber() != other.hasRegionNumber()) return false; - if (hasRegionNumber()) { - if (getRegionNumber() - != other.getRegionNumber()) return false; - } + if (getRegionNumber() + != other.getRegionNumber()) return false; if (hasTableId() != other.hasTableId()) return false; if (hasTableId()) { if (!getTableId() @@ -8277,10 +8259,8 @@ java.lang.String defaultValue); hash = (53 * hash) + getSchemaName().hashCode(); hash = (37 * hash) + TABLE_NAME_FIELD_NUMBER; hash = (53 * hash) + getTableName().hashCode(); - if (hasRegionNumber()) { - hash = (37 * hash) + REGION_NUMBER_FIELD_NUMBER; - hash = (53 * hash) + getRegionNumber(); - } + hash = (37 * hash) + REGION_NUMBER_FIELD_NUMBER; + hash = (53 * hash) + getRegionNumber(); if (hasTableId()) { hash = (37 * hash) + TABLE_ID_FIELD_NUMBER; hash = (53 * hash) + getTableId().hashCode(); @@ -8425,7 +8405,7 @@ java.lang.String defaultValue); tableName_ = ""; regionNumber_ = 0; - bitField0_ = (bitField0_ & ~0x00000001); + if (tableIdBuilder_ == null) { tableId_ = null; } else { @@ -8458,21 +8438,15 @@ java.lang.String defaultValue); @java.lang.Override public io.greptime.v1.Ddl.FlushTableExpr buildPartial() { io.greptime.v1.Ddl.FlushTableExpr result = new io.greptime.v1.Ddl.FlushTableExpr(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; result.catalogName_ = catalogName_; result.schemaName_ = schemaName_; result.tableName_ = tableName_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.regionNumber_ = regionNumber_; - to_bitField0_ |= 0x00000001; - } + result.regionNumber_ = regionNumber_; if (tableIdBuilder_ == null) { result.tableId_ = tableId_; } else { result.tableId_ = tableIdBuilder_.build(); } - result.bitField0_ = to_bitField0_; onBuilt(); return result; } @@ -8533,7 +8507,7 @@ java.lang.String defaultValue); tableName_ = other.tableName_; onChanged(); } - if (other.hasRegionNumber()) { + if (other.getRegionNumber() != 0) { setRegionNumber(other.getRegionNumber()); } if (other.hasTableId()) { @@ -8567,7 +8541,6 @@ java.lang.String defaultValue); } return this; } - private int bitField0_; private java.lang.Object catalogName_ = ""; /** @@ -8799,15 +8772,7 @@ java.lang.String defaultValue); private int regionNumber_ ; /** - * optional uint32 region_number = 4; - * @return Whether the regionNumber field is set. - */ - @java.lang.Override - public boolean hasRegionNumber() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * optional uint32 region_number = 4; + * uint32 region_number = 4; * @return The regionNumber. */ @java.lang.Override @@ -8815,22 +8780,22 @@ java.lang.String defaultValue); return regionNumber_; } /** - * optional uint32 region_number = 4; + * uint32 region_number = 4; * @param value The regionNumber to set. * @return This builder for chaining. */ public Builder setRegionNumber(int value) { - bitField0_ |= 0x00000001; + regionNumber_ = value; onChanged(); return this; } /** - * optional uint32 region_number = 4; + * uint32 region_number = 4; * @return This builder for chaining. */ public Builder clearRegionNumber() { - bitField0_ = (bitField0_ & ~0x00000001); + regionNumber_ = 0; onChanged(); return this; @@ -9048,12 +9013,7 @@ java.lang.String defaultValue); getTableNameBytes(); /** - * optional uint32 region_number = 4; - * @return Whether the regionNumber field is set. - */ - boolean hasRegionNumber(); - /** - * optional uint32 region_number = 4; + * uint32 region_number = 4; * @return The regionNumber. */ int getRegionNumber(); @@ -9096,7 +9056,6 @@ java.lang.String defaultValue); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } - int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { @@ -9126,7 +9085,7 @@ java.lang.String defaultValue); break; } case 32: { - bitField0_ |= 0x00000001; + regionNumber_ = input.readUInt32(); break; } @@ -9164,7 +9123,6 @@ java.lang.String defaultValue); io.greptime.v1.Ddl.CompactTableExpr.class, io.greptime.v1.Ddl.CompactTableExpr.Builder.class); } - private int bitField0_; public static final int CATALOG_NAME_FIELD_NUMBER = 1; private volatile java.lang.Object catalogName_; /** @@ -9282,15 +9240,7 @@ java.lang.String defaultValue); public static final int REGION_NUMBER_FIELD_NUMBER = 4; private int regionNumber_; /** - * optional uint32 region_number = 4; - * @return Whether the regionNumber field is set. - */ - @java.lang.Override - public boolean hasRegionNumber() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * optional uint32 region_number = 4; + * uint32 region_number = 4; * @return The regionNumber. */ @java.lang.Override @@ -9321,7 +9271,7 @@ java.lang.String defaultValue); if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tableName_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, tableName_); } - if (((bitField0_ & 0x00000001) != 0)) { + if (regionNumber_ != 0) { output.writeUInt32(4, regionNumber_); } unknownFields.writeTo(output); @@ -9342,7 +9292,7 @@ java.lang.String defaultValue); if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tableName_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, tableName_); } - if (((bitField0_ & 0x00000001) != 0)) { + if (regionNumber_ != 0) { size += com.google.protobuf.CodedOutputStream .computeUInt32Size(4, regionNumber_); } @@ -9367,11 +9317,8 @@ java.lang.String defaultValue); .equals(other.getSchemaName())) return false; if (!getTableName() .equals(other.getTableName())) return false; - if (hasRegionNumber() != other.hasRegionNumber()) return false; - if (hasRegionNumber()) { - if (getRegionNumber() - != other.getRegionNumber()) return false; - } + if (getRegionNumber() + != other.getRegionNumber()) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -9389,10 +9336,8 @@ java.lang.String defaultValue); hash = (53 * hash) + getSchemaName().hashCode(); hash = (37 * hash) + TABLE_NAME_FIELD_NUMBER; hash = (53 * hash) + getTableName().hashCode(); - if (hasRegionNumber()) { - hash = (37 * hash) + REGION_NUMBER_FIELD_NUMBER; - hash = (53 * hash) + getRegionNumber(); - } + hash = (37 * hash) + REGION_NUMBER_FIELD_NUMBER; + hash = (53 * hash) + getRegionNumber(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -9533,7 +9478,7 @@ java.lang.String defaultValue); tableName_ = ""; regionNumber_ = 0; - bitField0_ = (bitField0_ & ~0x00000001); + return this; } @@ -9560,16 +9505,10 @@ java.lang.String defaultValue); @java.lang.Override public io.greptime.v1.Ddl.CompactTableExpr buildPartial() { io.greptime.v1.Ddl.CompactTableExpr result = new io.greptime.v1.Ddl.CompactTableExpr(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; result.catalogName_ = catalogName_; result.schemaName_ = schemaName_; result.tableName_ = tableName_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.regionNumber_ = regionNumber_; - to_bitField0_ |= 0x00000001; - } - result.bitField0_ = to_bitField0_; + result.regionNumber_ = regionNumber_; onBuilt(); return result; } @@ -9630,7 +9569,7 @@ java.lang.String defaultValue); tableName_ = other.tableName_; onChanged(); } - if (other.hasRegionNumber()) { + if (other.getRegionNumber() != 0) { setRegionNumber(other.getRegionNumber()); } this.mergeUnknownFields(other.unknownFields); @@ -9661,7 +9600,6 @@ java.lang.String defaultValue); } return this; } - private int bitField0_; private java.lang.Object catalogName_ = ""; /** @@ -9893,15 +9831,7 @@ java.lang.String defaultValue); private int regionNumber_ ; /** - * optional uint32 region_number = 4; - * @return Whether the regionNumber field is set. - */ - @java.lang.Override - public boolean hasRegionNumber() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * optional uint32 region_number = 4; + * uint32 region_number = 4; * @return The regionNumber. */ @java.lang.Override @@ -9909,22 +9839,22 @@ java.lang.String defaultValue); return regionNumber_; } /** - * optional uint32 region_number = 4; + * uint32 region_number = 4; * @param value The regionNumber to set. * @return This builder for chaining. */ public Builder setRegionNumber(int value) { - bitField0_ |= 0x00000001; + regionNumber_ = value; onChanged(); return this; } /** - * optional uint32 region_number = 4; + * uint32 region_number = 4; * @return This builder for chaining. */ public Builder clearRegionNumber() { - bitField0_ = (bitField0_ & ~0x00000001); + regionNumber_ = 0; onChanged(); return this; @@ -16719,33 +16649,32 @@ java.lang.String defaultValue); "(\004B\006\n\004kind\"v\n\rDropTableExpr\022\024\n\014catalog_n" + "ame\030\001 \001(\t\022\023\n\013schema_name\030\002 \001(\t\022\022\n\ntable_" + "name\030\003 \001(\t\022&\n\010table_id\030\004 \001(\0132\024.greptime." + - "v1.TableId\"\245\001\n\016FlushTableExpr\022\024\n\014catalog" + + "v1.TableId\"\216\001\n\016FlushTableExpr\022\024\n\014catalog" + "_name\030\001 \001(\t\022\023\n\013schema_name\030\002 \001(\t\022\022\n\ntabl" + - "e_name\030\003 \001(\t\022\032\n\rregion_number\030\004 \001(\rH\000\210\001\001" + - "\022&\n\010table_id\030\005 \001(\0132\024.greptime.v1.TableId" + - "B\020\n\016_region_number\"\177\n\020CompactTableExpr\022\024" + - "\n\014catalog_name\030\001 \001(\t\022\023\n\013schema_name\030\002 \001(" + - "\t\022\022\n\ntable_name\030\003 \001(\t\022\032\n\rregion_number\030\004" + - " \001(\rH\000\210\001\001B\020\n\016_region_number\"I\n\022CreateDat" + - "abaseExpr\022\025\n\rdatabase_name\030\001 \001(\t\022\034\n\024crea" + - "te_if_not_exists\030\002 \001(\010\"z\n\021TruncateTableE" + - "xpr\022\024\n\014catalog_name\030\001 \001(\t\022\023\n\013schema_name" + - "\030\002 \001(\t\022\022\n\ntable_name\030\003 \001(\t\022&\n\010table_id\030\004" + - " \001(\0132\024.greptime.v1.TableId\"9\n\nAddColumns" + - "\022+\n\013add_columns\030\001 \003(\0132\026.greptime.v1.AddC" + - "olumn\"<\n\013DropColumns\022-\n\014drop_columns\030\001 \003" + - "(\0132\027.greptime.v1.DropColumn\"%\n\013RenameTab" + - "le\022\026\n\016new_table_name\030\001 \001(\t\"\215\002\n\tAddColumn" + - "\022*\n\ncolumn_def\030\001 \001(\0132\026.greptime.v1.Colum" + - "nDef\022\016\n\006is_key\030\002 \001(\010\0221\n\010location\030\003 \001(\0132\037" + - ".greptime.v1.AddColumn.Location\032\220\001\n\010Loca" + - "tion\022C\n\rlocation_type\030\001 \001(\0162,.greptime.v" + - "1.AddColumn.Location.LocationType\022\031\n\021aft" + - "er_cloumn_name\030\002 \001(\t\"$\n\014LocationType\022\t\n\005" + - "FIRST\020\000\022\t\n\005AFTER\020\001\"\032\n\nDropColumn\022\014\n\004name" + - "\030\001 \001(\t\"\025\n\007TableId\022\n\n\002id\030\001 \001(\rBL\n\016io.grep" + - "time.v1B\003DdlZ5github.com/GreptimeTeam/gr" + - "eptime-proto/go/greptime/v1b\006proto3" + "e_name\030\003 \001(\t\022\025\n\rregion_number\030\004 \001(\r\022&\n\010t" + + "able_id\030\005 \001(\0132\024.greptime.v1.TableId\"h\n\020C" + + "ompactTableExpr\022\024\n\014catalog_name\030\001 \001(\t\022\023\n" + + "\013schema_name\030\002 \001(\t\022\022\n\ntable_name\030\003 \001(\t\022\025" + + "\n\rregion_number\030\004 \001(\r\"I\n\022CreateDatabaseE" + + "xpr\022\025\n\rdatabase_name\030\001 \001(\t\022\034\n\024create_if_" + + "not_exists\030\002 \001(\010\"z\n\021TruncateTableExpr\022\024\n" + + "\014catalog_name\030\001 \001(\t\022\023\n\013schema_name\030\002 \001(\t" + + "\022\022\n\ntable_name\030\003 \001(\t\022&\n\010table_id\030\004 \001(\0132\024" + + ".greptime.v1.TableId\"9\n\nAddColumns\022+\n\013ad" + + "d_columns\030\001 \003(\0132\026.greptime.v1.AddColumn\"" + + "<\n\013DropColumns\022-\n\014drop_columns\030\001 \003(\0132\027.g" + + "reptime.v1.DropColumn\"%\n\013RenameTable\022\026\n\016" + + "new_table_name\030\001 \001(\t\"\215\002\n\tAddColumn\022*\n\nco" + + "lumn_def\030\001 \001(\0132\026.greptime.v1.ColumnDef\022\016" + + "\n\006is_key\030\002 \001(\010\0221\n\010location\030\003 \001(\0132\037.grept" + + "ime.v1.AddColumn.Location\032\220\001\n\010Location\022C" + + "\n\rlocation_type\030\001 \001(\0162,.greptime.v1.AddC" + + "olumn.Location.LocationType\022\031\n\021after_clo" + + "umn_name\030\002 \001(\t\"$\n\014LocationType\022\t\n\005FIRST\020" + + "\000\022\t\n\005AFTER\020\001\"\032\n\nDropColumn\022\014\n\004name\030\001 \001(\t" + + "\"\025\n\007TableId\022\n\n\002id\030\001 \001(\rBL\n\016io.greptime.v" + + "1B\003DdlZ5github.com/GreptimeTeam/greptime" + + "-proto/go/greptime/v1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, @@ -16787,13 +16716,13 @@ java.lang.String defaultValue); internal_static_greptime_v1_FlushTableExpr_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_greptime_v1_FlushTableExpr_descriptor, - new java.lang.String[] { "CatalogName", "SchemaName", "TableName", "RegionNumber", "TableId", "RegionNumber", }); + new java.lang.String[] { "CatalogName", "SchemaName", "TableName", "RegionNumber", "TableId", }); internal_static_greptime_v1_CompactTableExpr_descriptor = getDescriptor().getMessageTypes().get(5); internal_static_greptime_v1_CompactTableExpr_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_greptime_v1_CompactTableExpr_descriptor, - new java.lang.String[] { "CatalogName", "SchemaName", "TableName", "RegionNumber", "RegionNumber", }); + new java.lang.String[] { "CatalogName", "SchemaName", "TableName", "RegionNumber", }); internal_static_greptime_v1_CreateDatabaseExpr_descriptor = getDescriptor().getMessageTypes().get(6); internal_static_greptime_v1_CreateDatabaseExpr_fieldAccessorTable = new diff --git a/java/src/main/java/io/greptime/v1/region/Server.java b/java/src/main/java/io/greptime/v1/region/Server.java index 909d124..28f6f72 100644 --- a/java/src/main/java/io/greptime/v1/region/Server.java +++ b/java/src/main/java/io/greptime/v1/region/Server.java @@ -23,16 +23,7 @@ public final class Server { * TraceID of request * * - * optional uint64 trace_id = 1; - * @return Whether the traceId field is set. - */ - boolean hasTraceId(); - /** - *
-     * TraceID of request
-     * 
- * - * optional uint64 trace_id = 1; + * uint64 trace_id = 1; * @return The traceId. */ long getTraceId(); @@ -42,16 +33,7 @@ public final class Server { * SpanID of request * * - * optional uint64 span_id = 2; - * @return Whether the spanId field is set. - */ - boolean hasSpanId(); - /** - *
-     * SpanID of request
-     * 
- * - * optional uint64 span_id = 2; + * uint64 span_id = 2; * @return The spanId. */ long getSpanId(); @@ -91,7 +73,6 @@ public final class Server { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } - int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { @@ -103,12 +84,12 @@ public final class Server { done = true; break; case 8: { - bitField0_ |= 0x00000001; + traceId_ = input.readUInt64(); break; } case 16: { - bitField0_ |= 0x00000002; + spanId_ = input.readUInt64(); break; } @@ -146,7 +127,6 @@ public final class Server { io.greptime.v1.region.Server.RegionRequestHeader.class, io.greptime.v1.region.Server.RegionRequestHeader.Builder.class); } - private int bitField0_; public static final int TRACE_ID_FIELD_NUMBER = 1; private long traceId_; /** @@ -154,19 +134,7 @@ public final class Server { * TraceID of request * * - * optional uint64 trace_id = 1; - * @return Whether the traceId field is set. - */ - @java.lang.Override - public boolean hasTraceId() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-     * TraceID of request
-     * 
- * - * optional uint64 trace_id = 1; + * uint64 trace_id = 1; * @return The traceId. */ @java.lang.Override @@ -181,19 +149,7 @@ public final class Server { * SpanID of request * * - * optional uint64 span_id = 2; - * @return Whether the spanId field is set. - */ - @java.lang.Override - public boolean hasSpanId() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - *
-     * SpanID of request
-     * 
- * - * optional uint64 span_id = 2; + * uint64 span_id = 2; * @return The spanId. */ @java.lang.Override @@ -215,10 +171,10 @@ public final class Server { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (((bitField0_ & 0x00000001) != 0)) { + if (traceId_ != 0L) { output.writeUInt64(1, traceId_); } - if (((bitField0_ & 0x00000002) != 0)) { + if (spanId_ != 0L) { output.writeUInt64(2, spanId_); } unknownFields.writeTo(output); @@ -230,11 +186,11 @@ public final class Server { if (size != -1) return size; size = 0; - if (((bitField0_ & 0x00000001) != 0)) { + if (traceId_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeUInt64Size(1, traceId_); } - if (((bitField0_ & 0x00000002) != 0)) { + if (spanId_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeUInt64Size(2, spanId_); } @@ -253,16 +209,10 @@ public final class Server { } io.greptime.v1.region.Server.RegionRequestHeader other = (io.greptime.v1.region.Server.RegionRequestHeader) obj; - if (hasTraceId() != other.hasTraceId()) return false; - if (hasTraceId()) { - if (getTraceId() - != other.getTraceId()) return false; - } - if (hasSpanId() != other.hasSpanId()) return false; - if (hasSpanId()) { - if (getSpanId() - != other.getSpanId()) return false; - } + if (getTraceId() + != other.getTraceId()) return false; + if (getSpanId() + != other.getSpanId()) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -274,16 +224,12 @@ public final class Server { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - if (hasTraceId()) { - hash = (37 * hash) + TRACE_ID_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getTraceId()); - } - if (hasSpanId()) { - hash = (37 * hash) + SPAN_ID_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getSpanId()); - } + hash = (37 * hash) + TRACE_ID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTraceId()); + hash = (37 * hash) + SPAN_ID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getSpanId()); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -418,9 +364,9 @@ public final class Server { public Builder clear() { super.clear(); traceId_ = 0L; - bitField0_ = (bitField0_ & ~0x00000001); + spanId_ = 0L; - bitField0_ = (bitField0_ & ~0x00000002); + return this; } @@ -447,17 +393,8 @@ public final class Server { @java.lang.Override public io.greptime.v1.region.Server.RegionRequestHeader buildPartial() { io.greptime.v1.region.Server.RegionRequestHeader result = new io.greptime.v1.region.Server.RegionRequestHeader(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.traceId_ = traceId_; - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.spanId_ = spanId_; - to_bitField0_ |= 0x00000002; - } - result.bitField0_ = to_bitField0_; + result.traceId_ = traceId_; + result.spanId_ = spanId_; onBuilt(); return result; } @@ -506,10 +443,10 @@ public final class Server { public Builder mergeFrom(io.greptime.v1.region.Server.RegionRequestHeader other) { if (other == io.greptime.v1.region.Server.RegionRequestHeader.getDefaultInstance()) return this; - if (other.hasTraceId()) { + if (other.getTraceId() != 0L) { setTraceId(other.getTraceId()); } - if (other.hasSpanId()) { + if (other.getSpanId() != 0L) { setSpanId(other.getSpanId()); } this.mergeUnknownFields(other.unknownFields); @@ -540,7 +477,6 @@ public final class Server { } return this; } - private int bitField0_; private long traceId_ ; /** @@ -548,19 +484,7 @@ public final class Server { * TraceID of request * * - * optional uint64 trace_id = 1; - * @return Whether the traceId field is set. - */ - @java.lang.Override - public boolean hasTraceId() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-       * TraceID of request
-       * 
- * - * optional uint64 trace_id = 1; + * uint64 trace_id = 1; * @return The traceId. */ @java.lang.Override @@ -572,12 +496,12 @@ public final class Server { * TraceID of request * * - * optional uint64 trace_id = 1; + * uint64 trace_id = 1; * @param value The traceId to set. * @return This builder for chaining. */ public Builder setTraceId(long value) { - bitField0_ |= 0x00000001; + traceId_ = value; onChanged(); return this; @@ -587,11 +511,11 @@ public final class Server { * TraceID of request * * - * optional uint64 trace_id = 1; + * uint64 trace_id = 1; * @return This builder for chaining. */ public Builder clearTraceId() { - bitField0_ = (bitField0_ & ~0x00000001); + traceId_ = 0L; onChanged(); return this; @@ -603,19 +527,7 @@ public final class Server { * SpanID of request * * - * optional uint64 span_id = 2; - * @return Whether the spanId field is set. - */ - @java.lang.Override - public boolean hasSpanId() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - *
-       * SpanID of request
-       * 
- * - * optional uint64 span_id = 2; + * uint64 span_id = 2; * @return The spanId. */ @java.lang.Override @@ -627,12 +539,12 @@ public final class Server { * SpanID of request * * - * optional uint64 span_id = 2; + * uint64 span_id = 2; * @param value The spanId to set. * @return This builder for chaining. */ public Builder setSpanId(long value) { - bitField0_ |= 0x00000002; + spanId_ = value; onChanged(); return this; @@ -642,11 +554,11 @@ public final class Server { * SpanID of request * * - * optional uint64 span_id = 2; + * uint64 span_id = 2; * @return This builder for chaining. */ public Builder clearSpanId() { - bitField0_ = (bitField0_ & ~0x00000002); + spanId_ = 0L; onChanged(); return this; @@ -7801,7 +7713,7 @@ public final class Server { /** *
-     * Columns in the primary key.
+     * Id of columns in the primary key.
      * 
* * repeated uint32 primary_key = 4; @@ -7810,7 +7722,7 @@ public final class Server { java.util.List getPrimaryKeyList(); /** *
-     * Columns in the primary key.
+     * Id of columns in the primary key.
      * 
* * repeated uint32 primary_key = 4; @@ -7819,7 +7731,7 @@ public final class Server { int getPrimaryKeyCount(); /** *
-     * Columns in the primary key.
+     * Id of columns in the primary key.
      * 
* * repeated uint32 primary_key = 4; @@ -8204,7 +8116,7 @@ java.lang.String defaultValue); private com.google.protobuf.Internal.IntList primaryKey_; /** *
-     * Columns in the primary key.
+     * Id of columns in the primary key.
      * 
* * repeated uint32 primary_key = 4; @@ -8217,7 +8129,7 @@ java.lang.String defaultValue); } /** *
-     * Columns in the primary key.
+     * Id of columns in the primary key.
      * 
* * repeated uint32 primary_key = 4; @@ -8228,7 +8140,7 @@ java.lang.String defaultValue); } /** *
-     * Columns in the primary key.
+     * Id of columns in the primary key.
      * 
* * repeated uint32 primary_key = 4; @@ -9354,7 +9266,7 @@ java.lang.String defaultValue); } /** *
-       * Columns in the primary key.
+       * Id of columns in the primary key.
        * 
* * repeated uint32 primary_key = 4; @@ -9367,7 +9279,7 @@ java.lang.String defaultValue); } /** *
-       * Columns in the primary key.
+       * Id of columns in the primary key.
        * 
* * repeated uint32 primary_key = 4; @@ -9378,7 +9290,7 @@ java.lang.String defaultValue); } /** *
-       * Columns in the primary key.
+       * Id of columns in the primary key.
        * 
* * repeated uint32 primary_key = 4; @@ -9390,7 +9302,7 @@ java.lang.String defaultValue); } /** *
-       * Columns in the primary key.
+       * Id of columns in the primary key.
        * 
* * repeated uint32 primary_key = 4; @@ -9407,7 +9319,7 @@ java.lang.String defaultValue); } /** *
-       * Columns in the primary key.
+       * Id of columns in the primary key.
        * 
* * repeated uint32 primary_key = 4; @@ -9422,7 +9334,7 @@ java.lang.String defaultValue); } /** *
-       * Columns in the primary key.
+       * Id of columns in the primary key.
        * 
* * repeated uint32 primary_key = 4; @@ -9439,7 +9351,7 @@ java.lang.String defaultValue); } /** *
-       * Columns in the primary key.
+       * Id of columns in the primary key.
        * 
* * repeated uint32 primary_key = 4; @@ -14622,59 +14534,59 @@ java.lang.String defaultValue); java.lang.String[] descriptorData = { "\n\037greptime/v1/region/server.proto\022\022grept" + "ime.v1.region\032\030greptime/v1/common.proto\032" + - "\025greptime/v1/row.proto\"[\n\023RegionRequestH" + - "eader\022\025\n\010trace_id\030\001 \001(\004H\000\210\001\001\022\024\n\007span_id\030" + - "\002 \001(\004H\001\210\001\001B\013\n\t_trace_idB\n\n\010_span_id\"\245\004\n\r" + - "RegionRequest\0227\n\006header\030\001 \001(\0132\'.greptime" + - ".v1.region.RegionRequestHeader\0225\n\007insert" + - "s\030\003 \001(\0132\".greptime.v1.region.InsertReque" + - "stsH\000\0225\n\007deletes\030\004 \001(\0132\".greptime.v1.reg" + - "ion.DeleteRequestsH\000\0223\n\006create\030\005 \001(\0132!.g" + - "reptime.v1.region.CreateRequestH\000\022/\n\004dro" + - "p\030\006 \001(\0132\037.greptime.v1.region.DropRequest" + - "H\000\022/\n\004open\030\007 \001(\0132\037.greptime.v1.region.Op" + - "enRequestH\000\0221\n\005close\030\010 \001(\0132 .greptime.v1" + - ".region.CloseRequestH\000\0221\n\005alter\030\t \001(\0132 ." + - "greptime.v1.region.AlterRequestH\000\0221\n\005flu" + - "sh\030\n \001(\0132 .greptime.v1.region.FlushReque" + - "stH\000\0225\n\007compact\030\013 \001(\0132\".greptime.v1.regi" + - "on.CompactRequestH\000B\006\n\004body\"T\n\016RegionRes" + - "ponse\022+\n\006header\030\001 \001(\0132\033.greptime.v1.Resp" + - "onseHeader\022\025\n\raffected_rows\030\002 \001(\004\"E\n\016Ins" + - "ertRequests\0223\n\010requests\030\001 \003(\0132!.greptime" + - ".v1.region.InsertRequest\"E\n\016DeleteReques" + - "ts\0223\n\010requests\030\001 \003(\0132!.greptime.v1.regio" + - "n.DeleteRequest\"C\n\rInsertRequest\022\021\n\tregi" + - "on_id\030\001 \001(\004\022\037\n\004rows\030\002 \001(\0132\021.greptime.v1." + - "Rows\"C\n\rDeleteRequest\022\021\n\tregion_id\030\001 \001(\004" + - "\022\037\n\004rows\030\002 \001(\0132\021.greptime.v1.Rows\"/\n\014Que" + - "ryRequest\022\021\n\tregion_id\030\001 \001(\004\022\014\n\004plan\030\002 \001" + - "(\014\"\236\002\n\rCreateRequest\022\021\n\tregion_id\030\001 \001(\004\022" + - "\016\n\006engine\030\002 \001(\t\0222\n\013column_defs\030\003 \003(\0132\035.g" + - "reptime.v1.region.ColumnDef\022\023\n\013primary_k" + - "ey\030\004 \003(\r\022\034\n\024create_if_not_exists\030\005 \001(\010\022\022" + - "\n\nregion_dir\030\006 \001(\t\022?\n\007options\030\007 \003(\0132..gr" + - "eptime.v1.region.CreateRequest.OptionsEn" + - "try\032.\n\014OptionsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005valu" + - "e\030\002 \001(\t:\0028\001\" \n\013DropRequest\022\021\n\tregion_id\030" + - "\001 \001(\004\"\263\001\n\013OpenRequest\022\021\n\tregion_id\030\001 \001(\004" + - "\022\016\n\006engine\030\002 \001(\t\022\022\n\nregion_dir\030\003 \001(\t\022=\n\007" + - "options\030\004 \003(\0132,.greptime.v1.region.OpenR" + - "equest.OptionsEntry\032.\n\014OptionsEntry\022\013\n\003k" + - "ey\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"!\n\014CloseRequ" + - "est\022\021\n\tregion_id\030\001 \001(\004\"!\n\014AlterRequest\022\021" + - "\n\tregion_id\030\001 \001(\004\"!\n\014FlushRequest\022\021\n\treg" + - "ion_id\030\001 \001(\004\"#\n\016CompactRequest\022\021\n\tregion" + - "_id\030\001 \001(\004\"\276\001\n\tColumnDef\022\014\n\004name\030\001 \001(\t\022\021\n" + - "\tcolumn_id\030\002 \001(\r\022-\n\010datatype\030\003 \001(\0162\033.gre" + - "ptime.v1.ColumnDataType\022\023\n\013is_nullable\030\004" + - " \001(\010\022\032\n\022default_constraint\030\005 \001(\014\0220\n\rsema" + - "ntic_type\030\006 \001(\0162\031.greptime.v1.SemanticTy" + - "pe2Y\n\006Region\022O\n\006Handle\022!.greptime.v1.reg" + - "ion.RegionRequest\032\".greptime.v1.region.R" + - "egionResponseB]\n\025io.greptime.v1.regionB\006" + - "ServerZ