From 43ddd8dea69f4df0fe2e8b5cdc0044d2cfa35908 Mon Sep 17 00:00:00 2001 From: Yingwen Date: Fri, 3 Jan 2025 23:00:22 +0800 Subject: [PATCH] feat: add `add_if_not_exists` to `AddColumn` (#207) * feat: add column if not exists * chore: generate codes * feat: add if not exists for each col * chore: gen codes --- c++/greptime/v1/ddl.pb.cc | 141 +++++++----- c++/greptime/v1/ddl.pb.h | 31 +++ go/greptime/v1/ddl.pb.go | 253 +++++++++++---------- java/src/main/java/io/greptime/v1/Ddl.java | 152 +++++++++---- proto/greptime/v1/ddl.proto | 5 +- 5 files changed, 364 insertions(+), 218 deletions(-) diff --git a/c++/greptime/v1/ddl.pb.cc b/c++/greptime/v1/ddl.pb.cc index 1cd2054e..3e371e81 100644 --- a/c++/greptime/v1/ddl.pb.cc +++ b/c++/greptime/v1/ddl.pb.cc @@ -306,6 +306,7 @@ PROTOBUF_CONSTEXPR AddColumn::AddColumn( ::_pbi::ConstantInitialized): _impl_{ /*decltype(_impl_.column_def_)*/nullptr , /*decltype(_impl_.location_)*/nullptr + , /*decltype(_impl_.add_if_not_exists_)*/false , /*decltype(_impl_._cached_size_)*/{}} {} struct AddColumnDefaultTypeInternal { PROTOBUF_CONSTEXPR AddColumnDefaultTypeInternal() @@ -733,6 +734,7 @@ const uint32_t TableStruct_greptime_2fv1_2fddl_2eproto::offsets[] PROTOBUF_SECTI ~0u, // no _inlined_string_donated_ PROTOBUF_FIELD_OFFSET(::greptime::v1::AddColumn, _impl_.column_def_), PROTOBUF_FIELD_OFFSET(::greptime::v1::AddColumn, _impl_.location_), + PROTOBUF_FIELD_OFFSET(::greptime::v1::AddColumn, _impl_.add_if_not_exists_), ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::greptime::v1::ModifyColumnType, _internal_metadata_), ~0u, // no _extensions_ @@ -870,20 +872,20 @@ static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protode { 189, -1, -1, sizeof(::greptime::v1::ModifyColumnTypes)}, { 196, -1, -1, sizeof(::greptime::v1::RenameTable)}, { 203, -1, -1, sizeof(::greptime::v1::AddColumn)}, - { 211, -1, -1, sizeof(::greptime::v1::ModifyColumnType)}, - { 220, -1, -1, sizeof(::greptime::v1::Option)}, - { 228, -1, -1, sizeof(::greptime::v1::SetTableOptions)}, - { 235, -1, -1, sizeof(::greptime::v1::UnsetTableOptions)}, - { 242, -1, -1, sizeof(::greptime::v1::DropColumn)}, - { 249, -1, -1, sizeof(::greptime::v1::TableId)}, - { 256, -1, -1, sizeof(::greptime::v1::FlowId)}, - { 263, -1, -1, sizeof(::greptime::v1::ColumnDef)}, - { 277, -1, -1, sizeof(::greptime::v1::AddColumnLocation)}, - { 285, -1, -1, sizeof(::greptime::v1::SetColumnFulltext)}, - { 295, -1, -1, sizeof(::greptime::v1::UnsetColumnFulltext)}, - { 302, -1, -1, sizeof(::greptime::v1::AlterDatabaseExpr)}, - { 313, -1, -1, sizeof(::greptime::v1::SetDatabaseOptions)}, - { 320, -1, -1, sizeof(::greptime::v1::UnsetDatabaseOptions)}, + { 212, -1, -1, sizeof(::greptime::v1::ModifyColumnType)}, + { 221, -1, -1, sizeof(::greptime::v1::Option)}, + { 229, -1, -1, sizeof(::greptime::v1::SetTableOptions)}, + { 236, -1, -1, sizeof(::greptime::v1::UnsetTableOptions)}, + { 243, -1, -1, sizeof(::greptime::v1::DropColumn)}, + { 250, -1, -1, sizeof(::greptime::v1::TableId)}, + { 257, -1, -1, sizeof(::greptime::v1::FlowId)}, + { 264, -1, -1, sizeof(::greptime::v1::ColumnDef)}, + { 278, -1, -1, sizeof(::greptime::v1::AddColumnLocation)}, + { 286, -1, -1, sizeof(::greptime::v1::SetColumnFulltext)}, + { 296, -1, -1, sizeof(::greptime::v1::UnsetColumnFulltext)}, + { 303, -1, -1, sizeof(::greptime::v1::AlterDatabaseExpr)}, + { 314, -1, -1, sizeof(::greptime::v1::SetDatabaseOptions)}, + { 321, -1, -1, sizeof(::greptime::v1::UnsetDatabaseOptions)}, }; static const ::_pb::Message* const file_default_instances[] = { @@ -1005,52 +1007,53 @@ const char descriptor_table_protodef_greptime_2fv1_2fddl_2eproto[] PROTOBUF_SECT "e.v1.DropColumn\"O\n\021ModifyColumnTypes\022:\n\023" "modify_column_types\030\001 \003(\0132\035.greptime.v1." "ModifyColumnType\"%\n\013RenameTable\022\026\n\016new_t" - "able_name\030\001 \001(\t\"i\n\tAddColumn\022*\n\ncolumn_d" - "ef\030\001 \001(\0132\026.greptime.v1.ColumnDef\0220\n\010loca" - "tion\030\003 \001(\0132\036.greptime.v1.AddColumnLocati" - "on\"\236\001\n\020ModifyColumnType\022\023\n\013column_name\030\001" - " \001(\t\0220\n\013target_type\030\002 \001(\0162\033.greptime.v1." - "ColumnDataType\022C\n\025target_type_extension\030" - "\003 \001(\0132$.greptime.v1.ColumnDataTypeExtens" - "ion\"$\n\006Option\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(" - "\t\"=\n\017SetTableOptions\022*\n\rtable_options\030\001 " - "\003(\0132\023.greptime.v1.Option\"!\n\021UnsetTableOp" - "tions\022\014\n\004keys\030\001 \003(\t\"\032\n\nDropColumn\022\014\n\004nam" - "e\030\001 \001(\t\"\025\n\007TableId\022\n\n\002id\030\001 \001(\r\"\024\n\006FlowId" - "\022\n\n\002id\030\001 \001(\r\"\254\002\n\tColumnDef\022\014\n\004name\030\001 \001(\t" - "\022.\n\tdata_type\030\002 \001(\0162\033.greptime.v1.Column" - "DataType\022\023\n\013is_nullable\030\003 \001(\010\022\032\n\022default" - "_constraint\030\004 \001(\014\0220\n\rsemantic_type\030\005 \001(\016" - "2\031.greptime.v1.SemanticType\022\017\n\007comment\030\006" - " \001(\t\022@\n\022datatype_extension\030\007 \001(\0132$.grept" - "ime.v1.ColumnDataTypeExtension\022+\n\007option" - "s\030\010 \001(\0132\032.greptime.v1.ColumnOptions\"\230\001\n\021" - "AddColumnLocation\022B\n\rlocation_type\030\001 \001(\016" - "2+.greptime.v1.AddColumnLocation.Locatio" - "nType\022\031\n\021after_column_name\030\002 \001(\t\"$\n\014Loca" - "tionType\022\t\n\005FIRST\020\000\022\t\n\005AFTER\020\001\"y\n\021SetCol" - "umnFulltext\022\023\n\013column_name\030\001 \001(\t\022\016\n\006enab" - "le\030\002 \001(\010\022\'\n\010analyzer\030\003 \001(\0162\025.greptime.v1" - ".Analyzer\022\026\n\016case_sensitive\030\004 \001(\010\"*\n\023Uns" - "etColumnFulltext\022\023\n\013column_name\030\001 \001(\t\"\314\001" - "\n\021AlterDatabaseExpr\022\024\n\014catalog_name\030\001 \001(" - "\t\022\023\n\013schema_name\030\002 \001(\t\022\?\n\024set_database_o" - "ptions\030\003 \001(\0132\037.greptime.v1.SetDatabaseOp" - "tionsH\000\022C\n\026unset_database_options\030\004 \001(\0132" - "!.greptime.v1.UnsetDatabaseOptionsH\000B\006\n\004" - "kind\"G\n\022SetDatabaseOptions\0221\n\024set_databa" - "se_options\030\001 \003(\0132\023.greptime.v1.Option\"$\n" - "\024UnsetDatabaseOptions\022\014\n\004keys\030\001 \003(\t*$\n\010A" - "nalyzer\022\013\n\007ENGLISH\020\000\022\013\n\007CHINESE\020\001BL\n\016io." - "greptime.v1B\003DdlZ5github.com/GreptimeTea" - "m/greptime-proto/go/greptime/v1b\006proto3" + "able_name\030\001 \001(\t\"\204\001\n\tAddColumn\022*\n\ncolumn_" + "def\030\001 \001(\0132\026.greptime.v1.ColumnDef\0220\n\010loc" + "ation\030\003 \001(\0132\036.greptime.v1.AddColumnLocat" + "ion\022\031\n\021add_if_not_exists\030\004 \001(\010\"\236\001\n\020Modif" + "yColumnType\022\023\n\013column_name\030\001 \001(\t\0220\n\013targ" + "et_type\030\002 \001(\0162\033.greptime.v1.ColumnDataTy" + "pe\022C\n\025target_type_extension\030\003 \001(\0132$.grep" + "time.v1.ColumnDataTypeExtension\"$\n\006Optio" + "n\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t\"=\n\017SetTabl" + "eOptions\022*\n\rtable_options\030\001 \003(\0132\023.grepti" + "me.v1.Option\"!\n\021UnsetTableOptions\022\014\n\004key" + "s\030\001 \003(\t\"\032\n\nDropColumn\022\014\n\004name\030\001 \001(\t\"\025\n\007T" + "ableId\022\n\n\002id\030\001 \001(\r\"\024\n\006FlowId\022\n\n\002id\030\001 \001(\r" + "\"\254\002\n\tColumnDef\022\014\n\004name\030\001 \001(\t\022.\n\tdata_typ" + "e\030\002 \001(\0162\033.greptime.v1.ColumnDataType\022\023\n\013" + "is_nullable\030\003 \001(\010\022\032\n\022default_constraint\030" + "\004 \001(\014\0220\n\rsemantic_type\030\005 \001(\0162\031.greptime." + "v1.SemanticType\022\017\n\007comment\030\006 \001(\t\022@\n\022data" + "type_extension\030\007 \001(\0132$.greptime.v1.Colum" + "nDataTypeExtension\022+\n\007options\030\010 \001(\0132\032.gr" + "eptime.v1.ColumnOptions\"\230\001\n\021AddColumnLoc" + "ation\022B\n\rlocation_type\030\001 \001(\0162+.greptime." + "v1.AddColumnLocation.LocationType\022\031\n\021aft" + "er_column_name\030\002 \001(\t\"$\n\014LocationType\022\t\n\005" + "FIRST\020\000\022\t\n\005AFTER\020\001\"y\n\021SetColumnFulltext\022" + "\023\n\013column_name\030\001 \001(\t\022\016\n\006enable\030\002 \001(\010\022\'\n\010" + "analyzer\030\003 \001(\0162\025.greptime.v1.Analyzer\022\026\n" + "\016case_sensitive\030\004 \001(\010\"*\n\023UnsetColumnFull" + "text\022\023\n\013column_name\030\001 \001(\t\"\314\001\n\021AlterDatab" + "aseExpr\022\024\n\014catalog_name\030\001 \001(\t\022\023\n\013schema_" + "name\030\002 \001(\t\022\?\n\024set_database_options\030\003 \001(\013" + "2\037.greptime.v1.SetDatabaseOptionsH\000\022C\n\026u" + "nset_database_options\030\004 \001(\0132!.greptime.v" + "1.UnsetDatabaseOptionsH\000B\006\n\004kind\"G\n\022SetD" + "atabaseOptions\0221\n\024set_database_options\030\001" + " \003(\0132\023.greptime.v1.Option\"$\n\024UnsetDataba" + "seOptions\022\014\n\004keys\030\001 \003(\t*$\n\010Analyzer\022\013\n\007E" + "NGLISH\020\000\022\013\n\007CHINESE\020\001BL\n\016io.greptime.v1B" + "\003DdlZ5github.com/GreptimeTeam/greptime-p" + "roto/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, 4839, descriptor_table_protodef_greptime_2fv1_2fddl_2eproto, + false, false, 4867, descriptor_table_protodef_greptime_2fv1_2fddl_2eproto, "greptime/v1/ddl.proto", &descriptor_table_greptime_2fv1_2fddl_2eproto_once, descriptor_table_greptime_2fv1_2fddl_2eproto_deps, 1, 33, schemas, file_default_instances, TableStruct_greptime_2fv1_2fddl_2eproto::offsets, @@ -7406,6 +7409,7 @@ AddColumn::AddColumn(const AddColumn& from) new (&_impl_) Impl_{ decltype(_impl_.column_def_){nullptr} , decltype(_impl_.location_){nullptr} + , decltype(_impl_.add_if_not_exists_){} , /*decltype(_impl_._cached_size_)*/{}}; _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); @@ -7415,6 +7419,7 @@ AddColumn::AddColumn(const AddColumn& from) if (from._internal_has_location()) { _this->_impl_.location_ = new ::greptime::v1::AddColumnLocation(*from._impl_.location_); } + _this->_impl_.add_if_not_exists_ = from._impl_.add_if_not_exists_; // @@protoc_insertion_point(copy_constructor:greptime.v1.AddColumn) } @@ -7425,6 +7430,7 @@ inline void AddColumn::SharedCtor( new (&_impl_) Impl_{ decltype(_impl_.column_def_){nullptr} , decltype(_impl_.location_){nullptr} + , decltype(_impl_.add_if_not_exists_){false} , /*decltype(_impl_._cached_size_)*/{} }; } @@ -7462,6 +7468,7 @@ void AddColumn::Clear() { delete _impl_.location_; } _impl_.location_ = nullptr; + _impl_.add_if_not_exists_ = false; _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } @@ -7487,6 +7494,14 @@ const char* AddColumn::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx } else goto handle_unusual; continue; + // bool add_if_not_exists = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 32)) { + _impl_.add_if_not_exists_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; default: goto handle_unusual; } // switch @@ -7530,6 +7545,12 @@ uint8_t* AddColumn::_InternalSerialize( _Internal::location(this).GetCachedSize(), target, stream); } + // bool add_if_not_exists = 4; + if (this->_internal_add_if_not_exists() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray(4, this->_internal_add_if_not_exists(), target); + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); @@ -7560,6 +7581,11 @@ size_t AddColumn::ByteSizeLong() const { *_impl_.location_); } + // bool add_if_not_exists = 4; + if (this->_internal_add_if_not_exists() != 0) { + total_size += 1 + 1; + } + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); } @@ -7586,6 +7612,9 @@ void AddColumn::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROT _this->_internal_mutable_location()->::greptime::v1::AddColumnLocation::MergeFrom( from._internal_location()); } + if (from._internal_add_if_not_exists() != 0) { + _this->_internal_set_add_if_not_exists(from._internal_add_if_not_exists()); + } _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); } @@ -7604,8 +7633,8 @@ void AddColumn::InternalSwap(AddColumn* other) { using std::swap; _internal_metadata_.InternalSwap(&other->_internal_metadata_); ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(AddColumn, _impl_.location_) - + sizeof(AddColumn::_impl_.location_) + PROTOBUF_FIELD_OFFSET(AddColumn, _impl_.add_if_not_exists_) + + sizeof(AddColumn::_impl_.add_if_not_exists_) - PROTOBUF_FIELD_OFFSET(AddColumn, _impl_.column_def_)>( reinterpret_cast(&_impl_.column_def_), reinterpret_cast(&other->_impl_.column_def_)); diff --git a/c++/greptime/v1/ddl.pb.h b/c++/greptime/v1/ddl.pb.h index 36ce5cfd..94216bef 100644 --- a/c++/greptime/v1/ddl.pb.h +++ b/c++/greptime/v1/ddl.pb.h @@ -4000,6 +4000,7 @@ class AddColumn final : enum : int { kColumnDefFieldNumber = 1, kLocationFieldNumber = 3, + kAddIfNotExistsFieldNumber = 4, }; // .greptime.v1.ColumnDef column_def = 1; bool has_column_def() const; @@ -4037,6 +4038,15 @@ class AddColumn final : ::greptime::v1::AddColumnLocation* location); ::greptime::v1::AddColumnLocation* unsafe_arena_release_location(); + // bool add_if_not_exists = 4; + void clear_add_if_not_exists(); + bool add_if_not_exists() const; + void set_add_if_not_exists(bool value); + private: + bool _internal_add_if_not_exists() const; + void _internal_set_add_if_not_exists(bool value); + public: + // @@protoc_insertion_point(class_scope:greptime.v1.AddColumn) private: class _Internal; @@ -4047,6 +4057,7 @@ class AddColumn final : struct Impl_ { ::greptime::v1::ColumnDef* column_def_; ::greptime::v1::AddColumnLocation* location_; + bool add_if_not_exists_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; }; union { Impl_ _impl_; }; @@ -11186,6 +11197,26 @@ inline void AddColumn::set_allocated_location(::greptime::v1::AddColumnLocation* // @@protoc_insertion_point(field_set_allocated:greptime.v1.AddColumn.location) } +// bool add_if_not_exists = 4; +inline void AddColumn::clear_add_if_not_exists() { + _impl_.add_if_not_exists_ = false; +} +inline bool AddColumn::_internal_add_if_not_exists() const { + return _impl_.add_if_not_exists_; +} +inline bool AddColumn::add_if_not_exists() const { + // @@protoc_insertion_point(field_get:greptime.v1.AddColumn.add_if_not_exists) + return _internal_add_if_not_exists(); +} +inline void AddColumn::_internal_set_add_if_not_exists(bool value) { + + _impl_.add_if_not_exists_ = value; +} +inline void AddColumn::set_add_if_not_exists(bool value) { + _internal_set_add_if_not_exists(value); + // @@protoc_insertion_point(field_set:greptime.v1.AddColumn.add_if_not_exists) +} + // ------------------------------------------------------------------- // ModifyColumnType diff --git a/go/greptime/v1/ddl.pb.go b/go/greptime/v1/ddl.pb.go index 7202a63c..4d4e6f7c 100644 --- a/go/greptime/v1/ddl.pb.go +++ b/go/greptime/v1/ddl.pb.go @@ -1509,8 +1509,9 @@ type AddColumn struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - ColumnDef *ColumnDef `protobuf:"bytes,1,opt,name=column_def,json=columnDef,proto3" json:"column_def,omitempty"` - Location *AddColumnLocation `protobuf:"bytes,3,opt,name=location,proto3" json:"location,omitempty"` + ColumnDef *ColumnDef `protobuf:"bytes,1,opt,name=column_def,json=columnDef,proto3" json:"column_def,omitempty"` + Location *AddColumnLocation `protobuf:"bytes,3,opt,name=location,proto3" json:"location,omitempty"` + AddIfNotExists bool `protobuf:"varint,4,opt,name=add_if_not_exists,json=addIfNotExists,proto3" json:"add_if_not_exists,omitempty"` } func (x *AddColumn) Reset() { @@ -1559,6 +1560,13 @@ func (x *AddColumn) GetLocation() *AddColumnLocation { return nil } +func (x *AddColumn) GetAddIfNotExists() bool { + if x != nil { + return x.AddIfNotExists + } + return false +} + type ModifyColumnType struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -2656,128 +2664,131 @@ var file_greptime_v1_ddl_proto_rawDesc = []byte{ 0x54, 0x79, 0x70, 0x65, 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, 0xcb, 0x01, 0x0a, 0x10, 0x4d, - 0x6f, 0x64, 0x69, 0x66, 0x79, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, - 0x1f, 0x0a, 0x0b, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4e, 0x61, 0x6d, 0x65, - 0x12, 0x3c, 0x0a, 0x0b, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 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, 0x0a, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x58, - 0x0a, 0x15, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x65, 0x78, - 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 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, 0x13, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x45, - 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x30, 0x0a, 0x06, 0x4f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 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, 0x22, 0x4b, 0x0a, 0x0f, 0x53, 0x65, - 0x74, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x38, 0x0a, - 0x0d, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, - 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x27, 0x0a, 0x11, 0x55, 0x6e, 0x73, 0x65, 0x74, - 0x54, 0x61, 0x62, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x12, 0x0a, 0x04, - 0x6b, 0x65, 0x79, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x6b, 0x65, 0x79, 0x73, - 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, 0x18, 0x0a, - 0x06, 0x46, 0x6c, 0x6f, 0x77, 0x49, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0d, 0x52, 0x02, 0x69, 0x64, 0x22, 0x8e, 0x03, 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, + 0x77, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0xa9, 0x01, 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, 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, + 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, 0x12, 0x29, 0x0a, 0x11, 0x61, + 0x64, 0x64, 0x5f, 0x69, 0x66, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x65, 0x78, 0x69, 0x73, 0x74, 0x73, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x61, 0x64, 0x64, 0x49, 0x66, 0x4e, 0x6f, 0x74, + 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x22, 0xcb, 0x01, 0x0a, 0x10, 0x4d, 0x6f, 0x64, 0x69, 0x66, + 0x79, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x63, + 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0a, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x3c, 0x0a, 0x0b, + 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 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, 0x0a, + 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x58, 0x0a, 0x15, 0x74, 0x61, + 0x72, 0x67, 0x65, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x18, 0x03, 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, 0x12, 0x34, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x08, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, - 0x31, 0x2e, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, - 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 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, 0x22, 0xa6, 0x01, 0x0a, 0x11, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, - 0x46, 0x75, 0x6c, 0x6c, 0x74, 0x65, 0x78, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6f, 0x6c, 0x75, - 0x6d, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, - 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x6e, 0x61, - 0x62, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x65, 0x6e, 0x61, 0x62, 0x6c, - 0x65, 0x12, 0x31, 0x0a, 0x08, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x7a, 0x65, 0x72, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, - 0x31, 0x2e, 0x41, 0x6e, 0x61, 0x6c, 0x79, 0x7a, 0x65, 0x72, 0x52, 0x08, 0x61, 0x6e, 0x61, 0x6c, - 0x79, 0x7a, 0x65, 0x72, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x61, 0x73, 0x65, 0x5f, 0x73, 0x65, 0x6e, - 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x63, 0x61, - 0x73, 0x65, 0x53, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x22, 0x36, 0x0a, 0x13, 0x55, - 0x6e, 0x73, 0x65, 0x74, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x46, 0x75, 0x6c, 0x6c, 0x74, 0x65, - 0x78, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4e, - 0x61, 0x6d, 0x65, 0x22, 0x8f, 0x02, 0x0a, 0x11, 0x41, 0x6c, 0x74, 0x65, 0x72, 0x44, 0x61, 0x74, - 0x61, 0x62, 0x61, 0x73, 0x65, 0x45, 0x78, 0x70, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x61, 0x74, - 0x61, 0x6c, 0x6f, 0x67, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0b, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, - 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0a, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x53, 0x0a, - 0x14, 0x73, 0x65, 0x74, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x6f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x72, - 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x44, 0x61, 0x74, - 0x61, 0x62, 0x61, 0x73, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x48, 0x00, 0x52, 0x12, - 0x73, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x12, 0x59, 0x0a, 0x16, 0x75, 0x6e, 0x73, 0x65, 0x74, 0x5f, 0x64, 0x61, 0x74, 0x61, - 0x62, 0x61, 0x73, 0x65, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, - 0x2e, 0x55, 0x6e, 0x73, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x48, 0x00, 0x52, 0x14, 0x75, 0x6e, 0x73, 0x65, 0x74, 0x44, 0x61, - 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x06, 0x0a, - 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x22, 0x5b, 0x0a, 0x12, 0x53, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, - 0x62, 0x61, 0x73, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x45, 0x0a, 0x14, 0x73, - 0x65, 0x74, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x6f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x67, 0x72, 0x65, 0x70, - 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x12, - 0x73, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x22, 0x2a, 0x0a, 0x14, 0x55, 0x6e, 0x73, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x62, - 0x61, 0x73, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6b, 0x65, - 0x79, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x2a, 0x24, - 0x0a, 0x08, 0x41, 0x6e, 0x61, 0x6c, 0x79, 0x7a, 0x65, 0x72, 0x12, 0x0b, 0x0a, 0x07, 0x45, 0x4e, - 0x47, 0x4c, 0x49, 0x53, 0x48, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x43, 0x48, 0x49, 0x4e, 0x45, - 0x53, 0x45, 0x10, 0x01, 0x42, 0x4c, 0x0a, 0x0e, 0x69, 0x6f, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, - 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x03, 0x44, 0x64, 0x6c, 0x5a, 0x35, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, - 0x54, 0x65, 0x61, 0x6d, 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2d, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, - 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x13, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x45, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x30, 0x0a, 0x06, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 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, 0x22, 0x4b, 0x0a, 0x0f, 0x53, 0x65, 0x74, 0x54, 0x61, 0x62, + 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x38, 0x0a, 0x0d, 0x74, 0x61, 0x62, + 0x6c, 0x65, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x13, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x22, 0x27, 0x0a, 0x11, 0x55, 0x6e, 0x73, 0x65, 0x74, 0x54, 0x61, 0x62, 0x6c, + 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6b, 0x65, 0x79, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x6b, 0x65, 0x79, 0x73, 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, 0x18, 0x0a, 0x06, 0x46, 0x6c, 0x6f, + 0x77, 0x49, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, + 0x02, 0x69, 0x64, 0x22, 0x8e, 0x03, 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, 0x12, 0x34, + 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, + 0x6c, 0x75, 0x6d, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 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, 0x22, 0xa6, + 0x01, 0x0a, 0x11, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x46, 0x75, 0x6c, 0x6c, + 0x74, 0x65, 0x78, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x5f, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6c, 0x75, 0x6d, + 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x31, 0x0a, + 0x08, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x7a, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x15, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x6e, + 0x61, 0x6c, 0x79, 0x7a, 0x65, 0x72, 0x52, 0x08, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x7a, 0x65, 0x72, + 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x61, 0x73, 0x65, 0x5f, 0x73, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x69, + 0x76, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x63, 0x61, 0x73, 0x65, 0x53, 0x65, + 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x22, 0x36, 0x0a, 0x13, 0x55, 0x6e, 0x73, 0x65, 0x74, + 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x46, 0x75, 0x6c, 0x6c, 0x74, 0x65, 0x78, 0x74, 0x12, 0x1f, + 0x0a, 0x0b, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x22, + 0x8f, 0x02, 0x0a, 0x11, 0x41, 0x6c, 0x74, 0x65, 0x72, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, + 0x65, 0x45, 0x78, 0x70, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x61, 0x74, + 0x61, 0x6c, 0x6f, 0x67, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x63, 0x68, 0x65, + 0x6d, 0x61, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, + 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x53, 0x0a, 0x14, 0x73, 0x65, 0x74, + 0x5f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, + 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, + 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x48, 0x00, 0x52, 0x12, 0x73, 0x65, 0x74, 0x44, + 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x59, + 0x0a, 0x16, 0x75, 0x6e, 0x73, 0x65, 0x74, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, + 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, + 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x73, + 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x48, 0x00, 0x52, 0x14, 0x75, 0x6e, 0x73, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, + 0x73, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x06, 0x0a, 0x04, 0x6b, 0x69, 0x6e, + 0x64, 0x22, 0x5b, 0x0a, 0x12, 0x53, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, + 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x45, 0x0a, 0x14, 0x73, 0x65, 0x74, 0x5f, 0x64, + 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x12, 0x73, 0x65, 0x74, 0x44, + 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x2a, + 0x0a, 0x14, 0x55, 0x6e, 0x73, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x2a, 0x24, 0x0a, 0x08, 0x41, 0x6e, + 0x61, 0x6c, 0x79, 0x7a, 0x65, 0x72, 0x12, 0x0b, 0x0a, 0x07, 0x45, 0x4e, 0x47, 0x4c, 0x49, 0x53, + 0x48, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x43, 0x48, 0x49, 0x4e, 0x45, 0x53, 0x45, 0x10, 0x01, + 0x42, 0x4c, 0x0a, 0x0e, 0x69, 0x6f, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, + 0x76, 0x31, 0x42, 0x03, 0x44, 0x64, 0x6c, 0x5a, 0x35, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x54, 0x65, 0x61, 0x6d, + 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, + 0x67, 0x6f, 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/java/src/main/java/io/greptime/v1/Ddl.java b/java/src/main/java/io/greptime/v1/Ddl.java index f806ccb2..c55c5b36 100644 --- a/java/src/main/java/io/greptime/v1/Ddl.java +++ b/java/src/main/java/io/greptime/v1/Ddl.java @@ -21868,6 +21868,12 @@ public interface AddColumnOrBuilder extends * .greptime.v1.AddColumnLocation location = 3; */ io.greptime.v1.Ddl.AddColumnLocationOrBuilder getLocationOrBuilder(); + + /** + * bool add_if_not_exists = 4; + * @return The addIfNotExists. + */ + boolean getAddIfNotExists(); } /** * Protobuf type {@code greptime.v1.AddColumn} @@ -21940,6 +21946,11 @@ private AddColumn( break; } + case 32: { + + addIfNotExists_ = input.readBool(); + break; + } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { @@ -22026,6 +22037,17 @@ public io.greptime.v1.Ddl.AddColumnLocationOrBuilder getLocationOrBuilder() { return getLocation(); } + public static final int ADD_IF_NOT_EXISTS_FIELD_NUMBER = 4; + private boolean addIfNotExists_; + /** + * bool add_if_not_exists = 4; + * @return The addIfNotExists. + */ + @java.lang.Override + public boolean getAddIfNotExists() { + return addIfNotExists_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { @@ -22046,6 +22068,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (location_ != null) { output.writeMessage(3, getLocation()); } + if (addIfNotExists_ != false) { + output.writeBool(4, addIfNotExists_); + } unknownFields.writeTo(output); } @@ -22063,6 +22088,10 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(3, getLocation()); } + if (addIfNotExists_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(4, addIfNotExists_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -22088,6 +22117,8 @@ public boolean equals(final java.lang.Object obj) { if (!getLocation() .equals(other.getLocation())) return false; } + if (getAddIfNotExists() + != other.getAddIfNotExists()) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -22107,6 +22138,9 @@ public int hashCode() { hash = (37 * hash) + LOCATION_FIELD_NUMBER; hash = (53 * hash) + getLocation().hashCode(); } + hash = (37 * hash) + ADD_IF_NOT_EXISTS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getAddIfNotExists()); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -22252,6 +22286,8 @@ public Builder clear() { location_ = null; locationBuilder_ = null; } + addIfNotExists_ = false; + return this; } @@ -22288,6 +22324,7 @@ public io.greptime.v1.Ddl.AddColumn buildPartial() { } else { result.location_ = locationBuilder_.build(); } + result.addIfNotExists_ = addIfNotExists_; onBuilt(); return result; } @@ -22342,6 +22379,9 @@ public Builder mergeFrom(io.greptime.v1.Ddl.AddColumn other) { if (other.hasLocation()) { mergeLocation(other.getLocation()); } + if (other.getAddIfNotExists() != false) { + setAddIfNotExists(other.getAddIfNotExists()); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -22608,6 +22648,37 @@ public io.greptime.v1.Ddl.AddColumnLocationOrBuilder getLocationOrBuilder() { } return locationBuilder_; } + + private boolean addIfNotExists_ ; + /** + * bool add_if_not_exists = 4; + * @return The addIfNotExists. + */ + @java.lang.Override + public boolean getAddIfNotExists() { + return addIfNotExists_; + } + /** + * bool add_if_not_exists = 4; + * @param value The addIfNotExists to set. + * @return This builder for chaining. + */ + public Builder setAddIfNotExists(boolean value) { + + addIfNotExists_ = value; + onChanged(); + return this; + } + /** + * bool add_if_not_exists = 4; + * @return This builder for chaining. + */ + public Builder clearAddIfNotExists() { + + addIfNotExists_ = false; + onChanged(); + return this; + } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -33967,45 +34038,46 @@ public io.greptime.v1.Ddl.UnsetDatabaseOptions getDefaultInstanceForType() { "e.v1.DropColumn\"O\n\021ModifyColumnTypes\022:\n\023" + "modify_column_types\030\001 \003(\0132\035.greptime.v1." + "ModifyColumnType\"%\n\013RenameTable\022\026\n\016new_t" + - "able_name\030\001 \001(\t\"i\n\tAddColumn\022*\n\ncolumn_d" + - "ef\030\001 \001(\0132\026.greptime.v1.ColumnDef\0220\n\010loca" + - "tion\030\003 \001(\0132\036.greptime.v1.AddColumnLocati" + - "on\"\236\001\n\020ModifyColumnType\022\023\n\013column_name\030\001" + - " \001(\t\0220\n\013target_type\030\002 \001(\0162\033.greptime.v1." + - "ColumnDataType\022C\n\025target_type_extension\030" + - "\003 \001(\0132$.greptime.v1.ColumnDataTypeExtens" + - "ion\"$\n\006Option\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(" + - "\t\"=\n\017SetTableOptions\022*\n\rtable_options\030\001 " + - "\003(\0132\023.greptime.v1.Option\"!\n\021UnsetTableOp" + - "tions\022\014\n\004keys\030\001 \003(\t\"\032\n\nDropColumn\022\014\n\004nam" + - "e\030\001 \001(\t\"\025\n\007TableId\022\n\n\002id\030\001 \001(\r\"\024\n\006FlowId" + - "\022\n\n\002id\030\001 \001(\r\"\254\002\n\tColumnDef\022\014\n\004name\030\001 \001(\t" + - "\022.\n\tdata_type\030\002 \001(\0162\033.greptime.v1.Column" + - "DataType\022\023\n\013is_nullable\030\003 \001(\010\022\032\n\022default" + - "_constraint\030\004 \001(\014\0220\n\rsemantic_type\030\005 \001(\016" + - "2\031.greptime.v1.SemanticType\022\017\n\007comment\030\006" + - " \001(\t\022@\n\022datatype_extension\030\007 \001(\0132$.grept" + - "ime.v1.ColumnDataTypeExtension\022+\n\007option" + - "s\030\010 \001(\0132\032.greptime.v1.ColumnOptions\"\230\001\n\021" + - "AddColumnLocation\022B\n\rlocation_type\030\001 \001(\016" + - "2+.greptime.v1.AddColumnLocation.Locatio" + - "nType\022\031\n\021after_column_name\030\002 \001(\t\"$\n\014Loca" + - "tionType\022\t\n\005FIRST\020\000\022\t\n\005AFTER\020\001\"y\n\021SetCol" + - "umnFulltext\022\023\n\013column_name\030\001 \001(\t\022\016\n\006enab" + - "le\030\002 \001(\010\022\'\n\010analyzer\030\003 \001(\0162\025.greptime.v1" + - ".Analyzer\022\026\n\016case_sensitive\030\004 \001(\010\"*\n\023Uns" + - "etColumnFulltext\022\023\n\013column_name\030\001 \001(\t\"\314\001" + - "\n\021AlterDatabaseExpr\022\024\n\014catalog_name\030\001 \001(" + - "\t\022\023\n\013schema_name\030\002 \001(\t\022?\n\024set_database_o" + - "ptions\030\003 \001(\0132\037.greptime.v1.SetDatabaseOp" + - "tionsH\000\022C\n\026unset_database_options\030\004 \001(\0132" + - "!.greptime.v1.UnsetDatabaseOptionsH\000B\006\n\004" + - "kind\"G\n\022SetDatabaseOptions\0221\n\024set_databa" + - "se_options\030\001 \003(\0132\023.greptime.v1.Option\"$\n" + - "\024UnsetDatabaseOptions\022\014\n\004keys\030\001 \003(\t*$\n\010A" + - "nalyzer\022\013\n\007ENGLISH\020\000\022\013\n\007CHINESE\020\001BL\n\016io." + - "greptime.v1B\003DdlZ5github.com/GreptimeTea" + - "m/greptime-proto/go/greptime/v1b\006proto3" + "able_name\030\001 \001(\t\"\204\001\n\tAddColumn\022*\n\ncolumn_" + + "def\030\001 \001(\0132\026.greptime.v1.ColumnDef\0220\n\010loc" + + "ation\030\003 \001(\0132\036.greptime.v1.AddColumnLocat" + + "ion\022\031\n\021add_if_not_exists\030\004 \001(\010\"\236\001\n\020Modif" + + "yColumnType\022\023\n\013column_name\030\001 \001(\t\0220\n\013targ" + + "et_type\030\002 \001(\0162\033.greptime.v1.ColumnDataTy" + + "pe\022C\n\025target_type_extension\030\003 \001(\0132$.grep" + + "time.v1.ColumnDataTypeExtension\"$\n\006Optio" + + "n\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t\"=\n\017SetTabl" + + "eOptions\022*\n\rtable_options\030\001 \003(\0132\023.grepti" + + "me.v1.Option\"!\n\021UnsetTableOptions\022\014\n\004key" + + "s\030\001 \003(\t\"\032\n\nDropColumn\022\014\n\004name\030\001 \001(\t\"\025\n\007T" + + "ableId\022\n\n\002id\030\001 \001(\r\"\024\n\006FlowId\022\n\n\002id\030\001 \001(\r" + + "\"\254\002\n\tColumnDef\022\014\n\004name\030\001 \001(\t\022.\n\tdata_typ" + + "e\030\002 \001(\0162\033.greptime.v1.ColumnDataType\022\023\n\013" + + "is_nullable\030\003 \001(\010\022\032\n\022default_constraint\030" + + "\004 \001(\014\0220\n\rsemantic_type\030\005 \001(\0162\031.greptime." + + "v1.SemanticType\022\017\n\007comment\030\006 \001(\t\022@\n\022data" + + "type_extension\030\007 \001(\0132$.greptime.v1.Colum" + + "nDataTypeExtension\022+\n\007options\030\010 \001(\0132\032.gr" + + "eptime.v1.ColumnOptions\"\230\001\n\021AddColumnLoc" + + "ation\022B\n\rlocation_type\030\001 \001(\0162+.greptime." + + "v1.AddColumnLocation.LocationType\022\031\n\021aft" + + "er_column_name\030\002 \001(\t\"$\n\014LocationType\022\t\n\005" + + "FIRST\020\000\022\t\n\005AFTER\020\001\"y\n\021SetColumnFulltext\022" + + "\023\n\013column_name\030\001 \001(\t\022\016\n\006enable\030\002 \001(\010\022\'\n\010" + + "analyzer\030\003 \001(\0162\025.greptime.v1.Analyzer\022\026\n" + + "\016case_sensitive\030\004 \001(\010\"*\n\023UnsetColumnFull" + + "text\022\023\n\013column_name\030\001 \001(\t\"\314\001\n\021AlterDatab" + + "aseExpr\022\024\n\014catalog_name\030\001 \001(\t\022\023\n\013schema_" + + "name\030\002 \001(\t\022?\n\024set_database_options\030\003 \001(\013" + + "2\037.greptime.v1.SetDatabaseOptionsH\000\022C\n\026u" + + "nset_database_options\030\004 \001(\0132!.greptime.v" + + "1.UnsetDatabaseOptionsH\000B\006\n\004kind\"G\n\022SetD" + + "atabaseOptions\0221\n\024set_database_options\030\001" + + " \003(\0132\023.greptime.v1.Option\"$\n\024UnsetDataba" + + "seOptions\022\014\n\004keys\030\001 \003(\t*$\n\010Analyzer\022\013\n\007E" + + "NGLISH\020\000\022\013\n\007CHINESE\020\001BL\n\016io.greptime.v1B" + + "\003DdlZ5github.com/GreptimeTeam/greptime-p" + + "roto/go/greptime/v1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, @@ -34125,7 +34197,7 @@ public io.greptime.v1.Ddl.UnsetDatabaseOptions getDefaultInstanceForType() { internal_static_greptime_v1_AddColumn_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_greptime_v1_AddColumn_descriptor, - new java.lang.String[] { "ColumnDef", "Location", }); + new java.lang.String[] { "ColumnDef", "Location", "AddIfNotExists", }); internal_static_greptime_v1_ModifyColumnType_descriptor = getDescriptor().getMessageTypes().get(16); internal_static_greptime_v1_ModifyColumnType_fieldAccessorTable = new diff --git a/proto/greptime/v1/ddl.proto b/proto/greptime/v1/ddl.proto index 02a0dc11..031cb4e8 100644 --- a/proto/greptime/v1/ddl.proto +++ b/proto/greptime/v1/ddl.proto @@ -145,7 +145,9 @@ message DropDatabaseExpr { bool drop_if_exists = 3; } -message AddColumns { repeated AddColumn add_columns = 1; } +message AddColumns { + repeated AddColumn add_columns = 1; +} message DropColumns { repeated DropColumn drop_columns = 1; } @@ -156,6 +158,7 @@ message RenameTable { string new_table_name = 1; } message AddColumn { ColumnDef column_def = 1; AddColumnLocation location = 3; + bool add_if_not_exists = 4; } message ModifyColumnType {