From e83eb6a7dbabcf10d77137d60726114770184036 Mon Sep 17 00:00:00 2001 From: "Lei, HUANG" Date: Wed, 16 Oct 2024 22:46:48 -0700 Subject: [PATCH] feat/add-modify-table-attr-expr: Added ChangeTableAttributes to AlterRequest in server.proto - Introduced ChangeTableAttributes message handling in AlterRequest. - Updated server.pb.cc and server.pb.h to include logic for new ChangeTableAttributes. - Altered Java Server class to support ChangeTableAttributes. - Incremented descriptor sizes and adjusted field offsets in server.pb.cc. --- c++/greptime/v1/region/server.pb.cc | 138 ++++++--- c++/greptime/v1/region/server.pb.h | 88 ++++++ .../java/io/greptime/v1/region/Server.java | 280 ++++++++++++++++-- proto/greptime/v1/region/server.proto | 1 + 4 files changed, 449 insertions(+), 58 deletions(-) diff --git a/c++/greptime/v1/region/server.pb.cc b/c++/greptime/v1/region/server.pb.cc index 14a8ba56..39f473b5 100644 --- a/c++/greptime/v1/region/server.pb.cc +++ b/c++/greptime/v1/region/server.pb.cc @@ -622,6 +622,7 @@ const uint32_t TableStruct_greptime_2fv1_2fregion_2fserver_2eproto::offsets[] PR ::_pbi::kInvalidFieldOffsetTag, ::_pbi::kInvalidFieldOffsetTag, ::_pbi::kInvalidFieldOffsetTag, + ::_pbi::kInvalidFieldOffsetTag, PROTOBUF_FIELD_OFFSET(::greptime::v1::region::AlterRequest, _impl_.schema_version_), PROTOBUF_FIELD_OFFSET(::greptime::v1::region::AlterRequest, _impl_.kind_), ~0u, // no _has_bits_ @@ -720,16 +721,16 @@ static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protode { 161, -1, -1, sizeof(::greptime::v1::region::CloseRequest)}, { 168, -1, -1, sizeof(::greptime::v1::region::AlterRequests)}, { 175, -1, -1, sizeof(::greptime::v1::region::AlterRequest)}, - { 187, -1, -1, sizeof(::greptime::v1::region::AddColumns)}, - { 194, -1, -1, sizeof(::greptime::v1::region::DropColumns)}, - { 201, -1, -1, sizeof(::greptime::v1::region::AddColumn)}, - { 209, -1, -1, sizeof(::greptime::v1::region::DropColumn)}, - { 216, -1, -1, sizeof(::greptime::v1::region::FlushRequest)}, - { 223, -1, -1, sizeof(::greptime::v1::region::Regular)}, - { 229, -1, -1, sizeof(::greptime::v1::region::StrictWindow)}, - { 236, -1, -1, sizeof(::greptime::v1::region::CompactRequest)}, - { 246, -1, -1, sizeof(::greptime::v1::region::TruncateRequest)}, - { 253, -1, -1, sizeof(::greptime::v1::region::RegionColumnDef)}, + { 188, -1, -1, sizeof(::greptime::v1::region::AddColumns)}, + { 195, -1, -1, sizeof(::greptime::v1::region::DropColumns)}, + { 202, -1, -1, sizeof(::greptime::v1::region::AddColumn)}, + { 210, -1, -1, sizeof(::greptime::v1::region::DropColumn)}, + { 217, -1, -1, sizeof(::greptime::v1::region::FlushRequest)}, + { 224, -1, -1, sizeof(::greptime::v1::region::Regular)}, + { 230, -1, -1, sizeof(::greptime::v1::region::StrictWindow)}, + { 237, -1, -1, sizeof(::greptime::v1::region::CompactRequest)}, + { 247, -1, -1, sizeof(::greptime::v1::region::TruncateRequest)}, + { 254, -1, -1, sizeof(::greptime::v1::region::RegionColumnDef)}, }; static const ::_pb::Message* const file_default_instances[] = { @@ -826,34 +827,36 @@ const char descriptor_table_protodef_greptime_2fv1_2fregion_2fserver_2eproto[] P ".\n\014OptionsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 " "\001(\t:\0028\001\"!\n\014CloseRequest\022\021\n\tregion_id\030\001 \001" "(\004\"C\n\rAlterRequests\0222\n\010requests\030\001 \003(\0132 ." - "greptime.v1.region.AlterRequest\"\360\001\n\014Alte" + "greptime.v1.region.AlterRequest\"\267\002\n\014Alte" "rRequest\022\021\n\tregion_id\030\001 \001(\004\0225\n\013add_colum" "ns\030\002 \001(\0132\036.greptime.v1.region.AddColumns" "H\000\0227\n\014drop_columns\030\003 \001(\0132\037.greptime.v1.r" "egion.DropColumnsH\000\022=\n\023change_column_typ" "es\030\005 \001(\0132\036.greptime.v1.ChangeColumnTypes" - "H\000\022\026\n\016schema_version\030\004 \001(\004B\006\n\004kind\"@\n\nAd" - "dColumns\0222\n\013add_columns\030\001 \003(\0132\035.greptime" - ".v1.region.AddColumn\"C\n\013DropColumns\0224\n\014d" - "rop_columns\030\001 \003(\0132\036.greptime.v1.region.D" - "ropColumn\"v\n\tAddColumn\0227\n\ncolumn_def\030\001 \001" - "(\0132#.greptime.v1.region.RegionColumnDef\022" - "0\n\010location\030\003 \001(\0132\036.greptime.v1.AddColum" - "nLocation\"\032\n\nDropColumn\022\014\n\004name\030\001 \001(\t\"!\n" - "\014FlushRequest\022\021\n\tregion_id\030\001 \001(\004\"\t\n\007Regu" - "lar\"&\n\014StrictWindow\022\026\n\016window_seconds\030\001 " - "\001(\003\"\231\001\n\016CompactRequest\022\021\n\tregion_id\030\001 \001(" - "\004\022.\n\007regular\030\002 \001(\0132\033.greptime.v1.region." - "RegularH\000\0229\n\rstrict_window\030\003 \001(\0132 .grept" - "ime.v1.region.StrictWindowH\000B\t\n\007options\"" - "$\n\017TruncateRequest\022\021\n\tregion_id\030\001 \001(\004\"P\n" - "\017RegionColumnDef\022*\n\ncolumn_def\030\001 \001(\0132\026.g" - "reptime.v1.ColumnDef\022\021\n\tcolumn_id\030\002 \001(\r2" - "Y\n\006Region\022O\n\006Handle\022!.greptime.v1.region" - ".RegionRequest\032\".greptime.v1.region.Regi" - "onResponseB]\n\025io.greptime.v1.regionB\006Ser" - "verZ_impl_.kind_.change_column_types_; } +const ::greptime::v1::ChangeTableAttributes& +AlterRequest::_Internal::change_table_attributes(const AlterRequest* msg) { + return *msg->_impl_.kind_.change_table_attributes_; +} void AlterRequest::set_allocated_add_columns(::greptime::v1::region::AddColumns* add_columns) { ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); clear_kind(); @@ -5392,6 +5400,30 @@ void AlterRequest::clear_change_column_types() { clear_has_kind(); } } +void AlterRequest::set_allocated_change_table_attributes(::greptime::v1::ChangeTableAttributes* change_table_attributes) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + clear_kind(); + if (change_table_attributes) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(change_table_attributes)); + if (message_arena != submessage_arena) { + change_table_attributes = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, change_table_attributes, submessage_arena); + } + set_has_change_table_attributes(); + _impl_.kind_.change_table_attributes_ = change_table_attributes; + } + // @@protoc_insertion_point(field_set_allocated:greptime.v1.region.AlterRequest.change_table_attributes) +} +void AlterRequest::clear_change_table_attributes() { + if (_internal_has_change_table_attributes()) { + if (GetArenaForAllocation() == nullptr) { + delete _impl_.kind_.change_table_attributes_; + } + clear_has_kind(); + } +} AlterRequest::AlterRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned) : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { @@ -5429,6 +5461,11 @@ AlterRequest::AlterRequest(const AlterRequest& from) from._internal_change_column_types()); break; } + case kChangeTableAttributes: { + _this->_internal_mutable_change_table_attributes()->::greptime::v1::ChangeTableAttributes::MergeFrom( + from._internal_change_table_attributes()); + break; + } case KIND_NOT_SET: { break; } @@ -5491,6 +5528,12 @@ void AlterRequest::clear_kind() { } break; } + case kChangeTableAttributes: { + if (GetArenaForAllocation() == nullptr) { + delete _impl_.kind_.change_table_attributes_; + } + break; + } case KIND_NOT_SET: { break; } @@ -5558,6 +5601,14 @@ const char* AlterRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* } else goto handle_unusual; continue; + // .greptime.v1.ChangeTableAttributes change_table_attributes = 6; + case 6: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 50)) { + ptr = ctx->ParseMessage(_internal_mutable_change_table_attributes(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; default: goto handle_unusual; } // switch @@ -5620,6 +5671,13 @@ uint8_t* AlterRequest::_InternalSerialize( _Internal::change_column_types(this).GetCachedSize(), target, stream); } + // .greptime.v1.ChangeTableAttributes change_table_attributes = 6; + if (_internal_has_change_table_attributes()) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(6, _Internal::change_table_attributes(this), + _Internal::change_table_attributes(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); @@ -5668,6 +5726,13 @@ size_t AlterRequest::ByteSizeLong() const { *_impl_.kind_.change_column_types_); break; } + // .greptime.v1.ChangeTableAttributes change_table_attributes = 6; + case kChangeTableAttributes: { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *_impl_.kind_.change_table_attributes_); + break; + } case KIND_NOT_SET: { break; } @@ -5712,6 +5777,11 @@ void AlterRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::P from._internal_change_column_types()); break; } + case kChangeTableAttributes: { + _this->_internal_mutable_change_table_attributes()->::greptime::v1::ChangeTableAttributes::MergeFrom( + from._internal_change_table_attributes()); + break; + } case KIND_NOT_SET: { break; } diff --git a/c++/greptime/v1/region/server.pb.h b/c++/greptime/v1/region/server.pb.h index 3a9366a6..300511dc 100644 --- a/c++/greptime/v1/region/server.pb.h +++ b/c++/greptime/v1/region/server.pb.h @@ -3251,6 +3251,7 @@ class AlterRequest final : kAddColumns = 2, kDropColumns = 3, kChangeColumnTypes = 5, + kChangeTableAttributes = 6, KIND_NOT_SET = 0, }; @@ -3337,6 +3338,7 @@ class AlterRequest final : kAddColumnsFieldNumber = 2, kDropColumnsFieldNumber = 3, kChangeColumnTypesFieldNumber = 5, + kChangeTableAttributesFieldNumber = 6, }; // uint64 region_id = 1; void clear_region_id(); @@ -3410,6 +3412,24 @@ class AlterRequest final : ::greptime::v1::ChangeColumnTypes* change_column_types); ::greptime::v1::ChangeColumnTypes* unsafe_arena_release_change_column_types(); + // .greptime.v1.ChangeTableAttributes change_table_attributes = 6; + bool has_change_table_attributes() const; + private: + bool _internal_has_change_table_attributes() const; + public: + void clear_change_table_attributes(); + const ::greptime::v1::ChangeTableAttributes& change_table_attributes() const; + PROTOBUF_NODISCARD ::greptime::v1::ChangeTableAttributes* release_change_table_attributes(); + ::greptime::v1::ChangeTableAttributes* mutable_change_table_attributes(); + void set_allocated_change_table_attributes(::greptime::v1::ChangeTableAttributes* change_table_attributes); + private: + const ::greptime::v1::ChangeTableAttributes& _internal_change_table_attributes() const; + ::greptime::v1::ChangeTableAttributes* _internal_mutable_change_table_attributes(); + public: + void unsafe_arena_set_allocated_change_table_attributes( + ::greptime::v1::ChangeTableAttributes* change_table_attributes); + ::greptime::v1::ChangeTableAttributes* unsafe_arena_release_change_table_attributes(); + void clear_kind(); KindCase kind_case() const; // @@protoc_insertion_point(class_scope:greptime.v1.region.AlterRequest) @@ -3418,6 +3438,7 @@ class AlterRequest final : void set_has_add_columns(); void set_has_drop_columns(); void set_has_change_column_types(); + void set_has_change_table_attributes(); inline bool has_kind() const; inline void clear_has_kind(); @@ -3434,6 +3455,7 @@ class AlterRequest final : ::greptime::v1::region::AddColumns* add_columns_; ::greptime::v1::region::DropColumns* drop_columns_; ::greptime::v1::ChangeColumnTypes* change_column_types_; + ::greptime::v1::ChangeTableAttributes* change_table_attributes_; } kind_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; uint32_t _oneof_case_[1]; @@ -7690,6 +7712,72 @@ inline ::greptime::v1::ChangeColumnTypes* AlterRequest::mutable_change_column_ty return _msg; } +// .greptime.v1.ChangeTableAttributes change_table_attributes = 6; +inline bool AlterRequest::_internal_has_change_table_attributes() const { + return kind_case() == kChangeTableAttributes; +} +inline bool AlterRequest::has_change_table_attributes() const { + return _internal_has_change_table_attributes(); +} +inline void AlterRequest::set_has_change_table_attributes() { + _impl_._oneof_case_[0] = kChangeTableAttributes; +} +inline ::greptime::v1::ChangeTableAttributes* AlterRequest::release_change_table_attributes() { + // @@protoc_insertion_point(field_release:greptime.v1.region.AlterRequest.change_table_attributes) + if (_internal_has_change_table_attributes()) { + clear_has_kind(); + ::greptime::v1::ChangeTableAttributes* temp = _impl_.kind_.change_table_attributes_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.kind_.change_table_attributes_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::greptime::v1::ChangeTableAttributes& AlterRequest::_internal_change_table_attributes() const { + return _internal_has_change_table_attributes() + ? *_impl_.kind_.change_table_attributes_ + : reinterpret_cast< ::greptime::v1::ChangeTableAttributes&>(::greptime::v1::_ChangeTableAttributes_default_instance_); +} +inline const ::greptime::v1::ChangeTableAttributes& AlterRequest::change_table_attributes() const { + // @@protoc_insertion_point(field_get:greptime.v1.region.AlterRequest.change_table_attributes) + return _internal_change_table_attributes(); +} +inline ::greptime::v1::ChangeTableAttributes* AlterRequest::unsafe_arena_release_change_table_attributes() { + // @@protoc_insertion_point(field_unsafe_arena_release:greptime.v1.region.AlterRequest.change_table_attributes) + if (_internal_has_change_table_attributes()) { + clear_has_kind(); + ::greptime::v1::ChangeTableAttributes* temp = _impl_.kind_.change_table_attributes_; + _impl_.kind_.change_table_attributes_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void AlterRequest::unsafe_arena_set_allocated_change_table_attributes(::greptime::v1::ChangeTableAttributes* change_table_attributes) { + clear_kind(); + if (change_table_attributes) { + set_has_change_table_attributes(); + _impl_.kind_.change_table_attributes_ = change_table_attributes; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:greptime.v1.region.AlterRequest.change_table_attributes) +} +inline ::greptime::v1::ChangeTableAttributes* AlterRequest::_internal_mutable_change_table_attributes() { + if (!_internal_has_change_table_attributes()) { + clear_kind(); + set_has_change_table_attributes(); + _impl_.kind_.change_table_attributes_ = CreateMaybeMessage< ::greptime::v1::ChangeTableAttributes >(GetArenaForAllocation()); + } + return _impl_.kind_.change_table_attributes_; +} +inline ::greptime::v1::ChangeTableAttributes* AlterRequest::mutable_change_table_attributes() { + ::greptime::v1::ChangeTableAttributes* _msg = _internal_mutable_change_table_attributes(); + // @@protoc_insertion_point(field_mutable:greptime.v1.region.AlterRequest.change_table_attributes) + return _msg; +} + // uint64 schema_version = 4; inline void AlterRequest::clear_schema_version() { _impl_.schema_version_ = uint64_t{0u}; diff --git a/java/src/main/java/io/greptime/v1/region/Server.java b/java/src/main/java/io/greptime/v1/region/Server.java index 755a4fe1..581107a0 100644 --- a/java/src/main/java/io/greptime/v1/region/Server.java +++ b/java/src/main/java/io/greptime/v1/region/Server.java @@ -16433,6 +16433,21 @@ public interface AlterRequestOrBuilder extends */ io.greptime.v1.Ddl.ChangeColumnTypesOrBuilder getChangeColumnTypesOrBuilder(); + /** + * .greptime.v1.ChangeTableAttributes change_table_attributes = 6; + * @return Whether the changeTableAttributes field is set. + */ + boolean hasChangeTableAttributes(); + /** + * .greptime.v1.ChangeTableAttributes change_table_attributes = 6; + * @return The changeTableAttributes. + */ + io.greptime.v1.Ddl.ChangeTableAttributes getChangeTableAttributes(); + /** + * .greptime.v1.ChangeTableAttributes change_table_attributes = 6; + */ + io.greptime.v1.Ddl.ChangeTableAttributesOrBuilder getChangeTableAttributesOrBuilder(); + /** *
      * The version of the schema before applying the alteration.
@@ -16542,6 +16557,20 @@ private AlterRequest(
               kindCase_ = 5;
               break;
             }
+            case 50: {
+              io.greptime.v1.Ddl.ChangeTableAttributes.Builder subBuilder = null;
+              if (kindCase_ == 6) {
+                subBuilder = ((io.greptime.v1.Ddl.ChangeTableAttributes) kind_).toBuilder();
+              }
+              kind_ =
+                  input.readMessage(io.greptime.v1.Ddl.ChangeTableAttributes.parser(), extensionRegistry);
+              if (subBuilder != null) {
+                subBuilder.mergeFrom((io.greptime.v1.Ddl.ChangeTableAttributes) kind_);
+                kind_ = subBuilder.buildPartial();
+              }
+              kindCase_ = 6;
+              break;
+            }
             default: {
               if (!parseUnknownField(
                   input, unknownFields, extensionRegistry, tag)) {
@@ -16584,6 +16613,7 @@ public enum KindCase
       ADD_COLUMNS(2),
       DROP_COLUMNS(3),
       CHANGE_COLUMN_TYPES(5),
+      CHANGE_TABLE_ATTRIBUTES(6),
       KIND_NOT_SET(0);
       private final int value;
       private KindCase(int value) {
@@ -16604,6 +16634,7 @@ public static KindCase forNumber(int value) {
           case 2: return ADD_COLUMNS;
           case 3: return DROP_COLUMNS;
           case 5: return CHANGE_COLUMN_TYPES;
+          case 6: return CHANGE_TABLE_ATTRIBUTES;
           case 0: return KIND_NOT_SET;
           default: return null;
         }
@@ -16723,6 +16754,37 @@ public io.greptime.v1.Ddl.ChangeColumnTypesOrBuilder getChangeColumnTypesOrBuild
       return io.greptime.v1.Ddl.ChangeColumnTypes.getDefaultInstance();
     }
 
+    public static final int CHANGE_TABLE_ATTRIBUTES_FIELD_NUMBER = 6;
+    /**
+     * .greptime.v1.ChangeTableAttributes change_table_attributes = 6;
+     * @return Whether the changeTableAttributes field is set.
+     */
+    @java.lang.Override
+    public boolean hasChangeTableAttributes() {
+      return kindCase_ == 6;
+    }
+    /**
+     * .greptime.v1.ChangeTableAttributes change_table_attributes = 6;
+     * @return The changeTableAttributes.
+     */
+    @java.lang.Override
+    public io.greptime.v1.Ddl.ChangeTableAttributes getChangeTableAttributes() {
+      if (kindCase_ == 6) {
+         return (io.greptime.v1.Ddl.ChangeTableAttributes) kind_;
+      }
+      return io.greptime.v1.Ddl.ChangeTableAttributes.getDefaultInstance();
+    }
+    /**
+     * .greptime.v1.ChangeTableAttributes change_table_attributes = 6;
+     */
+    @java.lang.Override
+    public io.greptime.v1.Ddl.ChangeTableAttributesOrBuilder getChangeTableAttributesOrBuilder() {
+      if (kindCase_ == 6) {
+         return (io.greptime.v1.Ddl.ChangeTableAttributes) kind_;
+      }
+      return io.greptime.v1.Ddl.ChangeTableAttributes.getDefaultInstance();
+    }
+
     public static final int SCHEMA_VERSION_FIELD_NUMBER = 4;
     private long schemaVersion_;
     /**
@@ -16767,6 +16829,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
       if (kindCase_ == 5) {
         output.writeMessage(5, (io.greptime.v1.Ddl.ChangeColumnTypes) kind_);
       }
+      if (kindCase_ == 6) {
+        output.writeMessage(6, (io.greptime.v1.Ddl.ChangeTableAttributes) kind_);
+      }
       unknownFields.writeTo(output);
     }
 
@@ -16796,6 +16861,10 @@ public int getSerializedSize() {
         size += com.google.protobuf.CodedOutputStream
           .computeMessageSize(5, (io.greptime.v1.Ddl.ChangeColumnTypes) kind_);
       }
+      if (kindCase_ == 6) {
+        size += com.google.protobuf.CodedOutputStream
+          .computeMessageSize(6, (io.greptime.v1.Ddl.ChangeTableAttributes) kind_);
+      }
       size += unknownFields.getSerializedSize();
       memoizedSize = size;
       return size;
@@ -16829,6 +16898,10 @@ public boolean equals(final java.lang.Object obj) {
           if (!getChangeColumnTypes()
               .equals(other.getChangeColumnTypes())) return false;
           break;
+        case 6:
+          if (!getChangeTableAttributes()
+              .equals(other.getChangeTableAttributes())) return false;
+          break;
         case 0:
         default:
       }
@@ -16862,6 +16935,10 @@ public int hashCode() {
           hash = (37 * hash) + CHANGE_COLUMN_TYPES_FIELD_NUMBER;
           hash = (53 * hash) + getChangeColumnTypes().hashCode();
           break;
+        case 6:
+          hash = (37 * hash) + CHANGE_TABLE_ATTRIBUTES_FIELD_NUMBER;
+          hash = (53 * hash) + getChangeTableAttributes().hashCode();
+          break;
         case 0:
         default:
       }
@@ -17052,6 +17129,13 @@ public io.greptime.v1.region.Server.AlterRequest buildPartial() {
             result.kind_ = changeColumnTypesBuilder_.build();
           }
         }
+        if (kindCase_ == 6) {
+          if (changeTableAttributesBuilder_ == null) {
+            result.kind_ = kind_;
+          } else {
+            result.kind_ = changeTableAttributesBuilder_.build();
+          }
+        }
         result.schemaVersion_ = schemaVersion_;
         result.kindCase_ = kindCase_;
         onBuilt();
@@ -17121,6 +17205,10 @@ public Builder mergeFrom(io.greptime.v1.region.Server.AlterRequest other) {
             mergeChangeColumnTypes(other.getChangeColumnTypes());
             break;
           }
+          case CHANGE_TABLE_ATTRIBUTES: {
+            mergeChangeTableAttributes(other.getChangeTableAttributes());
+            break;
+          }
           case KIND_NOT_SET: {
             break;
           }
@@ -17626,6 +17714,148 @@ public io.greptime.v1.Ddl.ChangeColumnTypesOrBuilder getChangeColumnTypesOrBuild
         return changeColumnTypesBuilder_;
       }
 
+      private com.google.protobuf.SingleFieldBuilderV3<
+          io.greptime.v1.Ddl.ChangeTableAttributes, io.greptime.v1.Ddl.ChangeTableAttributes.Builder, io.greptime.v1.Ddl.ChangeTableAttributesOrBuilder> changeTableAttributesBuilder_;
+      /**
+       * .greptime.v1.ChangeTableAttributes change_table_attributes = 6;
+       * @return Whether the changeTableAttributes field is set.
+       */
+      @java.lang.Override
+      public boolean hasChangeTableAttributes() {
+        return kindCase_ == 6;
+      }
+      /**
+       * .greptime.v1.ChangeTableAttributes change_table_attributes = 6;
+       * @return The changeTableAttributes.
+       */
+      @java.lang.Override
+      public io.greptime.v1.Ddl.ChangeTableAttributes getChangeTableAttributes() {
+        if (changeTableAttributesBuilder_ == null) {
+          if (kindCase_ == 6) {
+            return (io.greptime.v1.Ddl.ChangeTableAttributes) kind_;
+          }
+          return io.greptime.v1.Ddl.ChangeTableAttributes.getDefaultInstance();
+        } else {
+          if (kindCase_ == 6) {
+            return changeTableAttributesBuilder_.getMessage();
+          }
+          return io.greptime.v1.Ddl.ChangeTableAttributes.getDefaultInstance();
+        }
+      }
+      /**
+       * .greptime.v1.ChangeTableAttributes change_table_attributes = 6;
+       */
+      public Builder setChangeTableAttributes(io.greptime.v1.Ddl.ChangeTableAttributes value) {
+        if (changeTableAttributesBuilder_ == null) {
+          if (value == null) {
+            throw new NullPointerException();
+          }
+          kind_ = value;
+          onChanged();
+        } else {
+          changeTableAttributesBuilder_.setMessage(value);
+        }
+        kindCase_ = 6;
+        return this;
+      }
+      /**
+       * .greptime.v1.ChangeTableAttributes change_table_attributes = 6;
+       */
+      public Builder setChangeTableAttributes(
+          io.greptime.v1.Ddl.ChangeTableAttributes.Builder builderForValue) {
+        if (changeTableAttributesBuilder_ == null) {
+          kind_ = builderForValue.build();
+          onChanged();
+        } else {
+          changeTableAttributesBuilder_.setMessage(builderForValue.build());
+        }
+        kindCase_ = 6;
+        return this;
+      }
+      /**
+       * .greptime.v1.ChangeTableAttributes change_table_attributes = 6;
+       */
+      public Builder mergeChangeTableAttributes(io.greptime.v1.Ddl.ChangeTableAttributes value) {
+        if (changeTableAttributesBuilder_ == null) {
+          if (kindCase_ == 6 &&
+              kind_ != io.greptime.v1.Ddl.ChangeTableAttributes.getDefaultInstance()) {
+            kind_ = io.greptime.v1.Ddl.ChangeTableAttributes.newBuilder((io.greptime.v1.Ddl.ChangeTableAttributes) kind_)
+                .mergeFrom(value).buildPartial();
+          } else {
+            kind_ = value;
+          }
+          onChanged();
+        } else {
+          if (kindCase_ == 6) {
+            changeTableAttributesBuilder_.mergeFrom(value);
+          } else {
+            changeTableAttributesBuilder_.setMessage(value);
+          }
+        }
+        kindCase_ = 6;
+        return this;
+      }
+      /**
+       * .greptime.v1.ChangeTableAttributes change_table_attributes = 6;
+       */
+      public Builder clearChangeTableAttributes() {
+        if (changeTableAttributesBuilder_ == null) {
+          if (kindCase_ == 6) {
+            kindCase_ = 0;
+            kind_ = null;
+            onChanged();
+          }
+        } else {
+          if (kindCase_ == 6) {
+            kindCase_ = 0;
+            kind_ = null;
+          }
+          changeTableAttributesBuilder_.clear();
+        }
+        return this;
+      }
+      /**
+       * .greptime.v1.ChangeTableAttributes change_table_attributes = 6;
+       */
+      public io.greptime.v1.Ddl.ChangeTableAttributes.Builder getChangeTableAttributesBuilder() {
+        return getChangeTableAttributesFieldBuilder().getBuilder();
+      }
+      /**
+       * .greptime.v1.ChangeTableAttributes change_table_attributes = 6;
+       */
+      @java.lang.Override
+      public io.greptime.v1.Ddl.ChangeTableAttributesOrBuilder getChangeTableAttributesOrBuilder() {
+        if ((kindCase_ == 6) && (changeTableAttributesBuilder_ != null)) {
+          return changeTableAttributesBuilder_.getMessageOrBuilder();
+        } else {
+          if (kindCase_ == 6) {
+            return (io.greptime.v1.Ddl.ChangeTableAttributes) kind_;
+          }
+          return io.greptime.v1.Ddl.ChangeTableAttributes.getDefaultInstance();
+        }
+      }
+      /**
+       * .greptime.v1.ChangeTableAttributes change_table_attributes = 6;
+       */
+      private com.google.protobuf.SingleFieldBuilderV3<
+          io.greptime.v1.Ddl.ChangeTableAttributes, io.greptime.v1.Ddl.ChangeTableAttributes.Builder, io.greptime.v1.Ddl.ChangeTableAttributesOrBuilder> 
+          getChangeTableAttributesFieldBuilder() {
+        if (changeTableAttributesBuilder_ == null) {
+          if (!(kindCase_ == 6)) {
+            kind_ = io.greptime.v1.Ddl.ChangeTableAttributes.getDefaultInstance();
+          }
+          changeTableAttributesBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
+              io.greptime.v1.Ddl.ChangeTableAttributes, io.greptime.v1.Ddl.ChangeTableAttributes.Builder, io.greptime.v1.Ddl.ChangeTableAttributesOrBuilder>(
+                  (io.greptime.v1.Ddl.ChangeTableAttributes) kind_,
+                  getParentForChildren(),
+                  isClean());
+          kind_ = null;
+        }
+        kindCase_ = 6;
+        onChanged();;
+        return changeTableAttributesBuilder_;
+      }
+
       private long schemaVersion_ ;
       /**
        * 
@@ -24564,34 +24794,36 @@ public io.greptime.v1.region.Server.RegionColumnDef getDefaultInstanceForType()
       ".\n\014OptionsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 " +
       "\001(\t:\0028\001\"!\n\014CloseRequest\022\021\n\tregion_id\030\001 \001" +
       "(\004\"C\n\rAlterRequests\0222\n\010requests\030\001 \003(\0132 ." +
-      "greptime.v1.region.AlterRequest\"\360\001\n\014Alte" +
+      "greptime.v1.region.AlterRequest\"\267\002\n\014Alte" +
       "rRequest\022\021\n\tregion_id\030\001 \001(\004\0225\n\013add_colum" +
       "ns\030\002 \001(\0132\036.greptime.v1.region.AddColumns" +
       "H\000\0227\n\014drop_columns\030\003 \001(\0132\037.greptime.v1.r" +
       "egion.DropColumnsH\000\022=\n\023change_column_typ" +
       "es\030\005 \001(\0132\036.greptime.v1.ChangeColumnTypes" +
-      "H\000\022\026\n\016schema_version\030\004 \001(\004B\006\n\004kind\"@\n\nAd" +
-      "dColumns\0222\n\013add_columns\030\001 \003(\0132\035.greptime" +
-      ".v1.region.AddColumn\"C\n\013DropColumns\0224\n\014d" +
-      "rop_columns\030\001 \003(\0132\036.greptime.v1.region.D" +
-      "ropColumn\"v\n\tAddColumn\0227\n\ncolumn_def\030\001 \001" +
-      "(\0132#.greptime.v1.region.RegionColumnDef\022" +
-      "0\n\010location\030\003 \001(\0132\036.greptime.v1.AddColum" +
-      "nLocation\"\032\n\nDropColumn\022\014\n\004name\030\001 \001(\t\"!\n" +
-      "\014FlushRequest\022\021\n\tregion_id\030\001 \001(\004\"\t\n\007Regu" +
-      "lar\"&\n\014StrictWindow\022\026\n\016window_seconds\030\001 " +
-      "\001(\003\"\231\001\n\016CompactRequest\022\021\n\tregion_id\030\001 \001(" +
-      "\004\022.\n\007regular\030\002 \001(\0132\033.greptime.v1.region." +
-      "RegularH\000\0229\n\rstrict_window\030\003 \001(\0132 .grept" +
-      "ime.v1.region.StrictWindowH\000B\t\n\007options\"" +
-      "$\n\017TruncateRequest\022\021\n\tregion_id\030\001 \001(\004\"P\n" +
-      "\017RegionColumnDef\022*\n\ncolumn_def\030\001 \001(\0132\026.g" +
-      "reptime.v1.ColumnDef\022\021\n\tcolumn_id\030\002 \001(\r2" +
-      "Y\n\006Region\022O\n\006Handle\022!.greptime.v1.region" +
-      ".RegionRequest\032\".greptime.v1.region.Regi" +
-      "onResponseB]\n\025io.greptime.v1.regionB\006Ser" +
-      "verZ