From 9ecbc5ccecfcc3db61d2b12574f42f5098f05d15 Mon Sep 17 00:00:00 2001 From: CookiePieWw Date: Wed, 20 Nov 2024 18:57:48 +0800 Subject: [PATCH] chore: remove options --- c++/greptime/v1/ddl.pb.cc | 143 +-------- c++/greptime/v1/ddl.pb.h | 93 +----- go/greptime/v1/ddl.pb.go | 100 +++--- java/src/main/java/io/greptime/v1/Ddl.java | 354 +-------------------- proto/greptime/v1/ddl.proto | 1 - 5 files changed, 65 insertions(+), 626 deletions(-) diff --git a/c++/greptime/v1/ddl.pb.cc b/c++/greptime/v1/ddl.pb.cc index dc22bd06..99b1717a 100644 --- a/c++/greptime/v1/ddl.pb.cc +++ b/c++/greptime/v1/ddl.pb.cc @@ -486,21 +486,9 @@ struct UnsetColumnFulltextDefaultTypeInternal { }; }; PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 UnsetColumnFulltextDefaultTypeInternal _UnsetColumnFulltext_default_instance_; -PROTOBUF_CONSTEXPR AlterDatabaseExpr_OptionsEntry_DoNotUse::AlterDatabaseExpr_OptionsEntry_DoNotUse( - ::_pbi::ConstantInitialized) {} -struct AlterDatabaseExpr_OptionsEntry_DoNotUseDefaultTypeInternal { - PROTOBUF_CONSTEXPR AlterDatabaseExpr_OptionsEntry_DoNotUseDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} - ~AlterDatabaseExpr_OptionsEntry_DoNotUseDefaultTypeInternal() {} - union { - AlterDatabaseExpr_OptionsEntry_DoNotUse _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 AlterDatabaseExpr_OptionsEntry_DoNotUseDefaultTypeInternal _AlterDatabaseExpr_OptionsEntry_DoNotUse_default_instance_; PROTOBUF_CONSTEXPR AlterDatabaseExpr::AlterDatabaseExpr( ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.options_)*/{::_pbi::ConstantInitialized()} - , /*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_.kind_)*/{} , /*decltype(_impl_._cached_size_)*/{} @@ -516,7 +504,7 @@ struct AlterDatabaseExprDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 AlterDatabaseExprDefaultTypeInternal _AlterDatabaseExpr_default_instance_; } // namespace v1 } // namespace greptime -static ::_pb::Metadata file_level_metadata_greptime_2fv1_2fddl_2eproto[33]; +static ::_pb::Metadata file_level_metadata_greptime_2fv1_2fddl_2eproto[32]; static const ::_pb::EnumDescriptor* file_level_enum_descriptors_greptime_2fv1_2fddl_2eproto[2]; static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_greptime_2fv1_2fddl_2eproto = nullptr; @@ -830,16 +818,6 @@ const uint32_t TableStruct_greptime_2fv1_2fddl_2eproto::offsets[] PROTOBUF_SECTI ~0u, // no _weak_field_map_ ~0u, // no _inlined_string_donated_ PROTOBUF_FIELD_OFFSET(::greptime::v1::UnsetColumnFulltext, _impl_.column_name_), - PROTOBUF_FIELD_OFFSET(::greptime::v1::AlterDatabaseExpr_OptionsEntry_DoNotUse, _has_bits_), - PROTOBUF_FIELD_OFFSET(::greptime::v1::AlterDatabaseExpr_OptionsEntry_DoNotUse, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::greptime::v1::AlterDatabaseExpr_OptionsEntry_DoNotUse, key_), - PROTOBUF_FIELD_OFFSET(::greptime::v1::AlterDatabaseExpr_OptionsEntry_DoNotUse, value_), - 0, - 1, ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::greptime::v1::AlterDatabaseExpr, _internal_metadata_), ~0u, // no _extensions_ @@ -848,7 +826,6 @@ const uint32_t TableStruct_greptime_2fv1_2fddl_2eproto::offsets[] PROTOBUF_SECTI ~0u, // no _inlined_string_donated_ PROTOBUF_FIELD_OFFSET(::greptime::v1::AlterDatabaseExpr, _impl_.catalog_name_), PROTOBUF_FIELD_OFFSET(::greptime::v1::AlterDatabaseExpr, _impl_.schema_name_), - PROTOBUF_FIELD_OFFSET(::greptime::v1::AlterDatabaseExpr, _impl_.options_), ::_pbi::kInvalidFieldOffsetTag, PROTOBUF_FIELD_OFFSET(::greptime::v1::AlterDatabaseExpr, _impl_.kind_), }; @@ -884,8 +861,7 @@ static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protode { 284, -1, -1, sizeof(::greptime::v1::AddColumnLocation)}, { 292, -1, -1, sizeof(::greptime::v1::SetColumnFulltext)}, { 302, -1, -1, sizeof(::greptime::v1::UnsetColumnFulltext)}, - { 309, 317, -1, sizeof(::greptime::v1::AlterDatabaseExpr_OptionsEntry_DoNotUse)}, - { 319, -1, -1, sizeof(::greptime::v1::AlterDatabaseExpr)}, + { 309, -1, -1, sizeof(::greptime::v1::AlterDatabaseExpr)}, }; static const ::_pb::Message* const file_default_instances[] = { @@ -920,7 +896,6 @@ static const ::_pb::Message* const file_default_instances[] = { &::greptime::v1::_AddColumnLocation_default_instance_._instance, &::greptime::v1::_SetColumnFulltext_default_instance_._instance, &::greptime::v1::_UnsetColumnFulltext_default_instance_._instance, - &::greptime::v1::_AlterDatabaseExpr_OptionsEntry_DoNotUse_default_instance_._instance, &::greptime::v1::_AlterDatabaseExpr_default_instance_._instance, }; @@ -1036,25 +1011,23 @@ const char descriptor_table_protodef_greptime_2fv1_2fddl_2eproto[] PROTOBUF_SECT "\022\023\n\013column_name\030\001 \001(\t\022\016\n\006enable\030\002 \001(\010\022\'\n" "\010analyzer\030\003 \001(\0162\025.greptime.v1.Analyzer\022\026" "\n\016case_sensitive\030\004 \001(\010\"*\n\023UnsetColumnFul" - "ltext\022\023\n\013column_name\030\001 \001(\t\"\365\001\n\021AlterData" + "ltext\022\023\n\013column_name\030\001 \001(\t\"\207\001\n\021AlterData" "baseExpr\022\024\n\014catalog_name\030\001 \001(\t\022\023\n\013schema" - "_name\030\002 \001(\t\022<\n\007options\030\003 \003(\0132+.greptime." - "v1.AlterDatabaseExpr.OptionsEntry\022\?\n\024set" - "_database_options\030\004 \001(\0132\037.greptime.v1.Se" - "tDatabaseOptionsH\000\032.\n\014OptionsEntry\022\013\n\003ke" - "y\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001B\006\n\004kind*$\n\010An" - "alyzer\022\013\n\007ENGLISH\020\000\022\013\n\007CHINESE\020\001BL\n\016io.g" - "reptime.v1B\003DdlZ5github.com/GreptimeTeam" - "/greptime-proto/go/greptime/v1b\006proto3" + "_name\030\002 \001(\t\022\?\n\024set_database_options\030\004 \001(" + "\0132\037.greptime.v1.SetDatabaseOptionsH\000B\006\n\004" + "kind*$\n\010Analyzer\022\013\n\007ENGLISH\020\000\022\013\n\007CHINESE" + "\020\001BL\n\016io.greptime.v1B\003DdlZ5github.com/Gr" + "eptimeTeam/greptime-proto/go/greptime/v1" + "b\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, 4838, descriptor_table_protodef_greptime_2fv1_2fddl_2eproto, + false, false, 4728, 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, 33, + &descriptor_table_greptime_2fv1_2fddl_2eproto_once, descriptor_table_greptime_2fv1_2fddl_2eproto_deps, 1, 32, schemas, file_default_instances, TableStruct_greptime_2fv1_2fddl_2eproto::offsets, file_level_metadata_greptime_2fv1_2fddl_2eproto, file_level_enum_descriptors_greptime_2fv1_2fddl_2eproto, file_level_service_descriptors_greptime_2fv1_2fddl_2eproto, @@ -10486,20 +10459,6 @@ ::PROTOBUF_NAMESPACE_ID::Metadata UnsetColumnFulltext::GetMetadata() const { // =================================================================== -AlterDatabaseExpr_OptionsEntry_DoNotUse::AlterDatabaseExpr_OptionsEntry_DoNotUse() {} -AlterDatabaseExpr_OptionsEntry_DoNotUse::AlterDatabaseExpr_OptionsEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena) - : SuperType(arena) {} -void AlterDatabaseExpr_OptionsEntry_DoNotUse::MergeFrom(const AlterDatabaseExpr_OptionsEntry_DoNotUse& other) { - MergeFromInternal(other); -} -::PROTOBUF_NAMESPACE_ID::Metadata AlterDatabaseExpr_OptionsEntry_DoNotUse::GetMetadata() const { - return ::_pbi::AssignDescriptors( - &descriptor_table_greptime_2fv1_2fddl_2eproto_getter, &descriptor_table_greptime_2fv1_2fddl_2eproto_once, - file_level_metadata_greptime_2fv1_2fddl_2eproto[31]); -} - -// =================================================================== - class AlterDatabaseExpr::_Internal { public: static const ::greptime::v1::SetDatabaseOptions& set_database_options(const AlterDatabaseExpr* msg); @@ -10528,24 +10487,19 @@ AlterDatabaseExpr::AlterDatabaseExpr(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned) : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { SharedCtor(arena, is_message_owned); - if (arena != nullptr && !is_message_owned) { - arena->OwnCustomDestructor(this, &AlterDatabaseExpr::ArenaDtor); - } // @@protoc_insertion_point(arena_constructor:greptime.v1.AlterDatabaseExpr) } AlterDatabaseExpr::AlterDatabaseExpr(const AlterDatabaseExpr& from) : ::PROTOBUF_NAMESPACE_ID::Message() { AlterDatabaseExpr* const _this = this; (void)_this; new (&_impl_) Impl_{ - /*decltype(_impl_.options_)*/{} - , decltype(_impl_.catalog_name_){} + decltype(_impl_.catalog_name_){} , decltype(_impl_.schema_name_){} , decltype(_impl_.kind_){} , /*decltype(_impl_._cached_size_)*/{} , /*decltype(_impl_._oneof_case_)*/{}}; _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - _this->_impl_.options_.MergeFrom(from._impl_.options_); _impl_.catalog_name_.InitDefault(); #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING _impl_.catalog_name_.Set("", GetArenaForAllocation()); @@ -10581,8 +10535,7 @@ inline void AlterDatabaseExpr::SharedCtor( (void)arena; (void)is_message_owned; new (&_impl_) Impl_{ - /*decltype(_impl_.options_)*/{::_pbi::ArenaInitialized(), arena} - , decltype(_impl_.catalog_name_){} + decltype(_impl_.catalog_name_){} , decltype(_impl_.schema_name_){} , decltype(_impl_.kind_){} , /*decltype(_impl_._cached_size_)*/{} @@ -10603,7 +10556,6 @@ AlterDatabaseExpr::~AlterDatabaseExpr() { // @@protoc_insertion_point(destructor:greptime.v1.AlterDatabaseExpr) if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { (void)arena; - ArenaDtor(this); return; } SharedDtor(); @@ -10611,8 +10563,6 @@ AlterDatabaseExpr::~AlterDatabaseExpr() { inline void AlterDatabaseExpr::SharedDtor() { GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - _impl_.options_.Destruct(); - _impl_.options_.~MapField(); _impl_.catalog_name_.Destroy(); _impl_.schema_name_.Destroy(); if (has_kind()) { @@ -10620,10 +10570,6 @@ inline void AlterDatabaseExpr::SharedDtor() { } } -void AlterDatabaseExpr::ArenaDtor(void* object) { - AlterDatabaseExpr* _this = reinterpret_cast< AlterDatabaseExpr* >(object); - _this->_impl_.options_.Destruct(); -} void AlterDatabaseExpr::SetCachedSize(int size) const { _impl_._cached_size_.Set(size); } @@ -10651,7 +10597,6 @@ void AlterDatabaseExpr::Clear() { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - _impl_.options_.Clear(); _impl_.catalog_name_.ClearToEmpty(); _impl_.schema_name_.ClearToEmpty(); clear_kind(); @@ -10684,19 +10629,6 @@ const char* AlterDatabaseExpr::_InternalParse(const char* ptr, ::_pbi::ParseCont } else goto handle_unusual; continue; - // map options = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { - ptr -= 1; - do { - ptr += 1; - ptr = ctx->ParseMessage(&_impl_.options_, ptr); - CHK_(ptr); - if (!ctx->DataAvailable(ptr)) break; - } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr)); - } else - goto handle_unusual; - continue; // .greptime.v1.SetDatabaseOptions set_database_options = 4; case 4: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 34)) { @@ -10754,36 +10686,6 @@ uint8_t* AlterDatabaseExpr::_InternalSerialize( 2, this->_internal_schema_name(), target); } - // map options = 3; - if (!this->_internal_options().empty()) { - using MapType = ::_pb::Map; - using WireHelper = AlterDatabaseExpr_OptionsEntry_DoNotUse::Funcs; - const auto& map_field = this->_internal_options(); - auto check_utf8 = [](const MapType::value_type& entry) { - (void)entry; - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - entry.first.data(), static_cast(entry.first.length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "greptime.v1.AlterDatabaseExpr.OptionsEntry.key"); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - entry.second.data(), static_cast(entry.second.length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "greptime.v1.AlterDatabaseExpr.OptionsEntry.value"); - }; - - if (stream->IsSerializationDeterministic() && map_field.size() > 1) { - for (const auto& entry : ::_pbi::MapSorterPtr(map_field)) { - target = WireHelper::InternalSerialize(3, entry.first, entry.second, target, stream); - check_utf8(entry); - } - } else { - for (const auto& entry : map_field) { - target = WireHelper::InternalSerialize(3, entry.first, entry.second, target, stream); - check_utf8(entry); - } - } - } - // .greptime.v1.SetDatabaseOptions set_database_options = 4; if (_internal_has_set_database_options()) { target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: @@ -10807,15 +10709,6 @@ size_t AlterDatabaseExpr::ByteSizeLong() const { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - // map options = 3; - total_size += 1 * - ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_options_size()); - for (::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_iterator - it = this->_internal_options().begin(); - it != this->_internal_options().end(); ++it) { - total_size += AlterDatabaseExpr_OptionsEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second); - } - // string catalog_name = 1; if (!this->_internal_catalog_name().empty()) { total_size += 1 + @@ -10860,7 +10753,6 @@ void AlterDatabaseExpr::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, cons uint32_t cached_has_bits = 0; (void) cached_has_bits; - _this->_impl_.options_.MergeFrom(from._impl_.options_); if (!from._internal_catalog_name().empty()) { _this->_internal_set_catalog_name(from._internal_catalog_name()); } @@ -10896,7 +10788,6 @@ void AlterDatabaseExpr::InternalSwap(AlterDatabaseExpr* other) { auto* lhs_arena = GetArenaForAllocation(); auto* rhs_arena = other->GetArenaForAllocation(); _internal_metadata_.InternalSwap(&other->_internal_metadata_); - _impl_.options_.InternalSwap(&other->_impl_.options_); ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( &_impl_.catalog_name_, lhs_arena, &other->_impl_.catalog_name_, rhs_arena @@ -10912,7 +10803,7 @@ void AlterDatabaseExpr::InternalSwap(AlterDatabaseExpr* other) { ::PROTOBUF_NAMESPACE_ID::Metadata AlterDatabaseExpr::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_greptime_2fv1_2fddl_2eproto_getter, &descriptor_table_greptime_2fv1_2fddl_2eproto_once, - file_level_metadata_greptime_2fv1_2fddl_2eproto[32]); + file_level_metadata_greptime_2fv1_2fddl_2eproto[31]); } // @@protoc_insertion_point(namespace_scope) @@ -11043,10 +10934,6 @@ template<> PROTOBUF_NOINLINE ::greptime::v1::UnsetColumnFulltext* Arena::CreateMaybeMessage< ::greptime::v1::UnsetColumnFulltext >(Arena* arena) { return Arena::CreateMessageInternal< ::greptime::v1::UnsetColumnFulltext >(arena); } -template<> PROTOBUF_NOINLINE ::greptime::v1::AlterDatabaseExpr_OptionsEntry_DoNotUse* -Arena::CreateMaybeMessage< ::greptime::v1::AlterDatabaseExpr_OptionsEntry_DoNotUse >(Arena* arena) { - return Arena::CreateMessageInternal< ::greptime::v1::AlterDatabaseExpr_OptionsEntry_DoNotUse >(arena); -} template<> PROTOBUF_NOINLINE ::greptime::v1::AlterDatabaseExpr* Arena::CreateMaybeMessage< ::greptime::v1::AlterDatabaseExpr >(Arena* arena) { return Arena::CreateMessageInternal< ::greptime::v1::AlterDatabaseExpr >(arena); diff --git a/c++/greptime/v1/ddl.pb.h b/c++/greptime/v1/ddl.pb.h index c517e32a..288e88a1 100644 --- a/c++/greptime/v1/ddl.pb.h +++ b/c++/greptime/v1/ddl.pb.h @@ -63,9 +63,6 @@ extern AddColumnsDefaultTypeInternal _AddColumns_default_instance_; class AlterDatabaseExpr; struct AlterDatabaseExprDefaultTypeInternal; extern AlterDatabaseExprDefaultTypeInternal _AlterDatabaseExpr_default_instance_; -class AlterDatabaseExpr_OptionsEntry_DoNotUse; -struct AlterDatabaseExpr_OptionsEntry_DoNotUseDefaultTypeInternal; -extern AlterDatabaseExpr_OptionsEntry_DoNotUseDefaultTypeInternal _AlterDatabaseExpr_OptionsEntry_DoNotUse_default_instance_; class AlterTableExpr; struct AlterTableExprDefaultTypeInternal; extern AlterTableExprDefaultTypeInternal _AlterTableExpr_default_instance_; @@ -157,7 +154,6 @@ template<> ::greptime::v1::AddColumn* Arena::CreateMaybeMessage<::greptime::v1:: template<> ::greptime::v1::AddColumnLocation* Arena::CreateMaybeMessage<::greptime::v1::AddColumnLocation>(Arena*); template<> ::greptime::v1::AddColumns* Arena::CreateMaybeMessage<::greptime::v1::AddColumns>(Arena*); template<> ::greptime::v1::AlterDatabaseExpr* Arena::CreateMaybeMessage<::greptime::v1::AlterDatabaseExpr>(Arena*); -template<> ::greptime::v1::AlterDatabaseExpr_OptionsEntry_DoNotUse* Arena::CreateMaybeMessage<::greptime::v1::AlterDatabaseExpr_OptionsEntry_DoNotUse>(Arena*); template<> ::greptime::v1::AlterTableExpr* Arena::CreateMaybeMessage<::greptime::v1::AlterTableExpr>(Arena*); template<> ::greptime::v1::ColumnDef* Arena::CreateMaybeMessage<::greptime::v1::ColumnDef>(Arena*); template<> ::greptime::v1::CreateDatabaseExpr* Arena::CreateMaybeMessage<::greptime::v1::CreateDatabaseExpr>(Arena*); @@ -6124,34 +6120,6 @@ class UnsetColumnFulltext final : }; // ------------------------------------------------------------------- -class AlterDatabaseExpr_OptionsEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal::MapEntry { -public: - typedef ::PROTOBUF_NAMESPACE_ID::internal::MapEntry SuperType; - AlterDatabaseExpr_OptionsEntry_DoNotUse(); - explicit PROTOBUF_CONSTEXPR AlterDatabaseExpr_OptionsEntry_DoNotUse( - ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - explicit AlterDatabaseExpr_OptionsEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena); - void MergeFrom(const AlterDatabaseExpr_OptionsEntry_DoNotUse& other); - static const AlterDatabaseExpr_OptionsEntry_DoNotUse* internal_default_instance() { return reinterpret_cast(&_AlterDatabaseExpr_OptionsEntry_DoNotUse_default_instance_); } - static bool ValidateKey(std::string* s) { - return ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(s->data(), static_cast(s->size()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "greptime.v1.AlterDatabaseExpr.OptionsEntry.key"); - } - static bool ValidateValue(std::string* s) { - return ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(s->data(), static_cast(s->size()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "greptime.v1.AlterDatabaseExpr.OptionsEntry.value"); - } - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - friend struct ::TableStruct_greptime_2fv1_2fddl_2eproto; -}; - -// ------------------------------------------------------------------- - class AlterDatabaseExpr final : public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:greptime.v1.AlterDatabaseExpr) */ { public: @@ -6205,7 +6173,7 @@ class AlterDatabaseExpr final : &_AlterDatabaseExpr_default_instance_); } static constexpr int kIndexInFileMessages = - 32; + 31; friend void swap(AlterDatabaseExpr& a, AlterDatabaseExpr& b) { a.Swap(&b); @@ -6266,8 +6234,6 @@ class AlterDatabaseExpr final : protected: explicit AlterDatabaseExpr(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned = false); - private: - static void ArenaDtor(void* object); public: static const ClassData _class_data_; @@ -6277,32 +6243,13 @@ class AlterDatabaseExpr final : // nested types ---------------------------------------------------- - // accessors ------------------------------------------------------- enum : int { - kOptionsFieldNumber = 3, kCatalogNameFieldNumber = 1, kSchemaNameFieldNumber = 2, kSetDatabaseOptionsFieldNumber = 4, }; - // map options = 3; - int options_size() const; - private: - int _internal_options_size() const; - public: - void clear_options(); - private: - const ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >& - _internal_options() const; - ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >* - _internal_mutable_options(); - public: - const ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >& - options() const; - ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >* - mutable_options(); - // string catalog_name = 1; void clear_catalog_name(); const std::string& catalog_name() const; @@ -6363,11 +6310,6 @@ class AlterDatabaseExpr final : typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::internal::MapField< - AlterDatabaseExpr_OptionsEntry_DoNotUse, - std::string, std::string, - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING, - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING> options_; ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr catalog_name_; ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr schema_name_; union KindUnion { @@ -12215,8 +12157,6 @@ inline void UnsetColumnFulltext::set_allocated_column_name(std::string* column_n // ------------------------------------------------------------------- -// ------------------------------------------------------------------- - // AlterDatabaseExpr // string catalog_name = 1; @@ -12319,35 +12259,6 @@ inline void AlterDatabaseExpr::set_allocated_schema_name(std::string* schema_nam // @@protoc_insertion_point(field_set_allocated:greptime.v1.AlterDatabaseExpr.schema_name) } -// map options = 3; -inline int AlterDatabaseExpr::_internal_options_size() const { - return _impl_.options_.size(); -} -inline int AlterDatabaseExpr::options_size() const { - return _internal_options_size(); -} -inline void AlterDatabaseExpr::clear_options() { - _impl_.options_.Clear(); -} -inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >& -AlterDatabaseExpr::_internal_options() const { - return _impl_.options_.GetMap(); -} -inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >& -AlterDatabaseExpr::options() const { - // @@protoc_insertion_point(field_map:greptime.v1.AlterDatabaseExpr.options) - return _internal_options(); -} -inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >* -AlterDatabaseExpr::_internal_mutable_options() { - return _impl_.options_.MutableMap(); -} -inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >* -AlterDatabaseExpr::mutable_options() { - // @@protoc_insertion_point(field_mutable_map:greptime.v1.AlterDatabaseExpr.options) - return _internal_mutable_options(); -} - // .greptime.v1.SetDatabaseOptions set_database_options = 4; inline bool AlterDatabaseExpr::_internal_has_set_database_options() const { return kind_case() == kSetDatabaseOptions; @@ -12496,8 +12407,6 @@ inline AlterDatabaseExpr::KindCase AlterDatabaseExpr::kind_case() const { // ------------------------------------------------------------------- -// ------------------------------------------------------------------- - // @@protoc_insertion_point(namespace_scope) diff --git a/go/greptime/v1/ddl.pb.go b/go/greptime/v1/ddl.pb.go index 6c459ac8..7579467d 100644 --- a/go/greptime/v1/ddl.pb.go +++ b/go/greptime/v1/ddl.pb.go @@ -2242,9 +2242,8 @@ type AlterDatabaseExpr 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"` - Options map[string]string `protobuf:"bytes,3,rep,name=options,proto3" json:"options,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + 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"` // Types that are assignable to Kind: // // *AlterDatabaseExpr_SetDatabaseOptions @@ -2297,13 +2296,6 @@ func (x *AlterDatabaseExpr) GetSchemaName() string { return "" } -func (x *AlterDatabaseExpr) GetOptions() map[string]string { - if x != nil { - return x.Options - } - return nil -} - func (m *AlterDatabaseExpr) GetKind() isAlterDatabaseExpr_Kind { if m != nil { return m.Kind @@ -2696,34 +2688,26 @@ var file_greptime_v1_ddl_proto_rawDesc = []byte{ 0x65, 0x22, 0x36, 0x0a, 0x13, 0x55, 0x6e, 0x73, 0x65, 0x74, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x46, 0x75, 0x6c, 0x6c, 0x74, 0x65, 0x78, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, - 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0xb7, 0x02, 0x0a, 0x11, 0x41, 0x6c, + 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0xb4, 0x01, 0x0a, 0x11, 0x41, 0x6c, 0x74, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 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, 0x45, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, - 0x76, 0x31, 0x2e, 0x41, 0x6c, 0x74, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, - 0x45, 0x78, 0x70, 0x72, 0x2e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x53, 0x0a, 0x14, 0x73, 0x65, - 0x74, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, - 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, - 0x73, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x48, 0x00, 0x52, 0x12, 0x73, 0x65, 0x74, - 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, - 0x3a, 0x0a, 0x0c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, - 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, - 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x06, 0x0a, 0x04, 0x6b, - 0x69, 0x6e, 0x64, 0x2a, 0x24, 0x0a, 0x08, 0x41, 0x6e, 0x61, 0x6c, 0x79, 0x7a, 0x65, 0x72, 0x12, - 0x0b, 0x0a, 0x07, 0x45, 0x4e, 0x47, 0x4c, 0x49, 0x53, 0x48, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, - 0x43, 0x48, 0x49, 0x4e, 0x45, 0x53, 0x45, 0x10, 0x01, 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, + 0x61, 0x6d, 0x65, 0x12, 0x53, 0x0a, 0x14, 0x73, 0x65, 0x74, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x62, + 0x61, 0x73, 0x65, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, + 0x53, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x48, 0x00, 0x52, 0x12, 0x73, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, + 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x06, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, + 0x2a, 0x24, 0x0a, 0x08, 0x41, 0x6e, 0x61, 0x6c, 0x79, 0x7a, 0x65, 0x72, 0x12, 0x0b, 0x0a, 0x07, + 0x45, 0x4e, 0x47, 0x4c, 0x49, 0x53, 0x48, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x43, 0x48, 0x49, + 0x4e, 0x45, 0x53, 0x45, 0x10, 0x01, 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 ( @@ -2739,7 +2723,7 @@ func file_greptime_v1_ddl_proto_rawDescGZIP() []byte { } var file_greptime_v1_ddl_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_greptime_v1_ddl_proto_msgTypes = make([]protoimpl.MessageInfo, 33) +var file_greptime_v1_ddl_proto_msgTypes = make([]protoimpl.MessageInfo, 32) var file_greptime_v1_ddl_proto_goTypes = []interface{}{ (Analyzer)(0), // 0: greptime.v1.Analyzer (AddColumnLocation_LocationType)(0), // 1: greptime.v1.AddColumnLocation.LocationType @@ -2775,13 +2759,12 @@ var file_greptime_v1_ddl_proto_goTypes = []interface{}{ nil, // 31: greptime.v1.CreateFlowExpr.FlowOptionsEntry nil, // 32: greptime.v1.CreateTableExpr.TableOptionsEntry nil, // 33: greptime.v1.CreateDatabaseExpr.OptionsEntry - nil, // 34: greptime.v1.AlterDatabaseExpr.OptionsEntry - (*TableName)(nil), // 35: greptime.v1.TableName - (*ExpireAfter)(nil), // 36: greptime.v1.ExpireAfter - (ColumnDataType)(0), // 37: greptime.v1.ColumnDataType - (*ColumnDataTypeExtension)(nil), // 38: greptime.v1.ColumnDataTypeExtension - (SemanticType)(0), // 39: greptime.v1.SemanticType - (*ColumnOptions)(nil), // 40: greptime.v1.ColumnOptions + (*TableName)(nil), // 34: greptime.v1.TableName + (*ExpireAfter)(nil), // 35: greptime.v1.ExpireAfter + (ColumnDataType)(0), // 36: greptime.v1.ColumnDataType + (*ColumnDataTypeExtension)(nil), // 37: greptime.v1.ColumnDataTypeExtension + (SemanticType)(0), // 38: greptime.v1.SemanticType + (*ColumnOptions)(nil), // 39: greptime.v1.ColumnOptions } var file_greptime_v1_ddl_proto_depIdxs = []int32{ 10, // 0: greptime.v1.DdlRequest.create_database:type_name -> greptime.v1.CreateDatabaseExpr @@ -2794,12 +2777,12 @@ var file_greptime_v1_ddl_proto_depIdxs = []int32{ 5, // 7: greptime.v1.DdlRequest.create_view:type_name -> greptime.v1.CreateViewExpr 6, // 8: greptime.v1.DdlRequest.drop_view:type_name -> greptime.v1.DropViewExpr 30, // 9: greptime.v1.DdlRequest.alter_database:type_name -> greptime.v1.AlterDatabaseExpr - 35, // 10: greptime.v1.CreateFlowExpr.source_table_names:type_name -> greptime.v1.TableName - 35, // 11: greptime.v1.CreateFlowExpr.sink_table_name:type_name -> greptime.v1.TableName - 36, // 12: greptime.v1.CreateFlowExpr.expire_after:type_name -> greptime.v1.ExpireAfter + 34, // 10: greptime.v1.CreateFlowExpr.source_table_names:type_name -> greptime.v1.TableName + 34, // 11: greptime.v1.CreateFlowExpr.sink_table_name:type_name -> greptime.v1.TableName + 35, // 12: greptime.v1.CreateFlowExpr.expire_after:type_name -> greptime.v1.ExpireAfter 31, // 13: greptime.v1.CreateFlowExpr.flow_options:type_name -> greptime.v1.CreateFlowExpr.FlowOptionsEntry 25, // 14: greptime.v1.DropFlowExpr.flow_id:type_name -> greptime.v1.FlowId - 35, // 15: greptime.v1.CreateViewExpr.table_names:type_name -> greptime.v1.TableName + 34, // 15: greptime.v1.CreateViewExpr.table_names:type_name -> greptime.v1.TableName 24, // 16: greptime.v1.DropViewExpr.view_id:type_name -> greptime.v1.TableId 26, // 17: greptime.v1.CreateTableExpr.column_defs:type_name -> greptime.v1.ColumnDef 32, // 18: greptime.v1.CreateTableExpr.table_options:type_name -> greptime.v1.CreateTableExpr.TableOptionsEntry @@ -2820,23 +2803,22 @@ var file_greptime_v1_ddl_proto_depIdxs = []int32{ 18, // 33: greptime.v1.ModifyColumnTypes.modify_column_types:type_name -> greptime.v1.ModifyColumnType 26, // 34: greptime.v1.AddColumn.column_def:type_name -> greptime.v1.ColumnDef 27, // 35: greptime.v1.AddColumn.location:type_name -> greptime.v1.AddColumnLocation - 37, // 36: greptime.v1.ModifyColumnType.target_type:type_name -> greptime.v1.ColumnDataType - 38, // 37: greptime.v1.ModifyColumnType.target_type_extension:type_name -> greptime.v1.ColumnDataTypeExtension + 36, // 36: greptime.v1.ModifyColumnType.target_type:type_name -> greptime.v1.ColumnDataType + 37, // 37: greptime.v1.ModifyColumnType.target_type_extension:type_name -> greptime.v1.ColumnDataTypeExtension 21, // 38: greptime.v1.SetDatabaseOptions.database_options:type_name -> greptime.v1.Option 21, // 39: greptime.v1.SetTableOptions.table_options:type_name -> greptime.v1.Option - 37, // 40: greptime.v1.ColumnDef.data_type:type_name -> greptime.v1.ColumnDataType - 39, // 41: greptime.v1.ColumnDef.semantic_type:type_name -> greptime.v1.SemanticType - 38, // 42: greptime.v1.ColumnDef.datatype_extension:type_name -> greptime.v1.ColumnDataTypeExtension - 40, // 43: greptime.v1.ColumnDef.options:type_name -> greptime.v1.ColumnOptions + 36, // 40: greptime.v1.ColumnDef.data_type:type_name -> greptime.v1.ColumnDataType + 38, // 41: greptime.v1.ColumnDef.semantic_type:type_name -> greptime.v1.SemanticType + 37, // 42: greptime.v1.ColumnDef.datatype_extension:type_name -> greptime.v1.ColumnDataTypeExtension + 39, // 43: greptime.v1.ColumnDef.options:type_name -> greptime.v1.ColumnOptions 1, // 44: greptime.v1.AddColumnLocation.location_type:type_name -> greptime.v1.AddColumnLocation.LocationType 0, // 45: greptime.v1.SetColumnFulltext.analyzer:type_name -> greptime.v1.Analyzer - 34, // 46: greptime.v1.AlterDatabaseExpr.options:type_name -> greptime.v1.AlterDatabaseExpr.OptionsEntry - 19, // 47: greptime.v1.AlterDatabaseExpr.set_database_options:type_name -> greptime.v1.SetDatabaseOptions - 48, // [48:48] is the sub-list for method output_type - 48, // [48:48] is the sub-list for method input_type - 48, // [48:48] is the sub-list for extension type_name - 48, // [48:48] is the sub-list for extension extendee - 0, // [0:48] is the sub-list for field type_name + 19, // 46: greptime.v1.AlterDatabaseExpr.set_database_options:type_name -> greptime.v1.SetDatabaseOptions + 47, // [47:47] is the sub-list for method output_type + 47, // [47:47] is the sub-list for method input_type + 47, // [47:47] is the sub-list for extension type_name + 47, // [47:47] is the sub-list for extension extendee + 0, // [0:47] is the sub-list for field type_name } func init() { file_greptime_v1_ddl_proto_init() } @@ -3226,7 +3208,7 @@ func file_greptime_v1_ddl_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_greptime_v1_ddl_proto_rawDesc, NumEnums: 2, - NumMessages: 33, + NumMessages: 32, NumExtensions: 0, NumServices: 0, }, diff --git a/java/src/main/java/io/greptime/v1/Ddl.java b/java/src/main/java/io/greptime/v1/Ddl.java index e8571f14..b65a43d1 100644 --- a/java/src/main/java/io/greptime/v1/Ddl.java +++ b/java/src/main/java/io/greptime/v1/Ddl.java @@ -31848,42 +31848,6 @@ public interface AlterDatabaseExprOrBuilder extends com.google.protobuf.ByteString getSchemaNameBytes(); - /** - * map<string, string> options = 3; - */ - int getOptionsCount(); - /** - * map<string, string> options = 3; - */ - boolean containsOptions( - java.lang.String key); - /** - * Use {@link #getOptionsMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getOptions(); - /** - * map<string, string> options = 3; - */ - java.util.Map - getOptionsMap(); - /** - * map<string, string> options = 3; - */ - - /* nullable */ -java.lang.String getOptionsOrDefault( - java.lang.String key, - /* nullable */ -java.lang.String defaultValue); - /** - * map<string, string> options = 3; - */ - - java.lang.String getOptionsOrThrow( - java.lang.String key); - /** * .greptime.v1.SetDatabaseOptions set_database_options = 4; * @return Whether the setDatabaseOptions field is set. @@ -31938,7 +31902,6 @@ private AlterDatabaseExpr( if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } - int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { @@ -31961,19 +31924,6 @@ private AlterDatabaseExpr( schemaName_ = s; break; } - case 26: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - options_ = com.google.protobuf.MapField.newMapField( - OptionsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry - options__ = input.readMessage( - OptionsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - options_.getMutableMap().put( - options__.getKey(), options__.getValue()); - break; - } case 34: { io.greptime.v1.Ddl.SetDatabaseOptions.Builder subBuilder = null; if (kindCase_ == 4) { @@ -32014,18 +31964,6 @@ private AlterDatabaseExpr( return io.greptime.v1.Ddl.internal_static_greptime_v1_AlterDatabaseExpr_descriptor; } - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 3: - return internalGetOptions(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { @@ -32149,87 +32087,6 @@ public java.lang.String getSchemaName() { } } - public static final int OPTIONS_FIELD_NUMBER = 3; - private static final class OptionsDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, java.lang.String> defaultEntry = - com.google.protobuf.MapEntry - .newDefaultInstance( - io.greptime.v1.Ddl.internal_static_greptime_v1_AlterDatabaseExpr_OptionsEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - private com.google.protobuf.MapField< - java.lang.String, java.lang.String> options_; - private com.google.protobuf.MapField - internalGetOptions() { - if (options_ == null) { - return com.google.protobuf.MapField.emptyMapField( - OptionsDefaultEntryHolder.defaultEntry); - } - return options_; - } - - public int getOptionsCount() { - return internalGetOptions().getMap().size(); - } - /** - * map<string, string> options = 3; - */ - - @java.lang.Override - public boolean containsOptions( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetOptions().getMap().containsKey(key); - } - /** - * Use {@link #getOptionsMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getOptions() { - return getOptionsMap(); - } - /** - * map<string, string> options = 3; - */ - @java.lang.Override - - public java.util.Map getOptionsMap() { - return internalGetOptions().getMap(); - } - /** - * map<string, string> options = 3; - */ - @java.lang.Override - - public java.lang.String getOptionsOrDefault( - java.lang.String key, - java.lang.String defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetOptions().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<string, string> options = 3; - */ - @java.lang.Override - - public java.lang.String getOptionsOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetOptions().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - public static final int SET_DATABASE_OPTIONS_FIELD_NUMBER = 4; /** * .greptime.v1.SetDatabaseOptions set_database_options = 4; @@ -32281,12 +32138,6 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(schemaName_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, schemaName_); } - com.google.protobuf.GeneratedMessageV3 - .serializeStringMapTo( - output, - internalGetOptions(), - OptionsDefaultEntryHolder.defaultEntry, - 3); if (kindCase_ == 4) { output.writeMessage(4, (io.greptime.v1.Ddl.SetDatabaseOptions) kind_); } @@ -32305,16 +32156,6 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(schemaName_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, schemaName_); } - for (java.util.Map.Entry entry - : internalGetOptions().getMap().entrySet()) { - com.google.protobuf.MapEntry - options__ = OptionsDefaultEntryHolder.defaultEntry.newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, options__); - } if (kindCase_ == 4) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(4, (io.greptime.v1.Ddl.SetDatabaseOptions) kind_); @@ -32338,8 +32179,6 @@ public boolean equals(final java.lang.Object obj) { .equals(other.getCatalogName())) return false; if (!getSchemaName() .equals(other.getSchemaName())) return false; - if (!internalGetOptions().equals( - other.internalGetOptions())) return false; if (!getKindCase().equals(other.getKindCase())) return false; switch (kindCase_) { case 4: @@ -32364,10 +32203,6 @@ public int hashCode() { hash = (53 * hash) + getCatalogName().hashCode(); hash = (37 * hash) + SCHEMA_NAME_FIELD_NUMBER; hash = (53 * hash) + getSchemaName().hashCode(); - if (!internalGetOptions().getMap().isEmpty()) { - hash = (37 * hash) + OPTIONS_FIELD_NUMBER; - hash = (53 * hash) + internalGetOptions().hashCode(); - } switch (kindCase_) { case 4: hash = (37 * hash) + SET_DATABASE_OPTIONS_FIELD_NUMBER; @@ -32483,28 +32318,6 @@ public static final class Builder extends return io.greptime.v1.Ddl.internal_static_greptime_v1_AlterDatabaseExpr_descriptor; } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField( - int number) { - switch (number) { - case 3: - return internalGetOptions(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField( - int number) { - switch (number) { - case 3: - return internalGetMutableOptions(); - default: - throw new RuntimeException( - "Invalid map field number: " + number); - } - } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { @@ -32535,7 +32348,6 @@ public Builder clear() { schemaName_ = ""; - internalGetMutableOptions().clear(); kindCase_ = 0; kind_ = null; return this; @@ -32564,11 +32376,8 @@ public io.greptime.v1.Ddl.AlterDatabaseExpr build() { @java.lang.Override public io.greptime.v1.Ddl.AlterDatabaseExpr buildPartial() { io.greptime.v1.Ddl.AlterDatabaseExpr result = new io.greptime.v1.Ddl.AlterDatabaseExpr(this); - int from_bitField0_ = bitField0_; result.catalogName_ = catalogName_; result.schemaName_ = schemaName_; - result.options_ = internalGetOptions(); - result.options_.makeImmutable(); if (kindCase_ == 4) { if (setDatabaseOptionsBuilder_ == null) { result.kind_ = kind_; @@ -32633,8 +32442,6 @@ public Builder mergeFrom(io.greptime.v1.Ddl.AlterDatabaseExpr other) { schemaName_ = other.schemaName_; onChanged(); } - internalGetMutableOptions().mergeFrom( - other.internalGetOptions()); switch (other.getKindCase()) { case SET_DATABASE_OPTIONS: { mergeSetDatabaseOptions(other.getSetDatabaseOptions()); @@ -32687,7 +32494,6 @@ public Builder clearKind() { return this; } - private int bitField0_; private java.lang.Object catalogName_ = ""; /** @@ -32841,137 +32647,6 @@ public Builder setSchemaNameBytes( return this; } - private com.google.protobuf.MapField< - java.lang.String, java.lang.String> options_; - private com.google.protobuf.MapField - internalGetOptions() { - if (options_ == null) { - return com.google.protobuf.MapField.emptyMapField( - OptionsDefaultEntryHolder.defaultEntry); - } - return options_; - } - private com.google.protobuf.MapField - internalGetMutableOptions() { - onChanged();; - if (options_ == null) { - options_ = com.google.protobuf.MapField.newMapField( - OptionsDefaultEntryHolder.defaultEntry); - } - if (!options_.isMutable()) { - options_ = options_.copy(); - } - return options_; - } - - public int getOptionsCount() { - return internalGetOptions().getMap().size(); - } - /** - * map<string, string> options = 3; - */ - - @java.lang.Override - public boolean containsOptions( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - return internalGetOptions().getMap().containsKey(key); - } - /** - * Use {@link #getOptionsMap()} instead. - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getOptions() { - return getOptionsMap(); - } - /** - * map<string, string> options = 3; - */ - @java.lang.Override - - public java.util.Map getOptionsMap() { - return internalGetOptions().getMap(); - } - /** - * map<string, string> options = 3; - */ - @java.lang.Override - - public java.lang.String getOptionsOrDefault( - java.lang.String key, - java.lang.String defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetOptions().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * map<string, string> options = 3; - */ - @java.lang.Override - - public java.lang.String getOptionsOrThrow( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetOptions().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearOptions() { - internalGetMutableOptions().getMutableMap() - .clear(); - return this; - } - /** - * map<string, string> options = 3; - */ - - public Builder removeOptions( - java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } - internalGetMutableOptions().getMutableMap() - .remove(key); - return this; - } - /** - * Use alternate mutation accessors instead. - */ - @java.lang.Deprecated - public java.util.Map - getMutableOptions() { - return internalGetMutableOptions().getMutableMap(); - } - /** - * map<string, string> options = 3; - */ - public Builder putOptions( - java.lang.String key, - java.lang.String value) { - if (key == null) { throw new NullPointerException("map key"); } - if (value == null) { - throw new NullPointerException("map value"); -} - - internalGetMutableOptions().getMutableMap() - .put(key, value); - return this; - } - /** - * map<string, string> options = 3; - */ - - public Builder putAllOptions( - java.util.Map values) { - internalGetMutableOptions().getMutableMap() - .putAll(values); - return this; - } - private com.google.protobuf.SingleFieldBuilderV3< io.greptime.v1.Ddl.SetDatabaseOptions, io.greptime.v1.Ddl.SetDatabaseOptions.Builder, io.greptime.v1.Ddl.SetDatabaseOptionsOrBuilder> setDatabaseOptionsBuilder_; /** @@ -33326,11 +33001,6 @@ public io.greptime.v1.Ddl.AlterDatabaseExpr getDefaultInstanceForType() { private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_greptime_v1_AlterDatabaseExpr_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_greptime_v1_AlterDatabaseExpr_OptionsEntry_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_greptime_v1_AlterDatabaseExpr_OptionsEntry_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { @@ -33451,16 +33121,14 @@ public io.greptime.v1.Ddl.AlterDatabaseExpr getDefaultInstanceForType() { "\022\023\n\013column_name\030\001 \001(\t\022\016\n\006enable\030\002 \001(\010\022\'\n" + "\010analyzer\030\003 \001(\0162\025.greptime.v1.Analyzer\022\026" + "\n\016case_sensitive\030\004 \001(\010\"*\n\023UnsetColumnFul" + - "ltext\022\023\n\013column_name\030\001 \001(\t\"\365\001\n\021AlterData" + + "ltext\022\023\n\013column_name\030\001 \001(\t\"\207\001\n\021AlterData" + "baseExpr\022\024\n\014catalog_name\030\001 \001(\t\022\023\n\013schema" + - "_name\030\002 \001(\t\022<\n\007options\030\003 \003(\0132+.greptime." + - "v1.AlterDatabaseExpr.OptionsEntry\022?\n\024set" + - "_database_options\030\004 \001(\0132\037.greptime.v1.Se" + - "tDatabaseOptionsH\000\032.\n\014OptionsEntry\022\013\n\003ke" + - "y\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001B\006\n\004kind*$\n\010An" + - "alyzer\022\013\n\007ENGLISH\020\000\022\013\n\007CHINESE\020\001BL\n\016io.g" + - "reptime.v1B\003DdlZ5github.com/GreptimeTeam" + - "/greptime-proto/go/greptime/v1b\006proto3" + "_name\030\002 \001(\t\022?\n\024set_database_options\030\004 \001(" + + "\0132\037.greptime.v1.SetDatabaseOptionsH\000B\006\n\004" + + "kind*$\n\010Analyzer\022\013\n\007ENGLISH\020\000\022\013\n\007CHINESE" + + "\020\001BL\n\016io.greptime.v1B\003DdlZ5github.com/Gr" + + "eptimeTeam/greptime-proto/go/greptime/v1" + + "b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, @@ -33658,13 +33326,7 @@ public io.greptime.v1.Ddl.AlterDatabaseExpr getDefaultInstanceForType() { internal_static_greptime_v1_AlterDatabaseExpr_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_greptime_v1_AlterDatabaseExpr_descriptor, - new java.lang.String[] { "CatalogName", "SchemaName", "Options", "SetDatabaseOptions", "Kind", }); - internal_static_greptime_v1_AlterDatabaseExpr_OptionsEntry_descriptor = - internal_static_greptime_v1_AlterDatabaseExpr_descriptor.getNestedTypes().get(0); - internal_static_greptime_v1_AlterDatabaseExpr_OptionsEntry_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_greptime_v1_AlterDatabaseExpr_OptionsEntry_descriptor, - new java.lang.String[] { "Key", "Value", }); + new java.lang.String[] { "CatalogName", "SchemaName", "SetDatabaseOptions", "Kind", }); io.greptime.v1.Common.getDescriptor(); } diff --git a/proto/greptime/v1/ddl.proto b/proto/greptime/v1/ddl.proto index 3cf4a7cd..93a1eb10 100644 --- a/proto/greptime/v1/ddl.proto +++ b/proto/greptime/v1/ddl.proto @@ -230,7 +230,6 @@ message UnsetColumnFulltext { message AlterDatabaseExpr { string catalog_name = 1; string schema_name = 2; - map options = 3; oneof kind { SetDatabaseOptions set_database_options = 4; }