diff --git a/c++/greptime/v1/ddl.pb.cc b/c++/greptime/v1/ddl.pb.cc index 8d4a1450..18e043fc 100644 --- a/c++/greptime/v1/ddl.pb.cc +++ b/c++/greptime/v1/ddl.pb.cc @@ -118,6 +118,7 @@ PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORIT PROTOBUF_CONSTEXPR CreateDatabaseExpr::CreateDatabaseExpr( ::_pbi::ConstantInitialized): _impl_{ /*decltype(_impl_.options_)*/{::_pbi::ConstantInitialized()} + , /*decltype(_impl_.catalog_name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} , /*decltype(_impl_.database_name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} , /*decltype(_impl_.create_if_not_exists_)*/false , /*decltype(_impl_._cached_size_)*/{}} {} @@ -359,6 +360,7 @@ const uint32_t TableStruct_greptime_2fv1_2fddl_2eproto::offsets[] PROTOBUF_SECTI ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::greptime::v1::CreateDatabaseExpr, _impl_.catalog_name_), PROTOBUF_FIELD_OFFSET(::greptime::v1::CreateDatabaseExpr, _impl_.database_name_), PROTOBUF_FIELD_OFFSET(::greptime::v1::CreateDatabaseExpr, _impl_.create_if_not_exists_), PROTOBUF_FIELD_OFFSET(::greptime::v1::CreateDatabaseExpr, _impl_.options_), @@ -454,16 +456,16 @@ static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protode { 52, -1, -1, sizeof(::greptime::v1::DropTableExpr)}, { 63, 71, -1, sizeof(::greptime::v1::CreateDatabaseExpr_OptionsEntry_DoNotUse)}, { 73, -1, -1, sizeof(::greptime::v1::CreateDatabaseExpr)}, - { 82, -1, -1, sizeof(::greptime::v1::TruncateTableExpr)}, - { 92, -1, -1, sizeof(::greptime::v1::DropDatabaseExpr)}, - { 101, -1, -1, sizeof(::greptime::v1::AddColumns)}, - { 108, -1, -1, sizeof(::greptime::v1::DropColumns)}, - { 115, -1, -1, sizeof(::greptime::v1::RenameTable)}, - { 122, -1, -1, sizeof(::greptime::v1::AddColumn)}, - { 130, -1, -1, sizeof(::greptime::v1::DropColumn)}, - { 137, -1, -1, sizeof(::greptime::v1::TableId)}, - { 144, -1, -1, sizeof(::greptime::v1::ColumnDef)}, - { 157, -1, -1, sizeof(::greptime::v1::AddColumnLocation)}, + { 83, -1, -1, sizeof(::greptime::v1::TruncateTableExpr)}, + { 93, -1, -1, sizeof(::greptime::v1::DropDatabaseExpr)}, + { 102, -1, -1, sizeof(::greptime::v1::AddColumns)}, + { 109, -1, -1, sizeof(::greptime::v1::DropColumns)}, + { 116, -1, -1, sizeof(::greptime::v1::RenameTable)}, + { 123, -1, -1, sizeof(::greptime::v1::AddColumn)}, + { 131, -1, -1, sizeof(::greptime::v1::DropColumn)}, + { 138, -1, -1, sizeof(::greptime::v1::TableId)}, + { 145, -1, -1, sizeof(::greptime::v1::ColumnDef)}, + { 158, -1, -1, sizeof(::greptime::v1::AddColumnLocation)}, }; static const ::_pb::Message* const file_default_instances[] = { @@ -515,44 +517,44 @@ const char descriptor_table_protodef_greptime_2fv1_2fddl_2eproto[] PROTOBUF_SECT "alog_name\030\001 \001(\t\022\023\n\013schema_name\030\002 \001(\t\022\022\n\n" "table_name\030\003 \001(\t\022&\n\010table_id\030\004 \001(\0132\024.gre" "ptime.v1.TableId\022\026\n\016drop_if_exists\030\005 \001(\010" - "\"\270\001\n\022CreateDatabaseExpr\022\025\n\rdatabase_name" - "\030\001 \001(\t\022\034\n\024create_if_not_exists\030\002 \001(\010\022=\n\007" - "options\030\003 \003(\0132,.greptime.v1.CreateDataba" - "seExpr.OptionsEntry\032.\n\014OptionsEntry\022\013\n\003k" - "ey\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"z\n\021TruncateT" - "ableExpr\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\"U\n\020DropD" - "atabaseExpr\022\024\n\014catalog_name\030\001 \001(\t\022\023\n\013sch" - "ema_name\030\002 \001(\t\022\026\n\016drop_if_exists\030\003 \001(\010\"9" - "\n\nAddColumns\022+\n\013add_columns\030\001 \003(\0132\026.grep" - "time.v1.AddColumn\"<\n\013DropColumns\022-\n\014drop" - "_columns\030\001 \003(\0132\027.greptime.v1.DropColumn\"" - "%\n\013RenameTable\022\026\n\016new_table_name\030\001 \001(\t\"i" - "\n\tAddColumn\022*\n\ncolumn_def\030\001 \001(\0132\026.grepti" - "me.v1.ColumnDef\0220\n\010location\030\003 \001(\0132\036.grep" - "time.v1.AddColumnLocation\"\032\n\nDropColumn\022" - "\014\n\004name\030\001 \001(\t\"\025\n\007TableId\022\n\n\002id\030\001 \001(\r\"\377\001\n" - "\tColumnDef\022\014\n\004name\030\001 \001(\t\022.\n\tdata_type\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\0220\n\rsemantic_type\030\005 \001(\0162\031.greptime.v1.S" - "emanticType\022\017\n\007comment\030\006 \001(\t\022@\n\022datatype" - "_extension\030\007 \001(\0132$.greptime.v1.ColumnDat" - "aTypeExtension\"\230\001\n\021AddColumnLocation\022B\n\r" - "location_type\030\001 \001(\0162+.greptime.v1.AddCol" - "umnLocation.LocationType\022\031\n\021after_column" - "_name\030\002 \001(\t\"$\n\014LocationType\022\t\n\005FIRST\020\000\022\t" - "\n\005AFTER\020\001BL\n\016io.greptime.v1B\003DdlZ5github" - ".com/GreptimeTeam/greptime-proto/go/grep" - "time/v1b\006proto3" + "\"\316\001\n\022CreateDatabaseExpr\022\024\n\014catalog_name\030" + "\001 \001(\t\022\025\n\rdatabase_name\030\002 \001(\t\022\034\n\024create_i" + "f_not_exists\030\003 \001(\010\022=\n\007options\030\004 \003(\0132,.gr" + "eptime.v1.CreateDatabaseExpr.OptionsEntr" + "y\032.\n\014OptionsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030" + "\002 \001(\t:\0028\001\"z\n\021TruncateTableExpr\022\024\n\014catalo" + "g_name\030\001 \001(\t\022\023\n\013schema_name\030\002 \001(\t\022\022\n\ntab" + "le_name\030\003 \001(\t\022&\n\010table_id\030\004 \001(\0132\024.grepti" + "me.v1.TableId\"U\n\020DropDatabaseExpr\022\024\n\014cat" + "alog_name\030\001 \001(\t\022\023\n\013schema_name\030\002 \001(\t\022\026\n\016" + "drop_if_exists\030\003 \001(\010\"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\"i\n\tAddColumn\022*\n\ncol" + "umn_def\030\001 \001(\0132\026.greptime.v1.ColumnDef\0220\n" + "\010location\030\003 \001(\0132\036.greptime.v1.AddColumnL" + "ocation\"\032\n\nDropColumn\022\014\n\004name\030\001 \001(\t\"\025\n\007T" + "ableId\022\n\n\002id\030\001 \001(\r\"\377\001\n\tColumnDef\022\014\n\004name" + "\030\001 \001(\t\022.\n\tdata_type\030\002 \001(\0162\033.greptime.v1." + "ColumnDataType\022\023\n\013is_nullable\030\003 \001(\010\022\032\n\022d" + "efault_constraint\030\004 \001(\014\0220\n\rsemantic_type" + "\030\005 \001(\0162\031.greptime.v1.SemanticType\022\017\n\007com" + "ment\030\006 \001(\t\022@\n\022datatype_extension\030\007 \001(\0132$" + ".greptime.v1.ColumnDataTypeExtension\"\230\001\n" + "\021AddColumnLocation\022B\n\rlocation_type\030\001 \001(" + "\0162+.greptime.v1.AddColumnLocation.Locati" + "onType\022\031\n\021after_column_name\030\002 \001(\t\"$\n\014Loc" + "ationType\022\t\n\005FIRST\020\000\022\t\n\005AFTER\020\001BL\n\016io.gr" + "eptime.v1B\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, 2335, descriptor_table_protodef_greptime_2fv1_2fddl_2eproto, + false, false, 2357, 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, 17, schemas, file_default_instances, TableStruct_greptime_2fv1_2fddl_2eproto::offsets, @@ -2674,12 +2676,21 @@ CreateDatabaseExpr::CreateDatabaseExpr(const CreateDatabaseExpr& from) CreateDatabaseExpr* const _this = this; (void)_this; new (&_impl_) Impl_{ /*decltype(_impl_.options_)*/{} + , decltype(_impl_.catalog_name_){} , decltype(_impl_.database_name_){} , decltype(_impl_.create_if_not_exists_){} , /*decltype(_impl_._cached_size_)*/{}}; _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()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_catalog_name().empty()) { + _this->_impl_.catalog_name_.Set(from._internal_catalog_name(), + _this->GetArenaForAllocation()); + } _impl_.database_name_.InitDefault(); #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING _impl_.database_name_.Set("", GetArenaForAllocation()); @@ -2698,10 +2709,15 @@ inline void CreateDatabaseExpr::SharedCtor( (void)is_message_owned; new (&_impl_) Impl_{ /*decltype(_impl_.options_)*/{::_pbi::ArenaInitialized(), arena} + , decltype(_impl_.catalog_name_){} , decltype(_impl_.database_name_){} , decltype(_impl_.create_if_not_exists_){false} , /*decltype(_impl_._cached_size_)*/{} }; + _impl_.catalog_name_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.catalog_name_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING _impl_.database_name_.InitDefault(); #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING _impl_.database_name_.Set("", GetArenaForAllocation()); @@ -2722,6 +2738,7 @@ inline void CreateDatabaseExpr::SharedDtor() { GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); _impl_.options_.Destruct(); _impl_.options_.~MapField(); + _impl_.catalog_name_.Destroy(); _impl_.database_name_.Destroy(); } @@ -2740,6 +2757,7 @@ void CreateDatabaseExpr::Clear() { (void) cached_has_bits; _impl_.options_.Clear(); + _impl_.catalog_name_.ClearToEmpty(); _impl_.database_name_.ClearToEmpty(); _impl_.create_if_not_exists_ = false; _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); @@ -2751,9 +2769,19 @@ const char* CreateDatabaseExpr::_InternalParse(const char* ptr, ::_pbi::ParseCon uint32_t tag; ptr = ::_pbi::ReadTag(ptr, &tag); switch (tag >> 3) { - // string database_name = 1; + // string catalog_name = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_catalog_name(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "greptime.v1.CreateDatabaseExpr.catalog_name")); + } else + goto handle_unusual; + continue; + // string database_name = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { auto str = _internal_mutable_database_name(); ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); CHK_(ptr); @@ -2761,24 +2789,24 @@ const char* CreateDatabaseExpr::_InternalParse(const char* ptr, ::_pbi::ParseCon } else goto handle_unusual; continue; - // bool create_if_not_exists = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { + // bool create_if_not_exists = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 24)) { _impl_.create_if_not_exists_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; continue; - // map options = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { + // map options = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 34)) { 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)); + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<34>(ptr)); } else goto handle_unusual; continue; @@ -2811,23 +2839,33 @@ uint8_t* CreateDatabaseExpr::_InternalSerialize( uint32_t cached_has_bits = 0; (void) cached_has_bits; - // string database_name = 1; + // string catalog_name = 1; + if (!this->_internal_catalog_name().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_catalog_name().data(), static_cast(this->_internal_catalog_name().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "greptime.v1.CreateDatabaseExpr.catalog_name"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_catalog_name(), target); + } + + // string database_name = 2; if (!this->_internal_database_name().empty()) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( this->_internal_database_name().data(), static_cast(this->_internal_database_name().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "greptime.v1.CreateDatabaseExpr.database_name"); target = stream->WriteStringMaybeAliased( - 1, this->_internal_database_name(), target); + 2, this->_internal_database_name(), target); } - // bool create_if_not_exists = 2; + // bool create_if_not_exists = 3; if (this->_internal_create_if_not_exists() != 0) { target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray(2, this->_internal_create_if_not_exists(), target); + target = ::_pbi::WireFormatLite::WriteBoolToArray(3, this->_internal_create_if_not_exists(), target); } - // map options = 3; + // map options = 4; if (!this->_internal_options().empty()) { using MapType = ::_pb::Map; using WireHelper = CreateDatabaseExpr_OptionsEntry_DoNotUse::Funcs; @@ -2846,12 +2884,12 @@ uint8_t* CreateDatabaseExpr::_InternalSerialize( 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); + target = WireHelper::InternalSerialize(4, 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); + target = WireHelper::InternalSerialize(4, entry.first, entry.second, target, stream); check_utf8(entry); } } @@ -2873,7 +2911,7 @@ size_t CreateDatabaseExpr::ByteSizeLong() const { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - // map options = 3; + // map options = 4; total_size += 1 * ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_options_size()); for (::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_iterator @@ -2882,14 +2920,21 @@ size_t CreateDatabaseExpr::ByteSizeLong() const { total_size += CreateDatabaseExpr_OptionsEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second); } - // string database_name = 1; + // string catalog_name = 1; + if (!this->_internal_catalog_name().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_catalog_name()); + } + + // string database_name = 2; if (!this->_internal_database_name().empty()) { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( this->_internal_database_name()); } - // bool create_if_not_exists = 2; + // bool create_if_not_exists = 3; if (this->_internal_create_if_not_exists() != 0) { total_size += 1 + 1; } @@ -2913,6 +2958,9 @@ void CreateDatabaseExpr::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, con (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()); + } if (!from._internal_database_name().empty()) { _this->_internal_set_database_name(from._internal_database_name()); } @@ -2939,6 +2987,10 @@ void CreateDatabaseExpr::InternalSwap(CreateDatabaseExpr* other) { 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 + ); ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( &_impl_.database_name_, lhs_arena, &other->_impl_.database_name_, rhs_arena diff --git a/c++/greptime/v1/ddl.pb.h b/c++/greptime/v1/ddl.pb.h index e4ae5aad..bfa75b55 100644 --- a/c++/greptime/v1/ddl.pb.h +++ b/c++/greptime/v1/ddl.pb.h @@ -1413,11 +1413,12 @@ class CreateDatabaseExpr final : // accessors ------------------------------------------------------- enum : int { - kOptionsFieldNumber = 3, - kDatabaseNameFieldNumber = 1, - kCreateIfNotExistsFieldNumber = 2, + kOptionsFieldNumber = 4, + kCatalogNameFieldNumber = 1, + kDatabaseNameFieldNumber = 2, + kCreateIfNotExistsFieldNumber = 3, }; - // map options = 3; + // map options = 4; int options_size() const; private: int _internal_options_size() const; @@ -1434,7 +1435,21 @@ class CreateDatabaseExpr final : ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >* mutable_options(); - // string database_name = 1; + // string catalog_name = 1; + void clear_catalog_name(); + const std::string& catalog_name() const; + template + void set_catalog_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_catalog_name(); + PROTOBUF_NODISCARD std::string* release_catalog_name(); + void set_allocated_catalog_name(std::string* catalog_name); + private: + const std::string& _internal_catalog_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_catalog_name(const std::string& value); + std::string* _internal_mutable_catalog_name(); + public: + + // string database_name = 2; void clear_database_name(); const std::string& database_name() const; template @@ -1448,7 +1463,7 @@ class CreateDatabaseExpr final : std::string* _internal_mutable_database_name(); public: - // bool create_if_not_exists = 2; + // bool create_if_not_exists = 3; void clear_create_if_not_exists(); bool create_if_not_exists() const; void set_create_if_not_exists(bool value); @@ -1470,6 +1485,7 @@ class CreateDatabaseExpr final : 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 database_name_; bool create_if_not_exists_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; @@ -4844,7 +4860,57 @@ inline void DropTableExpr::set_drop_if_exists(bool value) { // CreateDatabaseExpr -// string database_name = 1; +// string catalog_name = 1; +inline void CreateDatabaseExpr::clear_catalog_name() { + _impl_.catalog_name_.ClearToEmpty(); +} +inline const std::string& CreateDatabaseExpr::catalog_name() const { + // @@protoc_insertion_point(field_get:greptime.v1.CreateDatabaseExpr.catalog_name) + return _internal_catalog_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void CreateDatabaseExpr::set_catalog_name(ArgT0&& arg0, ArgT... args) { + + _impl_.catalog_name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:greptime.v1.CreateDatabaseExpr.catalog_name) +} +inline std::string* CreateDatabaseExpr::mutable_catalog_name() { + std::string* _s = _internal_mutable_catalog_name(); + // @@protoc_insertion_point(field_mutable:greptime.v1.CreateDatabaseExpr.catalog_name) + return _s; +} +inline const std::string& CreateDatabaseExpr::_internal_catalog_name() const { + return _impl_.catalog_name_.Get(); +} +inline void CreateDatabaseExpr::_internal_set_catalog_name(const std::string& value) { + + _impl_.catalog_name_.Set(value, GetArenaForAllocation()); +} +inline std::string* CreateDatabaseExpr::_internal_mutable_catalog_name() { + + return _impl_.catalog_name_.Mutable(GetArenaForAllocation()); +} +inline std::string* CreateDatabaseExpr::release_catalog_name() { + // @@protoc_insertion_point(field_release:greptime.v1.CreateDatabaseExpr.catalog_name) + return _impl_.catalog_name_.Release(); +} +inline void CreateDatabaseExpr::set_allocated_catalog_name(std::string* catalog_name) { + if (catalog_name != nullptr) { + + } else { + + } + _impl_.catalog_name_.SetAllocated(catalog_name, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.catalog_name_.IsDefault()) { + _impl_.catalog_name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:greptime.v1.CreateDatabaseExpr.catalog_name) +} + +// string database_name = 2; inline void CreateDatabaseExpr::clear_database_name() { _impl_.database_name_.ClearToEmpty(); } @@ -4894,7 +4960,7 @@ inline void CreateDatabaseExpr::set_allocated_database_name(std::string* databas // @@protoc_insertion_point(field_set_allocated:greptime.v1.CreateDatabaseExpr.database_name) } -// bool create_if_not_exists = 2; +// bool create_if_not_exists = 3; inline void CreateDatabaseExpr::clear_create_if_not_exists() { _impl_.create_if_not_exists_ = false; } @@ -4914,7 +4980,7 @@ inline void CreateDatabaseExpr::set_create_if_not_exists(bool value) { // @@protoc_insertion_point(field_set:greptime.v1.CreateDatabaseExpr.create_if_not_exists) } -// map options = 3; +// map options = 4; inline int CreateDatabaseExpr::_internal_options_size() const { return _impl_.options_.size(); } diff --git a/c++/greptime/v1/meta/ddl.pb.cc b/c++/greptime/v1/meta/ddl.pb.cc index 8ff0583d..7ef3cc43 100644 --- a/c++/greptime/v1/meta/ddl.pb.cc +++ b/c++/greptime/v1/meta/ddl.pb.cc @@ -23,6 +23,19 @@ namespace _pbi = _pb::internal; namespace greptime { namespace v1 { namespace meta { +PROTOBUF_CONSTEXPR CreateDatabaseTask::CreateDatabaseTask( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.create_database_)*/nullptr + , /*decltype(_impl_._cached_size_)*/{}} {} +struct CreateDatabaseTaskDefaultTypeInternal { + PROTOBUF_CONSTEXPR CreateDatabaseTaskDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~CreateDatabaseTaskDefaultTypeInternal() {} + union { + CreateDatabaseTask _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 CreateDatabaseTaskDefaultTypeInternal _CreateDatabaseTask_default_instance_; PROTOBUF_CONSTEXPR CreateTableTask::CreateTableTask( ::_pbi::ConstantInitialized): _impl_{ /*decltype(_impl_.partitions_)*/{} @@ -163,11 +176,18 @@ PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORIT } // namespace meta } // namespace v1 } // namespace greptime -static ::_pb::Metadata file_level_metadata_greptime_2fv1_2fmeta_2fddl_2eproto[10]; +static ::_pb::Metadata file_level_metadata_greptime_2fv1_2fmeta_2fddl_2eproto[11]; static const ::_pb::EnumDescriptor* file_level_enum_descriptors_greptime_2fv1_2fmeta_2fddl_2eproto[1]; static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_greptime_2fv1_2fmeta_2fddl_2eproto = nullptr; const uint32_t TableStruct_greptime_2fv1_2fmeta_2fddl_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::greptime::v1::meta::CreateDatabaseTask, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::greptime::v1::meta::CreateDatabaseTask, _impl_.create_database_), ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::greptime::v1::meta::CreateTableTask, _internal_metadata_), ~0u, // no _extensions_ @@ -241,6 +261,7 @@ const uint32_t TableStruct_greptime_2fv1_2fmeta_2fddl_2eproto::offsets[] PROTOBU ::_pbi::kInvalidFieldOffsetTag, ::_pbi::kInvalidFieldOffsetTag, ::_pbi::kInvalidFieldOffsetTag, + ::_pbi::kInvalidFieldOffsetTag, PROTOBUF_FIELD_OFFSET(::greptime::v1::meta::DdlTaskRequest, _impl_.task_), ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::greptime::v1::meta::DdlTaskResponse, _internal_metadata_), @@ -254,19 +275,21 @@ const uint32_t TableStruct_greptime_2fv1_2fmeta_2fddl_2eproto::offsets[] PROTOBU PROTOBUF_FIELD_OFFSET(::greptime::v1::meta::DdlTaskResponse, _impl_.table_ids_), }; static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { - { 0, -1, -1, sizeof(::greptime::v1::meta::CreateTableTask)}, - { 9, -1, -1, sizeof(::greptime::v1::meta::CreateTableTasks)}, - { 16, -1, -1, sizeof(::greptime::v1::meta::DropTableTask)}, - { 23, -1, -1, sizeof(::greptime::v1::meta::DropTableTasks)}, - { 30, -1, -1, sizeof(::greptime::v1::meta::AlterTableTask)}, - { 37, -1, -1, sizeof(::greptime::v1::meta::AlterTableTasks)}, - { 44, -1, -1, sizeof(::greptime::v1::meta::TruncateTableTask)}, - { 51, -1, -1, sizeof(::greptime::v1::meta::DropDatabaseTask)}, - { 58, -1, -1, sizeof(::greptime::v1::meta::DdlTaskRequest)}, - { 74, -1, -1, sizeof(::greptime::v1::meta::DdlTaskResponse)}, + { 0, -1, -1, sizeof(::greptime::v1::meta::CreateDatabaseTask)}, + { 7, -1, -1, sizeof(::greptime::v1::meta::CreateTableTask)}, + { 16, -1, -1, sizeof(::greptime::v1::meta::CreateTableTasks)}, + { 23, -1, -1, sizeof(::greptime::v1::meta::DropTableTask)}, + { 30, -1, -1, sizeof(::greptime::v1::meta::DropTableTasks)}, + { 37, -1, -1, sizeof(::greptime::v1::meta::AlterTableTask)}, + { 44, -1, -1, sizeof(::greptime::v1::meta::AlterTableTasks)}, + { 51, -1, -1, sizeof(::greptime::v1::meta::TruncateTableTask)}, + { 58, -1, -1, sizeof(::greptime::v1::meta::DropDatabaseTask)}, + { 65, -1, -1, sizeof(::greptime::v1::meta::DdlTaskRequest)}, + { 82, -1, -1, sizeof(::greptime::v1::meta::DdlTaskResponse)}, }; static const ::_pb::Message* const file_default_instances[] = { + &::greptime::v1::meta::_CreateDatabaseTask_default_instance_._instance, &::greptime::v1::meta::_CreateTableTask_default_instance_._instance, &::greptime::v1::meta::_CreateTableTasks_default_instance_._instance, &::greptime::v1::meta::_DropTableTask_default_instance_._instance, @@ -283,7 +306,9 @@ const char descriptor_table_protodef_greptime_2fv1_2fmeta_2fddl_2eproto[] PROTOB "\n\032greptime/v1/meta/ddl.proto\022\020greptime.v" "1.meta\032\035greptime/v1/meta/common.proto\032\034g" "reptime/v1/meta/route.proto\032\025greptime/v1" - "/ddl.proto\"\212\001\n\017CreateTableTask\0222\n\014create" + "/ddl.proto\"N\n\022CreateDatabaseTask\0228\n\017crea" + "te_database\030\001 \001(\0132\037.greptime.v1.CreateDa" + "tabaseExpr\"\212\001\n\017CreateTableTask\0222\n\014create" "_table\030\001 \001(\0132\034.greptime.v1.CreateTableEx" "pr\022/\n\npartitions\030\002 \003(\0132\033.greptime.v1.met" "a.Partition\022\022\n\ntable_info\030\003 \001(\014\"D\n\020Creat" @@ -298,7 +323,7 @@ const char descriptor_table_protodef_greptime_2fv1_2fmeta_2fddl_2eproto[] PROTOB "ask\"K\n\021TruncateTableTask\0226\n\016truncate_tab" "le\030\001 \001(\0132\036.greptime.v1.TruncateTableExpr" "\"H\n\020DropDatabaseTask\0224\n\rdrop_database\030\001 " - "\001(\0132\035.greptime.v1.DropDatabaseExpr\"\311\004\n\016D" + "\001(\0132\035.greptime.v1.DropDatabaseExpr\"\217\005\n\016D" "dlTaskRequest\022/\n\006header\030\001 \001(\0132\037.greptime" ".v1.meta.RequestHeader\022>\n\021create_table_t" "ask\030\002 \001(\0132!.greptime.v1.meta.CreateTable" @@ -313,15 +338,17 @@ const char descriptor_table_protodef_greptime_2fv1_2fmeta_2fddl_2eproto[] PROTOB "ksH\000\022>\n\021alter_table_tasks\030\010 \001(\0132!.grepti" "me.v1.meta.AlterTableTasksH\000\022@\n\022drop_dat" "abase_task\030\t \001(\0132\".greptime.v1.meta.Drop" - "DatabaseTaskH\000B\006\n\004task\"\312\001\n\017DdlTaskRespon" - "se\0220\n\006header\030\001 \001(\0132 .greptime.v1.meta.Re" - "sponseHeader\022*\n\003pid\030\002 \001(\0132\035.greptime.v1." - "meta.ProcedureId\022+\n\010table_id\030\004 \001(\0132\031.gre" - "ptime.v1.meta.TableId\022,\n\ttable_ids\030\005 \003(\013" - "2\031.greptime.v1.meta.TableId*#\n\013DdlTaskTy" - "pe\022\n\n\006Create\020\000\022\010\n\004Drop\020\001B_impl_.create_database_; +} +void CreateDatabaseTask::clear_create_database() { + if (GetArenaForAllocation() == nullptr && _impl_.create_database_ != nullptr) { + delete _impl_.create_database_; + } + _impl_.create_database_ = nullptr; +} +CreateDatabaseTask::CreateDatabaseTask(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:greptime.v1.meta.CreateDatabaseTask) +} +CreateDatabaseTask::CreateDatabaseTask(const CreateDatabaseTask& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + CreateDatabaseTask* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.create_database_){nullptr} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + if (from._internal_has_create_database()) { + _this->_impl_.create_database_ = new ::greptime::v1::CreateDatabaseExpr(*from._impl_.create_database_); + } + // @@protoc_insertion_point(copy_constructor:greptime.v1.meta.CreateDatabaseTask) +} + +inline void CreateDatabaseTask::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.create_database_){nullptr} + , /*decltype(_impl_._cached_size_)*/{} + }; +} + +CreateDatabaseTask::~CreateDatabaseTask() { + // @@protoc_insertion_point(destructor:greptime.v1.meta.CreateDatabaseTask) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void CreateDatabaseTask::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + if (this != internal_default_instance()) delete _impl_.create_database_; +} + +void CreateDatabaseTask::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void CreateDatabaseTask::Clear() { +// @@protoc_insertion_point(message_clear_start:greptime.v1.meta.CreateDatabaseTask) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + if (GetArenaForAllocation() == nullptr && _impl_.create_database_ != nullptr) { + delete _impl_.create_database_; + } + _impl_.create_database_ = nullptr; + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* CreateDatabaseTask::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // .greptime.v1.CreateDatabaseExpr create_database = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + ptr = ctx->ParseMessage(_internal_mutable_create_database(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* CreateDatabaseTask::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:greptime.v1.meta.CreateDatabaseTask) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // .greptime.v1.CreateDatabaseExpr create_database = 1; + if (this->_internal_has_create_database()) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(1, _Internal::create_database(this), + _Internal::create_database(this).GetCachedSize(), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:greptime.v1.meta.CreateDatabaseTask) + return target; +} + +size_t CreateDatabaseTask::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:greptime.v1.meta.CreateDatabaseTask) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // .greptime.v1.CreateDatabaseExpr create_database = 1; + if (this->_internal_has_create_database()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *_impl_.create_database_); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData CreateDatabaseTask::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + CreateDatabaseTask::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*CreateDatabaseTask::GetClassData() const { return &_class_data_; } + + +void CreateDatabaseTask::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:greptime.v1.meta.CreateDatabaseTask) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (from._internal_has_create_database()) { + _this->_internal_mutable_create_database()->::greptime::v1::CreateDatabaseExpr::MergeFrom( + from._internal_create_database()); + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void CreateDatabaseTask::CopyFrom(const CreateDatabaseTask& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:greptime.v1.meta.CreateDatabaseTask) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool CreateDatabaseTask::IsInitialized() const { + return true; +} + +void CreateDatabaseTask::InternalSwap(CreateDatabaseTask* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_.create_database_, other->_impl_.create_database_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata CreateDatabaseTask::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_greptime_2fv1_2fmeta_2fddl_2eproto_getter, &descriptor_table_greptime_2fv1_2fmeta_2fddl_2eproto_once, + file_level_metadata_greptime_2fv1_2fmeta_2fddl_2eproto[0]); +} + // =================================================================== class CreateTableTask::_Internal { @@ -641,7 +867,7 @@ void CreateTableTask::InternalSwap(CreateTableTask* other) { ::PROTOBUF_NAMESPACE_ID::Metadata CreateTableTask::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_greptime_2fv1_2fmeta_2fddl_2eproto_getter, &descriptor_table_greptime_2fv1_2fmeta_2fddl_2eproto_once, - file_level_metadata_greptime_2fv1_2fmeta_2fddl_2eproto[0]); + file_level_metadata_greptime_2fv1_2fmeta_2fddl_2eproto[1]); } // =================================================================== @@ -826,7 +1052,7 @@ void CreateTableTasks::InternalSwap(CreateTableTasks* other) { ::PROTOBUF_NAMESPACE_ID::Metadata CreateTableTasks::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_greptime_2fv1_2fmeta_2fddl_2eproto_getter, &descriptor_table_greptime_2fv1_2fmeta_2fddl_2eproto_once, - file_level_metadata_greptime_2fv1_2fmeta_2fddl_2eproto[1]); + file_level_metadata_greptime_2fv1_2fmeta_2fddl_2eproto[2]); } // =================================================================== @@ -1025,7 +1251,7 @@ void DropTableTask::InternalSwap(DropTableTask* other) { ::PROTOBUF_NAMESPACE_ID::Metadata DropTableTask::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_greptime_2fv1_2fmeta_2fddl_2eproto_getter, &descriptor_table_greptime_2fv1_2fmeta_2fddl_2eproto_once, - file_level_metadata_greptime_2fv1_2fmeta_2fddl_2eproto[2]); + file_level_metadata_greptime_2fv1_2fmeta_2fddl_2eproto[3]); } // =================================================================== @@ -1210,7 +1436,7 @@ void DropTableTasks::InternalSwap(DropTableTasks* other) { ::PROTOBUF_NAMESPACE_ID::Metadata DropTableTasks::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_greptime_2fv1_2fmeta_2fddl_2eproto_getter, &descriptor_table_greptime_2fv1_2fmeta_2fddl_2eproto_once, - file_level_metadata_greptime_2fv1_2fmeta_2fddl_2eproto[3]); + file_level_metadata_greptime_2fv1_2fmeta_2fddl_2eproto[4]); } // =================================================================== @@ -1409,7 +1635,7 @@ void AlterTableTask::InternalSwap(AlterTableTask* other) { ::PROTOBUF_NAMESPACE_ID::Metadata AlterTableTask::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_greptime_2fv1_2fmeta_2fddl_2eproto_getter, &descriptor_table_greptime_2fv1_2fmeta_2fddl_2eproto_once, - file_level_metadata_greptime_2fv1_2fmeta_2fddl_2eproto[4]); + file_level_metadata_greptime_2fv1_2fmeta_2fddl_2eproto[5]); } // =================================================================== @@ -1594,7 +1820,7 @@ void AlterTableTasks::InternalSwap(AlterTableTasks* other) { ::PROTOBUF_NAMESPACE_ID::Metadata AlterTableTasks::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_greptime_2fv1_2fmeta_2fddl_2eproto_getter, &descriptor_table_greptime_2fv1_2fmeta_2fddl_2eproto_once, - file_level_metadata_greptime_2fv1_2fmeta_2fddl_2eproto[5]); + file_level_metadata_greptime_2fv1_2fmeta_2fddl_2eproto[6]); } // =================================================================== @@ -1793,7 +2019,7 @@ void TruncateTableTask::InternalSwap(TruncateTableTask* other) { ::PROTOBUF_NAMESPACE_ID::Metadata TruncateTableTask::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_greptime_2fv1_2fmeta_2fddl_2eproto_getter, &descriptor_table_greptime_2fv1_2fmeta_2fddl_2eproto_once, - file_level_metadata_greptime_2fv1_2fmeta_2fddl_2eproto[6]); + file_level_metadata_greptime_2fv1_2fmeta_2fddl_2eproto[7]); } // =================================================================== @@ -1992,7 +2218,7 @@ void DropDatabaseTask::InternalSwap(DropDatabaseTask* other) { ::PROTOBUF_NAMESPACE_ID::Metadata DropDatabaseTask::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_greptime_2fv1_2fmeta_2fddl_2eproto_getter, &descriptor_table_greptime_2fv1_2fmeta_2fddl_2eproto_once, - file_level_metadata_greptime_2fv1_2fmeta_2fddl_2eproto[7]); + file_level_metadata_greptime_2fv1_2fmeta_2fddl_2eproto[8]); } // =================================================================== @@ -2008,6 +2234,7 @@ class DdlTaskRequest::_Internal { static const ::greptime::v1::meta::DropTableTasks& drop_table_tasks(const DdlTaskRequest* msg); static const ::greptime::v1::meta::AlterTableTasks& alter_table_tasks(const DdlTaskRequest* msg); static const ::greptime::v1::meta::DropDatabaseTask& drop_database_task(const DdlTaskRequest* msg); + static const ::greptime::v1::meta::CreateDatabaseTask& create_database_task(const DdlTaskRequest* msg); }; const ::greptime::v1::meta::RequestHeader& @@ -2046,6 +2273,10 @@ const ::greptime::v1::meta::DropDatabaseTask& DdlTaskRequest::_Internal::drop_database_task(const DdlTaskRequest* msg) { return *msg->_impl_.task_.drop_database_task_; } +const ::greptime::v1::meta::CreateDatabaseTask& +DdlTaskRequest::_Internal::create_database_task(const DdlTaskRequest* msg) { + return *msg->_impl_.task_.create_database_task_; +} void DdlTaskRequest::clear_header() { if (GetArenaForAllocation() == nullptr && _impl_.header_ != nullptr) { delete _impl_.header_; @@ -2172,6 +2403,21 @@ void DdlTaskRequest::set_allocated_drop_database_task(::greptime::v1::meta::Drop } // @@protoc_insertion_point(field_set_allocated:greptime.v1.meta.DdlTaskRequest.drop_database_task) } +void DdlTaskRequest::set_allocated_create_database_task(::greptime::v1::meta::CreateDatabaseTask* create_database_task) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + clear_task(); + if (create_database_task) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(create_database_task); + if (message_arena != submessage_arena) { + create_database_task = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, create_database_task, submessage_arena); + } + set_has_create_database_task(); + _impl_.task_.create_database_task_ = create_database_task; + } + // @@protoc_insertion_point(field_set_allocated:greptime.v1.meta.DdlTaskRequest.create_database_task) +} DdlTaskRequest::DdlTaskRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned) : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { @@ -2233,6 +2479,11 @@ DdlTaskRequest::DdlTaskRequest(const DdlTaskRequest& from) from._internal_drop_database_task()); break; } + case kCreateDatabaseTask: { + _this->_internal_mutable_create_database_task()->::greptime::v1::meta::CreateDatabaseTask::MergeFrom( + from._internal_create_database_task()); + break; + } case TASK_NOT_SET: { break; } @@ -2325,6 +2576,12 @@ void DdlTaskRequest::clear_task() { } break; } + case kCreateDatabaseTask: { + if (GetArenaForAllocation() == nullptr) { + delete _impl_.task_.create_database_task_; + } + break; + } case TASK_NOT_SET: { break; } @@ -2425,6 +2682,14 @@ const char* DdlTaskRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext } else goto handle_unusual; continue; + // .greptime.v1.meta.CreateDatabaseTask create_database_task = 10; + case 10: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 82)) { + ptr = ctx->ParseMessage(_internal_mutable_create_database_task(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; default: goto handle_unusual; } // switch @@ -2517,6 +2782,13 @@ uint8_t* DdlTaskRequest::_InternalSerialize( _Internal::drop_database_task(this).GetCachedSize(), target, stream); } + // .greptime.v1.meta.CreateDatabaseTask create_database_task = 10; + if (_internal_has_create_database_task()) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(10, _Internal::create_database_task(this), + _Internal::create_database_task(this).GetCachedSize(), target, stream); + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); @@ -2597,6 +2869,13 @@ size_t DdlTaskRequest::ByteSizeLong() const { *_impl_.task_.drop_database_task_); break; } + // .greptime.v1.meta.CreateDatabaseTask create_database_task = 10; + case kCreateDatabaseTask: { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *_impl_.task_.create_database_task_); + break; + } case TASK_NOT_SET: { break; } @@ -2664,6 +2943,11 @@ void DdlTaskRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const : from._internal_drop_database_task()); break; } + case kCreateDatabaseTask: { + _this->_internal_mutable_create_database_task()->::greptime::v1::meta::CreateDatabaseTask::MergeFrom( + from._internal_create_database_task()); + break; + } case TASK_NOT_SET: { break; } @@ -2693,7 +2977,7 @@ void DdlTaskRequest::InternalSwap(DdlTaskRequest* other) { ::PROTOBUF_NAMESPACE_ID::Metadata DdlTaskRequest::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_greptime_2fv1_2fmeta_2fddl_2eproto_getter, &descriptor_table_greptime_2fv1_2fmeta_2fddl_2eproto_once, - file_level_metadata_greptime_2fv1_2fmeta_2fddl_2eproto[8]); + file_level_metadata_greptime_2fv1_2fmeta_2fddl_2eproto[9]); } // =================================================================== @@ -3028,7 +3312,7 @@ void DdlTaskResponse::InternalSwap(DdlTaskResponse* other) { ::PROTOBUF_NAMESPACE_ID::Metadata DdlTaskResponse::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_greptime_2fv1_2fmeta_2fddl_2eproto_getter, &descriptor_table_greptime_2fv1_2fmeta_2fddl_2eproto_once, - file_level_metadata_greptime_2fv1_2fmeta_2fddl_2eproto[9]); + file_level_metadata_greptime_2fv1_2fmeta_2fddl_2eproto[10]); } // @@protoc_insertion_point(namespace_scope) @@ -3036,6 +3320,10 @@ ::PROTOBUF_NAMESPACE_ID::Metadata DdlTaskResponse::GetMetadata() const { } // namespace v1 } // namespace greptime PROTOBUF_NAMESPACE_OPEN +template<> PROTOBUF_NOINLINE ::greptime::v1::meta::CreateDatabaseTask* +Arena::CreateMaybeMessage< ::greptime::v1::meta::CreateDatabaseTask >(Arena* arena) { + return Arena::CreateMessageInternal< ::greptime::v1::meta::CreateDatabaseTask >(arena); +} template<> PROTOBUF_NOINLINE ::greptime::v1::meta::CreateTableTask* Arena::CreateMaybeMessage< ::greptime::v1::meta::CreateTableTask >(Arena* arena) { return Arena::CreateMessageInternal< ::greptime::v1::meta::CreateTableTask >(arena); diff --git a/c++/greptime/v1/meta/ddl.pb.h b/c++/greptime/v1/meta/ddl.pb.h index 2e22dc1d..e8fc13ea 100644 --- a/c++/greptime/v1/meta/ddl.pb.h +++ b/c++/greptime/v1/meta/ddl.pb.h @@ -57,6 +57,9 @@ extern AlterTableTaskDefaultTypeInternal _AlterTableTask_default_instance_; class AlterTableTasks; struct AlterTableTasksDefaultTypeInternal; extern AlterTableTasksDefaultTypeInternal _AlterTableTasks_default_instance_; +class CreateDatabaseTask; +struct CreateDatabaseTaskDefaultTypeInternal; +extern CreateDatabaseTaskDefaultTypeInternal _CreateDatabaseTask_default_instance_; class CreateTableTask; struct CreateTableTaskDefaultTypeInternal; extern CreateTableTaskDefaultTypeInternal _CreateTableTask_default_instance_; @@ -87,6 +90,7 @@ extern TruncateTableTaskDefaultTypeInternal _TruncateTableTask_default_instance_ PROTOBUF_NAMESPACE_OPEN template<> ::greptime::v1::meta::AlterTableTask* Arena::CreateMaybeMessage<::greptime::v1::meta::AlterTableTask>(Arena*); template<> ::greptime::v1::meta::AlterTableTasks* Arena::CreateMaybeMessage<::greptime::v1::meta::AlterTableTasks>(Arena*); +template<> ::greptime::v1::meta::CreateDatabaseTask* Arena::CreateMaybeMessage<::greptime::v1::meta::CreateDatabaseTask>(Arena*); template<> ::greptime::v1::meta::CreateTableTask* Arena::CreateMaybeMessage<::greptime::v1::meta::CreateTableTask>(Arena*); template<> ::greptime::v1::meta::CreateTableTasks* Arena::CreateMaybeMessage<::greptime::v1::meta::CreateTableTasks>(Arena*); template<> ::greptime::v1::meta::DdlTaskRequest* Arena::CreateMaybeMessage<::greptime::v1::meta::DdlTaskRequest>(Arena*); @@ -127,6 +131,163 @@ inline bool DdlTaskType_Parse( } // =================================================================== +class CreateDatabaseTask final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:greptime.v1.meta.CreateDatabaseTask) */ { + public: + inline CreateDatabaseTask() : CreateDatabaseTask(nullptr) {} + ~CreateDatabaseTask() override; + explicit PROTOBUF_CONSTEXPR CreateDatabaseTask(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + CreateDatabaseTask(const CreateDatabaseTask& from); + CreateDatabaseTask(CreateDatabaseTask&& from) noexcept + : CreateDatabaseTask() { + *this = ::std::move(from); + } + + inline CreateDatabaseTask& operator=(const CreateDatabaseTask& from) { + CopyFrom(from); + return *this; + } + inline CreateDatabaseTask& operator=(CreateDatabaseTask&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const CreateDatabaseTask& default_instance() { + return *internal_default_instance(); + } + static inline const CreateDatabaseTask* internal_default_instance() { + return reinterpret_cast( + &_CreateDatabaseTask_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + friend void swap(CreateDatabaseTask& a, CreateDatabaseTask& b) { + a.Swap(&b); + } + inline void Swap(CreateDatabaseTask* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(CreateDatabaseTask* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + CreateDatabaseTask* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const CreateDatabaseTask& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const CreateDatabaseTask& from) { + CreateDatabaseTask::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(CreateDatabaseTask* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "greptime.v1.meta.CreateDatabaseTask"; + } + protected: + explicit CreateDatabaseTask(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kCreateDatabaseFieldNumber = 1, + }; + // .greptime.v1.CreateDatabaseExpr create_database = 1; + bool has_create_database() const; + private: + bool _internal_has_create_database() const; + public: + void clear_create_database(); + const ::greptime::v1::CreateDatabaseExpr& create_database() const; + PROTOBUF_NODISCARD ::greptime::v1::CreateDatabaseExpr* release_create_database(); + ::greptime::v1::CreateDatabaseExpr* mutable_create_database(); + void set_allocated_create_database(::greptime::v1::CreateDatabaseExpr* create_database); + private: + const ::greptime::v1::CreateDatabaseExpr& _internal_create_database() const; + ::greptime::v1::CreateDatabaseExpr* _internal_mutable_create_database(); + public: + void unsafe_arena_set_allocated_create_database( + ::greptime::v1::CreateDatabaseExpr* create_database); + ::greptime::v1::CreateDatabaseExpr* unsafe_arena_release_create_database(); + + // @@protoc_insertion_point(class_scope:greptime.v1.meta.CreateDatabaseTask) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::greptime::v1::CreateDatabaseExpr* create_database_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_greptime_2fv1_2fmeta_2fddl_2eproto; +}; +// ------------------------------------------------------------------- + class CreateTableTask final : public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:greptime.v1.meta.CreateTableTask) */ { public: @@ -175,7 +336,7 @@ class CreateTableTask final : &_CreateTableTask_default_instance_); } static constexpr int kIndexInFileMessages = - 0; + 1; friend void swap(CreateTableTask& a, CreateTableTask& b) { a.Swap(&b); @@ -368,7 +529,7 @@ class CreateTableTasks final : &_CreateTableTasks_default_instance_); } static constexpr int kIndexInFileMessages = - 1; + 2; friend void swap(CreateTableTasks& a, CreateTableTasks& b) { a.Swap(&b); @@ -525,7 +686,7 @@ class DropTableTask final : &_DropTableTask_default_instance_); } static constexpr int kIndexInFileMessages = - 2; + 3; friend void swap(DropTableTask& a, DropTableTask& b) { a.Swap(&b); @@ -682,7 +843,7 @@ class DropTableTasks final : &_DropTableTasks_default_instance_); } static constexpr int kIndexInFileMessages = - 3; + 4; friend void swap(DropTableTasks& a, DropTableTasks& b) { a.Swap(&b); @@ -839,7 +1000,7 @@ class AlterTableTask final : &_AlterTableTask_default_instance_); } static constexpr int kIndexInFileMessages = - 4; + 5; friend void swap(AlterTableTask& a, AlterTableTask& b) { a.Swap(&b); @@ -996,7 +1157,7 @@ class AlterTableTasks final : &_AlterTableTasks_default_instance_); } static constexpr int kIndexInFileMessages = - 5; + 6; friend void swap(AlterTableTasks& a, AlterTableTasks& b) { a.Swap(&b); @@ -1153,7 +1314,7 @@ class TruncateTableTask final : &_TruncateTableTask_default_instance_); } static constexpr int kIndexInFileMessages = - 6; + 7; friend void swap(TruncateTableTask& a, TruncateTableTask& b) { a.Swap(&b); @@ -1310,7 +1471,7 @@ class DropDatabaseTask final : &_DropDatabaseTask_default_instance_); } static constexpr int kIndexInFileMessages = - 7; + 8; friend void swap(DropDatabaseTask& a, DropDatabaseTask& b) { a.Swap(&b); @@ -1471,6 +1632,7 @@ class DdlTaskRequest final : kDropTableTasks = 7, kAlterTableTasks = 8, kDropDatabaseTask = 9, + kCreateDatabaseTask = 10, TASK_NOT_SET = 0, }; @@ -1479,7 +1641,7 @@ class DdlTaskRequest final : &_DdlTaskRequest_default_instance_); } static constexpr int kIndexInFileMessages = - 8; + 9; friend void swap(DdlTaskRequest& a, DdlTaskRequest& b) { a.Swap(&b); @@ -1561,6 +1723,7 @@ class DdlTaskRequest final : kDropTableTasksFieldNumber = 7, kAlterTableTasksFieldNumber = 8, kDropDatabaseTaskFieldNumber = 9, + kCreateDatabaseTaskFieldNumber = 10, }; // .greptime.v1.meta.RequestHeader header = 1; bool has_header() const; @@ -1724,6 +1887,24 @@ class DdlTaskRequest final : ::greptime::v1::meta::DropDatabaseTask* drop_database_task); ::greptime::v1::meta::DropDatabaseTask* unsafe_arena_release_drop_database_task(); + // .greptime.v1.meta.CreateDatabaseTask create_database_task = 10; + bool has_create_database_task() const; + private: + bool _internal_has_create_database_task() const; + public: + void clear_create_database_task(); + const ::greptime::v1::meta::CreateDatabaseTask& create_database_task() const; + PROTOBUF_NODISCARD ::greptime::v1::meta::CreateDatabaseTask* release_create_database_task(); + ::greptime::v1::meta::CreateDatabaseTask* mutable_create_database_task(); + void set_allocated_create_database_task(::greptime::v1::meta::CreateDatabaseTask* create_database_task); + private: + const ::greptime::v1::meta::CreateDatabaseTask& _internal_create_database_task() const; + ::greptime::v1::meta::CreateDatabaseTask* _internal_mutable_create_database_task(); + public: + void unsafe_arena_set_allocated_create_database_task( + ::greptime::v1::meta::CreateDatabaseTask* create_database_task); + ::greptime::v1::meta::CreateDatabaseTask* unsafe_arena_release_create_database_task(); + void clear_task(); TaskCase task_case() const; // @@protoc_insertion_point(class_scope:greptime.v1.meta.DdlTaskRequest) @@ -1737,6 +1918,7 @@ class DdlTaskRequest final : void set_has_drop_table_tasks(); void set_has_alter_table_tasks(); void set_has_drop_database_task(); + void set_has_create_database_task(); inline bool has_task() const; inline void clear_has_task(); @@ -1757,6 +1939,7 @@ class DdlTaskRequest final : ::greptime::v1::meta::DropTableTasks* drop_table_tasks_; ::greptime::v1::meta::AlterTableTasks* alter_table_tasks_; ::greptime::v1::meta::DropDatabaseTask* drop_database_task_; + ::greptime::v1::meta::CreateDatabaseTask* create_database_task_; } task_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; uint32_t _oneof_case_[1]; @@ -1815,7 +1998,7 @@ class DdlTaskResponse final : &_DdlTaskResponse_default_instance_); } static constexpr int kIndexInFileMessages = - 9; + 10; friend void swap(DdlTaskResponse& a, DdlTaskResponse& b) { a.Swap(&b); @@ -1991,6 +2174,95 @@ class DdlTaskResponse final : #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wstrict-aliasing" #endif // __GNUC__ +// CreateDatabaseTask + +// .greptime.v1.CreateDatabaseExpr create_database = 1; +inline bool CreateDatabaseTask::_internal_has_create_database() const { + return this != internal_default_instance() && _impl_.create_database_ != nullptr; +} +inline bool CreateDatabaseTask::has_create_database() const { + return _internal_has_create_database(); +} +inline const ::greptime::v1::CreateDatabaseExpr& CreateDatabaseTask::_internal_create_database() const { + const ::greptime::v1::CreateDatabaseExpr* p = _impl_.create_database_; + return p != nullptr ? *p : reinterpret_cast( + ::greptime::v1::_CreateDatabaseExpr_default_instance_); +} +inline const ::greptime::v1::CreateDatabaseExpr& CreateDatabaseTask::create_database() const { + // @@protoc_insertion_point(field_get:greptime.v1.meta.CreateDatabaseTask.create_database) + return _internal_create_database(); +} +inline void CreateDatabaseTask::unsafe_arena_set_allocated_create_database( + ::greptime::v1::CreateDatabaseExpr* create_database) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.create_database_); + } + _impl_.create_database_ = create_database; + if (create_database) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:greptime.v1.meta.CreateDatabaseTask.create_database) +} +inline ::greptime::v1::CreateDatabaseExpr* CreateDatabaseTask::release_create_database() { + + ::greptime::v1::CreateDatabaseExpr* temp = _impl_.create_database_; + _impl_.create_database_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::greptime::v1::CreateDatabaseExpr* CreateDatabaseTask::unsafe_arena_release_create_database() { + // @@protoc_insertion_point(field_release:greptime.v1.meta.CreateDatabaseTask.create_database) + + ::greptime::v1::CreateDatabaseExpr* temp = _impl_.create_database_; + _impl_.create_database_ = nullptr; + return temp; +} +inline ::greptime::v1::CreateDatabaseExpr* CreateDatabaseTask::_internal_mutable_create_database() { + + if (_impl_.create_database_ == nullptr) { + auto* p = CreateMaybeMessage<::greptime::v1::CreateDatabaseExpr>(GetArenaForAllocation()); + _impl_.create_database_ = p; + } + return _impl_.create_database_; +} +inline ::greptime::v1::CreateDatabaseExpr* CreateDatabaseTask::mutable_create_database() { + ::greptime::v1::CreateDatabaseExpr* _msg = _internal_mutable_create_database(); + // @@protoc_insertion_point(field_mutable:greptime.v1.meta.CreateDatabaseTask.create_database) + return _msg; +} +inline void CreateDatabaseTask::set_allocated_create_database(::greptime::v1::CreateDatabaseExpr* create_database) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.create_database_); + } + if (create_database) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(create_database)); + if (message_arena != submessage_arena) { + create_database = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, create_database, submessage_arena); + } + + } else { + + } + _impl_.create_database_ = create_database; + // @@protoc_insertion_point(field_set_allocated:greptime.v1.meta.CreateDatabaseTask.create_database) +} + +// ------------------------------------------------------------------- + // CreateTableTask // .greptime.v1.CreateTableExpr create_table = 1; @@ -3334,6 +3606,80 @@ inline ::greptime::v1::meta::DropDatabaseTask* DdlTaskRequest::mutable_drop_data return _msg; } +// .greptime.v1.meta.CreateDatabaseTask create_database_task = 10; +inline bool DdlTaskRequest::_internal_has_create_database_task() const { + return task_case() == kCreateDatabaseTask; +} +inline bool DdlTaskRequest::has_create_database_task() const { + return _internal_has_create_database_task(); +} +inline void DdlTaskRequest::set_has_create_database_task() { + _impl_._oneof_case_[0] = kCreateDatabaseTask; +} +inline void DdlTaskRequest::clear_create_database_task() { + if (_internal_has_create_database_task()) { + if (GetArenaForAllocation() == nullptr) { + delete _impl_.task_.create_database_task_; + } + clear_has_task(); + } +} +inline ::greptime::v1::meta::CreateDatabaseTask* DdlTaskRequest::release_create_database_task() { + // @@protoc_insertion_point(field_release:greptime.v1.meta.DdlTaskRequest.create_database_task) + if (_internal_has_create_database_task()) { + clear_has_task(); + ::greptime::v1::meta::CreateDatabaseTask* temp = _impl_.task_.create_database_task_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.task_.create_database_task_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::greptime::v1::meta::CreateDatabaseTask& DdlTaskRequest::_internal_create_database_task() const { + return _internal_has_create_database_task() + ? *_impl_.task_.create_database_task_ + : reinterpret_cast< ::greptime::v1::meta::CreateDatabaseTask&>(::greptime::v1::meta::_CreateDatabaseTask_default_instance_); +} +inline const ::greptime::v1::meta::CreateDatabaseTask& DdlTaskRequest::create_database_task() const { + // @@protoc_insertion_point(field_get:greptime.v1.meta.DdlTaskRequest.create_database_task) + return _internal_create_database_task(); +} +inline ::greptime::v1::meta::CreateDatabaseTask* DdlTaskRequest::unsafe_arena_release_create_database_task() { + // @@protoc_insertion_point(field_unsafe_arena_release:greptime.v1.meta.DdlTaskRequest.create_database_task) + if (_internal_has_create_database_task()) { + clear_has_task(); + ::greptime::v1::meta::CreateDatabaseTask* temp = _impl_.task_.create_database_task_; + _impl_.task_.create_database_task_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void DdlTaskRequest::unsafe_arena_set_allocated_create_database_task(::greptime::v1::meta::CreateDatabaseTask* create_database_task) { + clear_task(); + if (create_database_task) { + set_has_create_database_task(); + _impl_.task_.create_database_task_ = create_database_task; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:greptime.v1.meta.DdlTaskRequest.create_database_task) +} +inline ::greptime::v1::meta::CreateDatabaseTask* DdlTaskRequest::_internal_mutable_create_database_task() { + if (!_internal_has_create_database_task()) { + clear_task(); + set_has_create_database_task(); + _impl_.task_.create_database_task_ = CreateMaybeMessage< ::greptime::v1::meta::CreateDatabaseTask >(GetArenaForAllocation()); + } + return _impl_.task_.create_database_task_; +} +inline ::greptime::v1::meta::CreateDatabaseTask* DdlTaskRequest::mutable_create_database_task() { + ::greptime::v1::meta::CreateDatabaseTask* _msg = _internal_mutable_create_database_task(); + // @@protoc_insertion_point(field_mutable:greptime.v1.meta.DdlTaskRequest.create_database_task) + return _msg; +} + inline bool DdlTaskRequest::has_task() const { return task_case() != TASK_NOT_SET; } @@ -3660,6 +4006,8 @@ DdlTaskResponse::table_ids() const { // ------------------------------------------------------------------- +// ------------------------------------------------------------------- + // @@protoc_insertion_point(namespace_scope) diff --git a/go/greptime/v1/ddl.pb.go b/go/greptime/v1/ddl.pb.go index 47f39a1a..09192639 100644 --- a/go/greptime/v1/ddl.pb.go +++ b/go/greptime/v1/ddl.pb.go @@ -537,9 +537,10 @@ type CreateDatabaseExpr struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - DatabaseName string `protobuf:"bytes,1,opt,name=database_name,json=databaseName,proto3" json:"database_name,omitempty"` - CreateIfNotExists bool `protobuf:"varint,2,opt,name=create_if_not_exists,json=createIfNotExists,proto3" json:"create_if_not_exists,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"` + DatabaseName string `protobuf:"bytes,2,opt,name=database_name,json=databaseName,proto3" json:"database_name,omitempty"` + CreateIfNotExists bool `protobuf:"varint,3,opt,name=create_if_not_exists,json=createIfNotExists,proto3" json:"create_if_not_exists,omitempty"` + Options map[string]string `protobuf:"bytes,4,rep,name=options,proto3" json:"options,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } func (x *CreateDatabaseExpr) Reset() { @@ -574,6 +575,13 @@ func (*CreateDatabaseExpr) Descriptor() ([]byte, []int) { return file_greptime_v1_ddl_proto_rawDescGZIP(), []int{4} } +func (x *CreateDatabaseExpr) GetCatalogName() string { + if x != nil { + return x.CatalogName + } + return "" +} + func (x *CreateDatabaseExpr) GetDatabaseName() string { if x != nil { return x.DatabaseName @@ -1264,103 +1272,105 @@ var file_greptime_v1_ddl_proto_rawDesc = []byte{ 0x52, 0x07, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x24, 0x0a, 0x0e, 0x64, 0x72, 0x6f, 0x70, 0x5f, 0x69, 0x66, 0x5f, 0x65, 0x78, 0x69, 0x73, 0x74, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x64, 0x72, 0x6f, 0x70, 0x49, 0x66, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x22, - 0xee, 0x01, 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, 0x12, 0x46, 0x0a, 0x07, - 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, - 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 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, 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, - 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, + 0x91, 0x02, 0x0a, 0x12, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 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, 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, 0x7c, 0x0a, 0x10, 0x44, 0x72, - 0x6f, 0x70, 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, 0x24, 0x0a, 0x0e, 0x64, 0x72, 0x6f, 0x70, 0x5f, 0x69, 0x66, 0x5f, 0x65, 0x78, - 0x69, 0x73, 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x64, 0x72, 0x6f, 0x70, - 0x49, 0x66, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 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, - 0x7e, 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, 0x3a, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, - 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4c, 0x6f, 0x63, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, - 0x20, 0x0a, 0x0a, 0x44, 0x72, 0x6f, 0x70, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x12, 0x12, 0x0a, + 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x61, 0x74, + 0x61, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 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, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x49, 0x66, 0x4e, 0x6f, 0x74, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x12, + 0x46, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x2c, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 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, 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, 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, 0x7c, 0x0a, + 0x10, 0x44, 0x72, 0x6f, 0x70, 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, 0x24, 0x0a, 0x0e, 0x64, 0x72, 0x6f, 0x70, 0x5f, 0x69, 0x66, + 0x5f, 0x65, 0x78, 0x69, 0x73, 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x64, + 0x72, 0x6f, 0x70, 0x49, 0x66, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 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, 0x7e, 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, 0x3a, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, + 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, + 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 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, 0x22, + 0xd8, 0x02, 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, 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, 0x22, 0xd8, 0x02, 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, 0x38, - 0x0a, 0x09, 0x64, 0x61, 0x74, 0x61, 0x5f, 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, 0x54, 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, 0x12, 0x3e, 0x0a, 0x0d, 0x73, 0x65, 0x6d, 0x61, - 0x6e, 0x74, 0x69, 0x63, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x19, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, - 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0c, 0x73, 0x65, 0x6d, 0x61, - 0x6e, 0x74, 0x69, 0x63, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, - 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, - 0x6e, 0x74, 0x12, 0x53, 0x0a, 0x12, 0x64, 0x61, 0x74, 0x61, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x65, - 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, - 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, 0x45, 0x78, 0x74, 0x65, 0x6e, - 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x11, 0x64, 0x61, 0x74, 0x61, 0x74, 0x79, 0x70, 0x65, 0x45, 0x78, - 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xb7, 0x01, 0x0a, 0x11, 0x41, 0x64, 0x64, 0x43, - 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x50, 0x0a, - 0x0d, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, - 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 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, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x5f, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x61, 0x66, 0x74, 0x65, - 0x72, 0x43, 0x6f, 0x6c, 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, 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, + 0x65, 0x12, 0x38, 0x0a, 0x09, 0x64, 0x61, 0x74, 0x61, 0x5f, 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, 0x54, 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, 0x12, 0x3e, 0x0a, 0x0d, 0x73, + 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, + 0x2e, 0x53, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0c, 0x73, + 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, + 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, + 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x53, 0x0a, 0x12, 0x64, 0x61, 0x74, 0x61, 0x74, 0x79, 0x70, + 0x65, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x24, 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, 0x45, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x11, 0x64, 0x61, 0x74, 0x61, 0x74, 0x79, 0x70, + 0x65, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xb7, 0x01, 0x0a, 0x11, 0x41, + 0x64, 0x64, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x50, 0x0a, 0x0d, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, + 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 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, 0x6f, 0x6c, 0x75, + 0x6d, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x61, + 0x66, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6c, 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, 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 ( diff --git a/go/greptime/v1/meta/ddl.pb.go b/go/greptime/v1/meta/ddl.pb.go index 5d4fc2e3..6fb36be2 100644 --- a/go/greptime/v1/meta/ddl.pb.go +++ b/go/greptime/v1/meta/ddl.pb.go @@ -81,6 +81,53 @@ func (DdlTaskType) EnumDescriptor() ([]byte, []int) { return file_greptime_v1_meta_ddl_proto_rawDescGZIP(), []int{0} } +type CreateDatabaseTask struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + CreateDatabase *v1.CreateDatabaseExpr `protobuf:"bytes,1,opt,name=create_database,json=createDatabase,proto3" json:"create_database,omitempty"` +} + +func (x *CreateDatabaseTask) Reset() { + *x = CreateDatabaseTask{} + if protoimpl.UnsafeEnabled { + mi := &file_greptime_v1_meta_ddl_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateDatabaseTask) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateDatabaseTask) ProtoMessage() {} + +func (x *CreateDatabaseTask) ProtoReflect() protoreflect.Message { + mi := &file_greptime_v1_meta_ddl_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateDatabaseTask.ProtoReflect.Descriptor instead. +func (*CreateDatabaseTask) Descriptor() ([]byte, []int) { + return file_greptime_v1_meta_ddl_proto_rawDescGZIP(), []int{0} +} + +func (x *CreateDatabaseTask) GetCreateDatabase() *v1.CreateDatabaseExpr { + if x != nil { + return x.CreateDatabase + } + return nil +} + type CreateTableTask struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -94,7 +141,7 @@ type CreateTableTask struct { func (x *CreateTableTask) Reset() { *x = CreateTableTask{} if protoimpl.UnsafeEnabled { - mi := &file_greptime_v1_meta_ddl_proto_msgTypes[0] + mi := &file_greptime_v1_meta_ddl_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -107,7 +154,7 @@ func (x *CreateTableTask) String() string { func (*CreateTableTask) ProtoMessage() {} func (x *CreateTableTask) ProtoReflect() protoreflect.Message { - mi := &file_greptime_v1_meta_ddl_proto_msgTypes[0] + mi := &file_greptime_v1_meta_ddl_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -120,7 +167,7 @@ func (x *CreateTableTask) ProtoReflect() protoreflect.Message { // Deprecated: Use CreateTableTask.ProtoReflect.Descriptor instead. func (*CreateTableTask) Descriptor() ([]byte, []int) { - return file_greptime_v1_meta_ddl_proto_rawDescGZIP(), []int{0} + return file_greptime_v1_meta_ddl_proto_rawDescGZIP(), []int{1} } func (x *CreateTableTask) GetCreateTable() *v1.CreateTableExpr { @@ -155,7 +202,7 @@ type CreateTableTasks struct { func (x *CreateTableTasks) Reset() { *x = CreateTableTasks{} if protoimpl.UnsafeEnabled { - mi := &file_greptime_v1_meta_ddl_proto_msgTypes[1] + mi := &file_greptime_v1_meta_ddl_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -168,7 +215,7 @@ func (x *CreateTableTasks) String() string { func (*CreateTableTasks) ProtoMessage() {} func (x *CreateTableTasks) ProtoReflect() protoreflect.Message { - mi := &file_greptime_v1_meta_ddl_proto_msgTypes[1] + mi := &file_greptime_v1_meta_ddl_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -181,7 +228,7 @@ func (x *CreateTableTasks) ProtoReflect() protoreflect.Message { // Deprecated: Use CreateTableTasks.ProtoReflect.Descriptor instead. func (*CreateTableTasks) Descriptor() ([]byte, []int) { - return file_greptime_v1_meta_ddl_proto_rawDescGZIP(), []int{1} + return file_greptime_v1_meta_ddl_proto_rawDescGZIP(), []int{2} } func (x *CreateTableTasks) GetTasks() []*CreateTableTask { @@ -202,7 +249,7 @@ type DropTableTask struct { func (x *DropTableTask) Reset() { *x = DropTableTask{} if protoimpl.UnsafeEnabled { - mi := &file_greptime_v1_meta_ddl_proto_msgTypes[2] + mi := &file_greptime_v1_meta_ddl_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -215,7 +262,7 @@ func (x *DropTableTask) String() string { func (*DropTableTask) ProtoMessage() {} func (x *DropTableTask) ProtoReflect() protoreflect.Message { - mi := &file_greptime_v1_meta_ddl_proto_msgTypes[2] + mi := &file_greptime_v1_meta_ddl_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -228,7 +275,7 @@ func (x *DropTableTask) ProtoReflect() protoreflect.Message { // Deprecated: Use DropTableTask.ProtoReflect.Descriptor instead. func (*DropTableTask) Descriptor() ([]byte, []int) { - return file_greptime_v1_meta_ddl_proto_rawDescGZIP(), []int{2} + return file_greptime_v1_meta_ddl_proto_rawDescGZIP(), []int{3} } func (x *DropTableTask) GetDropTable() *v1.DropTableExpr { @@ -249,7 +296,7 @@ type DropTableTasks struct { func (x *DropTableTasks) Reset() { *x = DropTableTasks{} if protoimpl.UnsafeEnabled { - mi := &file_greptime_v1_meta_ddl_proto_msgTypes[3] + mi := &file_greptime_v1_meta_ddl_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -262,7 +309,7 @@ func (x *DropTableTasks) String() string { func (*DropTableTasks) ProtoMessage() {} func (x *DropTableTasks) ProtoReflect() protoreflect.Message { - mi := &file_greptime_v1_meta_ddl_proto_msgTypes[3] + mi := &file_greptime_v1_meta_ddl_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -275,7 +322,7 @@ func (x *DropTableTasks) ProtoReflect() protoreflect.Message { // Deprecated: Use DropTableTasks.ProtoReflect.Descriptor instead. func (*DropTableTasks) Descriptor() ([]byte, []int) { - return file_greptime_v1_meta_ddl_proto_rawDescGZIP(), []int{3} + return file_greptime_v1_meta_ddl_proto_rawDescGZIP(), []int{4} } func (x *DropTableTasks) GetTasks() []*DropTableTask { @@ -296,7 +343,7 @@ type AlterTableTask struct { func (x *AlterTableTask) Reset() { *x = AlterTableTask{} if protoimpl.UnsafeEnabled { - mi := &file_greptime_v1_meta_ddl_proto_msgTypes[4] + mi := &file_greptime_v1_meta_ddl_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -309,7 +356,7 @@ func (x *AlterTableTask) String() string { func (*AlterTableTask) ProtoMessage() {} func (x *AlterTableTask) ProtoReflect() protoreflect.Message { - mi := &file_greptime_v1_meta_ddl_proto_msgTypes[4] + mi := &file_greptime_v1_meta_ddl_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -322,7 +369,7 @@ func (x *AlterTableTask) ProtoReflect() protoreflect.Message { // Deprecated: Use AlterTableTask.ProtoReflect.Descriptor instead. func (*AlterTableTask) Descriptor() ([]byte, []int) { - return file_greptime_v1_meta_ddl_proto_rawDescGZIP(), []int{4} + return file_greptime_v1_meta_ddl_proto_rawDescGZIP(), []int{5} } func (x *AlterTableTask) GetAlterTable() *v1.AlterExpr { @@ -343,7 +390,7 @@ type AlterTableTasks struct { func (x *AlterTableTasks) Reset() { *x = AlterTableTasks{} if protoimpl.UnsafeEnabled { - mi := &file_greptime_v1_meta_ddl_proto_msgTypes[5] + mi := &file_greptime_v1_meta_ddl_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -356,7 +403,7 @@ func (x *AlterTableTasks) String() string { func (*AlterTableTasks) ProtoMessage() {} func (x *AlterTableTasks) ProtoReflect() protoreflect.Message { - mi := &file_greptime_v1_meta_ddl_proto_msgTypes[5] + mi := &file_greptime_v1_meta_ddl_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -369,7 +416,7 @@ func (x *AlterTableTasks) ProtoReflect() protoreflect.Message { // Deprecated: Use AlterTableTasks.ProtoReflect.Descriptor instead. func (*AlterTableTasks) Descriptor() ([]byte, []int) { - return file_greptime_v1_meta_ddl_proto_rawDescGZIP(), []int{5} + return file_greptime_v1_meta_ddl_proto_rawDescGZIP(), []int{6} } func (x *AlterTableTasks) GetTasks() []*AlterTableTask { @@ -390,7 +437,7 @@ type TruncateTableTask struct { func (x *TruncateTableTask) Reset() { *x = TruncateTableTask{} if protoimpl.UnsafeEnabled { - mi := &file_greptime_v1_meta_ddl_proto_msgTypes[6] + mi := &file_greptime_v1_meta_ddl_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -403,7 +450,7 @@ func (x *TruncateTableTask) String() string { func (*TruncateTableTask) ProtoMessage() {} func (x *TruncateTableTask) ProtoReflect() protoreflect.Message { - mi := &file_greptime_v1_meta_ddl_proto_msgTypes[6] + mi := &file_greptime_v1_meta_ddl_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -416,7 +463,7 @@ func (x *TruncateTableTask) ProtoReflect() protoreflect.Message { // Deprecated: Use TruncateTableTask.ProtoReflect.Descriptor instead. func (*TruncateTableTask) Descriptor() ([]byte, []int) { - return file_greptime_v1_meta_ddl_proto_rawDescGZIP(), []int{6} + return file_greptime_v1_meta_ddl_proto_rawDescGZIP(), []int{7} } func (x *TruncateTableTask) GetTruncateTable() *v1.TruncateTableExpr { @@ -437,7 +484,7 @@ type DropDatabaseTask struct { func (x *DropDatabaseTask) Reset() { *x = DropDatabaseTask{} if protoimpl.UnsafeEnabled { - mi := &file_greptime_v1_meta_ddl_proto_msgTypes[7] + mi := &file_greptime_v1_meta_ddl_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -450,7 +497,7 @@ func (x *DropDatabaseTask) String() string { func (*DropDatabaseTask) ProtoMessage() {} func (x *DropDatabaseTask) ProtoReflect() protoreflect.Message { - mi := &file_greptime_v1_meta_ddl_proto_msgTypes[7] + mi := &file_greptime_v1_meta_ddl_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -463,7 +510,7 @@ func (x *DropDatabaseTask) ProtoReflect() protoreflect.Message { // Deprecated: Use DropDatabaseTask.ProtoReflect.Descriptor instead. func (*DropDatabaseTask) Descriptor() ([]byte, []int) { - return file_greptime_v1_meta_ddl_proto_rawDescGZIP(), []int{7} + return file_greptime_v1_meta_ddl_proto_rawDescGZIP(), []int{8} } func (x *DropDatabaseTask) GetDropDatabase() *v1.DropDatabaseExpr { @@ -489,13 +536,14 @@ type DdlTaskRequest struct { // *DdlTaskRequest_DropTableTasks // *DdlTaskRequest_AlterTableTasks // *DdlTaskRequest_DropDatabaseTask + // *DdlTaskRequest_CreateDatabaseTask Task isDdlTaskRequest_Task `protobuf_oneof:"task"` } func (x *DdlTaskRequest) Reset() { *x = DdlTaskRequest{} if protoimpl.UnsafeEnabled { - mi := &file_greptime_v1_meta_ddl_proto_msgTypes[8] + mi := &file_greptime_v1_meta_ddl_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -508,7 +556,7 @@ func (x *DdlTaskRequest) String() string { func (*DdlTaskRequest) ProtoMessage() {} func (x *DdlTaskRequest) ProtoReflect() protoreflect.Message { - mi := &file_greptime_v1_meta_ddl_proto_msgTypes[8] + mi := &file_greptime_v1_meta_ddl_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -521,7 +569,7 @@ func (x *DdlTaskRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use DdlTaskRequest.ProtoReflect.Descriptor instead. func (*DdlTaskRequest) Descriptor() ([]byte, []int) { - return file_greptime_v1_meta_ddl_proto_rawDescGZIP(), []int{8} + return file_greptime_v1_meta_ddl_proto_rawDescGZIP(), []int{9} } func (x *DdlTaskRequest) GetHeader() *RequestHeader { @@ -594,6 +642,13 @@ func (x *DdlTaskRequest) GetDropDatabaseTask() *DropDatabaseTask { return nil } +func (x *DdlTaskRequest) GetCreateDatabaseTask() *CreateDatabaseTask { + if x, ok := x.GetTask().(*DdlTaskRequest_CreateDatabaseTask); ok { + return x.CreateDatabaseTask + } + return nil +} + type isDdlTaskRequest_Task interface { isDdlTaskRequest_Task() } @@ -630,6 +685,10 @@ type DdlTaskRequest_DropDatabaseTask struct { DropDatabaseTask *DropDatabaseTask `protobuf:"bytes,9,opt,name=drop_database_task,json=dropDatabaseTask,proto3,oneof"` } +type DdlTaskRequest_CreateDatabaseTask struct { + CreateDatabaseTask *CreateDatabaseTask `protobuf:"bytes,10,opt,name=create_database_task,json=createDatabaseTask,proto3,oneof"` +} + func (*DdlTaskRequest_CreateTableTask) isDdlTaskRequest_Task() {} func (*DdlTaskRequest_DropTableTask) isDdlTaskRequest_Task() {} @@ -646,6 +705,8 @@ func (*DdlTaskRequest_AlterTableTasks) isDdlTaskRequest_Task() {} func (*DdlTaskRequest_DropDatabaseTask) isDdlTaskRequest_Task() {} +func (*DdlTaskRequest_CreateDatabaseTask) isDdlTaskRequest_Task() {} + type DdlTaskResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -663,7 +724,7 @@ type DdlTaskResponse struct { func (x *DdlTaskResponse) Reset() { *x = DdlTaskResponse{} if protoimpl.UnsafeEnabled { - mi := &file_greptime_v1_meta_ddl_proto_msgTypes[9] + mi := &file_greptime_v1_meta_ddl_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -676,7 +737,7 @@ func (x *DdlTaskResponse) String() string { func (*DdlTaskResponse) ProtoMessage() {} func (x *DdlTaskResponse) ProtoReflect() protoreflect.Message { - mi := &file_greptime_v1_meta_ddl_proto_msgTypes[9] + mi := &file_greptime_v1_meta_ddl_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -689,7 +750,7 @@ func (x *DdlTaskResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use DdlTaskResponse.ProtoReflect.Descriptor instead. func (*DdlTaskResponse) Descriptor() ([]byte, []int) { - return file_greptime_v1_meta_ddl_proto_rawDescGZIP(), []int{9} + return file_greptime_v1_meta_ddl_proto_rawDescGZIP(), []int{10} } func (x *DdlTaskResponse) GetHeader() *ResponseHeader { @@ -731,7 +792,13 @@ var file_greptime_v1_meta_ddl_proto_rawDesc = []byte{ 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x15, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x64, 0x64, 0x6c, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x22, 0xae, 0x01, 0x0a, 0x0f, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x62, + 0x74, 0x6f, 0x22, 0x5e, 0x0a, 0x12, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, + 0x62, 0x61, 0x73, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x48, 0x0a, 0x0f, 0x63, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x45, 0x78, + 0x70, 0x72, 0x52, 0x0e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, + 0x73, 0x65, 0x22, 0xae, 0x01, 0x0a, 0x0f, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x3f, 0x0a, 0x0c, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, @@ -777,7 +844,7 @@ var file_greptime_v1_meta_ddl_proto_rawDesc = []byte{ 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x72, 0x6f, 0x70, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x45, 0x78, 0x70, 0x72, 0x52, 0x0c, 0x64, 0x72, 0x6f, 0x70, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x22, - 0xd9, 0x05, 0x0a, 0x0e, 0x44, 0x64, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, + 0xb3, 0x06, 0x0a, 0x0e, 0x44, 0x64, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x37, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, @@ -822,29 +889,34 @@ var file_greptime_v1_meta_ddl_proto_rawDesc = []byte{ 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x44, 0x72, 0x6f, 0x70, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x48, 0x00, 0x52, 0x10, 0x64, 0x72, 0x6f, 0x70, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x54, - 0x61, 0x73, 0x6b, 0x42, 0x06, 0x0a, 0x04, 0x74, 0x61, 0x73, 0x6b, 0x22, 0xea, 0x01, 0x0a, 0x0f, - 0x44, 0x64, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x38, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x20, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, - 0x74, 0x61, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x2f, 0x0a, 0x03, 0x70, 0x69, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, - 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x64, - 0x75, 0x72, 0x65, 0x49, 0x64, 0x52, 0x03, 0x70, 0x69, 0x64, 0x12, 0x34, 0x0a, 0x08, 0x74, 0x61, - 0x62, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, - 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, - 0x54, 0x61, 0x62, 0x6c, 0x65, 0x49, 0x64, 0x52, 0x07, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x49, 0x64, - 0x12, 0x36, 0x0a, 0x09, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x05, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, - 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x49, 0x64, 0x52, 0x08, - 0x74, 0x61, 0x62, 0x6c, 0x65, 0x49, 0x64, 0x73, 0x2a, 0x23, 0x0a, 0x0b, 0x44, 0x64, 0x6c, 0x54, - 0x61, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x44, 0x72, 0x6f, 0x70, 0x10, 0x01, 0x42, 0x3c, 0x5a, - 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x70, - 0x74, 0x69, 0x6d, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, - 0x65, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74, - 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x61, 0x73, 0x6b, 0x12, 0x58, 0x0a, 0x14, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x64, 0x61, + 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x18, 0x0a, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, + 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x44, 0x61, 0x74, 0x61, 0x62, + 0x61, 0x73, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x48, 0x00, 0x52, 0x12, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x42, 0x06, 0x0a, + 0x04, 0x74, 0x61, 0x73, 0x6b, 0x22, 0xea, 0x01, 0x0a, 0x0f, 0x44, 0x64, 0x6c, 0x54, 0x61, 0x73, + 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x06, 0x68, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x72, 0x65, 0x70, + 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x06, 0x68, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x12, 0x2f, 0x0a, 0x03, 0x70, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1d, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, + 0x65, 0x74, 0x61, 0x2e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x64, 0x75, 0x72, 0x65, 0x49, 0x64, 0x52, + 0x03, 0x70, 0x69, 0x64, 0x12, 0x34, 0x0a, 0x08, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x69, 0x64, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x49, + 0x64, 0x52, 0x07, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x36, 0x0a, 0x09, 0x74, 0x61, + 0x62, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, + 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, + 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x49, 0x64, 0x52, 0x08, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x49, + 0x64, 0x73, 0x2a, 0x23, 0x0a, 0x0b, 0x44, 0x64, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x10, 0x00, 0x12, 0x08, 0x0a, + 0x04, 0x44, 0x72, 0x6f, 0x70, 0x10, 0x01, 0x42, 0x3c, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x54, 0x65, + 0x61, 0x6d, 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2d, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, + 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -860,58 +932,62 @@ func file_greptime_v1_meta_ddl_proto_rawDescGZIP() []byte { } var file_greptime_v1_meta_ddl_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_greptime_v1_meta_ddl_proto_msgTypes = make([]protoimpl.MessageInfo, 10) +var file_greptime_v1_meta_ddl_proto_msgTypes = make([]protoimpl.MessageInfo, 11) var file_greptime_v1_meta_ddl_proto_goTypes = []interface{}{ - (DdlTaskType)(0), // 0: greptime.v1.meta.DdlTaskType - (*CreateTableTask)(nil), // 1: greptime.v1.meta.CreateTableTask - (*CreateTableTasks)(nil), // 2: greptime.v1.meta.CreateTableTasks - (*DropTableTask)(nil), // 3: greptime.v1.meta.DropTableTask - (*DropTableTasks)(nil), // 4: greptime.v1.meta.DropTableTasks - (*AlterTableTask)(nil), // 5: greptime.v1.meta.AlterTableTask - (*AlterTableTasks)(nil), // 6: greptime.v1.meta.AlterTableTasks - (*TruncateTableTask)(nil), // 7: greptime.v1.meta.TruncateTableTask - (*DropDatabaseTask)(nil), // 8: greptime.v1.meta.DropDatabaseTask - (*DdlTaskRequest)(nil), // 9: greptime.v1.meta.DdlTaskRequest - (*DdlTaskResponse)(nil), // 10: greptime.v1.meta.DdlTaskResponse - (*v1.CreateTableExpr)(nil), // 11: greptime.v1.CreateTableExpr - (*Partition)(nil), // 12: greptime.v1.meta.Partition - (*v1.DropTableExpr)(nil), // 13: greptime.v1.DropTableExpr - (*v1.AlterExpr)(nil), // 14: greptime.v1.AlterExpr - (*v1.TruncateTableExpr)(nil), // 15: greptime.v1.TruncateTableExpr - (*v1.DropDatabaseExpr)(nil), // 16: greptime.v1.DropDatabaseExpr - (*RequestHeader)(nil), // 17: greptime.v1.meta.RequestHeader - (*ResponseHeader)(nil), // 18: greptime.v1.meta.ResponseHeader - (*ProcedureId)(nil), // 19: greptime.v1.meta.ProcedureId - (*TableId)(nil), // 20: greptime.v1.meta.TableId + (DdlTaskType)(0), // 0: greptime.v1.meta.DdlTaskType + (*CreateDatabaseTask)(nil), // 1: greptime.v1.meta.CreateDatabaseTask + (*CreateTableTask)(nil), // 2: greptime.v1.meta.CreateTableTask + (*CreateTableTasks)(nil), // 3: greptime.v1.meta.CreateTableTasks + (*DropTableTask)(nil), // 4: greptime.v1.meta.DropTableTask + (*DropTableTasks)(nil), // 5: greptime.v1.meta.DropTableTasks + (*AlterTableTask)(nil), // 6: greptime.v1.meta.AlterTableTask + (*AlterTableTasks)(nil), // 7: greptime.v1.meta.AlterTableTasks + (*TruncateTableTask)(nil), // 8: greptime.v1.meta.TruncateTableTask + (*DropDatabaseTask)(nil), // 9: greptime.v1.meta.DropDatabaseTask + (*DdlTaskRequest)(nil), // 10: greptime.v1.meta.DdlTaskRequest + (*DdlTaskResponse)(nil), // 11: greptime.v1.meta.DdlTaskResponse + (*v1.CreateDatabaseExpr)(nil), // 12: greptime.v1.CreateDatabaseExpr + (*v1.CreateTableExpr)(nil), // 13: greptime.v1.CreateTableExpr + (*Partition)(nil), // 14: greptime.v1.meta.Partition + (*v1.DropTableExpr)(nil), // 15: greptime.v1.DropTableExpr + (*v1.AlterExpr)(nil), // 16: greptime.v1.AlterExpr + (*v1.TruncateTableExpr)(nil), // 17: greptime.v1.TruncateTableExpr + (*v1.DropDatabaseExpr)(nil), // 18: greptime.v1.DropDatabaseExpr + (*RequestHeader)(nil), // 19: greptime.v1.meta.RequestHeader + (*ResponseHeader)(nil), // 20: greptime.v1.meta.ResponseHeader + (*ProcedureId)(nil), // 21: greptime.v1.meta.ProcedureId + (*TableId)(nil), // 22: greptime.v1.meta.TableId } var file_greptime_v1_meta_ddl_proto_depIdxs = []int32{ - 11, // 0: greptime.v1.meta.CreateTableTask.create_table:type_name -> greptime.v1.CreateTableExpr - 12, // 1: greptime.v1.meta.CreateTableTask.partitions:type_name -> greptime.v1.meta.Partition - 1, // 2: greptime.v1.meta.CreateTableTasks.tasks:type_name -> greptime.v1.meta.CreateTableTask - 13, // 3: greptime.v1.meta.DropTableTask.drop_table:type_name -> greptime.v1.DropTableExpr - 3, // 4: greptime.v1.meta.DropTableTasks.tasks:type_name -> greptime.v1.meta.DropTableTask - 14, // 5: greptime.v1.meta.AlterTableTask.alter_table:type_name -> greptime.v1.AlterExpr - 5, // 6: greptime.v1.meta.AlterTableTasks.tasks:type_name -> greptime.v1.meta.AlterTableTask - 15, // 7: greptime.v1.meta.TruncateTableTask.truncate_table:type_name -> greptime.v1.TruncateTableExpr - 16, // 8: greptime.v1.meta.DropDatabaseTask.drop_database:type_name -> greptime.v1.DropDatabaseExpr - 17, // 9: greptime.v1.meta.DdlTaskRequest.header:type_name -> greptime.v1.meta.RequestHeader - 1, // 10: greptime.v1.meta.DdlTaskRequest.create_table_task:type_name -> greptime.v1.meta.CreateTableTask - 3, // 11: greptime.v1.meta.DdlTaskRequest.drop_table_task:type_name -> greptime.v1.meta.DropTableTask - 5, // 12: greptime.v1.meta.DdlTaskRequest.alter_table_task:type_name -> greptime.v1.meta.AlterTableTask - 7, // 13: greptime.v1.meta.DdlTaskRequest.truncate_table_task:type_name -> greptime.v1.meta.TruncateTableTask - 2, // 14: greptime.v1.meta.DdlTaskRequest.create_table_tasks:type_name -> greptime.v1.meta.CreateTableTasks - 4, // 15: greptime.v1.meta.DdlTaskRequest.drop_table_tasks:type_name -> greptime.v1.meta.DropTableTasks - 6, // 16: greptime.v1.meta.DdlTaskRequest.alter_table_tasks:type_name -> greptime.v1.meta.AlterTableTasks - 8, // 17: greptime.v1.meta.DdlTaskRequest.drop_database_task:type_name -> greptime.v1.meta.DropDatabaseTask - 18, // 18: greptime.v1.meta.DdlTaskResponse.header:type_name -> greptime.v1.meta.ResponseHeader - 19, // 19: greptime.v1.meta.DdlTaskResponse.pid:type_name -> greptime.v1.meta.ProcedureId - 20, // 20: greptime.v1.meta.DdlTaskResponse.table_id:type_name -> greptime.v1.meta.TableId - 20, // 21: greptime.v1.meta.DdlTaskResponse.table_ids:type_name -> greptime.v1.meta.TableId - 22, // [22:22] is the sub-list for method output_type - 22, // [22:22] is the sub-list for method input_type - 22, // [22:22] is the sub-list for extension type_name - 22, // [22:22] is the sub-list for extension extendee - 0, // [0:22] is the sub-list for field type_name + 12, // 0: greptime.v1.meta.CreateDatabaseTask.create_database:type_name -> greptime.v1.CreateDatabaseExpr + 13, // 1: greptime.v1.meta.CreateTableTask.create_table:type_name -> greptime.v1.CreateTableExpr + 14, // 2: greptime.v1.meta.CreateTableTask.partitions:type_name -> greptime.v1.meta.Partition + 2, // 3: greptime.v1.meta.CreateTableTasks.tasks:type_name -> greptime.v1.meta.CreateTableTask + 15, // 4: greptime.v1.meta.DropTableTask.drop_table:type_name -> greptime.v1.DropTableExpr + 4, // 5: greptime.v1.meta.DropTableTasks.tasks:type_name -> greptime.v1.meta.DropTableTask + 16, // 6: greptime.v1.meta.AlterTableTask.alter_table:type_name -> greptime.v1.AlterExpr + 6, // 7: greptime.v1.meta.AlterTableTasks.tasks:type_name -> greptime.v1.meta.AlterTableTask + 17, // 8: greptime.v1.meta.TruncateTableTask.truncate_table:type_name -> greptime.v1.TruncateTableExpr + 18, // 9: greptime.v1.meta.DropDatabaseTask.drop_database:type_name -> greptime.v1.DropDatabaseExpr + 19, // 10: greptime.v1.meta.DdlTaskRequest.header:type_name -> greptime.v1.meta.RequestHeader + 2, // 11: greptime.v1.meta.DdlTaskRequest.create_table_task:type_name -> greptime.v1.meta.CreateTableTask + 4, // 12: greptime.v1.meta.DdlTaskRequest.drop_table_task:type_name -> greptime.v1.meta.DropTableTask + 6, // 13: greptime.v1.meta.DdlTaskRequest.alter_table_task:type_name -> greptime.v1.meta.AlterTableTask + 8, // 14: greptime.v1.meta.DdlTaskRequest.truncate_table_task:type_name -> greptime.v1.meta.TruncateTableTask + 3, // 15: greptime.v1.meta.DdlTaskRequest.create_table_tasks:type_name -> greptime.v1.meta.CreateTableTasks + 5, // 16: greptime.v1.meta.DdlTaskRequest.drop_table_tasks:type_name -> greptime.v1.meta.DropTableTasks + 7, // 17: greptime.v1.meta.DdlTaskRequest.alter_table_tasks:type_name -> greptime.v1.meta.AlterTableTasks + 9, // 18: greptime.v1.meta.DdlTaskRequest.drop_database_task:type_name -> greptime.v1.meta.DropDatabaseTask + 1, // 19: greptime.v1.meta.DdlTaskRequest.create_database_task:type_name -> greptime.v1.meta.CreateDatabaseTask + 20, // 20: greptime.v1.meta.DdlTaskResponse.header:type_name -> greptime.v1.meta.ResponseHeader + 21, // 21: greptime.v1.meta.DdlTaskResponse.pid:type_name -> greptime.v1.meta.ProcedureId + 22, // 22: greptime.v1.meta.DdlTaskResponse.table_id:type_name -> greptime.v1.meta.TableId + 22, // 23: greptime.v1.meta.DdlTaskResponse.table_ids:type_name -> greptime.v1.meta.TableId + 24, // [24:24] is the sub-list for method output_type + 24, // [24:24] is the sub-list for method input_type + 24, // [24:24] is the sub-list for extension type_name + 24, // [24:24] is the sub-list for extension extendee + 0, // [0:24] is the sub-list for field type_name } func init() { file_greptime_v1_meta_ddl_proto_init() } @@ -923,7 +999,7 @@ func file_greptime_v1_meta_ddl_proto_init() { file_greptime_v1_meta_route_proto_init() if !protoimpl.UnsafeEnabled { file_greptime_v1_meta_ddl_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateTableTask); i { + switch v := v.(*CreateDatabaseTask); i { case 0: return &v.state case 1: @@ -935,7 +1011,7 @@ func file_greptime_v1_meta_ddl_proto_init() { } } file_greptime_v1_meta_ddl_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateTableTasks); i { + switch v := v.(*CreateTableTask); i { case 0: return &v.state case 1: @@ -947,7 +1023,7 @@ func file_greptime_v1_meta_ddl_proto_init() { } } file_greptime_v1_meta_ddl_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DropTableTask); i { + switch v := v.(*CreateTableTasks); i { case 0: return &v.state case 1: @@ -959,7 +1035,7 @@ func file_greptime_v1_meta_ddl_proto_init() { } } file_greptime_v1_meta_ddl_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DropTableTasks); i { + switch v := v.(*DropTableTask); i { case 0: return &v.state case 1: @@ -971,7 +1047,7 @@ func file_greptime_v1_meta_ddl_proto_init() { } } file_greptime_v1_meta_ddl_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AlterTableTask); i { + switch v := v.(*DropTableTasks); i { case 0: return &v.state case 1: @@ -983,7 +1059,7 @@ func file_greptime_v1_meta_ddl_proto_init() { } } file_greptime_v1_meta_ddl_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AlterTableTasks); i { + switch v := v.(*AlterTableTask); i { case 0: return &v.state case 1: @@ -995,7 +1071,7 @@ func file_greptime_v1_meta_ddl_proto_init() { } } file_greptime_v1_meta_ddl_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TruncateTableTask); i { + switch v := v.(*AlterTableTasks); i { case 0: return &v.state case 1: @@ -1007,7 +1083,7 @@ func file_greptime_v1_meta_ddl_proto_init() { } } file_greptime_v1_meta_ddl_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DropDatabaseTask); i { + switch v := v.(*TruncateTableTask); i { case 0: return &v.state case 1: @@ -1019,7 +1095,7 @@ func file_greptime_v1_meta_ddl_proto_init() { } } file_greptime_v1_meta_ddl_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DdlTaskRequest); i { + switch v := v.(*DropDatabaseTask); i { case 0: return &v.state case 1: @@ -1031,6 +1107,18 @@ func file_greptime_v1_meta_ddl_proto_init() { } } file_greptime_v1_meta_ddl_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DdlTaskRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_greptime_v1_meta_ddl_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DdlTaskResponse); i { case 0: return &v.state @@ -1043,7 +1131,7 @@ func file_greptime_v1_meta_ddl_proto_init() { } } } - file_greptime_v1_meta_ddl_proto_msgTypes[8].OneofWrappers = []interface{}{ + file_greptime_v1_meta_ddl_proto_msgTypes[9].OneofWrappers = []interface{}{ (*DdlTaskRequest_CreateTableTask)(nil), (*DdlTaskRequest_DropTableTask)(nil), (*DdlTaskRequest_AlterTableTask)(nil), @@ -1052,6 +1140,7 @@ func file_greptime_v1_meta_ddl_proto_init() { (*DdlTaskRequest_DropTableTasks)(nil), (*DdlTaskRequest_AlterTableTasks)(nil), (*DdlTaskRequest_DropDatabaseTask)(nil), + (*DdlTaskRequest_CreateDatabaseTask)(nil), } type x struct{} out := protoimpl.TypeBuilder{ @@ -1059,7 +1148,7 @@ func file_greptime_v1_meta_ddl_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_greptime_v1_meta_ddl_proto_rawDesc, NumEnums: 1, - NumMessages: 10, + NumMessages: 11, NumExtensions: 0, NumServices: 0, }, diff --git a/java/src/main/java/greptime/v1/meta/Ddl.java b/java/src/main/java/greptime/v1/meta/Ddl.java index b00dccc1..ea2fed4d 100644 --- a/java/src/main/java/greptime/v1/meta/Ddl.java +++ b/java/src/main/java/greptime/v1/meta/Ddl.java @@ -122,6 +122,629 @@ private DdlTaskType(int value) { // @@protoc_insertion_point(enum_scope:greptime.v1.meta.DdlTaskType) } + public interface CreateDatabaseTaskOrBuilder extends + // @@protoc_insertion_point(interface_extends:greptime.v1.meta.CreateDatabaseTask) + com.google.protobuf.MessageOrBuilder { + + /** + * .greptime.v1.CreateDatabaseExpr create_database = 1; + * @return Whether the createDatabase field is set. + */ + boolean hasCreateDatabase(); + /** + * .greptime.v1.CreateDatabaseExpr create_database = 1; + * @return The createDatabase. + */ + io.greptime.v1.Ddl.CreateDatabaseExpr getCreateDatabase(); + /** + * .greptime.v1.CreateDatabaseExpr create_database = 1; + */ + io.greptime.v1.Ddl.CreateDatabaseExprOrBuilder getCreateDatabaseOrBuilder(); + } + /** + * Protobuf type {@code greptime.v1.meta.CreateDatabaseTask} + */ + public static final class CreateDatabaseTask extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:greptime.v1.meta.CreateDatabaseTask) + CreateDatabaseTaskOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateDatabaseTask.newBuilder() to construct. + private CreateDatabaseTask(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CreateDatabaseTask() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CreateDatabaseTask(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private CreateDatabaseTask( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + io.greptime.v1.Ddl.CreateDatabaseExpr.Builder subBuilder = null; + if (createDatabase_ != null) { + subBuilder = createDatabase_.toBuilder(); + } + createDatabase_ = input.readMessage(io.greptime.v1.Ddl.CreateDatabaseExpr.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(createDatabase_); + createDatabase_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return greptime.v1.meta.Ddl.internal_static_greptime_v1_meta_CreateDatabaseTask_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return greptime.v1.meta.Ddl.internal_static_greptime_v1_meta_CreateDatabaseTask_fieldAccessorTable + .ensureFieldAccessorsInitialized( + greptime.v1.meta.Ddl.CreateDatabaseTask.class, greptime.v1.meta.Ddl.CreateDatabaseTask.Builder.class); + } + + public static final int CREATE_DATABASE_FIELD_NUMBER = 1; + private io.greptime.v1.Ddl.CreateDatabaseExpr createDatabase_; + /** + * .greptime.v1.CreateDatabaseExpr create_database = 1; + * @return Whether the createDatabase field is set. + */ + @java.lang.Override + public boolean hasCreateDatabase() { + return createDatabase_ != null; + } + /** + * .greptime.v1.CreateDatabaseExpr create_database = 1; + * @return The createDatabase. + */ + @java.lang.Override + public io.greptime.v1.Ddl.CreateDatabaseExpr getCreateDatabase() { + return createDatabase_ == null ? io.greptime.v1.Ddl.CreateDatabaseExpr.getDefaultInstance() : createDatabase_; + } + /** + * .greptime.v1.CreateDatabaseExpr create_database = 1; + */ + @java.lang.Override + public io.greptime.v1.Ddl.CreateDatabaseExprOrBuilder getCreateDatabaseOrBuilder() { + return getCreateDatabase(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (createDatabase_ != null) { + output.writeMessage(1, getCreateDatabase()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (createDatabase_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getCreateDatabase()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof greptime.v1.meta.Ddl.CreateDatabaseTask)) { + return super.equals(obj); + } + greptime.v1.meta.Ddl.CreateDatabaseTask other = (greptime.v1.meta.Ddl.CreateDatabaseTask) obj; + + if (hasCreateDatabase() != other.hasCreateDatabase()) return false; + if (hasCreateDatabase()) { + if (!getCreateDatabase() + .equals(other.getCreateDatabase())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasCreateDatabase()) { + hash = (37 * hash) + CREATE_DATABASE_FIELD_NUMBER; + hash = (53 * hash) + getCreateDatabase().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static greptime.v1.meta.Ddl.CreateDatabaseTask parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static greptime.v1.meta.Ddl.CreateDatabaseTask parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static greptime.v1.meta.Ddl.CreateDatabaseTask parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static greptime.v1.meta.Ddl.CreateDatabaseTask parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static greptime.v1.meta.Ddl.CreateDatabaseTask parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static greptime.v1.meta.Ddl.CreateDatabaseTask parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static greptime.v1.meta.Ddl.CreateDatabaseTask parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static greptime.v1.meta.Ddl.CreateDatabaseTask parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static greptime.v1.meta.Ddl.CreateDatabaseTask parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static greptime.v1.meta.Ddl.CreateDatabaseTask parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static greptime.v1.meta.Ddl.CreateDatabaseTask parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static greptime.v1.meta.Ddl.CreateDatabaseTask parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(greptime.v1.meta.Ddl.CreateDatabaseTask prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code greptime.v1.meta.CreateDatabaseTask} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:greptime.v1.meta.CreateDatabaseTask) + greptime.v1.meta.Ddl.CreateDatabaseTaskOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return greptime.v1.meta.Ddl.internal_static_greptime_v1_meta_CreateDatabaseTask_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return greptime.v1.meta.Ddl.internal_static_greptime_v1_meta_CreateDatabaseTask_fieldAccessorTable + .ensureFieldAccessorsInitialized( + greptime.v1.meta.Ddl.CreateDatabaseTask.class, greptime.v1.meta.Ddl.CreateDatabaseTask.Builder.class); + } + + // Construct using greptime.v1.meta.Ddl.CreateDatabaseTask.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (createDatabaseBuilder_ == null) { + createDatabase_ = null; + } else { + createDatabase_ = null; + createDatabaseBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return greptime.v1.meta.Ddl.internal_static_greptime_v1_meta_CreateDatabaseTask_descriptor; + } + + @java.lang.Override + public greptime.v1.meta.Ddl.CreateDatabaseTask getDefaultInstanceForType() { + return greptime.v1.meta.Ddl.CreateDatabaseTask.getDefaultInstance(); + } + + @java.lang.Override + public greptime.v1.meta.Ddl.CreateDatabaseTask build() { + greptime.v1.meta.Ddl.CreateDatabaseTask result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public greptime.v1.meta.Ddl.CreateDatabaseTask buildPartial() { + greptime.v1.meta.Ddl.CreateDatabaseTask result = new greptime.v1.meta.Ddl.CreateDatabaseTask(this); + if (createDatabaseBuilder_ == null) { + result.createDatabase_ = createDatabase_; + } else { + result.createDatabase_ = createDatabaseBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof greptime.v1.meta.Ddl.CreateDatabaseTask) { + return mergeFrom((greptime.v1.meta.Ddl.CreateDatabaseTask)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(greptime.v1.meta.Ddl.CreateDatabaseTask other) { + if (other == greptime.v1.meta.Ddl.CreateDatabaseTask.getDefaultInstance()) return this; + if (other.hasCreateDatabase()) { + mergeCreateDatabase(other.getCreateDatabase()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + greptime.v1.meta.Ddl.CreateDatabaseTask parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (greptime.v1.meta.Ddl.CreateDatabaseTask) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private io.greptime.v1.Ddl.CreateDatabaseExpr createDatabase_; + private com.google.protobuf.SingleFieldBuilderV3< + io.greptime.v1.Ddl.CreateDatabaseExpr, io.greptime.v1.Ddl.CreateDatabaseExpr.Builder, io.greptime.v1.Ddl.CreateDatabaseExprOrBuilder> createDatabaseBuilder_; + /** + * .greptime.v1.CreateDatabaseExpr create_database = 1; + * @return Whether the createDatabase field is set. + */ + public boolean hasCreateDatabase() { + return createDatabaseBuilder_ != null || createDatabase_ != null; + } + /** + * .greptime.v1.CreateDatabaseExpr create_database = 1; + * @return The createDatabase. + */ + public io.greptime.v1.Ddl.CreateDatabaseExpr getCreateDatabase() { + if (createDatabaseBuilder_ == null) { + return createDatabase_ == null ? io.greptime.v1.Ddl.CreateDatabaseExpr.getDefaultInstance() : createDatabase_; + } else { + return createDatabaseBuilder_.getMessage(); + } + } + /** + * .greptime.v1.CreateDatabaseExpr create_database = 1; + */ + public Builder setCreateDatabase(io.greptime.v1.Ddl.CreateDatabaseExpr value) { + if (createDatabaseBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createDatabase_ = value; + onChanged(); + } else { + createDatabaseBuilder_.setMessage(value); + } + + return this; + } + /** + * .greptime.v1.CreateDatabaseExpr create_database = 1; + */ + public Builder setCreateDatabase( + io.greptime.v1.Ddl.CreateDatabaseExpr.Builder builderForValue) { + if (createDatabaseBuilder_ == null) { + createDatabase_ = builderForValue.build(); + onChanged(); + } else { + createDatabaseBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .greptime.v1.CreateDatabaseExpr create_database = 1; + */ + public Builder mergeCreateDatabase(io.greptime.v1.Ddl.CreateDatabaseExpr value) { + if (createDatabaseBuilder_ == null) { + if (createDatabase_ != null) { + createDatabase_ = + io.greptime.v1.Ddl.CreateDatabaseExpr.newBuilder(createDatabase_).mergeFrom(value).buildPartial(); + } else { + createDatabase_ = value; + } + onChanged(); + } else { + createDatabaseBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .greptime.v1.CreateDatabaseExpr create_database = 1; + */ + public Builder clearCreateDatabase() { + if (createDatabaseBuilder_ == null) { + createDatabase_ = null; + onChanged(); + } else { + createDatabase_ = null; + createDatabaseBuilder_ = null; + } + + return this; + } + /** + * .greptime.v1.CreateDatabaseExpr create_database = 1; + */ + public io.greptime.v1.Ddl.CreateDatabaseExpr.Builder getCreateDatabaseBuilder() { + + onChanged(); + return getCreateDatabaseFieldBuilder().getBuilder(); + } + /** + * .greptime.v1.CreateDatabaseExpr create_database = 1; + */ + public io.greptime.v1.Ddl.CreateDatabaseExprOrBuilder getCreateDatabaseOrBuilder() { + if (createDatabaseBuilder_ != null) { + return createDatabaseBuilder_.getMessageOrBuilder(); + } else { + return createDatabase_ == null ? + io.greptime.v1.Ddl.CreateDatabaseExpr.getDefaultInstance() : createDatabase_; + } + } + /** + * .greptime.v1.CreateDatabaseExpr create_database = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.greptime.v1.Ddl.CreateDatabaseExpr, io.greptime.v1.Ddl.CreateDatabaseExpr.Builder, io.greptime.v1.Ddl.CreateDatabaseExprOrBuilder> + getCreateDatabaseFieldBuilder() { + if (createDatabaseBuilder_ == null) { + createDatabaseBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.greptime.v1.Ddl.CreateDatabaseExpr, io.greptime.v1.Ddl.CreateDatabaseExpr.Builder, io.greptime.v1.Ddl.CreateDatabaseExprOrBuilder>( + getCreateDatabase(), + getParentForChildren(), + isClean()); + createDatabase_ = null; + } + return createDatabaseBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:greptime.v1.meta.CreateDatabaseTask) + } + + // @@protoc_insertion_point(class_scope:greptime.v1.meta.CreateDatabaseTask) + private static final greptime.v1.meta.Ddl.CreateDatabaseTask DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new greptime.v1.meta.Ddl.CreateDatabaseTask(); + } + + public static greptime.v1.meta.Ddl.CreateDatabaseTask getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateDatabaseTask parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateDatabaseTask(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public greptime.v1.meta.Ddl.CreateDatabaseTask getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + public interface CreateTableTaskOrBuilder extends // @@protoc_insertion_point(interface_extends:greptime.v1.meta.CreateTableTask) com.google.protobuf.MessageOrBuilder { @@ -6210,6 +6833,21 @@ public interface DdlTaskRequestOrBuilder extends */ greptime.v1.meta.Ddl.DropDatabaseTaskOrBuilder getDropDatabaseTaskOrBuilder(); + /** + * .greptime.v1.meta.CreateDatabaseTask create_database_task = 10; + * @return Whether the createDatabaseTask field is set. + */ + boolean hasCreateDatabaseTask(); + /** + * .greptime.v1.meta.CreateDatabaseTask create_database_task = 10; + * @return The createDatabaseTask. + */ + greptime.v1.meta.Ddl.CreateDatabaseTask getCreateDatabaseTask(); + /** + * .greptime.v1.meta.CreateDatabaseTask create_database_task = 10; + */ + greptime.v1.meta.Ddl.CreateDatabaseTaskOrBuilder getCreateDatabaseTaskOrBuilder(); + public greptime.v1.meta.Ddl.DdlTaskRequest.TaskCase getTaskCase(); } /** @@ -6382,6 +7020,20 @@ private DdlTaskRequest( taskCase_ = 9; break; } + case 82: { + greptime.v1.meta.Ddl.CreateDatabaseTask.Builder subBuilder = null; + if (taskCase_ == 10) { + subBuilder = ((greptime.v1.meta.Ddl.CreateDatabaseTask) task_).toBuilder(); + } + task_ = + input.readMessage(greptime.v1.meta.Ddl.CreateDatabaseTask.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((greptime.v1.meta.Ddl.CreateDatabaseTask) task_); + task_ = subBuilder.buildPartial(); + } + taskCase_ = 10; + break; + } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { @@ -6429,6 +7081,7 @@ public enum TaskCase DROP_TABLE_TASKS(7), ALTER_TABLE_TASKS(8), DROP_DATABASE_TASK(9), + CREATE_DATABASE_TASK(10), TASK_NOT_SET(0); private final int value; private TaskCase(int value) { @@ -6454,6 +7107,7 @@ public static TaskCase forNumber(int value) { case 7: return DROP_TABLE_TASKS; case 8: return ALTER_TABLE_TASKS; case 9: return DROP_DATABASE_TASK; + case 10: return CREATE_DATABASE_TASK; case 0: return TASK_NOT_SET; default: return null; } @@ -6743,6 +7397,37 @@ public greptime.v1.meta.Ddl.DropDatabaseTaskOrBuilder getDropDatabaseTaskOrBuild return greptime.v1.meta.Ddl.DropDatabaseTask.getDefaultInstance(); } + public static final int CREATE_DATABASE_TASK_FIELD_NUMBER = 10; + /** + * .greptime.v1.meta.CreateDatabaseTask create_database_task = 10; + * @return Whether the createDatabaseTask field is set. + */ + @java.lang.Override + public boolean hasCreateDatabaseTask() { + return taskCase_ == 10; + } + /** + * .greptime.v1.meta.CreateDatabaseTask create_database_task = 10; + * @return The createDatabaseTask. + */ + @java.lang.Override + public greptime.v1.meta.Ddl.CreateDatabaseTask getCreateDatabaseTask() { + if (taskCase_ == 10) { + return (greptime.v1.meta.Ddl.CreateDatabaseTask) task_; + } + return greptime.v1.meta.Ddl.CreateDatabaseTask.getDefaultInstance(); + } + /** + * .greptime.v1.meta.CreateDatabaseTask create_database_task = 10; + */ + @java.lang.Override + public greptime.v1.meta.Ddl.CreateDatabaseTaskOrBuilder getCreateDatabaseTaskOrBuilder() { + if (taskCase_ == 10) { + return (greptime.v1.meta.Ddl.CreateDatabaseTask) task_; + } + return greptime.v1.meta.Ddl.CreateDatabaseTask.getDefaultInstance(); + } + private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { @@ -6784,6 +7469,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (taskCase_ == 9) { output.writeMessage(9, (greptime.v1.meta.Ddl.DropDatabaseTask) task_); } + if (taskCase_ == 10) { + output.writeMessage(10, (greptime.v1.meta.Ddl.CreateDatabaseTask) task_); + } unknownFields.writeTo(output); } @@ -6829,6 +7517,10 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(9, (greptime.v1.meta.Ddl.DropDatabaseTask) task_); } + if (taskCase_ == 10) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(10, (greptime.v1.meta.Ddl.CreateDatabaseTask) task_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -6883,6 +7575,10 @@ public boolean equals(final java.lang.Object obj) { if (!getDropDatabaseTask() .equals(other.getDropDatabaseTask())) return false; break; + case 10: + if (!getCreateDatabaseTask() + .equals(other.getCreateDatabaseTask())) return false; + break; case 0: default: } @@ -6934,6 +7630,10 @@ public int hashCode() { hash = (37 * hash) + DROP_DATABASE_TASK_FIELD_NUMBER; hash = (53 * hash) + getDropDatabaseTask().hashCode(); break; + case 10: + hash = (37 * hash) + CREATE_DATABASE_TASK_FIELD_NUMBER; + hash = (53 * hash) + getCreateDatabaseTask().hashCode(); + break; case 0: default: } @@ -7165,6 +7865,13 @@ public greptime.v1.meta.Ddl.DdlTaskRequest buildPartial() { result.task_ = dropDatabaseTaskBuilder_.build(); } } + if (taskCase_ == 10) { + if (createDatabaseTaskBuilder_ == null) { + result.task_ = task_; + } else { + result.task_ = createDatabaseTaskBuilder_.build(); + } + } result.taskCase_ = taskCase_; onBuilt(); return result; @@ -7250,6 +7957,10 @@ public Builder mergeFrom(greptime.v1.meta.Ddl.DdlTaskRequest other) { mergeDropDatabaseTask(other.getDropDatabaseTask()); break; } + case CREATE_DATABASE_TASK: { + mergeCreateDatabaseTask(other.getCreateDatabaseTask()); + break; + } case TASK_NOT_SET: { break; } @@ -8552,6 +9263,148 @@ public greptime.v1.meta.Ddl.DropDatabaseTaskOrBuilder getDropDatabaseTaskOrBuild onChanged();; return dropDatabaseTaskBuilder_; } + + private com.google.protobuf.SingleFieldBuilderV3< + greptime.v1.meta.Ddl.CreateDatabaseTask, greptime.v1.meta.Ddl.CreateDatabaseTask.Builder, greptime.v1.meta.Ddl.CreateDatabaseTaskOrBuilder> createDatabaseTaskBuilder_; + /** + * .greptime.v1.meta.CreateDatabaseTask create_database_task = 10; + * @return Whether the createDatabaseTask field is set. + */ + @java.lang.Override + public boolean hasCreateDatabaseTask() { + return taskCase_ == 10; + } + /** + * .greptime.v1.meta.CreateDatabaseTask create_database_task = 10; + * @return The createDatabaseTask. + */ + @java.lang.Override + public greptime.v1.meta.Ddl.CreateDatabaseTask getCreateDatabaseTask() { + if (createDatabaseTaskBuilder_ == null) { + if (taskCase_ == 10) { + return (greptime.v1.meta.Ddl.CreateDatabaseTask) task_; + } + return greptime.v1.meta.Ddl.CreateDatabaseTask.getDefaultInstance(); + } else { + if (taskCase_ == 10) { + return createDatabaseTaskBuilder_.getMessage(); + } + return greptime.v1.meta.Ddl.CreateDatabaseTask.getDefaultInstance(); + } + } + /** + * .greptime.v1.meta.CreateDatabaseTask create_database_task = 10; + */ + public Builder setCreateDatabaseTask(greptime.v1.meta.Ddl.CreateDatabaseTask value) { + if (createDatabaseTaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + task_ = value; + onChanged(); + } else { + createDatabaseTaskBuilder_.setMessage(value); + } + taskCase_ = 10; + return this; + } + /** + * .greptime.v1.meta.CreateDatabaseTask create_database_task = 10; + */ + public Builder setCreateDatabaseTask( + greptime.v1.meta.Ddl.CreateDatabaseTask.Builder builderForValue) { + if (createDatabaseTaskBuilder_ == null) { + task_ = builderForValue.build(); + onChanged(); + } else { + createDatabaseTaskBuilder_.setMessage(builderForValue.build()); + } + taskCase_ = 10; + return this; + } + /** + * .greptime.v1.meta.CreateDatabaseTask create_database_task = 10; + */ + public Builder mergeCreateDatabaseTask(greptime.v1.meta.Ddl.CreateDatabaseTask value) { + if (createDatabaseTaskBuilder_ == null) { + if (taskCase_ == 10 && + task_ != greptime.v1.meta.Ddl.CreateDatabaseTask.getDefaultInstance()) { + task_ = greptime.v1.meta.Ddl.CreateDatabaseTask.newBuilder((greptime.v1.meta.Ddl.CreateDatabaseTask) task_) + .mergeFrom(value).buildPartial(); + } else { + task_ = value; + } + onChanged(); + } else { + if (taskCase_ == 10) { + createDatabaseTaskBuilder_.mergeFrom(value); + } else { + createDatabaseTaskBuilder_.setMessage(value); + } + } + taskCase_ = 10; + return this; + } + /** + * .greptime.v1.meta.CreateDatabaseTask create_database_task = 10; + */ + public Builder clearCreateDatabaseTask() { + if (createDatabaseTaskBuilder_ == null) { + if (taskCase_ == 10) { + taskCase_ = 0; + task_ = null; + onChanged(); + } + } else { + if (taskCase_ == 10) { + taskCase_ = 0; + task_ = null; + } + createDatabaseTaskBuilder_.clear(); + } + return this; + } + /** + * .greptime.v1.meta.CreateDatabaseTask create_database_task = 10; + */ + public greptime.v1.meta.Ddl.CreateDatabaseTask.Builder getCreateDatabaseTaskBuilder() { + return getCreateDatabaseTaskFieldBuilder().getBuilder(); + } + /** + * .greptime.v1.meta.CreateDatabaseTask create_database_task = 10; + */ + @java.lang.Override + public greptime.v1.meta.Ddl.CreateDatabaseTaskOrBuilder getCreateDatabaseTaskOrBuilder() { + if ((taskCase_ == 10) && (createDatabaseTaskBuilder_ != null)) { + return createDatabaseTaskBuilder_.getMessageOrBuilder(); + } else { + if (taskCase_ == 10) { + return (greptime.v1.meta.Ddl.CreateDatabaseTask) task_; + } + return greptime.v1.meta.Ddl.CreateDatabaseTask.getDefaultInstance(); + } + } + /** + * .greptime.v1.meta.CreateDatabaseTask create_database_task = 10; + */ + private com.google.protobuf.SingleFieldBuilderV3< + greptime.v1.meta.Ddl.CreateDatabaseTask, greptime.v1.meta.Ddl.CreateDatabaseTask.Builder, greptime.v1.meta.Ddl.CreateDatabaseTaskOrBuilder> + getCreateDatabaseTaskFieldBuilder() { + if (createDatabaseTaskBuilder_ == null) { + if (!(taskCase_ == 10)) { + task_ = greptime.v1.meta.Ddl.CreateDatabaseTask.getDefaultInstance(); + } + createDatabaseTaskBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + greptime.v1.meta.Ddl.CreateDatabaseTask, greptime.v1.meta.Ddl.CreateDatabaseTask.Builder, greptime.v1.meta.Ddl.CreateDatabaseTaskOrBuilder>( + (greptime.v1.meta.Ddl.CreateDatabaseTask) task_, + getParentForChildren(), + isClean()); + task_ = null; + } + taskCase_ = 10; + onChanged();; + return createDatabaseTaskBuilder_; + } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -10196,6 +11049,11 @@ public greptime.v1.meta.Ddl.DdlTaskResponse getDefaultInstanceForType() { } + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_greptime_v1_meta_CreateDatabaseTask_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_greptime_v1_meta_CreateDatabaseTask_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_greptime_v1_meta_CreateTableTask_descriptor; private static final @@ -10258,7 +11116,9 @@ public greptime.v1.meta.Ddl.DdlTaskResponse getDefaultInstanceForType() { "\n\032greptime/v1/meta/ddl.proto\022\020greptime.v" + "1.meta\032\035greptime/v1/meta/common.proto\032\034g" + "reptime/v1/meta/route.proto\032\025greptime/v1" + - "/ddl.proto\"\212\001\n\017CreateTableTask\0222\n\014create" + + "/ddl.proto\"N\n\022CreateDatabaseTask\0228\n\017crea" + + "te_database\030\001 \001(\0132\037.greptime.v1.CreateDa" + + "tabaseExpr\"\212\001\n\017CreateTableTask\0222\n\014create" + "_table\030\001 \001(\0132\034.greptime.v1.CreateTableEx" + "pr\022/\n\npartitions\030\002 \003(\0132\033.greptime.v1.met" + "a.Partition\022\022\n\ntable_info\030\003 \001(\014\"D\n\020Creat" + @@ -10273,7 +11133,7 @@ public greptime.v1.meta.Ddl.DdlTaskResponse getDefaultInstanceForType() { "ask\"K\n\021TruncateTableTask\0226\n\016truncate_tab" + "le\030\001 \001(\0132\036.greptime.v1.TruncateTableExpr" + "\"H\n\020DropDatabaseTask\0224\n\rdrop_database\030\001 " + - "\001(\0132\035.greptime.v1.DropDatabaseExpr\"\311\004\n\016D" + + "\001(\0132\035.greptime.v1.DropDatabaseExpr\"\217\005\n\016D" + "dlTaskRequest\022/\n\006header\030\001 \001(\0132\037.greptime" + ".v1.meta.RequestHeader\022>\n\021create_table_t" + "ask\030\002 \001(\0132!.greptime.v1.meta.CreateTable" + @@ -10288,15 +11148,17 @@ public greptime.v1.meta.Ddl.DdlTaskResponse getDefaultInstanceForType() { "ksH\000\022>\n\021alter_table_tasks\030\010 \001(\0132!.grepti" + "me.v1.meta.AlterTableTasksH\000\022@\n\022drop_dat" + "abase_task\030\t \001(\0132\".greptime.v1.meta.Drop" + - "DatabaseTaskH\000B\006\n\004task\"\312\001\n\017DdlTaskRespon" + - "se\0220\n\006header\030\001 \001(\0132 .greptime.v1.meta.Re" + - "sponseHeader\022*\n\003pid\030\002 \001(\0132\035.greptime.v1." + - "meta.ProcedureId\022+\n\010table_id\030\004 \001(\0132\031.gre" + - "ptime.v1.meta.TableId\022,\n\ttable_ids\030\005 \003(\013" + - "2\031.greptime.v1.meta.TableId*#\n\013DdlTaskTy" + - "pe\022\n\n\006Create\020\000\022\010\n\004Drop\020\001Bstring database_name = 1; + * string catalog_name = 1; + * @return The catalogName. + */ + java.lang.String getCatalogName(); + /** + * string catalog_name = 1; + * @return The bytes for catalogName. + */ + com.google.protobuf.ByteString + getCatalogNameBytes(); + + /** + * string database_name = 2; * @return The databaseName. */ java.lang.String getDatabaseName(); /** - * string database_name = 1; + * string database_name = 2; * @return The bytes for databaseName. */ com.google.protobuf.ByteString getDatabaseNameBytes(); /** - * bool create_if_not_exists = 2; + * bool create_if_not_exists = 3; * @return The createIfNotExists. */ boolean getCreateIfNotExists(); /** - * map<string, string> options = 3; + * map<string, string> options = 4; */ int getOptionsCount(); /** - * map<string, string> options = 3; + * map<string, string> options = 4; */ boolean containsOptions( java.lang.String key); @@ -6990,12 +7002,12 @@ boolean containsOptions( java.util.Map getOptions(); /** - * map<string, string> options = 3; + * map<string, string> options = 4; */ java.util.Map getOptionsMap(); /** - * map<string, string> options = 3; + * map<string, string> options = 4; */ /* nullable */ @@ -7004,7 +7016,7 @@ java.lang.String getOptionsOrDefault( /* nullable */ java.lang.String defaultValue); /** - * map<string, string> options = 3; + * map<string, string> options = 4; */ java.lang.String getOptionsOrThrow( @@ -7023,6 +7035,7 @@ private CreateDatabaseExpr(com.google.protobuf.GeneratedMessageV3.Builder bui super(builder); } private CreateDatabaseExpr() { + catalogName_ = ""; databaseName_ = ""; } @@ -7060,15 +7073,21 @@ private CreateDatabaseExpr( case 10: { java.lang.String s = input.readStringRequireUtf8(); + catalogName_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + databaseName_ = s; break; } - case 16: { + case 24: { createIfNotExists_ = input.readBool(); break; } - case 26: { + case 34: { if (!((mutable_bitField0_ & 0x00000001) != 0)) { options_ = com.google.protobuf.MapField.newMapField( OptionsDefaultEntryHolder.defaultEntry); @@ -7112,7 +7131,7 @@ private CreateDatabaseExpr( protected com.google.protobuf.MapField internalGetMapField( int number) { switch (number) { - case 3: + case 4: return internalGetOptions(); default: throw new RuntimeException( @@ -7127,10 +7146,48 @@ protected com.google.protobuf.MapField internalGetMapField( io.greptime.v1.Ddl.CreateDatabaseExpr.class, io.greptime.v1.Ddl.CreateDatabaseExpr.Builder.class); } - public static final int DATABASE_NAME_FIELD_NUMBER = 1; + public static final int CATALOG_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object catalogName_; + /** + * string catalog_name = 1; + * @return The catalogName. + */ + @java.lang.Override + public java.lang.String getCatalogName() { + java.lang.Object ref = catalogName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + catalogName_ = s; + return s; + } + } + /** + * string catalog_name = 1; + * @return The bytes for catalogName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getCatalogNameBytes() { + java.lang.Object ref = catalogName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + catalogName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATABASE_NAME_FIELD_NUMBER = 2; private volatile java.lang.Object databaseName_; /** - * string database_name = 1; + * string database_name = 2; * @return The databaseName. */ @java.lang.Override @@ -7147,7 +7204,7 @@ public java.lang.String getDatabaseName() { } } /** - * string database_name = 1; + * string database_name = 2; * @return The bytes for databaseName. */ @java.lang.Override @@ -7165,10 +7222,10 @@ public java.lang.String getDatabaseName() { } } - public static final int CREATE_IF_NOT_EXISTS_FIELD_NUMBER = 2; + public static final int CREATE_IF_NOT_EXISTS_FIELD_NUMBER = 3; private boolean createIfNotExists_; /** - * bool create_if_not_exists = 2; + * bool create_if_not_exists = 3; * @return The createIfNotExists. */ @java.lang.Override @@ -7176,7 +7233,7 @@ public boolean getCreateIfNotExists() { return createIfNotExists_; } - public static final int OPTIONS_FIELD_NUMBER = 3; + public static final int OPTIONS_FIELD_NUMBER = 4; private static final class OptionsDefaultEntryHolder { static final com.google.protobuf.MapEntry< java.lang.String, java.lang.String> defaultEntry = @@ -7203,7 +7260,7 @@ public int getOptionsCount() { return internalGetOptions().getMap().size(); } /** - * map<string, string> options = 3; + * map<string, string> options = 4; */ @java.lang.Override @@ -7221,7 +7278,7 @@ public java.util.Map getOptions() { return getOptionsMap(); } /** - * map<string, string> options = 3; + * map<string, string> options = 4; */ @java.lang.Override @@ -7229,7 +7286,7 @@ public java.util.Map getOptionsMap() { return internalGetOptions().getMap(); } /** - * map<string, string> options = 3; + * map<string, string> options = 4; */ @java.lang.Override @@ -7242,7 +7299,7 @@ public java.lang.String getOptionsOrDefault( return map.containsKey(key) ? map.get(key) : defaultValue; } /** - * map<string, string> options = 3; + * map<string, string> options = 4; */ @java.lang.Override @@ -7271,18 +7328,21 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(catalogName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, catalogName_); + } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(databaseName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, databaseName_); + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, databaseName_); } if (createIfNotExists_ != false) { - output.writeBool(2, createIfNotExists_); + output.writeBool(3, createIfNotExists_); } com.google.protobuf.GeneratedMessageV3 .serializeStringMapTo( output, internalGetOptions(), OptionsDefaultEntryHolder.defaultEntry, - 3); + 4); unknownFields.writeTo(output); } @@ -7292,12 +7352,15 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(catalogName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, catalogName_); + } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(databaseName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, databaseName_); + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, databaseName_); } if (createIfNotExists_ != false) { size += com.google.protobuf.CodedOutputStream - .computeBoolSize(2, createIfNotExists_); + .computeBoolSize(3, createIfNotExists_); } for (java.util.Map.Entry entry : internalGetOptions().getMap().entrySet()) { @@ -7307,7 +7370,7 @@ public int getSerializedSize() { .setValue(entry.getValue()) .build(); size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, options__); + .computeMessageSize(4, options__); } size += unknownFields.getSerializedSize(); memoizedSize = size; @@ -7324,6 +7387,8 @@ public boolean equals(final java.lang.Object obj) { } io.greptime.v1.Ddl.CreateDatabaseExpr other = (io.greptime.v1.Ddl.CreateDatabaseExpr) obj; + if (!getCatalogName() + .equals(other.getCatalogName())) return false; if (!getDatabaseName() .equals(other.getDatabaseName())) return false; if (getCreateIfNotExists() @@ -7341,6 +7406,8 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CATALOG_NAME_FIELD_NUMBER; + hash = (53 * hash) + getCatalogName().hashCode(); hash = (37 * hash) + DATABASE_NAME_FIELD_NUMBER; hash = (53 * hash) + getDatabaseName().hashCode(); hash = (37 * hash) + CREATE_IF_NOT_EXISTS_FIELD_NUMBER; @@ -7461,7 +7528,7 @@ public static final class Builder extends protected com.google.protobuf.MapField internalGetMapField( int number) { switch (number) { - case 3: + case 4: return internalGetOptions(); default: throw new RuntimeException( @@ -7472,7 +7539,7 @@ protected com.google.protobuf.MapField internalGetMapField( protected com.google.protobuf.MapField internalGetMutableMapField( int number) { switch (number) { - case 3: + case 4: return internalGetMutableOptions(); default: throw new RuntimeException( @@ -7505,6 +7572,8 @@ private void maybeForceBuilderInitialization() { @java.lang.Override public Builder clear() { super.clear(); + catalogName_ = ""; + databaseName_ = ""; createIfNotExists_ = false; @@ -7537,6 +7606,7 @@ public io.greptime.v1.Ddl.CreateDatabaseExpr build() { public io.greptime.v1.Ddl.CreateDatabaseExpr buildPartial() { io.greptime.v1.Ddl.CreateDatabaseExpr result = new io.greptime.v1.Ddl.CreateDatabaseExpr(this); int from_bitField0_ = bitField0_; + result.catalogName_ = catalogName_; result.databaseName_ = databaseName_; result.createIfNotExists_ = createIfNotExists_; result.options_ = internalGetOptions(); @@ -7589,6 +7659,10 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom(io.greptime.v1.Ddl.CreateDatabaseExpr other) { if (other == io.greptime.v1.Ddl.CreateDatabaseExpr.getDefaultInstance()) return this; + if (!other.getCatalogName().isEmpty()) { + catalogName_ = other.catalogName_; + onChanged(); + } if (!other.getDatabaseName().isEmpty()) { databaseName_ = other.databaseName_; onChanged(); @@ -7628,9 +7702,85 @@ public Builder mergeFrom( } private int bitField0_; + private java.lang.Object catalogName_ = ""; + /** + * string catalog_name = 1; + * @return The catalogName. + */ + public java.lang.String getCatalogName() { + java.lang.Object ref = catalogName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + catalogName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string catalog_name = 1; + * @return The bytes for catalogName. + */ + public com.google.protobuf.ByteString + getCatalogNameBytes() { + java.lang.Object ref = catalogName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + catalogName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string catalog_name = 1; + * @param value The catalogName to set. + * @return This builder for chaining. + */ + public Builder setCatalogName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + catalogName_ = value; + onChanged(); + return this; + } + /** + * string catalog_name = 1; + * @return This builder for chaining. + */ + public Builder clearCatalogName() { + + catalogName_ = getDefaultInstance().getCatalogName(); + onChanged(); + return this; + } + /** + * string catalog_name = 1; + * @param value The bytes for catalogName to set. + * @return This builder for chaining. + */ + public Builder setCatalogNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + catalogName_ = value; + onChanged(); + return this; + } + private java.lang.Object databaseName_ = ""; /** - * string database_name = 1; + * string database_name = 2; * @return The databaseName. */ public java.lang.String getDatabaseName() { @@ -7646,7 +7796,7 @@ public java.lang.String getDatabaseName() { } } /** - * string database_name = 1; + * string database_name = 2; * @return The bytes for databaseName. */ public com.google.protobuf.ByteString @@ -7663,7 +7813,7 @@ public java.lang.String getDatabaseName() { } } /** - * string database_name = 1; + * string database_name = 2; * @param value The databaseName to set. * @return This builder for chaining. */ @@ -7678,7 +7828,7 @@ public Builder setDatabaseName( return this; } /** - * string database_name = 1; + * string database_name = 2; * @return This builder for chaining. */ public Builder clearDatabaseName() { @@ -7688,7 +7838,7 @@ public Builder clearDatabaseName() { return this; } /** - * string database_name = 1; + * string database_name = 2; * @param value The bytes for databaseName to set. * @return This builder for chaining. */ @@ -7706,7 +7856,7 @@ public Builder setDatabaseNameBytes( private boolean createIfNotExists_ ; /** - * bool create_if_not_exists = 2; + * bool create_if_not_exists = 3; * @return The createIfNotExists. */ @java.lang.Override @@ -7714,7 +7864,7 @@ public boolean getCreateIfNotExists() { return createIfNotExists_; } /** - * bool create_if_not_exists = 2; + * bool create_if_not_exists = 3; * @param value The createIfNotExists to set. * @return This builder for chaining. */ @@ -7725,7 +7875,7 @@ public Builder setCreateIfNotExists(boolean value) { return this; } /** - * bool create_if_not_exists = 2; + * bool create_if_not_exists = 3; * @return This builder for chaining. */ public Builder clearCreateIfNotExists() { @@ -7762,7 +7912,7 @@ public int getOptionsCount() { return internalGetOptions().getMap().size(); } /** - * map<string, string> options = 3; + * map<string, string> options = 4; */ @java.lang.Override @@ -7780,7 +7930,7 @@ public java.util.Map getOptions() { return getOptionsMap(); } /** - * map<string, string> options = 3; + * map<string, string> options = 4; */ @java.lang.Override @@ -7788,7 +7938,7 @@ public java.util.Map getOptionsMap() { return internalGetOptions().getMap(); } /** - * map<string, string> options = 3; + * map<string, string> options = 4; */ @java.lang.Override @@ -7801,7 +7951,7 @@ public java.lang.String getOptionsOrDefault( return map.containsKey(key) ? map.get(key) : defaultValue; } /** - * map<string, string> options = 3; + * map<string, string> options = 4; */ @java.lang.Override @@ -7822,7 +7972,7 @@ public Builder clearOptions() { return this; } /** - * map<string, string> options = 3; + * map<string, string> options = 4; */ public Builder removeOptions( @@ -7841,7 +7991,7 @@ public Builder removeOptions( return internalGetMutableOptions().getMutableMap(); } /** - * map<string, string> options = 3; + * map<string, string> options = 4; */ public Builder putOptions( java.lang.String key, @@ -7856,7 +8006,7 @@ public Builder putOptions( return this; } /** - * map<string, string> options = 3; + * map<string, string> options = 4; */ public Builder putAllOptions( @@ -16077,37 +16227,37 @@ public io.greptime.v1.Ddl.AddColumnLocation getDefaultInstanceForType() { "alog_name\030\001 \001(\t\022\023\n\013schema_name\030\002 \001(\t\022\022\n\n" + "table_name\030\003 \001(\t\022&\n\010table_id\030\004 \001(\0132\024.gre" + "ptime.v1.TableId\022\026\n\016drop_if_exists\030\005 \001(\010" + - "\"\270\001\n\022CreateDatabaseExpr\022\025\n\rdatabase_name" + - "\030\001 \001(\t\022\034\n\024create_if_not_exists\030\002 \001(\010\022=\n\007" + - "options\030\003 \003(\0132,.greptime.v1.CreateDataba" + - "seExpr.OptionsEntry\032.\n\014OptionsEntry\022\013\n\003k" + - "ey\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"z\n\021TruncateT" + - "ableExpr\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\"U\n\020DropD" + - "atabaseExpr\022\024\n\014catalog_name\030\001 \001(\t\022\023\n\013sch" + - "ema_name\030\002 \001(\t\022\026\n\016drop_if_exists\030\003 \001(\010\"9" + - "\n\nAddColumns\022+\n\013add_columns\030\001 \003(\0132\026.grep" + - "time.v1.AddColumn\"<\n\013DropColumns\022-\n\014drop" + - "_columns\030\001 \003(\0132\027.greptime.v1.DropColumn\"" + - "%\n\013RenameTable\022\026\n\016new_table_name\030\001 \001(\t\"i" + - "\n\tAddColumn\022*\n\ncolumn_def\030\001 \001(\0132\026.grepti" + - "me.v1.ColumnDef\0220\n\010location\030\003 \001(\0132\036.grep" + - "time.v1.AddColumnLocation\"\032\n\nDropColumn\022" + - "\014\n\004name\030\001 \001(\t\"\025\n\007TableId\022\n\n\002id\030\001 \001(\r\"\377\001\n" + - "\tColumnDef\022\014\n\004name\030\001 \001(\t\022.\n\tdata_type\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\0220\n\rsemantic_type\030\005 \001(\0162\031.greptime.v1.S" + - "emanticType\022\017\n\007comment\030\006 \001(\t\022@\n\022datatype" + - "_extension\030\007 \001(\0132$.greptime.v1.ColumnDat" + - "aTypeExtension\"\230\001\n\021AddColumnLocation\022B\n\r" + - "location_type\030\001 \001(\0162+.greptime.v1.AddCol" + - "umnLocation.LocationType\022\031\n\021after_column" + - "_name\030\002 \001(\t\"$\n\014LocationType\022\t\n\005FIRST\020\000\022\t" + - "\n\005AFTER\020\001BL\n\016io.greptime.v1B\003DdlZ5github" + - ".com/GreptimeTeam/greptime-proto/go/grep" + - "time/v1b\006proto3" + "\"\316\001\n\022CreateDatabaseExpr\022\024\n\014catalog_name\030" + + "\001 \001(\t\022\025\n\rdatabase_name\030\002 \001(\t\022\034\n\024create_i" + + "f_not_exists\030\003 \001(\010\022=\n\007options\030\004 \003(\0132,.gr" + + "eptime.v1.CreateDatabaseExpr.OptionsEntr" + + "y\032.\n\014OptionsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030" + + "\002 \001(\t:\0028\001\"z\n\021TruncateTableExpr\022\024\n\014catalo" + + "g_name\030\001 \001(\t\022\023\n\013schema_name\030\002 \001(\t\022\022\n\ntab" + + "le_name\030\003 \001(\t\022&\n\010table_id\030\004 \001(\0132\024.grepti" + + "me.v1.TableId\"U\n\020DropDatabaseExpr\022\024\n\014cat" + + "alog_name\030\001 \001(\t\022\023\n\013schema_name\030\002 \001(\t\022\026\n\016" + + "drop_if_exists\030\003 \001(\010\"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\"i\n\tAddColumn\022*\n\ncol" + + "umn_def\030\001 \001(\0132\026.greptime.v1.ColumnDef\0220\n" + + "\010location\030\003 \001(\0132\036.greptime.v1.AddColumnL" + + "ocation\"\032\n\nDropColumn\022\014\n\004name\030\001 \001(\t\"\025\n\007T" + + "ableId\022\n\n\002id\030\001 \001(\r\"\377\001\n\tColumnDef\022\014\n\004name" + + "\030\001 \001(\t\022.\n\tdata_type\030\002 \001(\0162\033.greptime.v1." + + "ColumnDataType\022\023\n\013is_nullable\030\003 \001(\010\022\032\n\022d" + + "efault_constraint\030\004 \001(\014\0220\n\rsemantic_type" + + "\030\005 \001(\0162\031.greptime.v1.SemanticType\022\017\n\007com" + + "ment\030\006 \001(\t\022@\n\022datatype_extension\030\007 \001(\0132$" + + ".greptime.v1.ColumnDataTypeExtension\"\230\001\n" + + "\021AddColumnLocation\022B\n\rlocation_type\030\001 \001(" + + "\0162+.greptime.v1.AddColumnLocation.Locati" + + "onType\022\031\n\021after_column_name\030\002 \001(\t\"$\n\014Loc" + + "ationType\022\t\n\005FIRST\020\000\022\t\n\005AFTER\020\001BL\n\016io.gr" + + "eptime.v1B\003DdlZ5github.com/GreptimeTeam/" + + "greptime-proto/go/greptime/v1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, @@ -16149,7 +16299,7 @@ public io.greptime.v1.Ddl.AddColumnLocation getDefaultInstanceForType() { internal_static_greptime_v1_CreateDatabaseExpr_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_greptime_v1_CreateDatabaseExpr_descriptor, - new java.lang.String[] { "DatabaseName", "CreateIfNotExists", "Options", }); + new java.lang.String[] { "CatalogName", "DatabaseName", "CreateIfNotExists", "Options", }); internal_static_greptime_v1_CreateDatabaseExpr_OptionsEntry_descriptor = internal_static_greptime_v1_CreateDatabaseExpr_descriptor.getNestedTypes().get(0); internal_static_greptime_v1_CreateDatabaseExpr_OptionsEntry_fieldAccessorTable = new diff --git a/proto/greptime/v1/ddl.proto b/proto/greptime/v1/ddl.proto index 6f721c01..19e27ece 100644 --- a/proto/greptime/v1/ddl.proto +++ b/proto/greptime/v1/ddl.proto @@ -70,9 +70,10 @@ message DropTableExpr { } message CreateDatabaseExpr { - string database_name = 1; - bool create_if_not_exists = 2; - map options = 3; + string catalog_name = 1; + string database_name = 2; + bool create_if_not_exists = 3; + map options = 4; } message TruncateTableExpr { diff --git a/proto/greptime/v1/meta/ddl.proto b/proto/greptime/v1/meta/ddl.proto index 6e59bb4a..9e926679 100644 --- a/proto/greptime/v1/meta/ddl.proto +++ b/proto/greptime/v1/meta/ddl.proto @@ -27,6 +27,10 @@ enum DdlTaskType { Drop = 1; } +message CreateDatabaseTask { + CreateDatabaseExpr create_database = 1; +} + message CreateTableTask { CreateTableExpr create_table = 1; repeated Partition partitions = 2; @@ -67,6 +71,7 @@ message DdlTaskRequest { DropTableTasks drop_table_tasks = 7; AlterTableTasks alter_table_tasks = 8; DropDatabaseTask drop_database_task = 9; + CreateDatabaseTask create_database_task = 10; } }