From 4204be285fa2d6e7023bd748d91792d6cd443ad1 Mon Sep 17 00:00:00 2001 From: Zheming Li Date: Mon, 22 May 2023 17:18:14 +0800 Subject: [PATCH] feat: add location info when adding columns (#38) --- go/greptime/v1/ddl.pb.go | 232 +- .../src/main/java/io/greptime/v1/Columns.java | 1543 ++++--- .../main/java/io/greptime/v1/Database.java | 1265 +++--- java/src/main/java/io/greptime/v1/Ddl.java | 3941 +++++++++++------ proto/greptime/v1/ddl.proto | 10 + 5 files changed, 4333 insertions(+), 2658 deletions(-) diff --git a/go/greptime/v1/ddl.pb.go b/go/greptime/v1/ddl.pb.go index 2378bf4..5db7bd4 100644 --- a/go/greptime/v1/ddl.pb.go +++ b/go/greptime/v1/ddl.pb.go @@ -34,6 +34,52 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +type AddColumn_Location_LocationType int32 + +const ( + AddColumn_Location_FIRST AddColumn_Location_LocationType = 0 + AddColumn_Location_AFTER AddColumn_Location_LocationType = 1 +) + +// Enum value maps for AddColumn_Location_LocationType. +var ( + AddColumn_Location_LocationType_name = map[int32]string{ + 0: "FIRST", + 1: "AFTER", + } + AddColumn_Location_LocationType_value = map[string]int32{ + "FIRST": 0, + "AFTER": 1, + } +) + +func (x AddColumn_Location_LocationType) Enum() *AddColumn_Location_LocationType { + p := new(AddColumn_Location_LocationType) + *p = x + return p +} + +func (x AddColumn_Location_LocationType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (AddColumn_Location_LocationType) Descriptor() protoreflect.EnumDescriptor { + return file_greptime_v1_ddl_proto_enumTypes[0].Descriptor() +} + +func (AddColumn_Location_LocationType) Type() protoreflect.EnumType { + return &file_greptime_v1_ddl_proto_enumTypes[0] +} + +func (x AddColumn_Location_LocationType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use AddColumn_Location_LocationType.Descriptor instead. +func (AddColumn_Location_LocationType) EnumDescriptor() ([]byte, []int) { + return file_greptime_v1_ddl_proto_rawDescGZIP(), []int{9, 0, 0} +} + // "Data Definition Language" requests, that create, modify or delete the // database structures but not the data. `DdlRequest` could carry more // information than plain SQL, for example, the "table_id" in `CreateTableExpr`. @@ -751,8 +797,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"` - IsKey bool `protobuf:"varint,2,opt,name=is_key,json=isKey,proto3" json:"is_key,omitempty"` + ColumnDef *ColumnDef `protobuf:"bytes,1,opt,name=column_def,json=columnDef,proto3" json:"column_def,omitempty"` + IsKey bool `protobuf:"varint,2,opt,name=is_key,json=isKey,proto3" json:"is_key,omitempty"` + Location *AddColumn_Location `protobuf:"bytes,3,opt,name=location,proto3" json:"location,omitempty"` } func (x *AddColumn) Reset() { @@ -801,6 +848,13 @@ func (x *AddColumn) GetIsKey() bool { return false } +func (x *AddColumn) GetLocation() *AddColumn_Location { + if x != nil { + return x.Location + } + return nil +} + type DropColumn struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -895,6 +949,61 @@ func (x *TableId) GetId() uint32 { return 0 } +type AddColumn_Location struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + LocationType AddColumn_Location_LocationType `protobuf:"varint,1,opt,name=location_type,json=locationType,proto3,enum=greptime.v1.AddColumn_Location_LocationType" json:"location_type,omitempty"` + AfterCloumnName string `protobuf:"bytes,2,opt,name=after_cloumn_name,json=afterCloumnName,proto3" json:"after_cloumn_name,omitempty"` +} + +func (x *AddColumn_Location) Reset() { + *x = AddColumn_Location{} + if protoimpl.UnsafeEnabled { + mi := &file_greptime_v1_ddl_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AddColumn_Location) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AddColumn_Location) ProtoMessage() {} + +func (x *AddColumn_Location) ProtoReflect() protoreflect.Message { + mi := &file_greptime_v1_ddl_proto_msgTypes[13] + 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 AddColumn_Location.ProtoReflect.Descriptor instead. +func (*AddColumn_Location) Descriptor() ([]byte, []int) { + return file_greptime_v1_ddl_proto_rawDescGZIP(), []int{9, 0} +} + +func (x *AddColumn_Location) GetLocationType() AddColumn_Location_LocationType { + if x != nil { + return x.LocationType + } + return AddColumn_Location_FIRST +} + +func (x *AddColumn_Location) GetAfterCloumnName() string { + if x != nil { + return x.AfterCloumnName + } + return "" +} + var File_greptime_v1_ddl_proto protoreflect.FileDescriptor var file_greptime_v1_ddl_proto_rawDesc = []byte{ @@ -1014,13 +1123,28 @@ var file_greptime_v1_ddl_proto_rawDesc = []byte{ 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, 0x59, 0x0a, 0x09, 0x41, 0x64, 0x64, 0x43, 0x6f, 0x6c, - 0x75, 0x6d, 0x6e, 0x12, 0x35, 0x0a, 0x0a, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x5f, 0x64, 0x65, - 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, - 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x44, 0x65, 0x66, 0x52, - 0x09, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x44, 0x65, 0x66, 0x12, 0x15, 0x0a, 0x06, 0x69, 0x73, - 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x69, 0x73, 0x4b, 0x65, - 0x79, 0x22, 0x20, 0x0a, 0x0a, 0x44, 0x72, 0x6f, 0x70, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x12, + 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0xc8, 0x02, 0x0a, 0x09, 0x41, 0x64, 0x64, 0x43, 0x6f, + 0x6c, 0x75, 0x6d, 0x6e, 0x12, 0x35, 0x0a, 0x0a, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x5f, 0x64, + 0x65, 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, + 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x44, 0x65, 0x66, + 0x52, 0x09, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x44, 0x65, 0x66, 0x12, 0x15, 0x0a, 0x06, 0x69, + 0x73, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x69, 0x73, 0x4b, + 0x65, 0x79, 0x12, 0x3b, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, + 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x2e, 0x4c, 0x6f, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, + 0xaf, 0x01, 0x0a, 0x08, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x51, 0x0a, 0x0d, + 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x41, 0x64, 0x64, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x2e, 0x4c, 0x6f, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, + 0x65, 0x52, 0x0c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x2a, 0x0a, 0x11, 0x61, 0x66, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x6c, 0x6f, 0x75, 0x6d, 0x6e, 0x5f, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x61, 0x66, 0x74, 0x65, + 0x72, 0x43, 0x6c, 0x6f, 0x75, 0x6d, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x24, 0x0a, 0x0c, 0x4c, + 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x09, 0x0a, 0x05, 0x46, + 0x49, 0x52, 0x53, 0x54, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x41, 0x46, 0x54, 0x45, 0x52, 0x10, + 0x01, 0x22, 0x20, 0x0a, 0x0a, 0x44, 0x72, 0x6f, 0x70, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x19, 0x0a, 0x07, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x02, 0x69, 0x64, 0x42, 0x4c, @@ -1044,43 +1168,48 @@ func file_greptime_v1_ddl_proto_rawDescGZIP() []byte { return file_greptime_v1_ddl_proto_rawDescData } -var file_greptime_v1_ddl_proto_msgTypes = make([]protoimpl.MessageInfo, 13) +var file_greptime_v1_ddl_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_greptime_v1_ddl_proto_msgTypes = make([]protoimpl.MessageInfo, 14) var file_greptime_v1_ddl_proto_goTypes = []interface{}{ - (*DdlRequest)(nil), // 0: greptime.v1.DdlRequest - (*CreateTableExpr)(nil), // 1: greptime.v1.CreateTableExpr - (*AlterExpr)(nil), // 2: greptime.v1.AlterExpr - (*DropTableExpr)(nil), // 3: greptime.v1.DropTableExpr - (*FlushTableExpr)(nil), // 4: greptime.v1.FlushTableExpr - (*CreateDatabaseExpr)(nil), // 5: greptime.v1.CreateDatabaseExpr - (*AddColumns)(nil), // 6: greptime.v1.AddColumns - (*DropColumns)(nil), // 7: greptime.v1.DropColumns - (*RenameTable)(nil), // 8: greptime.v1.RenameTable - (*AddColumn)(nil), // 9: greptime.v1.AddColumn - (*DropColumn)(nil), // 10: greptime.v1.DropColumn - (*TableId)(nil), // 11: greptime.v1.TableId - nil, // 12: greptime.v1.CreateTableExpr.TableOptionsEntry - (*ColumnDef)(nil), // 13: greptime.v1.ColumnDef + (AddColumn_Location_LocationType)(0), // 0: greptime.v1.AddColumn.Location.LocationType + (*DdlRequest)(nil), // 1: greptime.v1.DdlRequest + (*CreateTableExpr)(nil), // 2: greptime.v1.CreateTableExpr + (*AlterExpr)(nil), // 3: greptime.v1.AlterExpr + (*DropTableExpr)(nil), // 4: greptime.v1.DropTableExpr + (*FlushTableExpr)(nil), // 5: greptime.v1.FlushTableExpr + (*CreateDatabaseExpr)(nil), // 6: greptime.v1.CreateDatabaseExpr + (*AddColumns)(nil), // 7: greptime.v1.AddColumns + (*DropColumns)(nil), // 8: greptime.v1.DropColumns + (*RenameTable)(nil), // 9: greptime.v1.RenameTable + (*AddColumn)(nil), // 10: greptime.v1.AddColumn + (*DropColumn)(nil), // 11: greptime.v1.DropColumn + (*TableId)(nil), // 12: greptime.v1.TableId + nil, // 13: greptime.v1.CreateTableExpr.TableOptionsEntry + (*AddColumn_Location)(nil), // 14: greptime.v1.AddColumn.Location + (*ColumnDef)(nil), // 15: greptime.v1.ColumnDef } var file_greptime_v1_ddl_proto_depIdxs = []int32{ - 5, // 0: greptime.v1.DdlRequest.create_database:type_name -> greptime.v1.CreateDatabaseExpr - 1, // 1: greptime.v1.DdlRequest.create_table:type_name -> greptime.v1.CreateTableExpr - 2, // 2: greptime.v1.DdlRequest.alter:type_name -> greptime.v1.AlterExpr - 3, // 3: greptime.v1.DdlRequest.drop_table:type_name -> greptime.v1.DropTableExpr - 4, // 4: greptime.v1.DdlRequest.flush_table:type_name -> greptime.v1.FlushTableExpr - 13, // 5: greptime.v1.CreateTableExpr.column_defs:type_name -> greptime.v1.ColumnDef - 12, // 6: greptime.v1.CreateTableExpr.table_options:type_name -> greptime.v1.CreateTableExpr.TableOptionsEntry - 11, // 7: greptime.v1.CreateTableExpr.table_id:type_name -> greptime.v1.TableId - 6, // 8: greptime.v1.AlterExpr.add_columns:type_name -> greptime.v1.AddColumns - 7, // 9: greptime.v1.AlterExpr.drop_columns:type_name -> greptime.v1.DropColumns - 8, // 10: greptime.v1.AlterExpr.rename_table:type_name -> greptime.v1.RenameTable - 9, // 11: greptime.v1.AddColumns.add_columns:type_name -> greptime.v1.AddColumn - 10, // 12: greptime.v1.DropColumns.drop_columns:type_name -> greptime.v1.DropColumn - 13, // 13: greptime.v1.AddColumn.column_def:type_name -> greptime.v1.ColumnDef - 14, // [14:14] is the sub-list for method output_type - 14, // [14:14] is the sub-list for method input_type - 14, // [14:14] is the sub-list for extension type_name - 14, // [14:14] is the sub-list for extension extendee - 0, // [0:14] is the sub-list for field type_name + 6, // 0: greptime.v1.DdlRequest.create_database:type_name -> greptime.v1.CreateDatabaseExpr + 2, // 1: greptime.v1.DdlRequest.create_table:type_name -> greptime.v1.CreateTableExpr + 3, // 2: greptime.v1.DdlRequest.alter:type_name -> greptime.v1.AlterExpr + 4, // 3: greptime.v1.DdlRequest.drop_table:type_name -> greptime.v1.DropTableExpr + 5, // 4: greptime.v1.DdlRequest.flush_table:type_name -> greptime.v1.FlushTableExpr + 15, // 5: greptime.v1.CreateTableExpr.column_defs:type_name -> greptime.v1.ColumnDef + 13, // 6: greptime.v1.CreateTableExpr.table_options:type_name -> greptime.v1.CreateTableExpr.TableOptionsEntry + 12, // 7: greptime.v1.CreateTableExpr.table_id:type_name -> greptime.v1.TableId + 7, // 8: greptime.v1.AlterExpr.add_columns:type_name -> greptime.v1.AddColumns + 8, // 9: greptime.v1.AlterExpr.drop_columns:type_name -> greptime.v1.DropColumns + 9, // 10: greptime.v1.AlterExpr.rename_table:type_name -> greptime.v1.RenameTable + 10, // 11: greptime.v1.AddColumns.add_columns:type_name -> greptime.v1.AddColumn + 11, // 12: greptime.v1.DropColumns.drop_columns:type_name -> greptime.v1.DropColumn + 15, // 13: greptime.v1.AddColumn.column_def:type_name -> greptime.v1.ColumnDef + 14, // 14: greptime.v1.AddColumn.location:type_name -> greptime.v1.AddColumn.Location + 0, // 15: greptime.v1.AddColumn.Location.location_type:type_name -> greptime.v1.AddColumn.Location.LocationType + 16, // [16:16] is the sub-list for method output_type + 16, // [16:16] is the sub-list for method input_type + 16, // [16:16] is the sub-list for extension type_name + 16, // [16:16] is the sub-list for extension extendee + 0, // [0:16] is the sub-list for field type_name } func init() { file_greptime_v1_ddl_proto_init() } @@ -1234,6 +1363,18 @@ func file_greptime_v1_ddl_proto_init() { return nil } } + file_greptime_v1_ddl_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AddColumn_Location); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } file_greptime_v1_ddl_proto_msgTypes[0].OneofWrappers = []interface{}{ (*DdlRequest_CreateDatabase)(nil), @@ -1253,13 +1394,14 @@ func file_greptime_v1_ddl_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_greptime_v1_ddl_proto_rawDesc, - NumEnums: 0, - NumMessages: 13, + NumEnums: 1, + NumMessages: 14, NumExtensions: 0, NumServices: 0, }, GoTypes: file_greptime_v1_ddl_proto_goTypes, DependencyIndexes: file_greptime_v1_ddl_proto_depIdxs, + EnumInfos: file_greptime_v1_ddl_proto_enumTypes, MessageInfos: file_greptime_v1_ddl_proto_msgTypes, }.Build() File_greptime_v1_ddl_proto = out.File diff --git a/java/src/main/java/io/greptime/v1/Columns.java b/java/src/main/java/io/greptime/v1/Columns.java index 37cf1cb..270c4a9 100644 --- a/java/src/main/java/io/greptime/v1/Columns.java +++ b/java/src/main/java/io/greptime/v1/Columns.java @@ -305,7 +305,8 @@ public final class Columns { /** *
      * The array of non-null values in this column.
-     * For example: suppose there is a column "foo" that contains some int32 values (1, 2, 3, 4, 5, null, 7, 8, 9, null);
+     * For example: suppose there is a column "foo" that contains some int32
+     * values (1, 2, 3, 4, 5, null, 7, 8, 9, null);
      *   column:
      *     column_name: foo
      *     semantic_type: Tag
@@ -320,7 +321,8 @@ public final class Columns {
     /**
      * 
      * The array of non-null values in this column.
-     * For example: suppose there is a column "foo" that contains some int32 values (1, 2, 3, 4, 5, null, 7, 8, 9, null);
+     * For example: suppose there is a column "foo" that contains some int32
+     * values (1, 2, 3, 4, 5, null, 7, 8, 9, null);
      *   column:
      *     column_name: foo
      *     semantic_type: Tag
@@ -335,7 +337,8 @@ public final class Columns {
     /**
      * 
      * The array of non-null values in this column.
-     * For example: suppose there is a column "foo" that contains some int32 values (1, 2, 3, 4, 5, null, 7, 8, 9, null);
+     * For example: suppose there is a column "foo" that contains some int32
+     * values (1, 2, 3, 4, 5, null, 7, 8, 9, null);
      *   column:
      *     column_name: foo
      *     semantic_type: Tag
@@ -350,7 +353,8 @@ public final class Columns {
     /**
      * 
      * Mask maps the positions of null values.
-     * If a bit in null_mask is 1, it indicates that the column value at that position is null.
+     * If a bit in null_mask is 1, it indicates that the column value at that
+     * position is null.
      * 
* * bytes null_mask = 4; @@ -408,6 +412,79 @@ public final class Columns { getUnknownFields() { return this.unknownFields; } + private Column( + 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: { + java.lang.String s = input.readStringRequireUtf8(); + + columnName_ = s; + break; + } + case 16: { + int rawValue = input.readEnum(); + + semanticType_ = rawValue; + break; + } + case 26: { + io.greptime.v1.Columns.Column.Values.Builder subBuilder = null; + if (values_ != null) { + subBuilder = values_.toBuilder(); + } + values_ = input.readMessage(io.greptime.v1.Columns.Column.Values.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(values_); + values_ = subBuilder.buildPartial(); + } + + break; + } + case 34: { + + nullMask_ = input.readBytes(); + break; + } + case 40: { + int rawValue = input.readEnum(); + + datatype_ = rawValue; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.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 io.greptime.v1.Columns.internal_static_greptime_v1_Column_descriptor; @@ -919,6 +996,475 @@ public final class Columns { getUnknownFields() { return this.unknownFields; } + private Values( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + 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 8: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + i8Values_ = newIntList(); + mutable_bitField0_ |= 0x00000001; + } + i8Values_.addInt(input.readInt32()); + break; + } + case 10: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) { + i8Values_ = newIntList(); + mutable_bitField0_ |= 0x00000001; + } + while (input.getBytesUntilLimit() > 0) { + i8Values_.addInt(input.readInt32()); + } + input.popLimit(limit); + break; + } + case 16: { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + i16Values_ = newIntList(); + mutable_bitField0_ |= 0x00000002; + } + i16Values_.addInt(input.readInt32()); + break; + } + case 18: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000002) != 0) && input.getBytesUntilLimit() > 0) { + i16Values_ = newIntList(); + mutable_bitField0_ |= 0x00000002; + } + while (input.getBytesUntilLimit() > 0) { + i16Values_.addInt(input.readInt32()); + } + input.popLimit(limit); + break; + } + case 24: { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + i32Values_ = newIntList(); + mutable_bitField0_ |= 0x00000004; + } + i32Values_.addInt(input.readInt32()); + break; + } + case 26: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000004) != 0) && input.getBytesUntilLimit() > 0) { + i32Values_ = newIntList(); + mutable_bitField0_ |= 0x00000004; + } + while (input.getBytesUntilLimit() > 0) { + i32Values_.addInt(input.readInt32()); + } + input.popLimit(limit); + break; + } + case 32: { + if (!((mutable_bitField0_ & 0x00000008) != 0)) { + i64Values_ = newLongList(); + mutable_bitField0_ |= 0x00000008; + } + i64Values_.addLong(input.readInt64()); + break; + } + case 34: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000008) != 0) && input.getBytesUntilLimit() > 0) { + i64Values_ = newLongList(); + mutable_bitField0_ |= 0x00000008; + } + while (input.getBytesUntilLimit() > 0) { + i64Values_.addLong(input.readInt64()); + } + input.popLimit(limit); + break; + } + case 40: { + if (!((mutable_bitField0_ & 0x00000010) != 0)) { + u8Values_ = newIntList(); + mutable_bitField0_ |= 0x00000010; + } + u8Values_.addInt(input.readUInt32()); + break; + } + case 42: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000010) != 0) && input.getBytesUntilLimit() > 0) { + u8Values_ = newIntList(); + mutable_bitField0_ |= 0x00000010; + } + while (input.getBytesUntilLimit() > 0) { + u8Values_.addInt(input.readUInt32()); + } + input.popLimit(limit); + break; + } + case 48: { + if (!((mutable_bitField0_ & 0x00000020) != 0)) { + u16Values_ = newIntList(); + mutable_bitField0_ |= 0x00000020; + } + u16Values_.addInt(input.readUInt32()); + break; + } + case 50: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000020) != 0) && input.getBytesUntilLimit() > 0) { + u16Values_ = newIntList(); + mutable_bitField0_ |= 0x00000020; + } + while (input.getBytesUntilLimit() > 0) { + u16Values_.addInt(input.readUInt32()); + } + input.popLimit(limit); + break; + } + case 56: { + if (!((mutable_bitField0_ & 0x00000040) != 0)) { + u32Values_ = newIntList(); + mutable_bitField0_ |= 0x00000040; + } + u32Values_.addInt(input.readUInt32()); + break; + } + case 58: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000040) != 0) && input.getBytesUntilLimit() > 0) { + u32Values_ = newIntList(); + mutable_bitField0_ |= 0x00000040; + } + while (input.getBytesUntilLimit() > 0) { + u32Values_.addInt(input.readUInt32()); + } + input.popLimit(limit); + break; + } + case 64: { + if (!((mutable_bitField0_ & 0x00000080) != 0)) { + u64Values_ = newLongList(); + mutable_bitField0_ |= 0x00000080; + } + u64Values_.addLong(input.readUInt64()); + break; + } + case 66: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000080) != 0) && input.getBytesUntilLimit() > 0) { + u64Values_ = newLongList(); + mutable_bitField0_ |= 0x00000080; + } + while (input.getBytesUntilLimit() > 0) { + u64Values_.addLong(input.readUInt64()); + } + input.popLimit(limit); + break; + } + case 77: { + if (!((mutable_bitField0_ & 0x00000100) != 0)) { + f32Values_ = newFloatList(); + mutable_bitField0_ |= 0x00000100; + } + f32Values_.addFloat(input.readFloat()); + break; + } + case 74: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000100) != 0) && input.getBytesUntilLimit() > 0) { + f32Values_ = newFloatList(); + mutable_bitField0_ |= 0x00000100; + } + while (input.getBytesUntilLimit() > 0) { + f32Values_.addFloat(input.readFloat()); + } + input.popLimit(limit); + break; + } + case 81: { + if (!((mutable_bitField0_ & 0x00000200) != 0)) { + f64Values_ = newDoubleList(); + mutable_bitField0_ |= 0x00000200; + } + f64Values_.addDouble(input.readDouble()); + break; + } + case 82: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000200) != 0) && input.getBytesUntilLimit() > 0) { + f64Values_ = newDoubleList(); + mutable_bitField0_ |= 0x00000200; + } + while (input.getBytesUntilLimit() > 0) { + f64Values_.addDouble(input.readDouble()); + } + input.popLimit(limit); + break; + } + case 88: { + if (!((mutable_bitField0_ & 0x00000400) != 0)) { + boolValues_ = newBooleanList(); + mutable_bitField0_ |= 0x00000400; + } + boolValues_.addBoolean(input.readBool()); + break; + } + case 90: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000400) != 0) && input.getBytesUntilLimit() > 0) { + boolValues_ = newBooleanList(); + mutable_bitField0_ |= 0x00000400; + } + while (input.getBytesUntilLimit() > 0) { + boolValues_.addBoolean(input.readBool()); + } + input.popLimit(limit); + break; + } + case 98: { + if (!((mutable_bitField0_ & 0x00000800) != 0)) { + binaryValues_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000800; + } + binaryValues_.add(input.readBytes()); + break; + } + case 106: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00001000) != 0)) { + stringValues_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00001000; + } + stringValues_.add(s); + break; + } + case 112: { + if (!((mutable_bitField0_ & 0x00002000) != 0)) { + dateValues_ = newIntList(); + mutable_bitField0_ |= 0x00002000; + } + dateValues_.addInt(input.readInt32()); + break; + } + case 114: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00002000) != 0) && input.getBytesUntilLimit() > 0) { + dateValues_ = newIntList(); + mutable_bitField0_ |= 0x00002000; + } + while (input.getBytesUntilLimit() > 0) { + dateValues_.addInt(input.readInt32()); + } + input.popLimit(limit); + break; + } + case 120: { + if (!((mutable_bitField0_ & 0x00004000) != 0)) { + datetimeValues_ = newLongList(); + mutable_bitField0_ |= 0x00004000; + } + datetimeValues_.addLong(input.readInt64()); + break; + } + case 122: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00004000) != 0) && input.getBytesUntilLimit() > 0) { + datetimeValues_ = newLongList(); + mutable_bitField0_ |= 0x00004000; + } + while (input.getBytesUntilLimit() > 0) { + datetimeValues_.addLong(input.readInt64()); + } + input.popLimit(limit); + break; + } + case 128: { + if (!((mutable_bitField0_ & 0x00008000) != 0)) { + tsSecondValues_ = newLongList(); + mutable_bitField0_ |= 0x00008000; + } + tsSecondValues_.addLong(input.readInt64()); + break; + } + case 130: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00008000) != 0) && input.getBytesUntilLimit() > 0) { + tsSecondValues_ = newLongList(); + mutable_bitField0_ |= 0x00008000; + } + while (input.getBytesUntilLimit() > 0) { + tsSecondValues_.addLong(input.readInt64()); + } + input.popLimit(limit); + break; + } + case 136: { + if (!((mutable_bitField0_ & 0x00010000) != 0)) { + tsMillisecondValues_ = newLongList(); + mutable_bitField0_ |= 0x00010000; + } + tsMillisecondValues_.addLong(input.readInt64()); + break; + } + case 138: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00010000) != 0) && input.getBytesUntilLimit() > 0) { + tsMillisecondValues_ = newLongList(); + mutable_bitField0_ |= 0x00010000; + } + while (input.getBytesUntilLimit() > 0) { + tsMillisecondValues_.addLong(input.readInt64()); + } + input.popLimit(limit); + break; + } + case 144: { + if (!((mutable_bitField0_ & 0x00020000) != 0)) { + tsMicrosecondValues_ = newLongList(); + mutable_bitField0_ |= 0x00020000; + } + tsMicrosecondValues_.addLong(input.readInt64()); + break; + } + case 146: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00020000) != 0) && input.getBytesUntilLimit() > 0) { + tsMicrosecondValues_ = newLongList(); + mutable_bitField0_ |= 0x00020000; + } + while (input.getBytesUntilLimit() > 0) { + tsMicrosecondValues_.addLong(input.readInt64()); + } + input.popLimit(limit); + break; + } + case 152: { + if (!((mutable_bitField0_ & 0x00040000) != 0)) { + tsNanosecondValues_ = newLongList(); + mutable_bitField0_ |= 0x00040000; + } + tsNanosecondValues_.addLong(input.readInt64()); + break; + } + case 154: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00040000) != 0) && input.getBytesUntilLimit() > 0) { + tsNanosecondValues_ = newLongList(); + mutable_bitField0_ |= 0x00040000; + } + while (input.getBytesUntilLimit() > 0) { + tsNanosecondValues_.addLong(input.readInt64()); + } + input.popLimit(limit); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + i8Values_.makeImmutable(); // C + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + i16Values_.makeImmutable(); // C + } + if (((mutable_bitField0_ & 0x00000004) != 0)) { + i32Values_.makeImmutable(); // C + } + if (((mutable_bitField0_ & 0x00000008) != 0)) { + i64Values_.makeImmutable(); // C + } + if (((mutable_bitField0_ & 0x00000010) != 0)) { + u8Values_.makeImmutable(); // C + } + if (((mutable_bitField0_ & 0x00000020) != 0)) { + u16Values_.makeImmutable(); // C + } + if (((mutable_bitField0_ & 0x00000040) != 0)) { + u32Values_.makeImmutable(); // C + } + if (((mutable_bitField0_ & 0x00000080) != 0)) { + u64Values_.makeImmutable(); // C + } + if (((mutable_bitField0_ & 0x00000100) != 0)) { + f32Values_.makeImmutable(); // C + } + if (((mutable_bitField0_ & 0x00000200) != 0)) { + f64Values_.makeImmutable(); // C + } + if (((mutable_bitField0_ & 0x00000400) != 0)) { + boolValues_.makeImmutable(); // C + } + if (((mutable_bitField0_ & 0x00000800) != 0)) { + binaryValues_ = java.util.Collections.unmodifiableList(binaryValues_); // C + } + if (((mutable_bitField0_ & 0x00001000) != 0)) { + stringValues_ = stringValues_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00002000) != 0)) { + dateValues_.makeImmutable(); // C + } + if (((mutable_bitField0_ & 0x00004000) != 0)) { + datetimeValues_.makeImmutable(); // C + } + if (((mutable_bitField0_ & 0x00008000) != 0)) { + tsSecondValues_.makeImmutable(); // C + } + if (((mutable_bitField0_ & 0x00010000) != 0)) { + tsMillisecondValues_.makeImmutable(); // C + } + if (((mutable_bitField0_ & 0x00020000) != 0)) { + tsMicrosecondValues_.makeImmutable(); // C + } + if (((mutable_bitField0_ & 0x00040000) != 0)) { + tsNanosecondValues_.makeImmutable(); // C + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.greptime.v1.Columns.internal_static_greptime_v1_Column_Values_descriptor; @@ -933,7 +1479,6 @@ public final class Columns { } public static final int I8_VALUES_FIELD_NUMBER = 1; - @SuppressWarnings("serial") private com.google.protobuf.Internal.IntList i8Values_; /** * repeated int32 i8_values = 1; @@ -962,7 +1507,6 @@ public final class Columns { private int i8ValuesMemoizedSerializedSize = -1; public static final int I16_VALUES_FIELD_NUMBER = 2; - @SuppressWarnings("serial") private com.google.protobuf.Internal.IntList i16Values_; /** * repeated int32 i16_values = 2; @@ -991,7 +1535,6 @@ public final class Columns { private int i16ValuesMemoizedSerializedSize = -1; public static final int I32_VALUES_FIELD_NUMBER = 3; - @SuppressWarnings("serial") private com.google.protobuf.Internal.IntList i32Values_; /** * repeated int32 i32_values = 3; @@ -1020,7 +1563,6 @@ public final class Columns { private int i32ValuesMemoizedSerializedSize = -1; public static final int I64_VALUES_FIELD_NUMBER = 4; - @SuppressWarnings("serial") private com.google.protobuf.Internal.LongList i64Values_; /** * repeated int64 i64_values = 4; @@ -1049,7 +1591,6 @@ public final class Columns { private int i64ValuesMemoizedSerializedSize = -1; public static final int U8_VALUES_FIELD_NUMBER = 5; - @SuppressWarnings("serial") private com.google.protobuf.Internal.IntList u8Values_; /** * repeated uint32 u8_values = 5; @@ -1078,7 +1619,6 @@ public final class Columns { private int u8ValuesMemoizedSerializedSize = -1; public static final int U16_VALUES_FIELD_NUMBER = 6; - @SuppressWarnings("serial") private com.google.protobuf.Internal.IntList u16Values_; /** * repeated uint32 u16_values = 6; @@ -1107,7 +1647,6 @@ public final class Columns { private int u16ValuesMemoizedSerializedSize = -1; public static final int U32_VALUES_FIELD_NUMBER = 7; - @SuppressWarnings("serial") private com.google.protobuf.Internal.IntList u32Values_; /** * repeated uint32 u32_values = 7; @@ -1136,7 +1675,6 @@ public final class Columns { private int u32ValuesMemoizedSerializedSize = -1; public static final int U64_VALUES_FIELD_NUMBER = 8; - @SuppressWarnings("serial") private com.google.protobuf.Internal.LongList u64Values_; /** * repeated uint64 u64_values = 8; @@ -1165,7 +1703,6 @@ public final class Columns { private int u64ValuesMemoizedSerializedSize = -1; public static final int F32_VALUES_FIELD_NUMBER = 9; - @SuppressWarnings("serial") private com.google.protobuf.Internal.FloatList f32Values_; /** * repeated float f32_values = 9; @@ -1194,7 +1731,6 @@ public final class Columns { private int f32ValuesMemoizedSerializedSize = -1; public static final int F64_VALUES_FIELD_NUMBER = 10; - @SuppressWarnings("serial") private com.google.protobuf.Internal.DoubleList f64Values_; /** * repeated double f64_values = 10; @@ -1223,7 +1759,6 @@ public final class Columns { private int f64ValuesMemoizedSerializedSize = -1; public static final int BOOL_VALUES_FIELD_NUMBER = 11; - @SuppressWarnings("serial") private com.google.protobuf.Internal.BooleanList boolValues_; /** * repeated bool bool_values = 11; @@ -1252,7 +1787,6 @@ public final class Columns { private int boolValuesMemoizedSerializedSize = -1; public static final int BINARY_VALUES_FIELD_NUMBER = 12; - @SuppressWarnings("serial") private java.util.List binaryValues_; /** * repeated bytes binary_values = 12; @@ -1280,7 +1814,6 @@ public final class Columns { } public static final int STRING_VALUES_FIELD_NUMBER = 13; - @SuppressWarnings("serial") private com.google.protobuf.LazyStringList stringValues_; /** * repeated string string_values = 13; @@ -1316,7 +1849,6 @@ public final class Columns { } public static final int DATE_VALUES_FIELD_NUMBER = 14; - @SuppressWarnings("serial") private com.google.protobuf.Internal.IntList dateValues_; /** * repeated int32 date_values = 14; @@ -1345,7 +1877,6 @@ public final class Columns { private int dateValuesMemoizedSerializedSize = -1; public static final int DATETIME_VALUES_FIELD_NUMBER = 15; - @SuppressWarnings("serial") private com.google.protobuf.Internal.LongList datetimeValues_; /** * repeated int64 datetime_values = 15; @@ -1374,7 +1905,6 @@ public final class Columns { private int datetimeValuesMemoizedSerializedSize = -1; public static final int TS_SECOND_VALUES_FIELD_NUMBER = 16; - @SuppressWarnings("serial") private com.google.protobuf.Internal.LongList tsSecondValues_; /** * repeated int64 ts_second_values = 16; @@ -1403,7 +1933,6 @@ public final class Columns { private int tsSecondValuesMemoizedSerializedSize = -1; public static final int TS_MILLISECOND_VALUES_FIELD_NUMBER = 17; - @SuppressWarnings("serial") private com.google.protobuf.Internal.LongList tsMillisecondValues_; /** * repeated int64 ts_millisecond_values = 17; @@ -1432,7 +1961,6 @@ public final class Columns { private int tsMillisecondValuesMemoizedSerializedSize = -1; public static final int TS_MICROSECOND_VALUES_FIELD_NUMBER = 18; - @SuppressWarnings("serial") private com.google.protobuf.Internal.LongList tsMicrosecondValues_; /** * repeated int64 ts_microsecond_values = 18; @@ -1461,7 +1989,6 @@ public final class Columns { private int tsMicrosecondValuesMemoizedSerializedSize = -1; public static final int TS_NANOSECOND_VALUES_FIELD_NUMBER = 19; - @SuppressWarnings("serial") private com.google.protobuf.Internal.LongList tsNanosecondValues_; /** * repeated int64 ts_nanosecond_values = 19; @@ -1629,7 +2156,7 @@ public final class Columns { for (int i = 0; i < tsNanosecondValues_.size(); i++) { output.writeInt64NoTag(tsNanosecondValues_.getLong(i)); } - getUnknownFields().writeTo(output); + unknownFields.writeTo(output); } @java.lang.Override @@ -1884,7 +2411,7 @@ public final class Columns { } tsNanosecondValuesMemoizedSerializedSize = dataSize; } - size += getUnknownFields().getSerializedSize(); + size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @@ -1937,7 +2464,7 @@ public final class Columns { .equals(other.getTsMicrosecondValuesList())) return false; if (!getTsNanosecondValuesList() .equals(other.getTsNanosecondValuesList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -2024,7 +2551,7 @@ public final class Columns { hash = (37 * hash) + TS_NANOSECOND_VALUES_FIELD_NUMBER; hash = (53 * hash) + getTsNanosecondValuesList().hashCode(); } - hash = (29 * hash) + getUnknownFields().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } @@ -2141,38 +2668,60 @@ public final class Columns { // Construct using io.greptime.v1.Columns.Column.Values.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(); - bitField0_ = 0; i8Values_ = emptyIntList(); + bitField0_ = (bitField0_ & ~0x00000001); i16Values_ = emptyIntList(); + bitField0_ = (bitField0_ & ~0x00000002); i32Values_ = emptyIntList(); + bitField0_ = (bitField0_ & ~0x00000004); i64Values_ = emptyLongList(); + bitField0_ = (bitField0_ & ~0x00000008); u8Values_ = emptyIntList(); + bitField0_ = (bitField0_ & ~0x00000010); u16Values_ = emptyIntList(); + bitField0_ = (bitField0_ & ~0x00000020); u32Values_ = emptyIntList(); + bitField0_ = (bitField0_ & ~0x00000040); u64Values_ = emptyLongList(); + bitField0_ = (bitField0_ & ~0x00000080); f32Values_ = emptyFloatList(); + bitField0_ = (bitField0_ & ~0x00000100); f64Values_ = emptyDoubleList(); + bitField0_ = (bitField0_ & ~0x00000200); boolValues_ = emptyBooleanList(); + bitField0_ = (bitField0_ & ~0x00000400); binaryValues_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000800); stringValues_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00001000); dateValues_ = emptyIntList(); + bitField0_ = (bitField0_ & ~0x00002000); datetimeValues_ = emptyLongList(); + bitField0_ = (bitField0_ & ~0x00004000); tsSecondValues_ = emptyLongList(); + bitField0_ = (bitField0_ & ~0x00008000); tsMillisecondValues_ = emptyLongList(); + bitField0_ = (bitField0_ & ~0x00010000); tsMicrosecondValues_ = emptyLongList(); + bitField0_ = (bitField0_ & ~0x00020000); tsNanosecondValues_ = emptyLongList(); + bitField0_ = (bitField0_ & ~0x00040000); return this; } @@ -2199,13 +2748,7 @@ public final class Columns { @java.lang.Override public io.greptime.v1.Columns.Column.Values buildPartial() { io.greptime.v1.Columns.Column.Values result = new io.greptime.v1.Columns.Column.Values(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.greptime.v1.Columns.Column.Values result) { + int from_bitField0_ = bitField0_; if (((bitField0_ & 0x00000001) != 0)) { i8Values_.makeImmutable(); bitField0_ = (bitField0_ & ~0x00000001); @@ -2301,10 +2844,8 @@ public final class Columns { bitField0_ = (bitField0_ & ~0x00040000); } result.tsNanosecondValues_ = tsNanosecondValues_; - } - - private void buildPartial0(io.greptime.v1.Columns.Column.Values result) { - int from_bitField0_ = bitField0_; + onBuilt(); + return result; } @java.lang.Override @@ -2541,7 +3082,7 @@ public final class Columns { } onChanged(); } - this.mergeUnknownFields(other.getUnknownFields()); + this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @@ -2556,314 +3097,17 @@ public final class Columns { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } + io.greptime.v1.Columns.Column.Values parsedMessage = null; try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - int v = input.readInt32(); - ensureI8ValuesIsMutable(); - i8Values_.addInt(v); - break; - } // case 8 - case 10: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - ensureI8ValuesIsMutable(); - while (input.getBytesUntilLimit() > 0) { - i8Values_.addInt(input.readInt32()); - } - input.popLimit(limit); - break; - } // case 10 - case 16: { - int v = input.readInt32(); - ensureI16ValuesIsMutable(); - i16Values_.addInt(v); - break; - } // case 16 - case 18: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - ensureI16ValuesIsMutable(); - while (input.getBytesUntilLimit() > 0) { - i16Values_.addInt(input.readInt32()); - } - input.popLimit(limit); - break; - } // case 18 - case 24: { - int v = input.readInt32(); - ensureI32ValuesIsMutable(); - i32Values_.addInt(v); - break; - } // case 24 - case 26: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - ensureI32ValuesIsMutable(); - while (input.getBytesUntilLimit() > 0) { - i32Values_.addInt(input.readInt32()); - } - input.popLimit(limit); - break; - } // case 26 - case 32: { - long v = input.readInt64(); - ensureI64ValuesIsMutable(); - i64Values_.addLong(v); - break; - } // case 32 - case 34: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - ensureI64ValuesIsMutable(); - while (input.getBytesUntilLimit() > 0) { - i64Values_.addLong(input.readInt64()); - } - input.popLimit(limit); - break; - } // case 34 - case 40: { - int v = input.readUInt32(); - ensureU8ValuesIsMutable(); - u8Values_.addInt(v); - break; - } // case 40 - case 42: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - ensureU8ValuesIsMutable(); - while (input.getBytesUntilLimit() > 0) { - u8Values_.addInt(input.readUInt32()); - } - input.popLimit(limit); - break; - } // case 42 - case 48: { - int v = input.readUInt32(); - ensureU16ValuesIsMutable(); - u16Values_.addInt(v); - break; - } // case 48 - case 50: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - ensureU16ValuesIsMutable(); - while (input.getBytesUntilLimit() > 0) { - u16Values_.addInt(input.readUInt32()); - } - input.popLimit(limit); - break; - } // case 50 - case 56: { - int v = input.readUInt32(); - ensureU32ValuesIsMutable(); - u32Values_.addInt(v); - break; - } // case 56 - case 58: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - ensureU32ValuesIsMutable(); - while (input.getBytesUntilLimit() > 0) { - u32Values_.addInt(input.readUInt32()); - } - input.popLimit(limit); - break; - } // case 58 - case 64: { - long v = input.readUInt64(); - ensureU64ValuesIsMutable(); - u64Values_.addLong(v); - break; - } // case 64 - case 66: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - ensureU64ValuesIsMutable(); - while (input.getBytesUntilLimit() > 0) { - u64Values_.addLong(input.readUInt64()); - } - input.popLimit(limit); - break; - } // case 66 - case 77: { - float v = input.readFloat(); - ensureF32ValuesIsMutable(); - f32Values_.addFloat(v); - break; - } // case 77 - case 74: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - ensureF32ValuesIsMutable(); - while (input.getBytesUntilLimit() > 0) { - f32Values_.addFloat(input.readFloat()); - } - input.popLimit(limit); - break; - } // case 74 - case 81: { - double v = input.readDouble(); - ensureF64ValuesIsMutable(); - f64Values_.addDouble(v); - break; - } // case 81 - case 82: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - ensureF64ValuesIsMutable(); - while (input.getBytesUntilLimit() > 0) { - f64Values_.addDouble(input.readDouble()); - } - input.popLimit(limit); - break; - } // case 82 - case 88: { - boolean v = input.readBool(); - ensureBoolValuesIsMutable(); - boolValues_.addBoolean(v); - break; - } // case 88 - case 90: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - ensureBoolValuesIsMutable(); - while (input.getBytesUntilLimit() > 0) { - boolValues_.addBoolean(input.readBool()); - } - input.popLimit(limit); - break; - } // case 90 - case 98: { - com.google.protobuf.ByteString v = input.readBytes(); - ensureBinaryValuesIsMutable(); - binaryValues_.add(v); - break; - } // case 98 - case 106: { - java.lang.String s = input.readStringRequireUtf8(); - ensureStringValuesIsMutable(); - stringValues_.add(s); - break; - } // case 106 - case 112: { - int v = input.readInt32(); - ensureDateValuesIsMutable(); - dateValues_.addInt(v); - break; - } // case 112 - case 114: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - ensureDateValuesIsMutable(); - while (input.getBytesUntilLimit() > 0) { - dateValues_.addInt(input.readInt32()); - } - input.popLimit(limit); - break; - } // case 114 - case 120: { - long v = input.readInt64(); - ensureDatetimeValuesIsMutable(); - datetimeValues_.addLong(v); - break; - } // case 120 - case 122: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - ensureDatetimeValuesIsMutable(); - while (input.getBytesUntilLimit() > 0) { - datetimeValues_.addLong(input.readInt64()); - } - input.popLimit(limit); - break; - } // case 122 - case 128: { - long v = input.readInt64(); - ensureTsSecondValuesIsMutable(); - tsSecondValues_.addLong(v); - break; - } // case 128 - case 130: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - ensureTsSecondValuesIsMutable(); - while (input.getBytesUntilLimit() > 0) { - tsSecondValues_.addLong(input.readInt64()); - } - input.popLimit(limit); - break; - } // case 130 - case 136: { - long v = input.readInt64(); - ensureTsMillisecondValuesIsMutable(); - tsMillisecondValues_.addLong(v); - break; - } // case 136 - case 138: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - ensureTsMillisecondValuesIsMutable(); - while (input.getBytesUntilLimit() > 0) { - tsMillisecondValues_.addLong(input.readInt64()); - } - input.popLimit(limit); - break; - } // case 138 - case 144: { - long v = input.readInt64(); - ensureTsMicrosecondValuesIsMutable(); - tsMicrosecondValues_.addLong(v); - break; - } // case 144 - case 146: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - ensureTsMicrosecondValuesIsMutable(); - while (input.getBytesUntilLimit() > 0) { - tsMicrosecondValues_.addLong(input.readInt64()); - } - input.popLimit(limit); - break; - } // case 146 - case 152: { - long v = input.readInt64(); - ensureTsNanosecondValuesIsMutable(); - tsNanosecondValues_.addLong(v); - break; - } // case 152 - case 154: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - ensureTsNanosecondValuesIsMutable(); - while (input.getBytesUntilLimit() > 0) { - tsNanosecondValues_.addLong(input.readInt64()); - } - input.popLimit(limit); - break; - } // case 154 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (io.greptime.v1.Columns.Column.Values) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - onChanged(); - } // finally + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } return this; } private int bitField0_; @@ -2873,7 +3117,7 @@ public final class Columns { if (!((bitField0_ & 0x00000001) != 0)) { i8Values_ = mutableCopy(i8Values_); bitField0_ |= 0x00000001; - } + } } /** * repeated int32 i8_values = 1; @@ -2907,7 +3151,6 @@ public final class Columns { */ public Builder setI8Values( int index, int value) { - ensureI8ValuesIsMutable(); i8Values_.setInt(index, value); onChanged(); @@ -2919,7 +3162,6 @@ public final class Columns { * @return This builder for chaining. */ public Builder addI8Values(int value) { - ensureI8ValuesIsMutable(); i8Values_.addInt(value); onChanged(); @@ -2954,7 +3196,7 @@ public final class Columns { if (!((bitField0_ & 0x00000002) != 0)) { i16Values_ = mutableCopy(i16Values_); bitField0_ |= 0x00000002; - } + } } /** * repeated int32 i16_values = 2; @@ -2988,7 +3230,6 @@ public final class Columns { */ public Builder setI16Values( int index, int value) { - ensureI16ValuesIsMutable(); i16Values_.setInt(index, value); onChanged(); @@ -3000,7 +3241,6 @@ public final class Columns { * @return This builder for chaining. */ public Builder addI16Values(int value) { - ensureI16ValuesIsMutable(); i16Values_.addInt(value); onChanged(); @@ -3035,7 +3275,7 @@ public final class Columns { if (!((bitField0_ & 0x00000004) != 0)) { i32Values_ = mutableCopy(i32Values_); bitField0_ |= 0x00000004; - } + } } /** * repeated int32 i32_values = 3; @@ -3069,7 +3309,6 @@ public final class Columns { */ public Builder setI32Values( int index, int value) { - ensureI32ValuesIsMutable(); i32Values_.setInt(index, value); onChanged(); @@ -3081,7 +3320,6 @@ public final class Columns { * @return This builder for chaining. */ public Builder addI32Values(int value) { - ensureI32ValuesIsMutable(); i32Values_.addInt(value); onChanged(); @@ -3116,7 +3354,7 @@ public final class Columns { if (!((bitField0_ & 0x00000008) != 0)) { i64Values_ = mutableCopy(i64Values_); bitField0_ |= 0x00000008; - } + } } /** * repeated int64 i64_values = 4; @@ -3150,7 +3388,6 @@ public final class Columns { */ public Builder setI64Values( int index, long value) { - ensureI64ValuesIsMutable(); i64Values_.setLong(index, value); onChanged(); @@ -3162,7 +3399,6 @@ public final class Columns { * @return This builder for chaining. */ public Builder addI64Values(long value) { - ensureI64ValuesIsMutable(); i64Values_.addLong(value); onChanged(); @@ -3197,7 +3433,7 @@ public final class Columns { if (!((bitField0_ & 0x00000010) != 0)) { u8Values_ = mutableCopy(u8Values_); bitField0_ |= 0x00000010; - } + } } /** * repeated uint32 u8_values = 5; @@ -3231,7 +3467,6 @@ public final class Columns { */ public Builder setU8Values( int index, int value) { - ensureU8ValuesIsMutable(); u8Values_.setInt(index, value); onChanged(); @@ -3243,7 +3478,6 @@ public final class Columns { * @return This builder for chaining. */ public Builder addU8Values(int value) { - ensureU8ValuesIsMutable(); u8Values_.addInt(value); onChanged(); @@ -3278,7 +3512,7 @@ public final class Columns { if (!((bitField0_ & 0x00000020) != 0)) { u16Values_ = mutableCopy(u16Values_); bitField0_ |= 0x00000020; - } + } } /** * repeated uint32 u16_values = 6; @@ -3312,7 +3546,6 @@ public final class Columns { */ public Builder setU16Values( int index, int value) { - ensureU16ValuesIsMutable(); u16Values_.setInt(index, value); onChanged(); @@ -3324,7 +3557,6 @@ public final class Columns { * @return This builder for chaining. */ public Builder addU16Values(int value) { - ensureU16ValuesIsMutable(); u16Values_.addInt(value); onChanged(); @@ -3359,7 +3591,7 @@ public final class Columns { if (!((bitField0_ & 0x00000040) != 0)) { u32Values_ = mutableCopy(u32Values_); bitField0_ |= 0x00000040; - } + } } /** * repeated uint32 u32_values = 7; @@ -3393,7 +3625,6 @@ public final class Columns { */ public Builder setU32Values( int index, int value) { - ensureU32ValuesIsMutable(); u32Values_.setInt(index, value); onChanged(); @@ -3405,7 +3636,6 @@ public final class Columns { * @return This builder for chaining. */ public Builder addU32Values(int value) { - ensureU32ValuesIsMutable(); u32Values_.addInt(value); onChanged(); @@ -3440,7 +3670,7 @@ public final class Columns { if (!((bitField0_ & 0x00000080) != 0)) { u64Values_ = mutableCopy(u64Values_); bitField0_ |= 0x00000080; - } + } } /** * repeated uint64 u64_values = 8; @@ -3474,7 +3704,6 @@ public final class Columns { */ public Builder setU64Values( int index, long value) { - ensureU64ValuesIsMutable(); u64Values_.setLong(index, value); onChanged(); @@ -3486,7 +3715,6 @@ public final class Columns { * @return This builder for chaining. */ public Builder addU64Values(long value) { - ensureU64ValuesIsMutable(); u64Values_.addLong(value); onChanged(); @@ -3521,7 +3749,7 @@ public final class Columns { if (!((bitField0_ & 0x00000100) != 0)) { f32Values_ = mutableCopy(f32Values_); bitField0_ |= 0x00000100; - } + } } /** * repeated float f32_values = 9; @@ -3555,7 +3783,6 @@ public final class Columns { */ public Builder setF32Values( int index, float value) { - ensureF32ValuesIsMutable(); f32Values_.setFloat(index, value); onChanged(); @@ -3567,7 +3794,6 @@ public final class Columns { * @return This builder for chaining. */ public Builder addF32Values(float value) { - ensureF32ValuesIsMutable(); f32Values_.addFloat(value); onChanged(); @@ -3602,7 +3828,7 @@ public final class Columns { if (!((bitField0_ & 0x00000200) != 0)) { f64Values_ = mutableCopy(f64Values_); bitField0_ |= 0x00000200; - } + } } /** * repeated double f64_values = 10; @@ -3636,7 +3862,6 @@ public final class Columns { */ public Builder setF64Values( int index, double value) { - ensureF64ValuesIsMutable(); f64Values_.setDouble(index, value); onChanged(); @@ -3648,7 +3873,6 @@ public final class Columns { * @return This builder for chaining. */ public Builder addF64Values(double value) { - ensureF64ValuesIsMutable(); f64Values_.addDouble(value); onChanged(); @@ -3683,7 +3907,7 @@ public final class Columns { if (!((bitField0_ & 0x00000400) != 0)) { boolValues_ = mutableCopy(boolValues_); bitField0_ |= 0x00000400; - } + } } /** * repeated bool bool_values = 11; @@ -3717,7 +3941,6 @@ public final class Columns { */ public Builder setBoolValues( int index, boolean value) { - ensureBoolValuesIsMutable(); boolValues_.setBoolean(index, value); onChanged(); @@ -3729,7 +3952,6 @@ public final class Columns { * @return This builder for chaining. */ public Builder addBoolValues(boolean value) { - ensureBoolValuesIsMutable(); boolValues_.addBoolean(value); onChanged(); @@ -3764,7 +3986,7 @@ public final class Columns { if (!((bitField0_ & 0x00000800) != 0)) { binaryValues_ = new java.util.ArrayList(binaryValues_); bitField0_ |= 0x00000800; - } + } } /** * repeated bytes binary_values = 12; @@ -3798,8 +4020,10 @@ public final class Columns { */ public Builder setBinaryValues( int index, com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - ensureBinaryValuesIsMutable(); + if (value == null) { + throw new NullPointerException(); + } + ensureBinaryValuesIsMutable(); binaryValues_.set(index, value); onChanged(); return this; @@ -3810,8 +4034,10 @@ public final class Columns { * @return This builder for chaining. */ public Builder addBinaryValues(com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - ensureBinaryValuesIsMutable(); + if (value == null) { + throw new NullPointerException(); + } + ensureBinaryValuesIsMutable(); binaryValues_.add(value); onChanged(); return this; @@ -3887,8 +4113,10 @@ public final class Columns { */ public Builder setStringValues( int index, java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureStringValuesIsMutable(); + if (value == null) { + throw new NullPointerException(); + } + ensureStringValuesIsMutable(); stringValues_.set(index, value); onChanged(); return this; @@ -3900,8 +4128,10 @@ public final class Columns { */ public Builder addStringValues( java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureStringValuesIsMutable(); + if (value == null) { + throw new NullPointerException(); + } + ensureStringValuesIsMutable(); stringValues_.add(value); onChanged(); return this; @@ -3936,8 +4166,10 @@ public final class Columns { */ public Builder addStringValuesBytes( com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); ensureStringValuesIsMutable(); stringValues_.add(value); onChanged(); @@ -3949,7 +4181,7 @@ public final class Columns { if (!((bitField0_ & 0x00002000) != 0)) { dateValues_ = mutableCopy(dateValues_); bitField0_ |= 0x00002000; - } + } } /** * repeated int32 date_values = 14; @@ -3983,7 +4215,6 @@ public final class Columns { */ public Builder setDateValues( int index, int value) { - ensureDateValuesIsMutable(); dateValues_.setInt(index, value); onChanged(); @@ -3995,7 +4226,6 @@ public final class Columns { * @return This builder for chaining. */ public Builder addDateValues(int value) { - ensureDateValuesIsMutable(); dateValues_.addInt(value); onChanged(); @@ -4030,7 +4260,7 @@ public final class Columns { if (!((bitField0_ & 0x00004000) != 0)) { datetimeValues_ = mutableCopy(datetimeValues_); bitField0_ |= 0x00004000; - } + } } /** * repeated int64 datetime_values = 15; @@ -4064,7 +4294,6 @@ public final class Columns { */ public Builder setDatetimeValues( int index, long value) { - ensureDatetimeValuesIsMutable(); datetimeValues_.setLong(index, value); onChanged(); @@ -4076,7 +4305,6 @@ public final class Columns { * @return This builder for chaining. */ public Builder addDatetimeValues(long value) { - ensureDatetimeValuesIsMutable(); datetimeValues_.addLong(value); onChanged(); @@ -4111,7 +4339,7 @@ public final class Columns { if (!((bitField0_ & 0x00008000) != 0)) { tsSecondValues_ = mutableCopy(tsSecondValues_); bitField0_ |= 0x00008000; - } + } } /** * repeated int64 ts_second_values = 16; @@ -4145,7 +4373,6 @@ public final class Columns { */ public Builder setTsSecondValues( int index, long value) { - ensureTsSecondValuesIsMutable(); tsSecondValues_.setLong(index, value); onChanged(); @@ -4157,7 +4384,6 @@ public final class Columns { * @return This builder for chaining. */ public Builder addTsSecondValues(long value) { - ensureTsSecondValuesIsMutable(); tsSecondValues_.addLong(value); onChanged(); @@ -4192,7 +4418,7 @@ public final class Columns { if (!((bitField0_ & 0x00010000) != 0)) { tsMillisecondValues_ = mutableCopy(tsMillisecondValues_); bitField0_ |= 0x00010000; - } + } } /** * repeated int64 ts_millisecond_values = 17; @@ -4226,7 +4452,6 @@ public final class Columns { */ public Builder setTsMillisecondValues( int index, long value) { - ensureTsMillisecondValuesIsMutable(); tsMillisecondValues_.setLong(index, value); onChanged(); @@ -4238,7 +4463,6 @@ public final class Columns { * @return This builder for chaining. */ public Builder addTsMillisecondValues(long value) { - ensureTsMillisecondValuesIsMutable(); tsMillisecondValues_.addLong(value); onChanged(); @@ -4273,7 +4497,7 @@ public final class Columns { if (!((bitField0_ & 0x00020000) != 0)) { tsMicrosecondValues_ = mutableCopy(tsMicrosecondValues_); bitField0_ |= 0x00020000; - } + } } /** * repeated int64 ts_microsecond_values = 18; @@ -4307,7 +4531,6 @@ public final class Columns { */ public Builder setTsMicrosecondValues( int index, long value) { - ensureTsMicrosecondValuesIsMutable(); tsMicrosecondValues_.setLong(index, value); onChanged(); @@ -4319,7 +4542,6 @@ public final class Columns { * @return This builder for chaining. */ public Builder addTsMicrosecondValues(long value) { - ensureTsMicrosecondValuesIsMutable(); tsMicrosecondValues_.addLong(value); onChanged(); @@ -4354,7 +4576,7 @@ public final class Columns { if (!((bitField0_ & 0x00040000) != 0)) { tsNanosecondValues_ = mutableCopy(tsNanosecondValues_); bitField0_ |= 0x00040000; - } + } } /** * repeated int64 ts_nanosecond_values = 19; @@ -4388,7 +4610,6 @@ public final class Columns { */ public Builder setTsNanosecondValues( int index, long value) { - ensureTsNanosecondValuesIsMutable(); tsNanosecondValues_.setLong(index, value); onChanged(); @@ -4400,7 +4621,6 @@ public final class Columns { * @return This builder for chaining. */ public Builder addTsNanosecondValues(long value) { - ensureTsNanosecondValuesIsMutable(); tsNanosecondValues_.addLong(value); onChanged(); @@ -4462,18 +4682,7 @@ public final class Columns { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); + return new Values(input, extensionRegistry); } }; @@ -4494,8 +4703,7 @@ public final class Columns { } public static final int COLUMN_NAME_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object columnName_ = ""; + private volatile java.lang.Object columnName_; /** * string column_name = 1; * @return The columnName. @@ -4533,7 +4741,7 @@ public final class Columns { } public static final int SEMANTIC_TYPE_FIELD_NUMBER = 2; - private int semanticType_ = 0; + private int semanticType_; /** * .greptime.v1.Column.SemanticType semantic_type = 2; * @return The enum numeric value on the wire for semanticType. @@ -4546,7 +4754,8 @@ public final class Columns { * @return The semanticType. */ @java.lang.Override public io.greptime.v1.Columns.Column.SemanticType getSemanticType() { - io.greptime.v1.Columns.Column.SemanticType result = io.greptime.v1.Columns.Column.SemanticType.forNumber(semanticType_); + @SuppressWarnings("deprecation") + io.greptime.v1.Columns.Column.SemanticType result = io.greptime.v1.Columns.Column.SemanticType.valueOf(semanticType_); return result == null ? io.greptime.v1.Columns.Column.SemanticType.UNRECOGNIZED : result; } @@ -4555,7 +4764,8 @@ public final class Columns { /** *
      * The array of non-null values in this column.
-     * For example: suppose there is a column "foo" that contains some int32 values (1, 2, 3, 4, 5, null, 7, 8, 9, null);
+     * For example: suppose there is a column "foo" that contains some int32
+     * values (1, 2, 3, 4, 5, null, 7, 8, 9, null);
      *   column:
      *     column_name: foo
      *     semantic_type: Tag
@@ -4573,7 +4783,8 @@ public final class Columns {
     /**
      * 
      * The array of non-null values in this column.
-     * For example: suppose there is a column "foo" that contains some int32 values (1, 2, 3, 4, 5, null, 7, 8, 9, null);
+     * For example: suppose there is a column "foo" that contains some int32
+     * values (1, 2, 3, 4, 5, null, 7, 8, 9, null);
      *   column:
      *     column_name: foo
      *     semantic_type: Tag
@@ -4591,7 +4802,8 @@ public final class Columns {
     /**
      * 
      * The array of non-null values in this column.
-     * For example: suppose there is a column "foo" that contains some int32 values (1, 2, 3, 4, 5, null, 7, 8, 9, null);
+     * For example: suppose there is a column "foo" that contains some int32
+     * values (1, 2, 3, 4, 5, null, 7, 8, 9, null);
      *   column:
      *     column_name: foo
      *     semantic_type: Tag
@@ -4603,15 +4815,16 @@ public final class Columns {
      */
     @java.lang.Override
     public io.greptime.v1.Columns.Column.ValuesOrBuilder getValuesOrBuilder() {
-      return values_ == null ? io.greptime.v1.Columns.Column.Values.getDefaultInstance() : values_;
+      return getValues();
     }
 
     public static final int NULL_MASK_FIELD_NUMBER = 4;
-    private com.google.protobuf.ByteString nullMask_ = com.google.protobuf.ByteString.EMPTY;
+    private com.google.protobuf.ByteString nullMask_;
     /**
      * 
      * Mask maps the positions of null values.
-     * If a bit in null_mask is 1, it indicates that the column value at that position is null.
+     * If a bit in null_mask is 1, it indicates that the column value at that
+     * position is null.
      * 
* * bytes null_mask = 4; @@ -4623,7 +4836,7 @@ public final class Columns { } public static final int DATATYPE_FIELD_NUMBER = 5; - private int datatype_ = 0; + private int datatype_; /** *
      * Helpful in creating vector from column.
@@ -4644,7 +4857,8 @@ public final class Columns {
      * @return The datatype.
      */
     @java.lang.Override public io.greptime.v1.Columns.ColumnDataType getDatatype() {
-      io.greptime.v1.Columns.ColumnDataType result = io.greptime.v1.Columns.ColumnDataType.forNumber(datatype_);
+      @SuppressWarnings("deprecation")
+      io.greptime.v1.Columns.ColumnDataType result = io.greptime.v1.Columns.ColumnDataType.valueOf(datatype_);
       return result == null ? io.greptime.v1.Columns.ColumnDataType.UNRECOGNIZED : result;
     }
 
@@ -4662,7 +4876,7 @@ public final class Columns {
     @java.lang.Override
     public void writeTo(com.google.protobuf.CodedOutputStream output)
                         throws java.io.IOException {
-      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(columnName_)) {
+      if (!getColumnNameBytes().isEmpty()) {
         com.google.protobuf.GeneratedMessageV3.writeString(output, 1, columnName_);
       }
       if (semanticType_ != io.greptime.v1.Columns.Column.SemanticType.TAG.getNumber()) {
@@ -4677,7 +4891,7 @@ public final class Columns {
       if (datatype_ != io.greptime.v1.Columns.ColumnDataType.BOOLEAN.getNumber()) {
         output.writeEnum(5, datatype_);
       }
-      getUnknownFields().writeTo(output);
+      unknownFields.writeTo(output);
     }
 
     @java.lang.Override
@@ -4686,7 +4900,7 @@ public final class Columns {
       if (size != -1) return size;
 
       size = 0;
-      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(columnName_)) {
+      if (!getColumnNameBytes().isEmpty()) {
         size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, columnName_);
       }
       if (semanticType_ != io.greptime.v1.Columns.Column.SemanticType.TAG.getNumber()) {
@@ -4705,7 +4919,7 @@ public final class Columns {
         size += com.google.protobuf.CodedOutputStream
           .computeEnumSize(5, datatype_);
       }
-      size += getUnknownFields().getSerializedSize();
+      size += unknownFields.getSerializedSize();
       memoizedSize = size;
       return size;
     }
@@ -4731,7 +4945,7 @@ public final class Columns {
       if (!getNullMask()
           .equals(other.getNullMask())) return false;
       if (datatype_ != other.datatype_) return false;
-      if (!getUnknownFields().equals(other.getUnknownFields())) return false;
+      if (!unknownFields.equals(other.unknownFields)) return false;
       return true;
     }
 
@@ -4754,7 +4968,7 @@ public final class Columns {
       hash = (53 * hash) + getNullMask().hashCode();
       hash = (37 * hash) + DATATYPE_FIELD_NUMBER;
       hash = (53 * hash) + datatype_;
-      hash = (29 * hash) + getUnknownFields().hashCode();
+      hash = (29 * hash) + unknownFields.hashCode();
       memoizedHashCode = hash;
       return hash;
     }
@@ -4871,27 +5085,36 @@ public final class Columns {
 
       // Construct using io.greptime.v1.Columns.Column.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();
-        bitField0_ = 0;
         columnName_ = "";
+
         semanticType_ = 0;
-        values_ = null;
-        if (valuesBuilder_ != null) {
-          valuesBuilder_.dispose();
+
+        if (valuesBuilder_ == null) {
+          values_ = null;
+        } else {
+          values_ = null;
           valuesBuilder_ = null;
         }
         nullMask_ = com.google.protobuf.ByteString.EMPTY;
+
         datatype_ = 0;
+
         return this;
       }
 
@@ -4918,32 +5141,19 @@ public final class Columns {
       @java.lang.Override
       public io.greptime.v1.Columns.Column buildPartial() {
         io.greptime.v1.Columns.Column result = new io.greptime.v1.Columns.Column(this);
-        if (bitField0_ != 0) { buildPartial0(result); }
+        result.columnName_ = columnName_;
+        result.semanticType_ = semanticType_;
+        if (valuesBuilder_ == null) {
+          result.values_ = values_;
+        } else {
+          result.values_ = valuesBuilder_.build();
+        }
+        result.nullMask_ = nullMask_;
+        result.datatype_ = datatype_;
         onBuilt();
         return result;
       }
 
-      private void buildPartial0(io.greptime.v1.Columns.Column result) {
-        int from_bitField0_ = bitField0_;
-        if (((from_bitField0_ & 0x00000001) != 0)) {
-          result.columnName_ = columnName_;
-        }
-        if (((from_bitField0_ & 0x00000002) != 0)) {
-          result.semanticType_ = semanticType_;
-        }
-        if (((from_bitField0_ & 0x00000004) != 0)) {
-          result.values_ = valuesBuilder_ == null
-              ? values_
-              : valuesBuilder_.build();
-        }
-        if (((from_bitField0_ & 0x00000008) != 0)) {
-          result.nullMask_ = nullMask_;
-        }
-        if (((from_bitField0_ & 0x00000010) != 0)) {
-          result.datatype_ = datatype_;
-        }
-      }
-
       @java.lang.Override
       public Builder clone() {
         return super.clone();
@@ -4990,7 +5200,6 @@ public final class Columns {
         if (other == io.greptime.v1.Columns.Column.getDefaultInstance()) return this;
         if (!other.getColumnName().isEmpty()) {
           columnName_ = other.columnName_;
-          bitField0_ |= 0x00000001;
           onChanged();
         }
         if (other.semanticType_ != 0) {
@@ -5005,7 +5214,7 @@ public final class Columns {
         if (other.datatype_ != 0) {
           setDatatypeValue(other.getDatatypeValue());
         }
-        this.mergeUnknownFields(other.getUnknownFields());
+        this.mergeUnknownFields(other.unknownFields);
         onChanged();
         return this;
       }
@@ -5020,60 +5229,19 @@ public final class Columns {
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
-        if (extensionRegistry == null) {
-          throw new java.lang.NullPointerException();
-        }
+        io.greptime.v1.Columns.Column parsedMessage = null;
         try {
-          boolean done = false;
-          while (!done) {
-            int tag = input.readTag();
-            switch (tag) {
-              case 0:
-                done = true;
-                break;
-              case 10: {
-                columnName_ = input.readStringRequireUtf8();
-                bitField0_ |= 0x00000001;
-                break;
-              } // case 10
-              case 16: {
-                semanticType_ = input.readEnum();
-                bitField0_ |= 0x00000002;
-                break;
-              } // case 16
-              case 26: {
-                input.readMessage(
-                    getValuesFieldBuilder().getBuilder(),
-                    extensionRegistry);
-                bitField0_ |= 0x00000004;
-                break;
-              } // case 26
-              case 34: {
-                nullMask_ = input.readBytes();
-                bitField0_ |= 0x00000008;
-                break;
-              } // case 34
-              case 40: {
-                datatype_ = input.readEnum();
-                bitField0_ |= 0x00000010;
-                break;
-              } // case 40
-              default: {
-                if (!super.parseUnknownField(input, extensionRegistry, tag)) {
-                  done = true; // was an endgroup tag
-                }
-                break;
-              } // default:
-            } // switch (tag)
-          } // while (!done)
+          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
         } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+          parsedMessage = (io.greptime.v1.Columns.Column) e.getUnfinishedMessage();
           throw e.unwrapIOException();
         } finally {
-          onChanged();
-        } // finally
+          if (parsedMessage != null) {
+            mergeFrom(parsedMessage);
+          }
+        }
         return this;
       }
-      private int bitField0_;
 
       private java.lang.Object columnName_ = "";
       /**
@@ -5116,9 +5284,11 @@ public final class Columns {
        */
       public Builder setColumnName(
           java.lang.String value) {
-        if (value == null) { throw new NullPointerException(); }
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  
         columnName_ = value;
-        bitField0_ |= 0x00000001;
         onChanged();
         return this;
       }
@@ -5127,8 +5297,8 @@ public final class Columns {
        * @return This builder for chaining.
        */
       public Builder clearColumnName() {
+        
         columnName_ = getDefaultInstance().getColumnName();
-        bitField0_ = (bitField0_ & ~0x00000001);
         onChanged();
         return this;
       }
@@ -5139,10 +5309,12 @@ public final class Columns {
        */
       public Builder setColumnNameBytes(
           com.google.protobuf.ByteString value) {
-        if (value == null) { throw new NullPointerException(); }
-        checkByteStringIsUtf8(value);
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  checkByteStringIsUtf8(value);
+        
         columnName_ = value;
-        bitField0_ |= 0x00000001;
         onChanged();
         return this;
       }
@@ -5161,8 +5333,8 @@ public final class Columns {
        * @return This builder for chaining.
        */
       public Builder setSemanticTypeValue(int value) {
+        
         semanticType_ = value;
-        bitField0_ |= 0x00000002;
         onChanged();
         return this;
       }
@@ -5172,7 +5344,8 @@ public final class Columns {
        */
       @java.lang.Override
       public io.greptime.v1.Columns.Column.SemanticType getSemanticType() {
-        io.greptime.v1.Columns.Column.SemanticType result = io.greptime.v1.Columns.Column.SemanticType.forNumber(semanticType_);
+        @SuppressWarnings("deprecation")
+        io.greptime.v1.Columns.Column.SemanticType result = io.greptime.v1.Columns.Column.SemanticType.valueOf(semanticType_);
         return result == null ? io.greptime.v1.Columns.Column.SemanticType.UNRECOGNIZED : result;
       }
       /**
@@ -5184,7 +5357,7 @@ public final class Columns {
         if (value == null) {
           throw new NullPointerException();
         }
-        bitField0_ |= 0x00000002;
+        
         semanticType_ = value.getNumber();
         onChanged();
         return this;
@@ -5194,7 +5367,7 @@ public final class Columns {
        * @return This builder for chaining.
        */
       public Builder clearSemanticType() {
-        bitField0_ = (bitField0_ & ~0x00000002);
+        
         semanticType_ = 0;
         onChanged();
         return this;
@@ -5206,7 +5379,8 @@ public final class Columns {
       /**
        * 
        * The array of non-null values in this column.
-       * For example: suppose there is a column "foo" that contains some int32 values (1, 2, 3, 4, 5, null, 7, 8, 9, null);
+       * For example: suppose there is a column "foo" that contains some int32
+       * values (1, 2, 3, 4, 5, null, 7, 8, 9, null);
        *   column:
        *     column_name: foo
        *     semantic_type: Tag
@@ -5218,12 +5392,13 @@ public final class Columns {
        * @return Whether the values field is set.
        */
       public boolean hasValues() {
-        return ((bitField0_ & 0x00000004) != 0);
+        return valuesBuilder_ != null || values_ != null;
       }
       /**
        * 
        * The array of non-null values in this column.
-       * For example: suppose there is a column "foo" that contains some int32 values (1, 2, 3, 4, 5, null, 7, 8, 9, null);
+       * For example: suppose there is a column "foo" that contains some int32
+       * values (1, 2, 3, 4, 5, null, 7, 8, 9, null);
        *   column:
        *     column_name: foo
        *     semantic_type: Tag
@@ -5244,7 +5419,8 @@ public final class Columns {
       /**
        * 
        * The array of non-null values in this column.
-       * For example: suppose there is a column "foo" that contains some int32 values (1, 2, 3, 4, 5, null, 7, 8, 9, null);
+       * For example: suppose there is a column "foo" that contains some int32
+       * values (1, 2, 3, 4, 5, null, 7, 8, 9, null);
        *   column:
        *     column_name: foo
        *     semantic_type: Tag
@@ -5260,17 +5436,18 @@ public final class Columns {
             throw new NullPointerException();
           }
           values_ = value;
+          onChanged();
         } else {
           valuesBuilder_.setMessage(value);
         }
-        bitField0_ |= 0x00000004;
-        onChanged();
+
         return this;
       }
       /**
        * 
        * The array of non-null values in this column.
-       * For example: suppose there is a column "foo" that contains some int32 values (1, 2, 3, 4, 5, null, 7, 8, 9, null);
+       * For example: suppose there is a column "foo" that contains some int32
+       * values (1, 2, 3, 4, 5, null, 7, 8, 9, null);
        *   column:
        *     column_name: foo
        *     semantic_type: Tag
@@ -5284,17 +5461,18 @@ public final class Columns {
           io.greptime.v1.Columns.Column.Values.Builder builderForValue) {
         if (valuesBuilder_ == null) {
           values_ = builderForValue.build();
+          onChanged();
         } else {
           valuesBuilder_.setMessage(builderForValue.build());
         }
-        bitField0_ |= 0x00000004;
-        onChanged();
+
         return this;
       }
       /**
        * 
        * The array of non-null values in this column.
-       * For example: suppose there is a column "foo" that contains some int32 values (1, 2, 3, 4, 5, null, 7, 8, 9, null);
+       * For example: suppose there is a column "foo" that contains some int32
+       * values (1, 2, 3, 4, 5, null, 7, 8, 9, null);
        *   column:
        *     column_name: foo
        *     semantic_type: Tag
@@ -5306,24 +5484,24 @@ public final class Columns {
        */
       public Builder mergeValues(io.greptime.v1.Columns.Column.Values value) {
         if (valuesBuilder_ == null) {
-          if (((bitField0_ & 0x00000004) != 0) &&
-            values_ != null &&
-            values_ != io.greptime.v1.Columns.Column.Values.getDefaultInstance()) {
-            getValuesBuilder().mergeFrom(value);
+          if (values_ != null) {
+            values_ =
+              io.greptime.v1.Columns.Column.Values.newBuilder(values_).mergeFrom(value).buildPartial();
           } else {
             values_ = value;
           }
+          onChanged();
         } else {
           valuesBuilder_.mergeFrom(value);
         }
-        bitField0_ |= 0x00000004;
-        onChanged();
+
         return this;
       }
       /**
        * 
        * The array of non-null values in this column.
-       * For example: suppose there is a column "foo" that contains some int32 values (1, 2, 3, 4, 5, null, 7, 8, 9, null);
+       * For example: suppose there is a column "foo" that contains some int32
+       * values (1, 2, 3, 4, 5, null, 7, 8, 9, null);
        *   column:
        *     column_name: foo
        *     semantic_type: Tag
@@ -5334,19 +5512,21 @@ public final class Columns {
        * .greptime.v1.Column.Values values = 3;
        */
       public Builder clearValues() {
-        bitField0_ = (bitField0_ & ~0x00000004);
-        values_ = null;
-        if (valuesBuilder_ != null) {
-          valuesBuilder_.dispose();
+        if (valuesBuilder_ == null) {
+          values_ = null;
+          onChanged();
+        } else {
+          values_ = null;
           valuesBuilder_ = null;
         }
-        onChanged();
+
         return this;
       }
       /**
        * 
        * The array of non-null values in this column.
-       * For example: suppose there is a column "foo" that contains some int32 values (1, 2, 3, 4, 5, null, 7, 8, 9, null);
+       * For example: suppose there is a column "foo" that contains some int32
+       * values (1, 2, 3, 4, 5, null, 7, 8, 9, null);
        *   column:
        *     column_name: foo
        *     semantic_type: Tag
@@ -5357,14 +5537,15 @@ public final class Columns {
        * .greptime.v1.Column.Values values = 3;
        */
       public io.greptime.v1.Columns.Column.Values.Builder getValuesBuilder() {
-        bitField0_ |= 0x00000004;
+        
         onChanged();
         return getValuesFieldBuilder().getBuilder();
       }
       /**
        * 
        * The array of non-null values in this column.
-       * For example: suppose there is a column "foo" that contains some int32 values (1, 2, 3, 4, 5, null, 7, 8, 9, null);
+       * For example: suppose there is a column "foo" that contains some int32
+       * values (1, 2, 3, 4, 5, null, 7, 8, 9, null);
        *   column:
        *     column_name: foo
        *     semantic_type: Tag
@@ -5385,7 +5566,8 @@ public final class Columns {
       /**
        * 
        * The array of non-null values in this column.
-       * For example: suppose there is a column "foo" that contains some int32 values (1, 2, 3, 4, 5, null, 7, 8, 9, null);
+       * For example: suppose there is a column "foo" that contains some int32
+       * values (1, 2, 3, 4, 5, null, 7, 8, 9, null);
        *   column:
        *     column_name: foo
        *     semantic_type: Tag
@@ -5413,7 +5595,8 @@ public final class Columns {
       /**
        * 
        * Mask maps the positions of null values.
-       * If a bit in null_mask is 1, it indicates that the column value at that position is null.
+       * If a bit in null_mask is 1, it indicates that the column value at that
+       * position is null.
        * 
* * bytes null_mask = 4; @@ -5426,7 +5609,8 @@ public final class Columns { /** *
        * Mask maps the positions of null values.
-       * If a bit in null_mask is 1, it indicates that the column value at that position is null.
+       * If a bit in null_mask is 1, it indicates that the column value at that
+       * position is null.
        * 
* * bytes null_mask = 4; @@ -5434,23 +5618,26 @@ public final class Columns { * @return This builder for chaining. */ public Builder setNullMask(com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } + if (value == null) { + throw new NullPointerException(); + } + nullMask_ = value; - bitField0_ |= 0x00000008; onChanged(); return this; } /** *
        * Mask maps the positions of null values.
-       * If a bit in null_mask is 1, it indicates that the column value at that position is null.
+       * If a bit in null_mask is 1, it indicates that the column value at that
+       * position is null.
        * 
* * bytes null_mask = 4; * @return This builder for chaining. */ public Builder clearNullMask() { - bitField0_ = (bitField0_ & ~0x00000008); + nullMask_ = getDefaultInstance().getNullMask(); onChanged(); return this; @@ -5478,8 +5665,8 @@ public final class Columns { * @return This builder for chaining. */ public Builder setDatatypeValue(int value) { + datatype_ = value; - bitField0_ |= 0x00000010; onChanged(); return this; } @@ -5493,7 +5680,8 @@ public final class Columns { */ @java.lang.Override public io.greptime.v1.Columns.ColumnDataType getDatatype() { - io.greptime.v1.Columns.ColumnDataType result = io.greptime.v1.Columns.ColumnDataType.forNumber(datatype_); + @SuppressWarnings("deprecation") + io.greptime.v1.Columns.ColumnDataType result = io.greptime.v1.Columns.ColumnDataType.valueOf(datatype_); return result == null ? io.greptime.v1.Columns.ColumnDataType.UNRECOGNIZED : result; } /** @@ -5509,7 +5697,7 @@ public final class Columns { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000010; + datatype_ = value.getNumber(); onChanged(); return this; @@ -5523,7 +5711,7 @@ public final class Columns { * @return This builder for chaining. */ public Builder clearDatatype() { - bitField0_ = (bitField0_ & ~0x00000010); + datatype_ = 0; onChanged(); return this; @@ -5561,18 +5749,7 @@ public final class Columns { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); + return new Column(input, extensionRegistry); } }; @@ -5661,6 +5838,65 @@ public final class Columns { getUnknownFields() { return this.unknownFields; } + private ColumnDef( + 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: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 16: { + int rawValue = input.readEnum(); + + datatype_ = rawValue; + break; + } + case 24: { + + isNullable_ = input.readBool(); + break; + } + case 34: { + + defaultConstraint_ = input.readBytes(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.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 io.greptime.v1.Columns.internal_static_greptime_v1_ColumnDef_descriptor; @@ -5675,8 +5911,7 @@ public final class Columns { } public static final int NAME_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; + private volatile java.lang.Object name_; /** * string name = 1; * @return The name. @@ -5714,7 +5949,7 @@ public final class Columns { } public static final int DATATYPE_FIELD_NUMBER = 2; - private int datatype_ = 0; + private int datatype_; /** * .greptime.v1.ColumnDataType datatype = 2; * @return The enum numeric value on the wire for datatype. @@ -5727,12 +5962,13 @@ public final class Columns { * @return The datatype. */ @java.lang.Override public io.greptime.v1.Columns.ColumnDataType getDatatype() { - io.greptime.v1.Columns.ColumnDataType result = io.greptime.v1.Columns.ColumnDataType.forNumber(datatype_); + @SuppressWarnings("deprecation") + io.greptime.v1.Columns.ColumnDataType result = io.greptime.v1.Columns.ColumnDataType.valueOf(datatype_); return result == null ? io.greptime.v1.Columns.ColumnDataType.UNRECOGNIZED : result; } public static final int IS_NULLABLE_FIELD_NUMBER = 3; - private boolean isNullable_ = false; + private boolean isNullable_; /** * bool is_nullable = 3; * @return The isNullable. @@ -5743,7 +5979,7 @@ public final class Columns { } public static final int DEFAULT_CONSTRAINT_FIELD_NUMBER = 4; - private com.google.protobuf.ByteString defaultConstraint_ = com.google.protobuf.ByteString.EMPTY; + private com.google.protobuf.ByteString defaultConstraint_; /** * bytes default_constraint = 4; * @return The defaultConstraint. @@ -5767,7 +6003,7 @@ public final class Columns { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + if (!getNameBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } if (datatype_ != io.greptime.v1.Columns.ColumnDataType.BOOLEAN.getNumber()) { @@ -5779,7 +6015,7 @@ public final class Columns { if (!defaultConstraint_.isEmpty()) { output.writeBytes(4, defaultConstraint_); } - getUnknownFields().writeTo(output); + unknownFields.writeTo(output); } @java.lang.Override @@ -5788,7 +6024,7 @@ public final class Columns { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + if (!getNameBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } if (datatype_ != io.greptime.v1.Columns.ColumnDataType.BOOLEAN.getNumber()) { @@ -5803,7 +6039,7 @@ public final class Columns { size += com.google.protobuf.CodedOutputStream .computeBytesSize(4, defaultConstraint_); } - size += getUnknownFields().getSerializedSize(); + size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @@ -5825,7 +6061,7 @@ public final class Columns { != other.getIsNullable()) return false; if (!getDefaultConstraint() .equals(other.getDefaultConstraint())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -5845,7 +6081,7 @@ public final class Columns { getIsNullable()); hash = (37 * hash) + DEFAULT_CONSTRAINT_FIELD_NUMBER; hash = (53 * hash) + getDefaultConstraint().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } @@ -5962,22 +6198,30 @@ public final class Columns { // Construct using io.greptime.v1.Columns.ColumnDef.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(); - bitField0_ = 0; name_ = ""; + datatype_ = 0; + isNullable_ = false; + defaultConstraint_ = com.google.protobuf.ByteString.EMPTY; + return this; } @@ -6004,27 +6248,14 @@ public final class Columns { @java.lang.Override public io.greptime.v1.Columns.ColumnDef buildPartial() { io.greptime.v1.Columns.ColumnDef result = new io.greptime.v1.Columns.ColumnDef(this); - if (bitField0_ != 0) { buildPartial0(result); } + result.name_ = name_; + result.datatype_ = datatype_; + result.isNullable_ = isNullable_; + result.defaultConstraint_ = defaultConstraint_; onBuilt(); return result; } - private void buildPartial0(io.greptime.v1.Columns.ColumnDef result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.name_ = name_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.datatype_ = datatype_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.isNullable_ = isNullable_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.defaultConstraint_ = defaultConstraint_; - } - } - @java.lang.Override public Builder clone() { return super.clone(); @@ -6071,7 +6302,6 @@ public final class Columns { if (other == io.greptime.v1.Columns.ColumnDef.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; - bitField0_ |= 0x00000001; onChanged(); } if (other.datatype_ != 0) { @@ -6083,7 +6313,7 @@ public final class Columns { if (other.getDefaultConstraint() != com.google.protobuf.ByteString.EMPTY) { setDefaultConstraint(other.getDefaultConstraint()); } - this.mergeUnknownFields(other.getUnknownFields()); + this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @@ -6098,53 +6328,19 @@ public final class Columns { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } + io.greptime.v1.Columns.ColumnDef parsedMessage = null; try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 16: { - datatype_ = input.readEnum(); - bitField0_ |= 0x00000002; - break; - } // case 16 - case 24: { - isNullable_ = input.readBool(); - bitField0_ |= 0x00000004; - break; - } // case 24 - case 34: { - defaultConstraint_ = input.readBytes(); - bitField0_ |= 0x00000008; - break; - } // case 34 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (io.greptime.v1.Columns.ColumnDef) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - onChanged(); - } // finally + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } return this; } - private int bitField0_; private java.lang.Object name_ = ""; /** @@ -6187,9 +6383,11 @@ public final class Columns { */ public Builder setName( java.lang.String value) { - if (value == null) { throw new NullPointerException(); } + if (value == null) { + throw new NullPointerException(); + } + name_ = value; - bitField0_ |= 0x00000001; onChanged(); return this; } @@ -6198,8 +6396,8 @@ public final class Columns { * @return This builder for chaining. */ public Builder clearName() { + name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } @@ -6210,10 +6408,12 @@ public final class Columns { */ public Builder setNameBytes( com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; - bitField0_ |= 0x00000001; onChanged(); return this; } @@ -6232,8 +6432,8 @@ public final class Columns { * @return This builder for chaining. */ public Builder setDatatypeValue(int value) { + datatype_ = value; - bitField0_ |= 0x00000002; onChanged(); return this; } @@ -6243,7 +6443,8 @@ public final class Columns { */ @java.lang.Override public io.greptime.v1.Columns.ColumnDataType getDatatype() { - io.greptime.v1.Columns.ColumnDataType result = io.greptime.v1.Columns.ColumnDataType.forNumber(datatype_); + @SuppressWarnings("deprecation") + io.greptime.v1.Columns.ColumnDataType result = io.greptime.v1.Columns.ColumnDataType.valueOf(datatype_); return result == null ? io.greptime.v1.Columns.ColumnDataType.UNRECOGNIZED : result; } /** @@ -6255,7 +6456,7 @@ public final class Columns { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000002; + datatype_ = value.getNumber(); onChanged(); return this; @@ -6265,7 +6466,7 @@ public final class Columns { * @return This builder for chaining. */ public Builder clearDatatype() { - bitField0_ = (bitField0_ & ~0x00000002); + datatype_ = 0; onChanged(); return this; @@ -6288,7 +6489,6 @@ public final class Columns { public Builder setIsNullable(boolean value) { isNullable_ = value; - bitField0_ |= 0x00000004; onChanged(); return this; } @@ -6297,7 +6497,7 @@ public final class Columns { * @return This builder for chaining. */ public Builder clearIsNullable() { - bitField0_ = (bitField0_ & ~0x00000004); + isNullable_ = false; onChanged(); return this; @@ -6318,9 +6518,11 @@ public final class Columns { * @return This builder for chaining. */ public Builder setDefaultConstraint(com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } + if (value == null) { + throw new NullPointerException(); + } + defaultConstraint_ = value; - bitField0_ |= 0x00000008; onChanged(); return this; } @@ -6329,7 +6531,7 @@ public final class Columns { * @return This builder for chaining. */ public Builder clearDefaultConstraint() { - bitField0_ = (bitField0_ & ~0x00000008); + defaultConstraint_ = getDefaultInstance().getDefaultConstraint(); onChanged(); return this; @@ -6367,18 +6569,7 @@ public final class Columns { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); + return new ColumnDef(input, extensionRegistry); } }; diff --git a/java/src/main/java/io/greptime/v1/Database.java b/java/src/main/java/io/greptime/v1/Database.java index 074ae90..99cd13f 100644 --- a/java/src/main/java/io/greptime/v1/Database.java +++ b/java/src/main/java/io/greptime/v1/Database.java @@ -122,6 +122,112 @@ public final class Database { getUnknownFields() { return this.unknownFields; } + private GreptimeRequest( + 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.Common.RequestHeader.Builder subBuilder = null; + if (header_ != null) { + subBuilder = header_.toBuilder(); + } + header_ = input.readMessage(io.greptime.v1.Common.RequestHeader.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(header_); + header_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + io.greptime.v1.Database.InsertRequest.Builder subBuilder = null; + if (requestCase_ == 2) { + subBuilder = ((io.greptime.v1.Database.InsertRequest) request_).toBuilder(); + } + request_ = + input.readMessage(io.greptime.v1.Database.InsertRequest.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((io.greptime.v1.Database.InsertRequest) request_); + request_ = subBuilder.buildPartial(); + } + requestCase_ = 2; + break; + } + case 26: { + io.greptime.v1.Database.QueryRequest.Builder subBuilder = null; + if (requestCase_ == 3) { + subBuilder = ((io.greptime.v1.Database.QueryRequest) request_).toBuilder(); + } + request_ = + input.readMessage(io.greptime.v1.Database.QueryRequest.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((io.greptime.v1.Database.QueryRequest) request_); + request_ = subBuilder.buildPartial(); + } + requestCase_ = 3; + break; + } + case 34: { + io.greptime.v1.Ddl.DdlRequest.Builder subBuilder = null; + if (requestCase_ == 4) { + subBuilder = ((io.greptime.v1.Ddl.DdlRequest) request_).toBuilder(); + } + request_ = + input.readMessage(io.greptime.v1.Ddl.DdlRequest.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((io.greptime.v1.Ddl.DdlRequest) request_); + request_ = subBuilder.buildPartial(); + } + requestCase_ = 4; + break; + } + case 42: { + io.greptime.v1.Database.DeleteRequest.Builder subBuilder = null; + if (requestCase_ == 5) { + subBuilder = ((io.greptime.v1.Database.DeleteRequest) request_).toBuilder(); + } + request_ = + input.readMessage(io.greptime.v1.Database.DeleteRequest.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((io.greptime.v1.Database.DeleteRequest) request_); + request_ = subBuilder.buildPartial(); + } + requestCase_ = 5; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.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 io.greptime.v1.Database.internal_static_greptime_v1_GreptimeRequest_descriptor; @@ -203,7 +309,7 @@ public final class Database { */ @java.lang.Override public io.greptime.v1.Common.RequestHeaderOrBuilder getHeaderOrBuilder() { - return header_ == null ? io.greptime.v1.Common.RequestHeader.getDefaultInstance() : header_; + return getHeader(); } public static final int INSERT_FIELD_NUMBER = 2; @@ -359,7 +465,7 @@ public final class Database { if (requestCase_ == 5) { output.writeMessage(5, (io.greptime.v1.Database.DeleteRequest) request_); } - getUnknownFields().writeTo(output); + unknownFields.writeTo(output); } @java.lang.Override @@ -388,7 +494,7 @@ public final class Database { size += com.google.protobuf.CodedOutputStream .computeMessageSize(5, (io.greptime.v1.Database.DeleteRequest) request_); } - size += getUnknownFields().getSerializedSize(); + size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @@ -429,7 +535,7 @@ public final class Database { case 0: default: } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -464,7 +570,7 @@ public final class Database { case 0: default: } - hash = (29 * hash) + getUnknownFields().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } @@ -581,35 +687,28 @@ public final class Database { // Construct using io.greptime.v1.Database.GreptimeRequest.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(); - bitField0_ = 0; - header_ = null; - if (headerBuilder_ != null) { - headerBuilder_.dispose(); + if (headerBuilder_ == null) { + header_ = null; + } else { + header_ = null; headerBuilder_ = null; } - if (insertBuilder_ != null) { - insertBuilder_.clear(); - } - if (queryBuilder_ != null) { - queryBuilder_.clear(); - } - if (ddlBuilder_ != null) { - ddlBuilder_.clear(); - } - if (deleteBuilder_ != null) { - deleteBuilder_.clear(); - } requestCase_ = 0; request_ = null; return this; @@ -638,42 +737,44 @@ public final class Database { @java.lang.Override public io.greptime.v1.Database.GreptimeRequest buildPartial() { io.greptime.v1.Database.GreptimeRequest result = new io.greptime.v1.Database.GreptimeRequest(this); - if (bitField0_ != 0) { buildPartial0(result); } - buildPartialOneofs(result); + if (headerBuilder_ == null) { + result.header_ = header_; + } else { + result.header_ = headerBuilder_.build(); + } + if (requestCase_ == 2) { + if (insertBuilder_ == null) { + result.request_ = request_; + } else { + result.request_ = insertBuilder_.build(); + } + } + if (requestCase_ == 3) { + if (queryBuilder_ == null) { + result.request_ = request_; + } else { + result.request_ = queryBuilder_.build(); + } + } + if (requestCase_ == 4) { + if (ddlBuilder_ == null) { + result.request_ = request_; + } else { + result.request_ = ddlBuilder_.build(); + } + } + if (requestCase_ == 5) { + if (deleteBuilder_ == null) { + result.request_ = request_; + } else { + result.request_ = deleteBuilder_.build(); + } + } + result.requestCase_ = requestCase_; onBuilt(); return result; } - private void buildPartial0(io.greptime.v1.Database.GreptimeRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.header_ = headerBuilder_ == null - ? header_ - : headerBuilder_.build(); - } - } - - private void buildPartialOneofs(io.greptime.v1.Database.GreptimeRequest result) { - result.requestCase_ = requestCase_; - result.request_ = this.request_; - if (requestCase_ == 2 && - insertBuilder_ != null) { - result.request_ = insertBuilder_.build(); - } - if (requestCase_ == 3 && - queryBuilder_ != null) { - result.request_ = queryBuilder_.build(); - } - if (requestCase_ == 4 && - ddlBuilder_ != null) { - result.request_ = ddlBuilder_.build(); - } - if (requestCase_ == 5 && - deleteBuilder_ != null) { - result.request_ = deleteBuilder_.build(); - } - } - @java.lang.Override public Builder clone() { return super.clone(); @@ -742,7 +843,7 @@ public final class Database { break; } } - this.mergeUnknownFields(other.getUnknownFields()); + this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @@ -757,65 +858,17 @@ public final class Database { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } + io.greptime.v1.Database.GreptimeRequest parsedMessage = null; try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - input.readMessage( - getHeaderFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - input.readMessage( - getInsertFieldBuilder().getBuilder(), - extensionRegistry); - requestCase_ = 2; - break; - } // case 18 - case 26: { - input.readMessage( - getQueryFieldBuilder().getBuilder(), - extensionRegistry); - requestCase_ = 3; - break; - } // case 26 - case 34: { - input.readMessage( - getDdlFieldBuilder().getBuilder(), - extensionRegistry); - requestCase_ = 4; - break; - } // case 34 - case 42: { - input.readMessage( - getDeleteFieldBuilder().getBuilder(), - extensionRegistry); - requestCase_ = 5; - break; - } // case 42 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (io.greptime.v1.Database.GreptimeRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - onChanged(); - } // finally + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } return this; } private int requestCase_ = 0; @@ -833,7 +886,6 @@ public final class Database { return this; } - private int bitField0_; private io.greptime.v1.Common.RequestHeader header_; private com.google.protobuf.SingleFieldBuilderV3< @@ -843,7 +895,7 @@ public final class Database { * @return Whether the header field is set. */ public boolean hasHeader() { - return ((bitField0_ & 0x00000001) != 0); + return headerBuilder_ != null || header_ != null; } /** * .greptime.v1.RequestHeader header = 1; @@ -865,11 +917,11 @@ public final class Database { throw new NullPointerException(); } header_ = value; + onChanged(); } else { headerBuilder_.setMessage(value); } - bitField0_ |= 0x00000001; - onChanged(); + return this; } /** @@ -879,11 +931,11 @@ public final class Database { io.greptime.v1.Common.RequestHeader.Builder builderForValue) { if (headerBuilder_ == null) { header_ = builderForValue.build(); + onChanged(); } else { headerBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000001; - onChanged(); + return this; } /** @@ -891,38 +943,38 @@ public final class Database { */ public Builder mergeHeader(io.greptime.v1.Common.RequestHeader value) { if (headerBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - header_ != null && - header_ != io.greptime.v1.Common.RequestHeader.getDefaultInstance()) { - getHeaderBuilder().mergeFrom(value); + if (header_ != null) { + header_ = + io.greptime.v1.Common.RequestHeader.newBuilder(header_).mergeFrom(value).buildPartial(); } else { header_ = value; } + onChanged(); } else { headerBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000001; - onChanged(); + return this; } /** * .greptime.v1.RequestHeader header = 1; */ public Builder clearHeader() { - bitField0_ = (bitField0_ & ~0x00000001); - header_ = null; - if (headerBuilder_ != null) { - headerBuilder_.dispose(); + if (headerBuilder_ == null) { + header_ = null; + onChanged(); + } else { + header_ = null; headerBuilder_ = null; } - onChanged(); + return this; } /** * .greptime.v1.RequestHeader header = 1; */ public io.greptime.v1.Common.RequestHeader.Builder getHeaderBuilder() { - bitField0_ |= 0x00000001; + onChanged(); return getHeaderFieldBuilder().getBuilder(); } @@ -1028,9 +1080,8 @@ public final class Database { } else { if (requestCase_ == 2) { insertBuilder_.mergeFrom(value); - } else { - insertBuilder_.setMessage(value); } + insertBuilder_.setMessage(value); } requestCase_ = 2; return this; @@ -1092,7 +1143,7 @@ public final class Database { request_ = null; } requestCase_ = 2; - onChanged(); + onChanged();; return insertBuilder_; } @@ -1170,9 +1221,8 @@ public final class Database { } else { if (requestCase_ == 3) { queryBuilder_.mergeFrom(value); - } else { - queryBuilder_.setMessage(value); } + queryBuilder_.setMessage(value); } requestCase_ = 3; return this; @@ -1234,7 +1284,7 @@ public final class Database { request_ = null; } requestCase_ = 3; - onChanged(); + onChanged();; return queryBuilder_; } @@ -1312,9 +1362,8 @@ public final class Database { } else { if (requestCase_ == 4) { ddlBuilder_.mergeFrom(value); - } else { - ddlBuilder_.setMessage(value); } + ddlBuilder_.setMessage(value); } requestCase_ = 4; return this; @@ -1376,7 +1425,7 @@ public final class Database { request_ = null; } requestCase_ = 4; - onChanged(); + onChanged();; return ddlBuilder_; } @@ -1454,9 +1503,8 @@ public final class Database { } else { if (requestCase_ == 5) { deleteBuilder_.mergeFrom(value); - } else { - deleteBuilder_.setMessage(value); } + deleteBuilder_.setMessage(value); } requestCase_ = 5; return this; @@ -1518,7 +1566,7 @@ public final class Database { request_ = null; } requestCase_ = 5; - onChanged(); + onChanged();; return deleteBuilder_; } @java.lang.Override @@ -1554,18 +1602,7 @@ public final class Database { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); + return new GreptimeRequest(input, extensionRegistry); } }; @@ -1648,6 +1685,70 @@ public final class Database { getUnknownFields() { return this.unknownFields; } + private GreptimeResponse( + 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.Common.ResponseHeader.Builder subBuilder = null; + if (header_ != null) { + subBuilder = header_.toBuilder(); + } + header_ = input.readMessage(io.greptime.v1.Common.ResponseHeader.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(header_); + header_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + io.greptime.v1.Common.AffectedRows.Builder subBuilder = null; + if (responseCase_ == 2) { + subBuilder = ((io.greptime.v1.Common.AffectedRows) response_).toBuilder(); + } + response_ = + input.readMessage(io.greptime.v1.Common.AffectedRows.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((io.greptime.v1.Common.AffectedRows) response_); + response_ = subBuilder.buildPartial(); + } + responseCase_ = 2; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.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 io.greptime.v1.Database.internal_static_greptime_v1_GreptimeResponse_descriptor; @@ -1723,7 +1824,7 @@ public final class Database { */ @java.lang.Override public io.greptime.v1.Common.ResponseHeaderOrBuilder getHeaderOrBuilder() { - return header_ == null ? io.greptime.v1.Common.ResponseHeader.getDefaultInstance() : header_; + return getHeader(); } public static final int AFFECTED_ROWS_FIELD_NUMBER = 2; @@ -1777,7 +1878,7 @@ public final class Database { if (responseCase_ == 2) { output.writeMessage(2, (io.greptime.v1.Common.AffectedRows) response_); } - getUnknownFields().writeTo(output); + unknownFields.writeTo(output); } @java.lang.Override @@ -1794,7 +1895,7 @@ public final class Database { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, (io.greptime.v1.Common.AffectedRows) response_); } - size += getUnknownFields().getSerializedSize(); + size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @@ -1823,7 +1924,7 @@ public final class Database { case 0: default: } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -1846,7 +1947,7 @@ public final class Database { case 0: default: } - hash = (29 * hash) + getUnknownFields().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } @@ -1963,26 +2064,28 @@ public final class Database { // Construct using io.greptime.v1.Database.GreptimeResponse.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(); - bitField0_ = 0; - header_ = null; - if (headerBuilder_ != null) { - headerBuilder_.dispose(); + if (headerBuilder_ == null) { + header_ = null; + } else { + header_ = null; headerBuilder_ = null; } - if (affectedRowsBuilder_ != null) { - affectedRowsBuilder_.clear(); - } responseCase_ = 0; response_ = null; return this; @@ -2011,30 +2114,23 @@ public final class Database { @java.lang.Override public io.greptime.v1.Database.GreptimeResponse buildPartial() { io.greptime.v1.Database.GreptimeResponse result = new io.greptime.v1.Database.GreptimeResponse(this); - if (bitField0_ != 0) { buildPartial0(result); } - buildPartialOneofs(result); + if (headerBuilder_ == null) { + result.header_ = header_; + } else { + result.header_ = headerBuilder_.build(); + } + if (responseCase_ == 2) { + if (affectedRowsBuilder_ == null) { + result.response_ = response_; + } else { + result.response_ = affectedRowsBuilder_.build(); + } + } + result.responseCase_ = responseCase_; onBuilt(); return result; } - private void buildPartial0(io.greptime.v1.Database.GreptimeResponse result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.header_ = headerBuilder_ == null - ? header_ - : headerBuilder_.build(); - } - } - - private void buildPartialOneofs(io.greptime.v1.Database.GreptimeResponse result) { - result.responseCase_ = responseCase_; - result.response_ = this.response_; - if (responseCase_ == 2 && - affectedRowsBuilder_ != null) { - result.response_ = affectedRowsBuilder_.build(); - } - } - @java.lang.Override public Builder clone() { return super.clone(); @@ -2091,7 +2187,7 @@ public final class Database { break; } } - this.mergeUnknownFields(other.getUnknownFields()); + this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @@ -2106,44 +2202,17 @@ public final class Database { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } + io.greptime.v1.Database.GreptimeResponse parsedMessage = null; try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - input.readMessage( - getHeaderFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - input.readMessage( - getAffectedRowsFieldBuilder().getBuilder(), - extensionRegistry); - responseCase_ = 2; - break; - } // case 18 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (io.greptime.v1.Database.GreptimeResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - onChanged(); - } // finally + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } return this; } private int responseCase_ = 0; @@ -2161,7 +2230,6 @@ public final class Database { return this; } - private int bitField0_; private io.greptime.v1.Common.ResponseHeader header_; private com.google.protobuf.SingleFieldBuilderV3< @@ -2171,7 +2239,7 @@ public final class Database { * @return Whether the header field is set. */ public boolean hasHeader() { - return ((bitField0_ & 0x00000001) != 0); + return headerBuilder_ != null || header_ != null; } /** * .greptime.v1.ResponseHeader header = 1; @@ -2193,11 +2261,11 @@ public final class Database { throw new NullPointerException(); } header_ = value; + onChanged(); } else { headerBuilder_.setMessage(value); } - bitField0_ |= 0x00000001; - onChanged(); + return this; } /** @@ -2207,11 +2275,11 @@ public final class Database { io.greptime.v1.Common.ResponseHeader.Builder builderForValue) { if (headerBuilder_ == null) { header_ = builderForValue.build(); + onChanged(); } else { headerBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000001; - onChanged(); + return this; } /** @@ -2219,38 +2287,38 @@ public final class Database { */ public Builder mergeHeader(io.greptime.v1.Common.ResponseHeader value) { if (headerBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - header_ != null && - header_ != io.greptime.v1.Common.ResponseHeader.getDefaultInstance()) { - getHeaderBuilder().mergeFrom(value); + if (header_ != null) { + header_ = + io.greptime.v1.Common.ResponseHeader.newBuilder(header_).mergeFrom(value).buildPartial(); } else { header_ = value; } + onChanged(); } else { headerBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000001; - onChanged(); + return this; } /** * .greptime.v1.ResponseHeader header = 1; */ public Builder clearHeader() { - bitField0_ = (bitField0_ & ~0x00000001); - header_ = null; - if (headerBuilder_ != null) { - headerBuilder_.dispose(); + if (headerBuilder_ == null) { + header_ = null; + onChanged(); + } else { + header_ = null; headerBuilder_ = null; } - onChanged(); + return this; } /** * .greptime.v1.ResponseHeader header = 1; */ public io.greptime.v1.Common.ResponseHeader.Builder getHeaderBuilder() { - bitField0_ |= 0x00000001; + onChanged(); return getHeaderFieldBuilder().getBuilder(); } @@ -2356,9 +2424,8 @@ public final class Database { } else { if (responseCase_ == 2) { affectedRowsBuilder_.mergeFrom(value); - } else { - affectedRowsBuilder_.setMessage(value); } + affectedRowsBuilder_.setMessage(value); } responseCase_ = 2; return this; @@ -2420,7 +2487,7 @@ public final class Database { response_ = null; } responseCase_ = 2; - onChanged(); + onChanged();; return affectedRowsBuilder_; } @java.lang.Override @@ -2456,18 +2523,7 @@ public final class Database { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); + return new GreptimeResponse(input, extensionRegistry); } }; @@ -2563,6 +2619,68 @@ public final class Database { getUnknownFields() { return this.unknownFields; } + private QueryRequest( + 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: { + java.lang.String s = input.readStringRequireUtf8(); + queryCase_ = 1; + query_ = s; + break; + } + case 18: { + queryCase_ = 2; + query_ = input.readBytes(); + break; + } + case 26: { + io.greptime.v1.Prometheus.PromRangeQuery.Builder subBuilder = null; + if (queryCase_ == 3) { + subBuilder = ((io.greptime.v1.Prometheus.PromRangeQuery) query_).toBuilder(); + } + query_ = + input.readMessage(io.greptime.v1.Prometheus.PromRangeQuery.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((io.greptime.v1.Prometheus.PromRangeQuery) query_); + query_ = subBuilder.buildPartial(); + } + queryCase_ = 3; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.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 io.greptime.v1.Database.internal_static_greptime_v1_QueryRequest_descriptor; @@ -2747,7 +2865,7 @@ public final class Database { if (queryCase_ == 3) { output.writeMessage(3, (io.greptime.v1.Prometheus.PromRangeQuery) query_); } - getUnknownFields().writeTo(output); + unknownFields.writeTo(output); } @java.lang.Override @@ -2768,7 +2886,7 @@ public final class Database { size += com.google.protobuf.CodedOutputStream .computeMessageSize(3, (io.greptime.v1.Prometheus.PromRangeQuery) query_); } - size += getUnknownFields().getSerializedSize(); + size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @@ -2800,7 +2918,7 @@ public final class Database { case 0: default: } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -2827,7 +2945,7 @@ public final class Database { case 0: default: } - hash = (29 * hash) + getUnknownFields().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } @@ -2944,21 +3062,22 @@ public final class Database { // Construct using io.greptime.v1.Database.QueryRequest.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(); - bitField0_ = 0; - if (promRangeQueryBuilder_ != null) { - promRangeQueryBuilder_.clear(); - } queryCase_ = 0; query_ = null; return this; @@ -2987,25 +3106,24 @@ public final class Database { @java.lang.Override public io.greptime.v1.Database.QueryRequest buildPartial() { io.greptime.v1.Database.QueryRequest result = new io.greptime.v1.Database.QueryRequest(this); - if (bitField0_ != 0) { buildPartial0(result); } - buildPartialOneofs(result); + if (queryCase_ == 1) { + result.query_ = query_; + } + if (queryCase_ == 2) { + result.query_ = query_; + } + if (queryCase_ == 3) { + if (promRangeQueryBuilder_ == null) { + result.query_ = query_; + } else { + result.query_ = promRangeQueryBuilder_.build(); + } + } + result.queryCase_ = queryCase_; onBuilt(); return result; } - private void buildPartial0(io.greptime.v1.Database.QueryRequest result) { - int from_bitField0_ = bitField0_; - } - - private void buildPartialOneofs(io.greptime.v1.Database.QueryRequest result) { - result.queryCase_ = queryCase_; - result.query_ = this.query_; - if (queryCase_ == 3 && - promRangeQueryBuilder_ != null) { - result.query_ = promRangeQueryBuilder_.build(); - } - } - @java.lang.Override public Builder clone() { return super.clone(); @@ -3069,7 +3187,7 @@ public final class Database { break; } } - this.mergeUnknownFields(other.getUnknownFields()); + this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @@ -3084,48 +3202,17 @@ public final class Database { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } + io.greptime.v1.Database.QueryRequest parsedMessage = null; try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - queryCase_ = 1; - query_ = s; - break; - } // case 10 - case 18: { - query_ = input.readBytes(); - queryCase_ = 2; - break; - } // case 18 - case 26: { - input.readMessage( - getPromRangeQueryFieldBuilder().getBuilder(), - extensionRegistry); - queryCase_ = 3; - break; - } // case 26 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (io.greptime.v1.Database.QueryRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - onChanged(); - } // finally + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } return this; } private int queryCase_ = 0; @@ -3143,7 +3230,6 @@ public final class Database { return this; } - private int bitField0_; /** * string sql = 1; @@ -3205,8 +3291,10 @@ public final class Database { */ public Builder setSql( java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - queryCase_ = 1; + if (value == null) { + throw new NullPointerException(); + } + queryCase_ = 1; query_ = value; onChanged(); return this; @@ -3230,8 +3318,10 @@ public final class Database { */ public Builder setSqlBytes( com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); queryCase_ = 1; query_ = value; onChanged(); @@ -3261,8 +3351,10 @@ public final class Database { * @return This builder for chaining. */ public Builder setLogicalPlan(com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - queryCase_ = 2; + if (value == null) { + throw new NullPointerException(); + } + queryCase_ = 2; query_ = value; onChanged(); return this; @@ -3354,9 +3446,8 @@ public final class Database { } else { if (queryCase_ == 3) { promRangeQueryBuilder_.mergeFrom(value); - } else { - promRangeQueryBuilder_.setMessage(value); } + promRangeQueryBuilder_.setMessage(value); } queryCase_ = 3; return this; @@ -3418,7 +3509,7 @@ public final class Database { query_ = null; } queryCase_ = 3; - onChanged(); + onChanged();; return promRangeQueryBuilder_; } @java.lang.Override @@ -3454,18 +3545,7 @@ public final class Database { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); + return new QueryRequest(input, extensionRegistry); } }; @@ -3595,6 +3675,72 @@ public final class Database { getUnknownFields() { return this.unknownFields; } + private InsertRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + 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: { + java.lang.String s = input.readStringRequireUtf8(); + + tableName_ = s; + break; + } + case 26: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + columns_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + columns_.add( + input.readMessage(io.greptime.v1.Columns.Column.parser(), extensionRegistry)); + break; + } + case 32: { + + rowCount_ = input.readUInt32(); + break; + } + case 40: { + + regionNumber_ = input.readUInt32(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + columns_ = java.util.Collections.unmodifiableList(columns_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.greptime.v1.Database.internal_static_greptime_v1_InsertRequest_descriptor; @@ -3609,8 +3755,7 @@ public final class Database { } public static final int TABLE_NAME_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object tableName_ = ""; + private volatile java.lang.Object tableName_; /** * string table_name = 1; * @return The tableName. @@ -3648,7 +3793,6 @@ public final class Database { } public static final int COLUMNS_FIELD_NUMBER = 3; - @SuppressWarnings("serial") private java.util.List columns_; /** *
@@ -3709,7 +3853,7 @@ public final class Database {
     }
 
     public static final int ROW_COUNT_FIELD_NUMBER = 4;
-    private int rowCount_ = 0;
+    private int rowCount_;
     /**
      * 
      * The row_count of all columns, which include null and non-null values.
@@ -3725,7 +3869,7 @@ public final class Database {
     }
 
     public static final int REGION_NUMBER_FIELD_NUMBER = 5;
-    private int regionNumber_ = 0;
+    private int regionNumber_;
     /**
      * 
      * The region number of current insert request.
@@ -3753,7 +3897,7 @@ public final class Database {
     @java.lang.Override
     public void writeTo(com.google.protobuf.CodedOutputStream output)
                         throws java.io.IOException {
-      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tableName_)) {
+      if (!getTableNameBytes().isEmpty()) {
         com.google.protobuf.GeneratedMessageV3.writeString(output, 1, tableName_);
       }
       for (int i = 0; i < columns_.size(); i++) {
@@ -3765,7 +3909,7 @@ public final class Database {
       if (regionNumber_ != 0) {
         output.writeUInt32(5, regionNumber_);
       }
-      getUnknownFields().writeTo(output);
+      unknownFields.writeTo(output);
     }
 
     @java.lang.Override
@@ -3774,7 +3918,7 @@ public final class Database {
       if (size != -1) return size;
 
       size = 0;
-      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tableName_)) {
+      if (!getTableNameBytes().isEmpty()) {
         size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, tableName_);
       }
       for (int i = 0; i < columns_.size(); i++) {
@@ -3789,7 +3933,7 @@ public final class Database {
         size += com.google.protobuf.CodedOutputStream
           .computeUInt32Size(5, regionNumber_);
       }
-      size += getUnknownFields().getSerializedSize();
+      size += unknownFields.getSerializedSize();
       memoizedSize = size;
       return size;
     }
@@ -3812,7 +3956,7 @@ public final class Database {
           != other.getRowCount()) return false;
       if (getRegionNumber()
           != other.getRegionNumber()) return false;
-      if (!getUnknownFields().equals(other.getUnknownFields())) return false;
+      if (!unknownFields.equals(other.unknownFields)) return false;
       return true;
     }
 
@@ -3833,7 +3977,7 @@ public final class Database {
       hash = (53 * hash) + getRowCount();
       hash = (37 * hash) + REGION_NUMBER_FIELD_NUMBER;
       hash = (53 * hash) + getRegionNumber();
-      hash = (29 * hash) + getUnknownFields().hashCode();
+      hash = (29 * hash) + unknownFields.hashCode();
       memoizedHashCode = hash;
       return hash;
     }
@@ -3950,28 +4094,35 @@ public final class Database {
 
       // Construct using io.greptime.v1.Database.InsertRequest.newBuilder()
       private Builder() {
-
+        maybeForceBuilderInitialization();
       }
 
       private Builder(
           com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
         super(parent);
-
+        maybeForceBuilderInitialization();
+      }
+      private void maybeForceBuilderInitialization() {
+        if (com.google.protobuf.GeneratedMessageV3
+                .alwaysUseFieldBuilders) {
+          getColumnsFieldBuilder();
+        }
       }
       @java.lang.Override
       public Builder clear() {
         super.clear();
-        bitField0_ = 0;
         tableName_ = "";
+
         if (columnsBuilder_ == null) {
           columns_ = java.util.Collections.emptyList();
+          bitField0_ = (bitField0_ & ~0x00000001);
         } else {
-          columns_ = null;
           columnsBuilder_.clear();
         }
-        bitField0_ = (bitField0_ & ~0x00000002);
         rowCount_ = 0;
+
         regionNumber_ = 0;
+
         return this;
       }
 
@@ -3998,35 +4149,21 @@ public final class Database {
       @java.lang.Override
       public io.greptime.v1.Database.InsertRequest buildPartial() {
         io.greptime.v1.Database.InsertRequest result = new io.greptime.v1.Database.InsertRequest(this);
-        buildPartialRepeatedFields(result);
-        if (bitField0_ != 0) { buildPartial0(result); }
-        onBuilt();
-        return result;
-      }
-
-      private void buildPartialRepeatedFields(io.greptime.v1.Database.InsertRequest result) {
+        int from_bitField0_ = bitField0_;
+        result.tableName_ = tableName_;
         if (columnsBuilder_ == null) {
-          if (((bitField0_ & 0x00000002) != 0)) {
+          if (((bitField0_ & 0x00000001) != 0)) {
             columns_ = java.util.Collections.unmodifiableList(columns_);
-            bitField0_ = (bitField0_ & ~0x00000002);
+            bitField0_ = (bitField0_ & ~0x00000001);
           }
           result.columns_ = columns_;
         } else {
           result.columns_ = columnsBuilder_.build();
         }
-      }
-
-      private void buildPartial0(io.greptime.v1.Database.InsertRequest result) {
-        int from_bitField0_ = bitField0_;
-        if (((from_bitField0_ & 0x00000001) != 0)) {
-          result.tableName_ = tableName_;
-        }
-        if (((from_bitField0_ & 0x00000004) != 0)) {
-          result.rowCount_ = rowCount_;
-        }
-        if (((from_bitField0_ & 0x00000008) != 0)) {
-          result.regionNumber_ = regionNumber_;
-        }
+        result.rowCount_ = rowCount_;
+        result.regionNumber_ = regionNumber_;
+        onBuilt();
+        return result;
       }
 
       @java.lang.Override
@@ -4075,14 +4212,13 @@ public final class Database {
         if (other == io.greptime.v1.Database.InsertRequest.getDefaultInstance()) return this;
         if (!other.getTableName().isEmpty()) {
           tableName_ = other.tableName_;
-          bitField0_ |= 0x00000001;
           onChanged();
         }
         if (columnsBuilder_ == null) {
           if (!other.columns_.isEmpty()) {
             if (columns_.isEmpty()) {
               columns_ = other.columns_;
-              bitField0_ = (bitField0_ & ~0x00000002);
+              bitField0_ = (bitField0_ & ~0x00000001);
             } else {
               ensureColumnsIsMutable();
               columns_.addAll(other.columns_);
@@ -4095,7 +4231,7 @@ public final class Database {
               columnsBuilder_.dispose();
               columnsBuilder_ = null;
               columns_ = other.columns_;
-              bitField0_ = (bitField0_ & ~0x00000002);
+              bitField0_ = (bitField0_ & ~0x00000001);
               columnsBuilder_ = 
                 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
                    getColumnsFieldBuilder() : null;
@@ -4110,7 +4246,7 @@ public final class Database {
         if (other.getRegionNumber() != 0) {
           setRegionNumber(other.getRegionNumber());
         }
-        this.mergeUnknownFields(other.getUnknownFields());
+        this.mergeUnknownFields(other.unknownFields);
         onChanged();
         return this;
       }
@@ -4125,58 +4261,17 @@ public final class Database {
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
-        if (extensionRegistry == null) {
-          throw new java.lang.NullPointerException();
-        }
+        io.greptime.v1.Database.InsertRequest parsedMessage = null;
         try {
-          boolean done = false;
-          while (!done) {
-            int tag = input.readTag();
-            switch (tag) {
-              case 0:
-                done = true;
-                break;
-              case 10: {
-                tableName_ = input.readStringRequireUtf8();
-                bitField0_ |= 0x00000001;
-                break;
-              } // case 10
-              case 26: {
-                io.greptime.v1.Columns.Column m =
-                    input.readMessage(
-                        io.greptime.v1.Columns.Column.parser(),
-                        extensionRegistry);
-                if (columnsBuilder_ == null) {
-                  ensureColumnsIsMutable();
-                  columns_.add(m);
-                } else {
-                  columnsBuilder_.addMessage(m);
-                }
-                break;
-              } // case 26
-              case 32: {
-                rowCount_ = input.readUInt32();
-                bitField0_ |= 0x00000004;
-                break;
-              } // case 32
-              case 40: {
-                regionNumber_ = input.readUInt32();
-                bitField0_ |= 0x00000008;
-                break;
-              } // case 40
-              default: {
-                if (!super.parseUnknownField(input, extensionRegistry, tag)) {
-                  done = true; // was an endgroup tag
-                }
-                break;
-              } // default:
-            } // switch (tag)
-          } // while (!done)
+          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
         } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+          parsedMessage = (io.greptime.v1.Database.InsertRequest) e.getUnfinishedMessage();
           throw e.unwrapIOException();
         } finally {
-          onChanged();
-        } // finally
+          if (parsedMessage != null) {
+            mergeFrom(parsedMessage);
+          }
+        }
         return this;
       }
       private int bitField0_;
@@ -4222,9 +4317,11 @@ public final class Database {
        */
       public Builder setTableName(
           java.lang.String value) {
-        if (value == null) { throw new NullPointerException(); }
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  
         tableName_ = value;
-        bitField0_ |= 0x00000001;
         onChanged();
         return this;
       }
@@ -4233,8 +4330,8 @@ public final class Database {
        * @return This builder for chaining.
        */
       public Builder clearTableName() {
+        
         tableName_ = getDefaultInstance().getTableName();
-        bitField0_ = (bitField0_ & ~0x00000001);
         onChanged();
         return this;
       }
@@ -4245,10 +4342,12 @@ public final class Database {
        */
       public Builder setTableNameBytes(
           com.google.protobuf.ByteString value) {
-        if (value == null) { throw new NullPointerException(); }
-        checkByteStringIsUtf8(value);
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  checkByteStringIsUtf8(value);
+        
         tableName_ = value;
-        bitField0_ |= 0x00000001;
         onChanged();
         return this;
       }
@@ -4256,9 +4355,9 @@ public final class Database {
       private java.util.List columns_ =
         java.util.Collections.emptyList();
       private void ensureColumnsIsMutable() {
-        if (!((bitField0_ & 0x00000002) != 0)) {
+        if (!((bitField0_ & 0x00000001) != 0)) {
           columns_ = new java.util.ArrayList(columns_);
-          bitField0_ |= 0x00000002;
+          bitField0_ |= 0x00000001;
          }
       }
 
@@ -4452,7 +4551,7 @@ public final class Database {
       public Builder clearColumns() {
         if (columnsBuilder_ == null) {
           columns_ = java.util.Collections.emptyList();
-          bitField0_ = (bitField0_ & ~0x00000002);
+          bitField0_ = (bitField0_ & ~0x00000001);
           onChanged();
         } else {
           columnsBuilder_.clear();
@@ -4557,7 +4656,7 @@ public final class Database {
           columnsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
               io.greptime.v1.Columns.Column, io.greptime.v1.Columns.Column.Builder, io.greptime.v1.Columns.ColumnOrBuilder>(
                   columns_,
-                  ((bitField0_ & 0x00000002) != 0),
+                  ((bitField0_ & 0x00000001) != 0),
                   getParentForChildren(),
                   isClean());
           columns_ = null;
@@ -4592,7 +4691,6 @@ public final class Database {
       public Builder setRowCount(int value) {
         
         rowCount_ = value;
-        bitField0_ |= 0x00000004;
         onChanged();
         return this;
       }
@@ -4606,7 +4704,7 @@ public final class Database {
        * @return This builder for chaining.
        */
       public Builder clearRowCount() {
-        bitField0_ = (bitField0_ & ~0x00000004);
+        
         rowCount_ = 0;
         onChanged();
         return this;
@@ -4637,7 +4735,6 @@ public final class Database {
       public Builder setRegionNumber(int value) {
         
         regionNumber_ = value;
-        bitField0_ |= 0x00000008;
         onChanged();
         return this;
       }
@@ -4650,7 +4747,7 @@ public final class Database {
        * @return This builder for chaining.
        */
       public Builder clearRegionNumber() {
-        bitField0_ = (bitField0_ & ~0x00000008);
+        
         regionNumber_ = 0;
         onChanged();
         return this;
@@ -4688,18 +4785,7 @@ public final class Database {
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws com.google.protobuf.InvalidProtocolBufferException {
-        Builder builder = newBuilder();
-        try {
-          builder.mergeFrom(input, extensionRegistry);
-        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-          throw e.setUnfinishedMessage(builder.buildPartial());
-        } catch (com.google.protobuf.UninitializedMessageException e) {
-          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
-        } catch (java.io.IOException e) {
-          throw new com.google.protobuf.InvalidProtocolBufferException(e)
-              .setUnfinishedMessage(builder.buildPartial());
-        }
-        return builder.buildPartial();
+        return new InsertRequest(input, extensionRegistry);
       }
     };
 
@@ -4725,7 +4811,8 @@ public final class Database {
 
     /**
      * 
-     * The table name to delete from. Catalog name and schema name are in the `RequestHeader`.
+     * The table name to delete from. Catalog name and schema name are in the
+     * `RequestHeader`.
      * 
* * string table_name = 1; @@ -4734,7 +4821,8 @@ public final class Database { java.lang.String getTableName(); /** *
-     * The table name to delete from. Catalog name and schema name are in the `RequestHeader`.
+     * The table name to delete from. Catalog name and schema name are in the
+     * `RequestHeader`.
      * 
* * string table_name = 1; @@ -4836,6 +4924,72 @@ public final class Database { getUnknownFields() { return this.unknownFields; } + private DeleteRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + 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: { + java.lang.String s = input.readStringRequireUtf8(); + + tableName_ = s; + break; + } + case 16: { + + regionNumber_ = input.readUInt32(); + break; + } + case 26: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + keyColumns_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + keyColumns_.add( + input.readMessage(io.greptime.v1.Columns.Column.parser(), extensionRegistry)); + break; + } + case 32: { + + rowCount_ = input.readUInt32(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + keyColumns_ = java.util.Collections.unmodifiableList(keyColumns_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.greptime.v1.Database.internal_static_greptime_v1_DeleteRequest_descriptor; @@ -4850,11 +5004,11 @@ public final class Database { } public static final int TABLE_NAME_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object tableName_ = ""; + private volatile java.lang.Object tableName_; /** *
-     * The table name to delete from. Catalog name and schema name are in the `RequestHeader`.
+     * The table name to delete from. Catalog name and schema name are in the
+     * `RequestHeader`.
      * 
* * string table_name = 1; @@ -4875,7 +5029,8 @@ public final class Database { } /** *
-     * The table name to delete from. Catalog name and schema name are in the `RequestHeader`.
+     * The table name to delete from. Catalog name and schema name are in the
+     * `RequestHeader`.
      * 
* * string table_name = 1; @@ -4897,7 +5052,7 @@ public final class Database { } public static final int REGION_NUMBER_FIELD_NUMBER = 2; - private int regionNumber_ = 0; + private int regionNumber_; /** *
      * The region number of current delete request.
@@ -4912,7 +5067,6 @@ public final class Database {
     }
 
     public static final int KEY_COLUMNS_FIELD_NUMBER = 3;
-    @SuppressWarnings("serial")
     private java.util.List keyColumns_;
     /**
      * 
@@ -4973,7 +5127,7 @@ public final class Database {
     }
 
     public static final int ROW_COUNT_FIELD_NUMBER = 4;
-    private int rowCount_ = 0;
+    private int rowCount_;
     /**
      * 
      * The row count of all columns above.
@@ -5001,7 +5155,7 @@ public final class Database {
     @java.lang.Override
     public void writeTo(com.google.protobuf.CodedOutputStream output)
                         throws java.io.IOException {
-      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tableName_)) {
+      if (!getTableNameBytes().isEmpty()) {
         com.google.protobuf.GeneratedMessageV3.writeString(output, 1, tableName_);
       }
       if (regionNumber_ != 0) {
@@ -5013,7 +5167,7 @@ public final class Database {
       if (rowCount_ != 0) {
         output.writeUInt32(4, rowCount_);
       }
-      getUnknownFields().writeTo(output);
+      unknownFields.writeTo(output);
     }
 
     @java.lang.Override
@@ -5022,7 +5176,7 @@ public final class Database {
       if (size != -1) return size;
 
       size = 0;
-      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tableName_)) {
+      if (!getTableNameBytes().isEmpty()) {
         size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, tableName_);
       }
       if (regionNumber_ != 0) {
@@ -5037,7 +5191,7 @@ public final class Database {
         size += com.google.protobuf.CodedOutputStream
           .computeUInt32Size(4, rowCount_);
       }
-      size += getUnknownFields().getSerializedSize();
+      size += unknownFields.getSerializedSize();
       memoizedSize = size;
       return size;
     }
@@ -5060,7 +5214,7 @@ public final class Database {
           .equals(other.getKeyColumnsList())) return false;
       if (getRowCount()
           != other.getRowCount()) return false;
-      if (!getUnknownFields().equals(other.getUnknownFields())) return false;
+      if (!unknownFields.equals(other.unknownFields)) return false;
       return true;
     }
 
@@ -5081,7 +5235,7 @@ public final class Database {
       }
       hash = (37 * hash) + ROW_COUNT_FIELD_NUMBER;
       hash = (53 * hash) + getRowCount();
-      hash = (29 * hash) + getUnknownFields().hashCode();
+      hash = (29 * hash) + unknownFields.hashCode();
       memoizedHashCode = hash;
       return hash;
     }
@@ -5198,28 +5352,35 @@ public final class Database {
 
       // Construct using io.greptime.v1.Database.DeleteRequest.newBuilder()
       private Builder() {
-
+        maybeForceBuilderInitialization();
       }
 
       private Builder(
           com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
         super(parent);
-
+        maybeForceBuilderInitialization();
+      }
+      private void maybeForceBuilderInitialization() {
+        if (com.google.protobuf.GeneratedMessageV3
+                .alwaysUseFieldBuilders) {
+          getKeyColumnsFieldBuilder();
+        }
       }
       @java.lang.Override
       public Builder clear() {
         super.clear();
-        bitField0_ = 0;
         tableName_ = "";
+
         regionNumber_ = 0;
+
         if (keyColumnsBuilder_ == null) {
           keyColumns_ = java.util.Collections.emptyList();
+          bitField0_ = (bitField0_ & ~0x00000001);
         } else {
-          keyColumns_ = null;
           keyColumnsBuilder_.clear();
         }
-        bitField0_ = (bitField0_ & ~0x00000004);
         rowCount_ = 0;
+
         return this;
       }
 
@@ -5246,35 +5407,21 @@ public final class Database {
       @java.lang.Override
       public io.greptime.v1.Database.DeleteRequest buildPartial() {
         io.greptime.v1.Database.DeleteRequest result = new io.greptime.v1.Database.DeleteRequest(this);
-        buildPartialRepeatedFields(result);
-        if (bitField0_ != 0) { buildPartial0(result); }
-        onBuilt();
-        return result;
-      }
-
-      private void buildPartialRepeatedFields(io.greptime.v1.Database.DeleteRequest result) {
+        int from_bitField0_ = bitField0_;
+        result.tableName_ = tableName_;
+        result.regionNumber_ = regionNumber_;
         if (keyColumnsBuilder_ == null) {
-          if (((bitField0_ & 0x00000004) != 0)) {
+          if (((bitField0_ & 0x00000001) != 0)) {
             keyColumns_ = java.util.Collections.unmodifiableList(keyColumns_);
-            bitField0_ = (bitField0_ & ~0x00000004);
+            bitField0_ = (bitField0_ & ~0x00000001);
           }
           result.keyColumns_ = keyColumns_;
         } else {
           result.keyColumns_ = keyColumnsBuilder_.build();
         }
-      }
-
-      private void buildPartial0(io.greptime.v1.Database.DeleteRequest result) {
-        int from_bitField0_ = bitField0_;
-        if (((from_bitField0_ & 0x00000001) != 0)) {
-          result.tableName_ = tableName_;
-        }
-        if (((from_bitField0_ & 0x00000002) != 0)) {
-          result.regionNumber_ = regionNumber_;
-        }
-        if (((from_bitField0_ & 0x00000008) != 0)) {
-          result.rowCount_ = rowCount_;
-        }
+        result.rowCount_ = rowCount_;
+        onBuilt();
+        return result;
       }
 
       @java.lang.Override
@@ -5323,7 +5470,6 @@ public final class Database {
         if (other == io.greptime.v1.Database.DeleteRequest.getDefaultInstance()) return this;
         if (!other.getTableName().isEmpty()) {
           tableName_ = other.tableName_;
-          bitField0_ |= 0x00000001;
           onChanged();
         }
         if (other.getRegionNumber() != 0) {
@@ -5333,7 +5479,7 @@ public final class Database {
           if (!other.keyColumns_.isEmpty()) {
             if (keyColumns_.isEmpty()) {
               keyColumns_ = other.keyColumns_;
-              bitField0_ = (bitField0_ & ~0x00000004);
+              bitField0_ = (bitField0_ & ~0x00000001);
             } else {
               ensureKeyColumnsIsMutable();
               keyColumns_.addAll(other.keyColumns_);
@@ -5346,7 +5492,7 @@ public final class Database {
               keyColumnsBuilder_.dispose();
               keyColumnsBuilder_ = null;
               keyColumns_ = other.keyColumns_;
-              bitField0_ = (bitField0_ & ~0x00000004);
+              bitField0_ = (bitField0_ & ~0x00000001);
               keyColumnsBuilder_ = 
                 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
                    getKeyColumnsFieldBuilder() : null;
@@ -5358,7 +5504,7 @@ public final class Database {
         if (other.getRowCount() != 0) {
           setRowCount(other.getRowCount());
         }
-        this.mergeUnknownFields(other.getUnknownFields());
+        this.mergeUnknownFields(other.unknownFields);
         onChanged();
         return this;
       }
@@ -5373,58 +5519,17 @@ public final class Database {
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
-        if (extensionRegistry == null) {
-          throw new java.lang.NullPointerException();
-        }
+        io.greptime.v1.Database.DeleteRequest parsedMessage = null;
         try {
-          boolean done = false;
-          while (!done) {
-            int tag = input.readTag();
-            switch (tag) {
-              case 0:
-                done = true;
-                break;
-              case 10: {
-                tableName_ = input.readStringRequireUtf8();
-                bitField0_ |= 0x00000001;
-                break;
-              } // case 10
-              case 16: {
-                regionNumber_ = input.readUInt32();
-                bitField0_ |= 0x00000002;
-                break;
-              } // case 16
-              case 26: {
-                io.greptime.v1.Columns.Column m =
-                    input.readMessage(
-                        io.greptime.v1.Columns.Column.parser(),
-                        extensionRegistry);
-                if (keyColumnsBuilder_ == null) {
-                  ensureKeyColumnsIsMutable();
-                  keyColumns_.add(m);
-                } else {
-                  keyColumnsBuilder_.addMessage(m);
-                }
-                break;
-              } // case 26
-              case 32: {
-                rowCount_ = input.readUInt32();
-                bitField0_ |= 0x00000008;
-                break;
-              } // case 32
-              default: {
-                if (!super.parseUnknownField(input, extensionRegistry, tag)) {
-                  done = true; // was an endgroup tag
-                }
-                break;
-              } // default:
-            } // switch (tag)
-          } // while (!done)
+          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
         } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+          parsedMessage = (io.greptime.v1.Database.DeleteRequest) e.getUnfinishedMessage();
           throw e.unwrapIOException();
         } finally {
-          onChanged();
-        } // finally
+          if (parsedMessage != null) {
+            mergeFrom(parsedMessage);
+          }
+        }
         return this;
       }
       private int bitField0_;
@@ -5432,7 +5537,8 @@ public final class Database {
       private java.lang.Object tableName_ = "";
       /**
        * 
-       * The table name to delete from. Catalog name and schema name are in the `RequestHeader`.
+       * The table name to delete from. Catalog name and schema name are in the
+       * `RequestHeader`.
        * 
* * string table_name = 1; @@ -5452,7 +5558,8 @@ public final class Database { } /** *
-       * The table name to delete from. Catalog name and schema name are in the `RequestHeader`.
+       * The table name to delete from. Catalog name and schema name are in the
+       * `RequestHeader`.
        * 
* * string table_name = 1; @@ -5473,7 +5580,8 @@ public final class Database { } /** *
-       * The table name to delete from. Catalog name and schema name are in the `RequestHeader`.
+       * The table name to delete from. Catalog name and schema name are in the
+       * `RequestHeader`.
        * 
* * string table_name = 1; @@ -5482,29 +5590,33 @@ public final class Database { */ public Builder setTableName( java.lang.String value) { - if (value == null) { throw new NullPointerException(); } + if (value == null) { + throw new NullPointerException(); + } + tableName_ = value; - bitField0_ |= 0x00000001; onChanged(); return this; } /** *
-       * The table name to delete from. Catalog name and schema name are in the `RequestHeader`.
+       * The table name to delete from. Catalog name and schema name are in the
+       * `RequestHeader`.
        * 
* * string table_name = 1; * @return This builder for chaining. */ public Builder clearTableName() { + tableName_ = getDefaultInstance().getTableName(); - bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** *
-       * The table name to delete from. Catalog name and schema name are in the `RequestHeader`.
+       * The table name to delete from. Catalog name and schema name are in the
+       * `RequestHeader`.
        * 
* * string table_name = 1; @@ -5513,10 +5625,12 @@ public final class Database { */ public Builder setTableNameBytes( com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + tableName_ = value; - bitField0_ |= 0x00000001; onChanged(); return this; } @@ -5546,7 +5660,6 @@ public final class Database { public Builder setRegionNumber(int value) { regionNumber_ = value; - bitField0_ |= 0x00000002; onChanged(); return this; } @@ -5559,7 +5672,7 @@ public final class Database { * @return This builder for chaining. */ public Builder clearRegionNumber() { - bitField0_ = (bitField0_ & ~0x00000002); + regionNumber_ = 0; onChanged(); return this; @@ -5568,9 +5681,9 @@ public final class Database { private java.util.List keyColumns_ = java.util.Collections.emptyList(); private void ensureKeyColumnsIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { + if (!((bitField0_ & 0x00000001) != 0)) { keyColumns_ = new java.util.ArrayList(keyColumns_); - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000001; } } @@ -5764,7 +5877,7 @@ public final class Database { public Builder clearKeyColumns() { if (keyColumnsBuilder_ == null) { keyColumns_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000001); onChanged(); } else { keyColumnsBuilder_.clear(); @@ -5869,7 +5982,7 @@ public final class Database { keyColumnsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< io.greptime.v1.Columns.Column, io.greptime.v1.Columns.Column.Builder, io.greptime.v1.Columns.ColumnOrBuilder>( keyColumns_, - ((bitField0_ & 0x00000004) != 0), + ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); keyColumns_ = null; @@ -5902,7 +6015,6 @@ public final class Database { public Builder setRowCount(int value) { rowCount_ = value; - bitField0_ |= 0x00000008; onChanged(); return this; } @@ -5915,7 +6027,7 @@ public final class Database { * @return This builder for chaining. */ public Builder clearRowCount() { - bitField0_ = (bitField0_ & ~0x00000008); + rowCount_ = 0; onChanged(); return this; @@ -5953,18 +6065,7 @@ public final class Database { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); + return new DeleteRequest(input, extensionRegistry); } }; diff --git a/java/src/main/java/io/greptime/v1/Ddl.java b/java/src/main/java/io/greptime/v1/Ddl.java index ee8e6ab..0b148b5 100644 --- a/java/src/main/java/io/greptime/v1/Ddl.java +++ b/java/src/main/java/io/greptime/v1/Ddl.java @@ -97,8 +97,9 @@ public final class Ddl { } /** *
-   * "Data Definition Language" requests, that create, modify or delete the database structures but not the data.
-   * `DdlRequest` could carry more information than plain SQL, for example, the "table_id" in `CreateTableExpr`.
+   * "Data Definition Language" requests, that create, modify or delete the
+   * database structures but not the data. `DdlRequest` could carry more
+   * information than plain SQL, for example, the "table_id" in `CreateTableExpr`.
    * So create a new DDL expr if you need it.
    * 
* @@ -128,6 +129,113 @@ public final class Ddl { getUnknownFields() { return this.unknownFields; } + private DdlRequest( + 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 (exprCase_ == 1) { + subBuilder = ((io.greptime.v1.Ddl.CreateDatabaseExpr) expr_).toBuilder(); + } + expr_ = + input.readMessage(io.greptime.v1.Ddl.CreateDatabaseExpr.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((io.greptime.v1.Ddl.CreateDatabaseExpr) expr_); + expr_ = subBuilder.buildPartial(); + } + exprCase_ = 1; + break; + } + case 18: { + io.greptime.v1.Ddl.CreateTableExpr.Builder subBuilder = null; + if (exprCase_ == 2) { + subBuilder = ((io.greptime.v1.Ddl.CreateTableExpr) expr_).toBuilder(); + } + expr_ = + input.readMessage(io.greptime.v1.Ddl.CreateTableExpr.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((io.greptime.v1.Ddl.CreateTableExpr) expr_); + expr_ = subBuilder.buildPartial(); + } + exprCase_ = 2; + break; + } + case 26: { + io.greptime.v1.Ddl.AlterExpr.Builder subBuilder = null; + if (exprCase_ == 3) { + subBuilder = ((io.greptime.v1.Ddl.AlterExpr) expr_).toBuilder(); + } + expr_ = + input.readMessage(io.greptime.v1.Ddl.AlterExpr.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((io.greptime.v1.Ddl.AlterExpr) expr_); + expr_ = subBuilder.buildPartial(); + } + exprCase_ = 3; + break; + } + case 34: { + io.greptime.v1.Ddl.DropTableExpr.Builder subBuilder = null; + if (exprCase_ == 4) { + subBuilder = ((io.greptime.v1.Ddl.DropTableExpr) expr_).toBuilder(); + } + expr_ = + input.readMessage(io.greptime.v1.Ddl.DropTableExpr.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((io.greptime.v1.Ddl.DropTableExpr) expr_); + expr_ = subBuilder.buildPartial(); + } + exprCase_ = 4; + break; + } + case 42: { + io.greptime.v1.Ddl.FlushTableExpr.Builder subBuilder = null; + if (exprCase_ == 5) { + subBuilder = ((io.greptime.v1.Ddl.FlushTableExpr) expr_).toBuilder(); + } + expr_ = + input.readMessage(io.greptime.v1.Ddl.FlushTableExpr.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((io.greptime.v1.Ddl.FlushTableExpr) expr_); + expr_ = subBuilder.buildPartial(); + } + exprCase_ = 5; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.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 io.greptime.v1.Ddl.internal_static_greptime_v1_DdlRequest_descriptor; @@ -372,7 +480,7 @@ public final class Ddl { if (exprCase_ == 5) { output.writeMessage(5, (io.greptime.v1.Ddl.FlushTableExpr) expr_); } - getUnknownFields().writeTo(output); + unknownFields.writeTo(output); } @java.lang.Override @@ -401,7 +509,7 @@ public final class Ddl { size += com.google.protobuf.CodedOutputStream .computeMessageSize(5, (io.greptime.v1.Ddl.FlushTableExpr) expr_); } - size += getUnknownFields().getSerializedSize(); + size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @@ -441,7 +549,7 @@ public final class Ddl { case 0: default: } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -476,7 +584,7 @@ public final class Ddl { case 0: default: } - hash = (29 * hash) + getUnknownFields().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } @@ -573,8 +681,9 @@ public final class Ddl { } /** *
-     * "Data Definition Language" requests, that create, modify or delete the database structures but not the data.
-     * `DdlRequest` could carry more information than plain SQL, for example, the "table_id" in `CreateTableExpr`.
+     * "Data Definition Language" requests, that create, modify or delete the
+     * database structures but not the data. `DdlRequest` could carry more
+     * information than plain SQL, for example, the "table_id" in `CreateTableExpr`.
      * So create a new DDL expr if you need it.
      * 
* @@ -599,33 +708,22 @@ public final class Ddl { // Construct using io.greptime.v1.Ddl.DdlRequest.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(); - bitField0_ = 0; - if (createDatabaseBuilder_ != null) { - createDatabaseBuilder_.clear(); - } - if (createTableBuilder_ != null) { - createTableBuilder_.clear(); - } - if (alterBuilder_ != null) { - alterBuilder_.clear(); - } - if (dropTableBuilder_ != null) { - dropTableBuilder_.clear(); - } - if (flushTableBuilder_ != null) { - flushTableBuilder_.clear(); - } exprCase_ = 0; expr_ = null; return this; @@ -654,41 +752,46 @@ public final class Ddl { @java.lang.Override public io.greptime.v1.Ddl.DdlRequest buildPartial() { io.greptime.v1.Ddl.DdlRequest result = new io.greptime.v1.Ddl.DdlRequest(this); - if (bitField0_ != 0) { buildPartial0(result); } - buildPartialOneofs(result); + if (exprCase_ == 1) { + if (createDatabaseBuilder_ == null) { + result.expr_ = expr_; + } else { + result.expr_ = createDatabaseBuilder_.build(); + } + } + if (exprCase_ == 2) { + if (createTableBuilder_ == null) { + result.expr_ = expr_; + } else { + result.expr_ = createTableBuilder_.build(); + } + } + if (exprCase_ == 3) { + if (alterBuilder_ == null) { + result.expr_ = expr_; + } else { + result.expr_ = alterBuilder_.build(); + } + } + if (exprCase_ == 4) { + if (dropTableBuilder_ == null) { + result.expr_ = expr_; + } else { + result.expr_ = dropTableBuilder_.build(); + } + } + if (exprCase_ == 5) { + if (flushTableBuilder_ == null) { + result.expr_ = expr_; + } else { + result.expr_ = flushTableBuilder_.build(); + } + } + result.exprCase_ = exprCase_; onBuilt(); return result; } - private void buildPartial0(io.greptime.v1.Ddl.DdlRequest result) { - int from_bitField0_ = bitField0_; - } - - private void buildPartialOneofs(io.greptime.v1.Ddl.DdlRequest result) { - result.exprCase_ = exprCase_; - result.expr_ = this.expr_; - if (exprCase_ == 1 && - createDatabaseBuilder_ != null) { - result.expr_ = createDatabaseBuilder_.build(); - } - if (exprCase_ == 2 && - createTableBuilder_ != null) { - result.expr_ = createTableBuilder_.build(); - } - if (exprCase_ == 3 && - alterBuilder_ != null) { - result.expr_ = alterBuilder_.build(); - } - if (exprCase_ == 4 && - dropTableBuilder_ != null) { - result.expr_ = dropTableBuilder_.build(); - } - if (exprCase_ == 5 && - flushTableBuilder_ != null) { - result.expr_ = flushTableBuilder_.build(); - } - } - @java.lang.Override public Builder clone() { return super.clone(); @@ -758,7 +861,7 @@ public final class Ddl { break; } } - this.mergeUnknownFields(other.getUnknownFields()); + this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @@ -773,65 +876,17 @@ public final class Ddl { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } + io.greptime.v1.Ddl.DdlRequest parsedMessage = null; try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - input.readMessage( - getCreateDatabaseFieldBuilder().getBuilder(), - extensionRegistry); - exprCase_ = 1; - break; - } // case 10 - case 18: { - input.readMessage( - getCreateTableFieldBuilder().getBuilder(), - extensionRegistry); - exprCase_ = 2; - break; - } // case 18 - case 26: { - input.readMessage( - getAlterFieldBuilder().getBuilder(), - extensionRegistry); - exprCase_ = 3; - break; - } // case 26 - case 34: { - input.readMessage( - getDropTableFieldBuilder().getBuilder(), - extensionRegistry); - exprCase_ = 4; - break; - } // case 34 - case 42: { - input.readMessage( - getFlushTableFieldBuilder().getBuilder(), - extensionRegistry); - exprCase_ = 5; - break; - } // case 42 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (io.greptime.v1.Ddl.DdlRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - onChanged(); - } // finally + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } return this; } private int exprCase_ = 0; @@ -849,7 +904,6 @@ public final class Ddl { return this; } - private int bitField0_; private com.google.protobuf.SingleFieldBuilderV3< io.greptime.v1.Ddl.CreateDatabaseExpr, io.greptime.v1.Ddl.CreateDatabaseExpr.Builder, io.greptime.v1.Ddl.CreateDatabaseExprOrBuilder> createDatabaseBuilder_; @@ -925,9 +979,8 @@ public final class Ddl { } else { if (exprCase_ == 1) { createDatabaseBuilder_.mergeFrom(value); - } else { - createDatabaseBuilder_.setMessage(value); } + createDatabaseBuilder_.setMessage(value); } exprCase_ = 1; return this; @@ -989,7 +1042,7 @@ public final class Ddl { expr_ = null; } exprCase_ = 1; - onChanged(); + onChanged();; return createDatabaseBuilder_; } @@ -1067,9 +1120,8 @@ public final class Ddl { } else { if (exprCase_ == 2) { createTableBuilder_.mergeFrom(value); - } else { - createTableBuilder_.setMessage(value); } + createTableBuilder_.setMessage(value); } exprCase_ = 2; return this; @@ -1131,7 +1183,7 @@ public final class Ddl { expr_ = null; } exprCase_ = 2; - onChanged(); + onChanged();; return createTableBuilder_; } @@ -1209,9 +1261,8 @@ public final class Ddl { } else { if (exprCase_ == 3) { alterBuilder_.mergeFrom(value); - } else { - alterBuilder_.setMessage(value); } + alterBuilder_.setMessage(value); } exprCase_ = 3; return this; @@ -1273,7 +1324,7 @@ public final class Ddl { expr_ = null; } exprCase_ = 3; - onChanged(); + onChanged();; return alterBuilder_; } @@ -1351,9 +1402,8 @@ public final class Ddl { } else { if (exprCase_ == 4) { dropTableBuilder_.mergeFrom(value); - } else { - dropTableBuilder_.setMessage(value); } + dropTableBuilder_.setMessage(value); } exprCase_ = 4; return this; @@ -1415,7 +1465,7 @@ public final class Ddl { expr_ = null; } exprCase_ = 4; - onChanged(); + onChanged();; return dropTableBuilder_; } @@ -1493,9 +1543,8 @@ public final class Ddl { } else { if (exprCase_ == 5) { flushTableBuilder_.mergeFrom(value); - } else { - flushTableBuilder_.setMessage(value); } + flushTableBuilder_.setMessage(value); } exprCase_ = 5; return this; @@ -1557,7 +1606,7 @@ public final class Ddl { expr_ = null; } exprCase_ = 5; - onChanged(); + onChanged();; return flushTableBuilder_; } @java.lang.Override @@ -1593,18 +1642,7 @@ public final class Ddl { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); + return new DdlRequest(input, extensionRegistry); } }; @@ -1766,14 +1804,14 @@ public final class Ddl { /** * map<string, string> table_options = 9; */ - /* nullable */ -java.lang.String getTableOptionsOrDefault( + + java.lang.String getTableOptionsOrDefault( java.lang.String key, - /* nullable */ -java.lang.String defaultValue); + java.lang.String defaultValue); /** * map<string, string> table_options = 9; */ + java.lang.String getTableOptionsOrThrow( java.lang.String key); @@ -1857,6 +1895,159 @@ java.lang.String defaultValue); getUnknownFields() { return this.unknownFields; } + private CreateTableExpr( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + 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: { + java.lang.String s = input.readStringRequireUtf8(); + + catalogName_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + schemaName_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + tableName_ = s; + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + desc_ = s; + break; + } + case 42: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + columnDefs_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + columnDefs_.add( + input.readMessage(io.greptime.v1.Columns.ColumnDef.parser(), extensionRegistry)); + break; + } + case 50: { + java.lang.String s = input.readStringRequireUtf8(); + + timeIndex_ = s; + break; + } + case 58: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + primaryKeys_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + primaryKeys_.add(s); + break; + } + case 64: { + + createIfNotExists_ = input.readBool(); + break; + } + case 74: { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + tableOptions_ = com.google.protobuf.MapField.newMapField( + TableOptionsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000004; + } + com.google.protobuf.MapEntry + tableOptions__ = input.readMessage( + TableOptionsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + tableOptions_.getMutableMap().put( + tableOptions__.getKey(), tableOptions__.getValue()); + break; + } + case 82: { + io.greptime.v1.Ddl.TableId.Builder subBuilder = null; + if (tableId_ != null) { + subBuilder = tableId_.toBuilder(); + } + tableId_ = input.readMessage(io.greptime.v1.Ddl.TableId.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(tableId_); + tableId_ = subBuilder.buildPartial(); + } + + break; + } + case 88: { + if (!((mutable_bitField0_ & 0x00000008) != 0)) { + regionIds_ = newIntList(); + mutable_bitField0_ |= 0x00000008; + } + regionIds_.addInt(input.readUInt32()); + break; + } + case 90: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000008) != 0) && input.getBytesUntilLimit() > 0) { + regionIds_ = newIntList(); + mutable_bitField0_ |= 0x00000008; + } + while (input.getBytesUntilLimit() > 0) { + regionIds_.addInt(input.readUInt32()); + } + input.popLimit(limit); + break; + } + case 98: { + java.lang.String s = input.readStringRequireUtf8(); + + engine_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + columnDefs_ = java.util.Collections.unmodifiableList(columnDefs_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + primaryKeys_ = primaryKeys_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000008) != 0)) { + regionIds_.makeImmutable(); // C + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.greptime.v1.Ddl.internal_static_greptime_v1_CreateTableExpr_descriptor; @@ -1883,8 +2074,7 @@ java.lang.String defaultValue); } public static final int CATALOG_NAME_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object catalogName_ = ""; + private volatile java.lang.Object catalogName_; /** * string catalog_name = 1; * @return The catalogName. @@ -1922,8 +2112,7 @@ java.lang.String defaultValue); } public static final int SCHEMA_NAME_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object schemaName_ = ""; + private volatile java.lang.Object schemaName_; /** * string schema_name = 2; * @return The schemaName. @@ -1961,8 +2150,7 @@ java.lang.String defaultValue); } public static final int TABLE_NAME_FIELD_NUMBER = 3; - @SuppressWarnings("serial") - private volatile java.lang.Object tableName_ = ""; + private volatile java.lang.Object tableName_; /** * string table_name = 3; * @return The tableName. @@ -2000,8 +2188,7 @@ java.lang.String defaultValue); } public static final int DESC_FIELD_NUMBER = 4; - @SuppressWarnings("serial") - private volatile java.lang.Object desc_ = ""; + private volatile java.lang.Object desc_; /** * string desc = 4; * @return The desc. @@ -2039,7 +2226,6 @@ java.lang.String defaultValue); } public static final int COLUMN_DEFS_FIELD_NUMBER = 5; - @SuppressWarnings("serial") private java.util.List columnDefs_; /** * repeated .greptime.v1.ColumnDef column_defs = 5; @@ -2080,8 +2266,7 @@ java.lang.String defaultValue); } public static final int TIME_INDEX_FIELD_NUMBER = 6; - @SuppressWarnings("serial") - private volatile java.lang.Object timeIndex_ = ""; + private volatile java.lang.Object timeIndex_; /** * string time_index = 6; * @return The timeIndex. @@ -2119,7 +2304,6 @@ java.lang.String defaultValue); } public static final int PRIMARY_KEYS_FIELD_NUMBER = 7; - @SuppressWarnings("serial") private com.google.protobuf.LazyStringList primaryKeys_; /** * repeated string primary_keys = 7; @@ -2155,7 +2339,7 @@ java.lang.String defaultValue); } public static final int CREATE_IF_NOT_EXISTS_FIELD_NUMBER = 8; - private boolean createIfNotExists_ = false; + private boolean createIfNotExists_; /** * bool create_if_not_exists = 8; * @return The createIfNotExists. @@ -2177,7 +2361,6 @@ java.lang.String defaultValue); com.google.protobuf.WireFormat.FieldType.STRING, ""); } - @SuppressWarnings("serial") private com.google.protobuf.MapField< java.lang.String, java.lang.String> tableOptions_; private com.google.protobuf.MapField @@ -2188,16 +2371,18 @@ java.lang.String defaultValue); } return tableOptions_; } + public int getTableOptionsCount() { return internalGetTableOptions().getMap().size(); } /** * map<string, string> table_options = 9; */ + @java.lang.Override public boolean containsTableOptions( java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } + if (key == null) { throw new java.lang.NullPointerException(); } return internalGetTableOptions().getMap().containsKey(key); } /** @@ -2212,6 +2397,7 @@ java.lang.String defaultValue); * map<string, string> table_options = 9; */ @java.lang.Override + public java.util.Map getTableOptionsMap() { return internalGetTableOptions().getMap(); } @@ -2219,12 +2405,11 @@ java.lang.String defaultValue); * map<string, string> table_options = 9; */ @java.lang.Override - public /* nullable */ -java.lang.String getTableOptionsOrDefault( + + public java.lang.String getTableOptionsOrDefault( java.lang.String key, - /* nullable */ -java.lang.String defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } + java.lang.String defaultValue) { + if (key == null) { throw new java.lang.NullPointerException(); } java.util.Map map = internalGetTableOptions().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; @@ -2233,9 +2418,10 @@ java.lang.String defaultValue) { * map<string, string> table_options = 9; */ @java.lang.Override + public java.lang.String getTableOptionsOrThrow( java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } + if (key == null) { throw new java.lang.NullPointerException(); } java.util.Map map = internalGetTableOptions().getMap(); if (!map.containsKey(key)) { @@ -2267,11 +2453,10 @@ java.lang.String defaultValue) { */ @java.lang.Override public io.greptime.v1.Ddl.TableIdOrBuilder getTableIdOrBuilder() { - return tableId_ == null ? io.greptime.v1.Ddl.TableId.getDefaultInstance() : tableId_; + return getTableId(); } public static final int REGION_IDS_FIELD_NUMBER = 11; - @SuppressWarnings("serial") private com.google.protobuf.Internal.IntList regionIds_; /** * repeated uint32 region_ids = 11; @@ -2300,8 +2485,7 @@ java.lang.String defaultValue) { private int regionIdsMemoizedSerializedSize = -1; public static final int ENGINE_FIELD_NUMBER = 12; - @SuppressWarnings("serial") - private volatile java.lang.Object engine_ = ""; + private volatile java.lang.Object engine_; /** * string engine = 12; * @return The engine. @@ -2353,22 +2537,22 @@ java.lang.String defaultValue) { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(catalogName_)) { + if (!getCatalogNameBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, catalogName_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(schemaName_)) { + if (!getSchemaNameBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, schemaName_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tableName_)) { + if (!getTableNameBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, tableName_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(desc_)) { + if (!getDescBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, desc_); } for (int i = 0; i < columnDefs_.size(); i++) { output.writeMessage(5, columnDefs_.get(i)); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(timeIndex_)) { + if (!getTimeIndexBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 6, timeIndex_); } for (int i = 0; i < primaryKeys_.size(); i++) { @@ -2393,10 +2577,10 @@ java.lang.String defaultValue) { for (int i = 0; i < regionIds_.size(); i++) { output.writeUInt32NoTag(regionIds_.getInt(i)); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(engine_)) { + if (!getEngineBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 12, engine_); } - getUnknownFields().writeTo(output); + unknownFields.writeTo(output); } @java.lang.Override @@ -2405,23 +2589,23 @@ java.lang.String defaultValue) { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(catalogName_)) { + if (!getCatalogNameBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, catalogName_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(schemaName_)) { + if (!getSchemaNameBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, schemaName_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tableName_)) { + if (!getTableNameBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, tableName_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(desc_)) { + if (!getDescBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, desc_); } for (int i = 0; i < columnDefs_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(5, columnDefs_.get(i)); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(timeIndex_)) { + if (!getTimeIndexBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, timeIndex_); } { @@ -2464,10 +2648,10 @@ java.lang.String defaultValue) { } regionIdsMemoizedSerializedSize = dataSize; } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(engine_)) { + if (!getEngineBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, engine_); } - size += getUnknownFields().getSerializedSize(); + size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @@ -2509,7 +2693,7 @@ java.lang.String defaultValue) { .equals(other.getRegionIdsList())) return false; if (!getEngine() .equals(other.getEngine())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -2555,7 +2739,7 @@ java.lang.String defaultValue) { } hash = (37 * hash) + ENGINE_FIELD_NUMBER; hash = (53 * hash) + getEngine().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } @@ -2694,41 +2878,54 @@ java.lang.String defaultValue) { // Construct using io.greptime.v1.Ddl.CreateTableExpr.newBuilder() private Builder() { - + maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getColumnDefsFieldBuilder(); + } } @java.lang.Override public Builder clear() { super.clear(); - bitField0_ = 0; catalogName_ = ""; + schemaName_ = ""; + tableName_ = ""; + desc_ = ""; + if (columnDefsBuilder_ == null) { columnDefs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); } else { - columnDefs_ = null; columnDefsBuilder_.clear(); } - bitField0_ = (bitField0_ & ~0x00000010); timeIndex_ = ""; + primaryKeys_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000040); + bitField0_ = (bitField0_ & ~0x00000002); createIfNotExists_ = false; + internalGetMutableTableOptions().clear(); - tableId_ = null; - if (tableIdBuilder_ != null) { - tableIdBuilder_.dispose(); + if (tableIdBuilder_ == null) { + tableId_ = null; + } else { + tableId_ = null; tableIdBuilder_ = null; } regionIds_ = emptyIntList(); + bitField0_ = (bitField0_ & ~0x00000008); engine_ = ""; + return this; } @@ -2755,66 +2952,42 @@ java.lang.String defaultValue) { @java.lang.Override public io.greptime.v1.Ddl.CreateTableExpr buildPartial() { io.greptime.v1.Ddl.CreateTableExpr result = new io.greptime.v1.Ddl.CreateTableExpr(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.greptime.v1.Ddl.CreateTableExpr result) { + int from_bitField0_ = bitField0_; + result.catalogName_ = catalogName_; + result.schemaName_ = schemaName_; + result.tableName_ = tableName_; + result.desc_ = desc_; if (columnDefsBuilder_ == null) { - if (((bitField0_ & 0x00000010) != 0)) { + if (((bitField0_ & 0x00000001) != 0)) { columnDefs_ = java.util.Collections.unmodifiableList(columnDefs_); - bitField0_ = (bitField0_ & ~0x00000010); + bitField0_ = (bitField0_ & ~0x00000001); } result.columnDefs_ = columnDefs_; } else { result.columnDefs_ = columnDefsBuilder_.build(); } - if (((bitField0_ & 0x00000040) != 0)) { + result.timeIndex_ = timeIndex_; + if (((bitField0_ & 0x00000002) != 0)) { primaryKeys_ = primaryKeys_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000040); + bitField0_ = (bitField0_ & ~0x00000002); } result.primaryKeys_ = primaryKeys_; - if (((bitField0_ & 0x00000400) != 0)) { + result.createIfNotExists_ = createIfNotExists_; + result.tableOptions_ = internalGetTableOptions(); + result.tableOptions_.makeImmutable(); + if (tableIdBuilder_ == null) { + result.tableId_ = tableId_; + } else { + result.tableId_ = tableIdBuilder_.build(); + } + if (((bitField0_ & 0x00000008) != 0)) { regionIds_.makeImmutable(); - bitField0_ = (bitField0_ & ~0x00000400); + bitField0_ = (bitField0_ & ~0x00000008); } result.regionIds_ = regionIds_; - } - - private void buildPartial0(io.greptime.v1.Ddl.CreateTableExpr result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.catalogName_ = catalogName_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.schemaName_ = schemaName_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.tableName_ = tableName_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.desc_ = desc_; - } - if (((from_bitField0_ & 0x00000020) != 0)) { - result.timeIndex_ = timeIndex_; - } - if (((from_bitField0_ & 0x00000080) != 0)) { - result.createIfNotExists_ = createIfNotExists_; - } - if (((from_bitField0_ & 0x00000100) != 0)) { - result.tableOptions_ = internalGetTableOptions(); - result.tableOptions_.makeImmutable(); - } - if (((from_bitField0_ & 0x00000200) != 0)) { - result.tableId_ = tableIdBuilder_ == null - ? tableId_ - : tableIdBuilder_.build(); - } - if (((from_bitField0_ & 0x00000800) != 0)) { - result.engine_ = engine_; - } + result.engine_ = engine_; + onBuilt(); + return result; } @java.lang.Override @@ -2863,29 +3036,25 @@ java.lang.String defaultValue) { if (other == io.greptime.v1.Ddl.CreateTableExpr.getDefaultInstance()) return this; if (!other.getCatalogName().isEmpty()) { catalogName_ = other.catalogName_; - bitField0_ |= 0x00000001; onChanged(); } if (!other.getSchemaName().isEmpty()) { schemaName_ = other.schemaName_; - bitField0_ |= 0x00000002; onChanged(); } if (!other.getTableName().isEmpty()) { tableName_ = other.tableName_; - bitField0_ |= 0x00000004; onChanged(); } if (!other.getDesc().isEmpty()) { desc_ = other.desc_; - bitField0_ |= 0x00000008; onChanged(); } if (columnDefsBuilder_ == null) { if (!other.columnDefs_.isEmpty()) { if (columnDefs_.isEmpty()) { columnDefs_ = other.columnDefs_; - bitField0_ = (bitField0_ & ~0x00000010); + bitField0_ = (bitField0_ & ~0x00000001); } else { ensureColumnDefsIsMutable(); columnDefs_.addAll(other.columnDefs_); @@ -2898,7 +3067,7 @@ java.lang.String defaultValue) { columnDefsBuilder_.dispose(); columnDefsBuilder_ = null; columnDefs_ = other.columnDefs_; - bitField0_ = (bitField0_ & ~0x00000010); + bitField0_ = (bitField0_ & ~0x00000001); columnDefsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getColumnDefsFieldBuilder() : null; @@ -2909,13 +3078,12 @@ java.lang.String defaultValue) { } if (!other.getTimeIndex().isEmpty()) { timeIndex_ = other.timeIndex_; - bitField0_ |= 0x00000020; onChanged(); } if (!other.primaryKeys_.isEmpty()) { if (primaryKeys_.isEmpty()) { primaryKeys_ = other.primaryKeys_; - bitField0_ = (bitField0_ & ~0x00000040); + bitField0_ = (bitField0_ & ~0x00000002); } else { ensurePrimaryKeysIsMutable(); primaryKeys_.addAll(other.primaryKeys_); @@ -2927,14 +3095,13 @@ java.lang.String defaultValue) { } internalGetMutableTableOptions().mergeFrom( other.internalGetTableOptions()); - bitField0_ |= 0x00000100; if (other.hasTableId()) { mergeTableId(other.getTableId()); } if (!other.regionIds_.isEmpty()) { if (regionIds_.isEmpty()) { regionIds_ = other.regionIds_; - bitField0_ = (bitField0_ & ~0x00000400); + bitField0_ = (bitField0_ & ~0x00000008); } else { ensureRegionIdsIsMutable(); regionIds_.addAll(other.regionIds_); @@ -2943,10 +3110,9 @@ java.lang.String defaultValue) { } if (!other.getEngine().isEmpty()) { engine_ = other.engine_; - bitField0_ |= 0x00000800; onChanged(); } - this.mergeUnknownFields(other.getUnknownFields()); + this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @@ -2961,116 +3127,17 @@ java.lang.String defaultValue) { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } + io.greptime.v1.Ddl.CreateTableExpr parsedMessage = null; try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - catalogName_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - schemaName_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: { - tableName_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: { - desc_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - break; - } // case 34 - case 42: { - io.greptime.v1.Columns.ColumnDef m = - input.readMessage( - io.greptime.v1.Columns.ColumnDef.parser(), - extensionRegistry); - if (columnDefsBuilder_ == null) { - ensureColumnDefsIsMutable(); - columnDefs_.add(m); - } else { - columnDefsBuilder_.addMessage(m); - } - break; - } // case 42 - case 50: { - timeIndex_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - break; - } // case 50 - case 58: { - java.lang.String s = input.readStringRequireUtf8(); - ensurePrimaryKeysIsMutable(); - primaryKeys_.add(s); - break; - } // case 58 - case 64: { - createIfNotExists_ = input.readBool(); - bitField0_ |= 0x00000080; - break; - } // case 64 - case 74: { - com.google.protobuf.MapEntry - tableOptions__ = input.readMessage( - TableOptionsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - internalGetMutableTableOptions().getMutableMap().put( - tableOptions__.getKey(), tableOptions__.getValue()); - bitField0_ |= 0x00000100; - break; - } // case 74 - case 82: { - input.readMessage( - getTableIdFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000200; - break; - } // case 82 - case 88: { - int v = input.readUInt32(); - ensureRegionIdsIsMutable(); - regionIds_.addInt(v); - break; - } // case 88 - case 90: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - ensureRegionIdsIsMutable(); - while (input.getBytesUntilLimit() > 0) { - regionIds_.addInt(input.readUInt32()); - } - input.popLimit(limit); - break; - } // case 90 - case 98: { - engine_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000800; - break; - } // case 98 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (io.greptime.v1.Ddl.CreateTableExpr) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - onChanged(); - } // finally + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } return this; } private int bitField0_; @@ -3116,9 +3183,11 @@ java.lang.String defaultValue) { */ public Builder setCatalogName( java.lang.String value) { - if (value == null) { throw new NullPointerException(); } + if (value == null) { + throw new NullPointerException(); + } + catalogName_ = value; - bitField0_ |= 0x00000001; onChanged(); return this; } @@ -3127,8 +3196,8 @@ java.lang.String defaultValue) { * @return This builder for chaining. */ public Builder clearCatalogName() { + catalogName_ = getDefaultInstance().getCatalogName(); - bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } @@ -3139,10 +3208,12 @@ java.lang.String defaultValue) { */ public Builder setCatalogNameBytes( com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + catalogName_ = value; - bitField0_ |= 0x00000001; onChanged(); return this; } @@ -3188,9 +3259,11 @@ java.lang.String defaultValue) { */ public Builder setSchemaName( java.lang.String value) { - if (value == null) { throw new NullPointerException(); } + if (value == null) { + throw new NullPointerException(); + } + schemaName_ = value; - bitField0_ |= 0x00000002; onChanged(); return this; } @@ -3199,8 +3272,8 @@ java.lang.String defaultValue) { * @return This builder for chaining. */ public Builder clearSchemaName() { + schemaName_ = getDefaultInstance().getSchemaName(); - bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } @@ -3211,10 +3284,12 @@ java.lang.String defaultValue) { */ public Builder setSchemaNameBytes( com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + schemaName_ = value; - bitField0_ |= 0x00000002; onChanged(); return this; } @@ -3260,9 +3335,11 @@ java.lang.String defaultValue) { */ public Builder setTableName( java.lang.String value) { - if (value == null) { throw new NullPointerException(); } + if (value == null) { + throw new NullPointerException(); + } + tableName_ = value; - bitField0_ |= 0x00000004; onChanged(); return this; } @@ -3271,8 +3348,8 @@ java.lang.String defaultValue) { * @return This builder for chaining. */ public Builder clearTableName() { + tableName_ = getDefaultInstance().getTableName(); - bitField0_ = (bitField0_ & ~0x00000004); onChanged(); return this; } @@ -3283,10 +3360,12 @@ java.lang.String defaultValue) { */ public Builder setTableNameBytes( com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + tableName_ = value; - bitField0_ |= 0x00000004; onChanged(); return this; } @@ -3332,9 +3411,11 @@ java.lang.String defaultValue) { */ public Builder setDesc( java.lang.String value) { - if (value == null) { throw new NullPointerException(); } + if (value == null) { + throw new NullPointerException(); + } + desc_ = value; - bitField0_ |= 0x00000008; onChanged(); return this; } @@ -3343,8 +3424,8 @@ java.lang.String defaultValue) { * @return This builder for chaining. */ public Builder clearDesc() { + desc_ = getDefaultInstance().getDesc(); - bitField0_ = (bitField0_ & ~0x00000008); onChanged(); return this; } @@ -3355,10 +3436,12 @@ java.lang.String defaultValue) { */ public Builder setDescBytes( com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + desc_ = value; - bitField0_ |= 0x00000008; onChanged(); return this; } @@ -3366,9 +3449,9 @@ java.lang.String defaultValue) { private java.util.List columnDefs_ = java.util.Collections.emptyList(); private void ensureColumnDefsIsMutable() { - if (!((bitField0_ & 0x00000010) != 0)) { + if (!((bitField0_ & 0x00000001) != 0)) { columnDefs_ = new java.util.ArrayList(columnDefs_); - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000001; } } @@ -3518,7 +3601,7 @@ java.lang.String defaultValue) { public Builder clearColumnDefs() { if (columnDefsBuilder_ == null) { columnDefs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); + bitField0_ = (bitField0_ & ~0x00000001); onChanged(); } else { columnDefsBuilder_.clear(); @@ -3595,7 +3678,7 @@ java.lang.String defaultValue) { columnDefsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< io.greptime.v1.Columns.ColumnDef, io.greptime.v1.Columns.ColumnDef.Builder, io.greptime.v1.Columns.ColumnDefOrBuilder>( columnDefs_, - ((bitField0_ & 0x00000010) != 0), + ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); columnDefs_ = null; @@ -3644,9 +3727,11 @@ java.lang.String defaultValue) { */ public Builder setTimeIndex( java.lang.String value) { - if (value == null) { throw new NullPointerException(); } + if (value == null) { + throw new NullPointerException(); + } + timeIndex_ = value; - bitField0_ |= 0x00000020; onChanged(); return this; } @@ -3655,8 +3740,8 @@ java.lang.String defaultValue) { * @return This builder for chaining. */ public Builder clearTimeIndex() { + timeIndex_ = getDefaultInstance().getTimeIndex(); - bitField0_ = (bitField0_ & ~0x00000020); onChanged(); return this; } @@ -3667,19 +3752,21 @@ java.lang.String defaultValue) { */ public Builder setTimeIndexBytes( com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + timeIndex_ = value; - bitField0_ |= 0x00000020; onChanged(); return this; } private com.google.protobuf.LazyStringList primaryKeys_ = com.google.protobuf.LazyStringArrayList.EMPTY; private void ensurePrimaryKeysIsMutable() { - if (!((bitField0_ & 0x00000040) != 0)) { + if (!((bitField0_ & 0x00000002) != 0)) { primaryKeys_ = new com.google.protobuf.LazyStringArrayList(primaryKeys_); - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000002; } } /** @@ -3722,8 +3809,10 @@ java.lang.String defaultValue) { */ public Builder setPrimaryKeys( int index, java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensurePrimaryKeysIsMutable(); + if (value == null) { + throw new NullPointerException(); + } + ensurePrimaryKeysIsMutable(); primaryKeys_.set(index, value); onChanged(); return this; @@ -3735,8 +3824,10 @@ java.lang.String defaultValue) { */ public Builder addPrimaryKeys( java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensurePrimaryKeysIsMutable(); + if (value == null) { + throw new NullPointerException(); + } + ensurePrimaryKeysIsMutable(); primaryKeys_.add(value); onChanged(); return this; @@ -3760,7 +3851,7 @@ java.lang.String defaultValue) { */ public Builder clearPrimaryKeys() { primaryKeys_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000040); + bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } @@ -3771,8 +3862,10 @@ java.lang.String defaultValue) { */ public Builder addPrimaryKeysBytes( com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); ensurePrimaryKeysIsMutable(); primaryKeys_.add(value); onChanged(); @@ -3796,7 +3889,6 @@ java.lang.String defaultValue) { public Builder setCreateIfNotExists(boolean value) { createIfNotExists_ = value; - bitField0_ |= 0x00000080; onChanged(); return this; } @@ -3805,7 +3897,7 @@ java.lang.String defaultValue) { * @return This builder for chaining. */ public Builder clearCreateIfNotExists() { - bitField0_ = (bitField0_ & ~0x00000080); + createIfNotExists_ = false; onChanged(); return this; @@ -3814,7 +3906,7 @@ java.lang.String defaultValue) { private com.google.protobuf.MapField< java.lang.String, java.lang.String> tableOptions_; private com.google.protobuf.MapField - internalGetTableOptions() { + internalGetTableOptions() { if (tableOptions_ == null) { return com.google.protobuf.MapField.emptyMapField( TableOptionsDefaultEntryHolder.defaultEntry); @@ -3822,7 +3914,8 @@ java.lang.String defaultValue) { return tableOptions_; } private com.google.protobuf.MapField - internalGetMutableTableOptions() { + internalGetMutableTableOptions() { + onChanged();; if (tableOptions_ == null) { tableOptions_ = com.google.protobuf.MapField.newMapField( TableOptionsDefaultEntryHolder.defaultEntry); @@ -3830,20 +3923,20 @@ java.lang.String defaultValue) { if (!tableOptions_.isMutable()) { tableOptions_ = tableOptions_.copy(); } - bitField0_ |= 0x00000100; - onChanged(); return tableOptions_; } + public int getTableOptionsCount() { return internalGetTableOptions().getMap().size(); } /** * map<string, string> table_options = 9; */ + @java.lang.Override public boolean containsTableOptions( java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } + if (key == null) { throw new java.lang.NullPointerException(); } return internalGetTableOptions().getMap().containsKey(key); } /** @@ -3858,6 +3951,7 @@ java.lang.String defaultValue) { * map<string, string> table_options = 9; */ @java.lang.Override + public java.util.Map getTableOptionsMap() { return internalGetTableOptions().getMap(); } @@ -3865,12 +3959,11 @@ java.lang.String defaultValue) { * map<string, string> table_options = 9; */ @java.lang.Override - public /* nullable */ -java.lang.String getTableOptionsOrDefault( + + public java.lang.String getTableOptionsOrDefault( java.lang.String key, - /* nullable */ -java.lang.String defaultValue) { - if (key == null) { throw new NullPointerException("map key"); } + java.lang.String defaultValue) { + if (key == null) { throw new java.lang.NullPointerException(); } java.util.Map map = internalGetTableOptions().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; @@ -3879,9 +3972,10 @@ java.lang.String defaultValue) { * map<string, string> table_options = 9; */ @java.lang.Override + public java.lang.String getTableOptionsOrThrow( java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } + if (key == null) { throw new java.lang.NullPointerException(); } java.util.Map map = internalGetTableOptions().getMap(); if (!map.containsKey(key)) { @@ -3889,8 +3983,8 @@ java.lang.String defaultValue) { } return map.get(key); } + public Builder clearTableOptions() { - bitField0_ = (bitField0_ & ~0x00000100); internalGetMutableTableOptions().getMutableMap() .clear(); return this; @@ -3898,9 +3992,10 @@ java.lang.String defaultValue) { /** * map<string, string> table_options = 9; */ + public Builder removeTableOptions( java.lang.String key) { - if (key == null) { throw new NullPointerException("map key"); } + if (key == null) { throw new java.lang.NullPointerException(); } internalGetMutableTableOptions().getMutableMap() .remove(key); return this; @@ -3910,8 +4005,7 @@ java.lang.String defaultValue) { */ @java.lang.Deprecated public java.util.Map - getMutableTableOptions() { - bitField0_ |= 0x00000100; + getMutableTableOptions() { return internalGetMutableTableOptions().getMutableMap(); } /** @@ -3920,21 +4014,20 @@ java.lang.String defaultValue) { public Builder putTableOptions( java.lang.String key, java.lang.String value) { - if (key == null) { throw new NullPointerException("map key"); } - if (value == null) { throw new NullPointerException("map value"); } + if (key == null) { throw new java.lang.NullPointerException(); } + if (value == null) { throw new java.lang.NullPointerException(); } internalGetMutableTableOptions().getMutableMap() .put(key, value); - bitField0_ |= 0x00000100; return this; } /** * map<string, string> table_options = 9; */ + public Builder putAllTableOptions( java.util.Map values) { internalGetMutableTableOptions().getMutableMap() .putAll(values); - bitField0_ |= 0x00000100; return this; } @@ -3946,7 +4039,7 @@ java.lang.String defaultValue) { * @return Whether the tableId field is set. */ public boolean hasTableId() { - return ((bitField0_ & 0x00000200) != 0); + return tableIdBuilder_ != null || tableId_ != null; } /** * .greptime.v1.TableId table_id = 10; @@ -3968,11 +4061,11 @@ java.lang.String defaultValue) { throw new NullPointerException(); } tableId_ = value; + onChanged(); } else { tableIdBuilder_.setMessage(value); } - bitField0_ |= 0x00000200; - onChanged(); + return this; } /** @@ -3982,11 +4075,11 @@ java.lang.String defaultValue) { io.greptime.v1.Ddl.TableId.Builder builderForValue) { if (tableIdBuilder_ == null) { tableId_ = builderForValue.build(); + onChanged(); } else { tableIdBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000200; - onChanged(); + return this; } /** @@ -3994,38 +4087,38 @@ java.lang.String defaultValue) { */ public Builder mergeTableId(io.greptime.v1.Ddl.TableId value) { if (tableIdBuilder_ == null) { - if (((bitField0_ & 0x00000200) != 0) && - tableId_ != null && - tableId_ != io.greptime.v1.Ddl.TableId.getDefaultInstance()) { - getTableIdBuilder().mergeFrom(value); + if (tableId_ != null) { + tableId_ = + io.greptime.v1.Ddl.TableId.newBuilder(tableId_).mergeFrom(value).buildPartial(); } else { tableId_ = value; } + onChanged(); } else { tableIdBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000200; - onChanged(); + return this; } /** * .greptime.v1.TableId table_id = 10; */ public Builder clearTableId() { - bitField0_ = (bitField0_ & ~0x00000200); - tableId_ = null; - if (tableIdBuilder_ != null) { - tableIdBuilder_.dispose(); + if (tableIdBuilder_ == null) { + tableId_ = null; + onChanged(); + } else { + tableId_ = null; tableIdBuilder_ = null; } - onChanged(); + return this; } /** * .greptime.v1.TableId table_id = 10; */ public io.greptime.v1.Ddl.TableId.Builder getTableIdBuilder() { - bitField0_ |= 0x00000200; + onChanged(); return getTableIdFieldBuilder().getBuilder(); } @@ -4059,10 +4152,10 @@ java.lang.String defaultValue) { private com.google.protobuf.Internal.IntList regionIds_ = emptyIntList(); private void ensureRegionIdsIsMutable() { - if (!((bitField0_ & 0x00000400) != 0)) { + if (!((bitField0_ & 0x00000008) != 0)) { regionIds_ = mutableCopy(regionIds_); - bitField0_ |= 0x00000400; - } + bitField0_ |= 0x00000008; + } } /** * repeated uint32 region_ids = 11; @@ -4070,7 +4163,7 @@ java.lang.String defaultValue) { */ public java.util.List getRegionIdsList() { - return ((bitField0_ & 0x00000400) != 0) ? + return ((bitField0_ & 0x00000008) != 0) ? java.util.Collections.unmodifiableList(regionIds_) : regionIds_; } /** @@ -4096,7 +4189,6 @@ java.lang.String defaultValue) { */ public Builder setRegionIds( int index, int value) { - ensureRegionIdsIsMutable(); regionIds_.setInt(index, value); onChanged(); @@ -4108,7 +4200,6 @@ java.lang.String defaultValue) { * @return This builder for chaining. */ public Builder addRegionIds(int value) { - ensureRegionIdsIsMutable(); regionIds_.addInt(value); onChanged(); @@ -4133,7 +4224,7 @@ java.lang.String defaultValue) { */ public Builder clearRegionIds() { regionIds_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000400); + bitField0_ = (bitField0_ & ~0x00000008); onChanged(); return this; } @@ -4179,9 +4270,11 @@ java.lang.String defaultValue) { */ public Builder setEngine( java.lang.String value) { - if (value == null) { throw new NullPointerException(); } + if (value == null) { + throw new NullPointerException(); + } + engine_ = value; - bitField0_ |= 0x00000800; onChanged(); return this; } @@ -4190,8 +4283,8 @@ java.lang.String defaultValue) { * @return This builder for chaining. */ public Builder clearEngine() { + engine_ = getDefaultInstance().getEngine(); - bitField0_ = (bitField0_ & ~0x00000800); onChanged(); return this; } @@ -4202,10 +4295,12 @@ java.lang.String defaultValue) { */ public Builder setEngineBytes( com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + engine_ = value; - bitField0_ |= 0x00000800; onChanged(); return this; } @@ -4242,18 +4337,7 @@ java.lang.String defaultValue) { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); + return new CreateTableExpr(input, extensionRegistry); } }; @@ -4390,6 +4474,103 @@ java.lang.String defaultValue) { getUnknownFields() { return this.unknownFields; } + private AlterExpr( + 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: { + java.lang.String s = input.readStringRequireUtf8(); + + catalogName_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + schemaName_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + tableName_ = s; + break; + } + case 34: { + io.greptime.v1.Ddl.AddColumns.Builder subBuilder = null; + if (kindCase_ == 4) { + subBuilder = ((io.greptime.v1.Ddl.AddColumns) kind_).toBuilder(); + } + kind_ = + input.readMessage(io.greptime.v1.Ddl.AddColumns.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((io.greptime.v1.Ddl.AddColumns) kind_); + kind_ = subBuilder.buildPartial(); + } + kindCase_ = 4; + break; + } + case 42: { + io.greptime.v1.Ddl.DropColumns.Builder subBuilder = null; + if (kindCase_ == 5) { + subBuilder = ((io.greptime.v1.Ddl.DropColumns) kind_).toBuilder(); + } + kind_ = + input.readMessage(io.greptime.v1.Ddl.DropColumns.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((io.greptime.v1.Ddl.DropColumns) kind_); + kind_ = subBuilder.buildPartial(); + } + kindCase_ = 5; + break; + } + case 50: { + io.greptime.v1.Ddl.RenameTable.Builder subBuilder = null; + if (kindCase_ == 6) { + subBuilder = ((io.greptime.v1.Ddl.RenameTable) kind_).toBuilder(); + } + kind_ = + input.readMessage(io.greptime.v1.Ddl.RenameTable.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((io.greptime.v1.Ddl.RenameTable) kind_); + kind_ = subBuilder.buildPartial(); + } + kindCase_ = 6; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.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 io.greptime.v1.Ddl.internal_static_greptime_v1_AlterExpr_descriptor; @@ -4447,8 +4628,7 @@ java.lang.String defaultValue) { } public static final int CATALOG_NAME_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object catalogName_ = ""; + private volatile java.lang.Object catalogName_; /** * string catalog_name = 1; * @return The catalogName. @@ -4486,8 +4666,7 @@ java.lang.String defaultValue) { } public static final int SCHEMA_NAME_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object schemaName_ = ""; + private volatile java.lang.Object schemaName_; /** * string schema_name = 2; * @return The schemaName. @@ -4525,8 +4704,7 @@ java.lang.String defaultValue) { } public static final int TABLE_NAME_FIELD_NUMBER = 3; - @SuppressWarnings("serial") - private volatile java.lang.Object tableName_ = ""; + private volatile java.lang.Object tableName_; /** * string table_name = 3; * @return The tableName. @@ -4670,13 +4848,13 @@ java.lang.String defaultValue) { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(catalogName_)) { + if (!getCatalogNameBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, catalogName_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(schemaName_)) { + if (!getSchemaNameBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, schemaName_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tableName_)) { + if (!getTableNameBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, tableName_); } if (kindCase_ == 4) { @@ -4688,7 +4866,7 @@ java.lang.String defaultValue) { if (kindCase_ == 6) { output.writeMessage(6, (io.greptime.v1.Ddl.RenameTable) kind_); } - getUnknownFields().writeTo(output); + unknownFields.writeTo(output); } @java.lang.Override @@ -4697,13 +4875,13 @@ java.lang.String defaultValue) { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(catalogName_)) { + if (!getCatalogNameBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, catalogName_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(schemaName_)) { + if (!getSchemaNameBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, schemaName_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tableName_)) { + if (!getTableNameBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, tableName_); } if (kindCase_ == 4) { @@ -4718,7 +4896,7 @@ java.lang.String defaultValue) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(6, (io.greptime.v1.Ddl.RenameTable) kind_); } - size += getUnknownFields().getSerializedSize(); + size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @@ -4756,7 +4934,7 @@ java.lang.String defaultValue) { case 0: default: } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -4789,7 +4967,7 @@ java.lang.String defaultValue) { case 0: default: } - hash = (29 * hash) + getUnknownFields().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } @@ -4906,30 +5084,28 @@ java.lang.String defaultValue) { // Construct using io.greptime.v1.Ddl.AlterExpr.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(); - bitField0_ = 0; catalogName_ = ""; + schemaName_ = ""; + tableName_ = ""; - if (addColumnsBuilder_ != null) { - addColumnsBuilder_.clear(); - } - if (dropColumnsBuilder_ != null) { - dropColumnsBuilder_.clear(); - } - if (renameTableBuilder_ != null) { - renameTableBuilder_.clear(); - } + kindCase_ = 0; kind_ = null; return this; @@ -4958,42 +5134,35 @@ java.lang.String defaultValue) { @java.lang.Override public io.greptime.v1.Ddl.AlterExpr buildPartial() { io.greptime.v1.Ddl.AlterExpr result = new io.greptime.v1.Ddl.AlterExpr(this); - if (bitField0_ != 0) { buildPartial0(result); } - buildPartialOneofs(result); + result.catalogName_ = catalogName_; + result.schemaName_ = schemaName_; + result.tableName_ = tableName_; + if (kindCase_ == 4) { + if (addColumnsBuilder_ == null) { + result.kind_ = kind_; + } else { + result.kind_ = addColumnsBuilder_.build(); + } + } + if (kindCase_ == 5) { + if (dropColumnsBuilder_ == null) { + result.kind_ = kind_; + } else { + result.kind_ = dropColumnsBuilder_.build(); + } + } + if (kindCase_ == 6) { + if (renameTableBuilder_ == null) { + result.kind_ = kind_; + } else { + result.kind_ = renameTableBuilder_.build(); + } + } + result.kindCase_ = kindCase_; onBuilt(); return result; } - private void buildPartial0(io.greptime.v1.Ddl.AlterExpr result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.catalogName_ = catalogName_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.schemaName_ = schemaName_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.tableName_ = tableName_; - } - } - - private void buildPartialOneofs(io.greptime.v1.Ddl.AlterExpr result) { - result.kindCase_ = kindCase_; - result.kind_ = this.kind_; - if (kindCase_ == 4 && - addColumnsBuilder_ != null) { - result.kind_ = addColumnsBuilder_.build(); - } - if (kindCase_ == 5 && - dropColumnsBuilder_ != null) { - result.kind_ = dropColumnsBuilder_.build(); - } - if (kindCase_ == 6 && - renameTableBuilder_ != null) { - result.kind_ = renameTableBuilder_.build(); - } - } - @java.lang.Override public Builder clone() { return super.clone(); @@ -5040,17 +5209,14 @@ java.lang.String defaultValue) { if (other == io.greptime.v1.Ddl.AlterExpr.getDefaultInstance()) return this; if (!other.getCatalogName().isEmpty()) { catalogName_ = other.catalogName_; - bitField0_ |= 0x00000001; onChanged(); } if (!other.getSchemaName().isEmpty()) { schemaName_ = other.schemaName_; - bitField0_ |= 0x00000002; onChanged(); } if (!other.getTableName().isEmpty()) { tableName_ = other.tableName_; - bitField0_ |= 0x00000004; onChanged(); } switch (other.getKindCase()) { @@ -5070,7 +5236,7 @@ java.lang.String defaultValue) { break; } } - this.mergeUnknownFields(other.getUnknownFields()); + this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @@ -5085,66 +5251,17 @@ java.lang.String defaultValue) { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } + io.greptime.v1.Ddl.AlterExpr parsedMessage = null; try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - catalogName_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - schemaName_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: { - tableName_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: { - input.readMessage( - getAddColumnsFieldBuilder().getBuilder(), - extensionRegistry); - kindCase_ = 4; - break; - } // case 34 - case 42: { - input.readMessage( - getDropColumnsFieldBuilder().getBuilder(), - extensionRegistry); - kindCase_ = 5; - break; - } // case 42 - case 50: { - input.readMessage( - getRenameTableFieldBuilder().getBuilder(), - extensionRegistry); - kindCase_ = 6; - break; - } // case 50 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (io.greptime.v1.Ddl.AlterExpr) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - onChanged(); - } // finally + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } return this; } private int kindCase_ = 0; @@ -5162,7 +5279,6 @@ java.lang.String defaultValue) { return this; } - private int bitField0_; private java.lang.Object catalogName_ = ""; /** @@ -5205,9 +5321,11 @@ java.lang.String defaultValue) { */ public Builder setCatalogName( java.lang.String value) { - if (value == null) { throw new NullPointerException(); } + if (value == null) { + throw new NullPointerException(); + } + catalogName_ = value; - bitField0_ |= 0x00000001; onChanged(); return this; } @@ -5216,8 +5334,8 @@ java.lang.String defaultValue) { * @return This builder for chaining. */ public Builder clearCatalogName() { + catalogName_ = getDefaultInstance().getCatalogName(); - bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } @@ -5228,10 +5346,12 @@ java.lang.String defaultValue) { */ public Builder setCatalogNameBytes( com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + catalogName_ = value; - bitField0_ |= 0x00000001; onChanged(); return this; } @@ -5277,9 +5397,11 @@ java.lang.String defaultValue) { */ public Builder setSchemaName( java.lang.String value) { - if (value == null) { throw new NullPointerException(); } + if (value == null) { + throw new NullPointerException(); + } + schemaName_ = value; - bitField0_ |= 0x00000002; onChanged(); return this; } @@ -5288,8 +5410,8 @@ java.lang.String defaultValue) { * @return This builder for chaining. */ public Builder clearSchemaName() { + schemaName_ = getDefaultInstance().getSchemaName(); - bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } @@ -5300,10 +5422,12 @@ java.lang.String defaultValue) { */ public Builder setSchemaNameBytes( com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + schemaName_ = value; - bitField0_ |= 0x00000002; onChanged(); return this; } @@ -5349,9 +5473,11 @@ java.lang.String defaultValue) { */ public Builder setTableName( java.lang.String value) { - if (value == null) { throw new NullPointerException(); } + if (value == null) { + throw new NullPointerException(); + } + tableName_ = value; - bitField0_ |= 0x00000004; onChanged(); return this; } @@ -5360,8 +5486,8 @@ java.lang.String defaultValue) { * @return This builder for chaining. */ public Builder clearTableName() { + tableName_ = getDefaultInstance().getTableName(); - bitField0_ = (bitField0_ & ~0x00000004); onChanged(); return this; } @@ -5372,10 +5498,12 @@ java.lang.String defaultValue) { */ public Builder setTableNameBytes( com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + tableName_ = value; - bitField0_ |= 0x00000004; onChanged(); return this; } @@ -5454,9 +5582,8 @@ java.lang.String defaultValue) { } else { if (kindCase_ == 4) { addColumnsBuilder_.mergeFrom(value); - } else { - addColumnsBuilder_.setMessage(value); } + addColumnsBuilder_.setMessage(value); } kindCase_ = 4; return this; @@ -5518,7 +5645,7 @@ java.lang.String defaultValue) { kind_ = null; } kindCase_ = 4; - onChanged(); + onChanged();; return addColumnsBuilder_; } @@ -5596,9 +5723,8 @@ java.lang.String defaultValue) { } else { if (kindCase_ == 5) { dropColumnsBuilder_.mergeFrom(value); - } else { - dropColumnsBuilder_.setMessage(value); } + dropColumnsBuilder_.setMessage(value); } kindCase_ = 5; return this; @@ -5660,7 +5786,7 @@ java.lang.String defaultValue) { kind_ = null; } kindCase_ = 5; - onChanged(); + onChanged();; return dropColumnsBuilder_; } @@ -5738,9 +5864,8 @@ java.lang.String defaultValue) { } else { if (kindCase_ == 6) { renameTableBuilder_.mergeFrom(value); - } else { - renameTableBuilder_.setMessage(value); } + renameTableBuilder_.setMessage(value); } kindCase_ = 6; return this; @@ -5802,7 +5927,7 @@ java.lang.String defaultValue) { kind_ = null; } kindCase_ = 6; - onChanged(); + onChanged();; return renameTableBuilder_; } @java.lang.Override @@ -5838,18 +5963,7 @@ java.lang.String defaultValue) { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); + return new AlterExpr(input, extensionRegistry); } }; @@ -5939,6 +6053,61 @@ java.lang.String defaultValue) { getUnknownFields() { return this.unknownFields; } + private DropTableExpr( + 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: { + java.lang.String s = input.readStringRequireUtf8(); + + catalogName_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + schemaName_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + tableName_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.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 io.greptime.v1.Ddl.internal_static_greptime_v1_DropTableExpr_descriptor; @@ -5953,8 +6122,7 @@ java.lang.String defaultValue) { } public static final int CATALOG_NAME_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object catalogName_ = ""; + private volatile java.lang.Object catalogName_; /** * string catalog_name = 1; * @return The catalogName. @@ -5992,8 +6160,7 @@ java.lang.String defaultValue) { } public static final int SCHEMA_NAME_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object schemaName_ = ""; + private volatile java.lang.Object schemaName_; /** * string schema_name = 2; * @return The schemaName. @@ -6031,8 +6198,7 @@ java.lang.String defaultValue) { } public static final int TABLE_NAME_FIELD_NUMBER = 3; - @SuppressWarnings("serial") - private volatile java.lang.Object tableName_ = ""; + private volatile java.lang.Object tableName_; /** * string table_name = 3; * @return The tableName. @@ -6083,16 +6249,16 @@ java.lang.String defaultValue) { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(catalogName_)) { + if (!getCatalogNameBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, catalogName_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(schemaName_)) { + if (!getSchemaNameBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, schemaName_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tableName_)) { + if (!getTableNameBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, tableName_); } - getUnknownFields().writeTo(output); + unknownFields.writeTo(output); } @java.lang.Override @@ -6101,16 +6267,16 @@ java.lang.String defaultValue) { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(catalogName_)) { + if (!getCatalogNameBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, catalogName_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(schemaName_)) { + if (!getSchemaNameBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, schemaName_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tableName_)) { + if (!getTableNameBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, tableName_); } - size += getUnknownFields().getSerializedSize(); + size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @@ -6131,7 +6297,7 @@ java.lang.String defaultValue) { .equals(other.getSchemaName())) return false; if (!getTableName() .equals(other.getTableName())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -6148,7 +6314,7 @@ java.lang.String defaultValue) { hash = (53 * hash) + getSchemaName().hashCode(); hash = (37 * hash) + TABLE_NAME_FIELD_NUMBER; hash = (53 * hash) + getTableName().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } @@ -6265,21 +6431,28 @@ java.lang.String defaultValue) { // Construct using io.greptime.v1.Ddl.DropTableExpr.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(); - bitField0_ = 0; catalogName_ = ""; + schemaName_ = ""; + tableName_ = ""; + return this; } @@ -6306,24 +6479,13 @@ java.lang.String defaultValue) { @java.lang.Override public io.greptime.v1.Ddl.DropTableExpr buildPartial() { io.greptime.v1.Ddl.DropTableExpr result = new io.greptime.v1.Ddl.DropTableExpr(this); - if (bitField0_ != 0) { buildPartial0(result); } + result.catalogName_ = catalogName_; + result.schemaName_ = schemaName_; + result.tableName_ = tableName_; onBuilt(); return result; } - private void buildPartial0(io.greptime.v1.Ddl.DropTableExpr result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.catalogName_ = catalogName_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.schemaName_ = schemaName_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.tableName_ = tableName_; - } - } - @java.lang.Override public Builder clone() { return super.clone(); @@ -6370,20 +6532,17 @@ java.lang.String defaultValue) { if (other == io.greptime.v1.Ddl.DropTableExpr.getDefaultInstance()) return this; if (!other.getCatalogName().isEmpty()) { catalogName_ = other.catalogName_; - bitField0_ |= 0x00000001; onChanged(); } if (!other.getSchemaName().isEmpty()) { schemaName_ = other.schemaName_; - bitField0_ |= 0x00000002; onChanged(); } if (!other.getTableName().isEmpty()) { tableName_ = other.tableName_; - bitField0_ |= 0x00000004; onChanged(); } - this.mergeUnknownFields(other.getUnknownFields()); + this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @@ -6398,48 +6557,19 @@ java.lang.String defaultValue) { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } + io.greptime.v1.Ddl.DropTableExpr parsedMessage = null; try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - catalogName_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - schemaName_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: { - tableName_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (io.greptime.v1.Ddl.DropTableExpr) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - onChanged(); - } // finally + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } return this; } - private int bitField0_; private java.lang.Object catalogName_ = ""; /** @@ -6482,9 +6612,11 @@ java.lang.String defaultValue) { */ public Builder setCatalogName( java.lang.String value) { - if (value == null) { throw new NullPointerException(); } + if (value == null) { + throw new NullPointerException(); + } + catalogName_ = value; - bitField0_ |= 0x00000001; onChanged(); return this; } @@ -6493,8 +6625,8 @@ java.lang.String defaultValue) { * @return This builder for chaining. */ public Builder clearCatalogName() { + catalogName_ = getDefaultInstance().getCatalogName(); - bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } @@ -6505,10 +6637,12 @@ java.lang.String defaultValue) { */ public Builder setCatalogNameBytes( com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + catalogName_ = value; - bitField0_ |= 0x00000001; onChanged(); return this; } @@ -6554,9 +6688,11 @@ java.lang.String defaultValue) { */ public Builder setSchemaName( java.lang.String value) { - if (value == null) { throw new NullPointerException(); } + if (value == null) { + throw new NullPointerException(); + } + schemaName_ = value; - bitField0_ |= 0x00000002; onChanged(); return this; } @@ -6565,8 +6701,8 @@ java.lang.String defaultValue) { * @return This builder for chaining. */ public Builder clearSchemaName() { + schemaName_ = getDefaultInstance().getSchemaName(); - bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } @@ -6577,10 +6713,12 @@ java.lang.String defaultValue) { */ public Builder setSchemaNameBytes( com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + schemaName_ = value; - bitField0_ |= 0x00000002; onChanged(); return this; } @@ -6626,9 +6764,11 @@ java.lang.String defaultValue) { */ public Builder setTableName( java.lang.String value) { - if (value == null) { throw new NullPointerException(); } + if (value == null) { + throw new NullPointerException(); + } + tableName_ = value; - bitField0_ |= 0x00000004; onChanged(); return this; } @@ -6637,8 +6777,8 @@ java.lang.String defaultValue) { * @return This builder for chaining. */ public Builder clearTableName() { + tableName_ = getDefaultInstance().getTableName(); - bitField0_ = (bitField0_ & ~0x00000004); onChanged(); return this; } @@ -6649,10 +6789,12 @@ java.lang.String defaultValue) { */ public Builder setTableNameBytes( com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + tableName_ = value; - bitField0_ |= 0x00000004; onChanged(); return this; } @@ -6689,18 +6831,7 @@ java.lang.String defaultValue) { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); + return new DropTableExpr(input, extensionRegistry); } }; @@ -6761,12 +6892,12 @@ java.lang.String defaultValue) { getTableNameBytes(); /** - * optional uint32 region_id = 4; + * uint32 region_id = 4; * @return Whether the regionId field is set. */ boolean hasRegionId(); /** - * optional uint32 region_id = 4; + * uint32 region_id = 4; * @return The regionId. */ int getRegionId(); @@ -6801,6 +6932,67 @@ java.lang.String defaultValue) { getUnknownFields() { return this.unknownFields; } + private FlushTableExpr( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + 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: { + java.lang.String s = input.readStringRequireUtf8(); + + catalogName_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + schemaName_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + tableName_ = s; + break; + } + case 32: { + bitField0_ |= 0x00000001; + regionId_ = input.readUInt32(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.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 io.greptime.v1.Ddl.internal_static_greptime_v1_FlushTableExpr_descriptor; @@ -6816,8 +7008,7 @@ java.lang.String defaultValue) { private int bitField0_; public static final int CATALOG_NAME_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object catalogName_ = ""; + private volatile java.lang.Object catalogName_; /** * string catalog_name = 1; * @return The catalogName. @@ -6855,8 +7046,7 @@ java.lang.String defaultValue) { } public static final int SCHEMA_NAME_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object schemaName_ = ""; + private volatile java.lang.Object schemaName_; /** * string schema_name = 2; * @return The schemaName. @@ -6894,8 +7084,7 @@ java.lang.String defaultValue) { } public static final int TABLE_NAME_FIELD_NUMBER = 3; - @SuppressWarnings("serial") - private volatile java.lang.Object tableName_ = ""; + private volatile java.lang.Object tableName_; /** * string table_name = 3; * @return The tableName. @@ -6933,9 +7122,9 @@ java.lang.String defaultValue) { } public static final int REGION_ID_FIELD_NUMBER = 4; - private int regionId_ = 0; + private int regionId_; /** - * optional uint32 region_id = 4; + * uint32 region_id = 4; * @return Whether the regionId field is set. */ @java.lang.Override @@ -6943,7 +7132,7 @@ java.lang.String defaultValue) { return ((bitField0_ & 0x00000001) != 0); } /** - * optional uint32 region_id = 4; + * uint32 region_id = 4; * @return The regionId. */ @java.lang.Override @@ -6965,19 +7154,19 @@ java.lang.String defaultValue) { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(catalogName_)) { + if (!getCatalogNameBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, catalogName_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(schemaName_)) { + if (!getSchemaNameBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, schemaName_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tableName_)) { + if (!getTableNameBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, tableName_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeUInt32(4, regionId_); } - getUnknownFields().writeTo(output); + unknownFields.writeTo(output); } @java.lang.Override @@ -6986,20 +7175,20 @@ java.lang.String defaultValue) { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(catalogName_)) { + if (!getCatalogNameBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, catalogName_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(schemaName_)) { + if (!getSchemaNameBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, schemaName_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tableName_)) { + if (!getTableNameBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, tableName_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream .computeUInt32Size(4, regionId_); } - size += getUnknownFields().getSerializedSize(); + size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @@ -7025,7 +7214,7 @@ java.lang.String defaultValue) { if (getRegionId() != other.getRegionId()) return false; } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -7046,7 +7235,7 @@ java.lang.String defaultValue) { hash = (37 * hash) + REGION_ID_FIELD_NUMBER; hash = (53 * hash) + getRegionId(); } - hash = (29 * hash) + getUnknownFields().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } @@ -7163,22 +7352,30 @@ java.lang.String defaultValue) { // Construct using io.greptime.v1.Ddl.FlushTableExpr.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(); - bitField0_ = 0; catalogName_ = ""; + schemaName_ = ""; + tableName_ = ""; + regionId_ = 0; + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -7205,28 +7402,18 @@ java.lang.String defaultValue) { @java.lang.Override public io.greptime.v1.Ddl.FlushTableExpr buildPartial() { io.greptime.v1.Ddl.FlushTableExpr result = new io.greptime.v1.Ddl.FlushTableExpr(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.greptime.v1.Ddl.FlushTableExpr result) { int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.catalogName_ = catalogName_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.schemaName_ = schemaName_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.tableName_ = tableName_; - } int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000008) != 0)) { + result.catalogName_ = catalogName_; + result.schemaName_ = schemaName_; + result.tableName_ = tableName_; + if (((from_bitField0_ & 0x00000001) != 0)) { result.regionId_ = regionId_; to_bitField0_ |= 0x00000001; } - result.bitField0_ |= to_bitField0_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; } @java.lang.Override @@ -7275,23 +7462,20 @@ java.lang.String defaultValue) { if (other == io.greptime.v1.Ddl.FlushTableExpr.getDefaultInstance()) return this; if (!other.getCatalogName().isEmpty()) { catalogName_ = other.catalogName_; - bitField0_ |= 0x00000001; onChanged(); } if (!other.getSchemaName().isEmpty()) { schemaName_ = other.schemaName_; - bitField0_ |= 0x00000002; onChanged(); } if (!other.getTableName().isEmpty()) { tableName_ = other.tableName_; - bitField0_ |= 0x00000004; onChanged(); } if (other.hasRegionId()) { setRegionId(other.getRegionId()); } - this.mergeUnknownFields(other.getUnknownFields()); + this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @@ -7306,50 +7490,17 @@ java.lang.String defaultValue) { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } + io.greptime.v1.Ddl.FlushTableExpr parsedMessage = null; try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - catalogName_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - schemaName_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: { - tableName_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 32: { - regionId_ = input.readUInt32(); - bitField0_ |= 0x00000008; - break; - } // case 32 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (io.greptime.v1.Ddl.FlushTableExpr) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - onChanged(); - } // finally + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } return this; } private int bitField0_; @@ -7395,9 +7546,11 @@ java.lang.String defaultValue) { */ public Builder setCatalogName( java.lang.String value) { - if (value == null) { throw new NullPointerException(); } + if (value == null) { + throw new NullPointerException(); + } + catalogName_ = value; - bitField0_ |= 0x00000001; onChanged(); return this; } @@ -7406,8 +7559,8 @@ java.lang.String defaultValue) { * @return This builder for chaining. */ public Builder clearCatalogName() { + catalogName_ = getDefaultInstance().getCatalogName(); - bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } @@ -7418,10 +7571,12 @@ java.lang.String defaultValue) { */ public Builder setCatalogNameBytes( com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + catalogName_ = value; - bitField0_ |= 0x00000001; onChanged(); return this; } @@ -7467,9 +7622,11 @@ java.lang.String defaultValue) { */ public Builder setSchemaName( java.lang.String value) { - if (value == null) { throw new NullPointerException(); } + if (value == null) { + throw new NullPointerException(); + } + schemaName_ = value; - bitField0_ |= 0x00000002; onChanged(); return this; } @@ -7478,8 +7635,8 @@ java.lang.String defaultValue) { * @return This builder for chaining. */ public Builder clearSchemaName() { + schemaName_ = getDefaultInstance().getSchemaName(); - bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } @@ -7490,10 +7647,12 @@ java.lang.String defaultValue) { */ public Builder setSchemaNameBytes( com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + schemaName_ = value; - bitField0_ |= 0x00000002; onChanged(); return this; } @@ -7539,9 +7698,11 @@ java.lang.String defaultValue) { */ public Builder setTableName( java.lang.String value) { - if (value == null) { throw new NullPointerException(); } + if (value == null) { + throw new NullPointerException(); + } + tableName_ = value; - bitField0_ |= 0x00000004; onChanged(); return this; } @@ -7550,8 +7711,8 @@ java.lang.String defaultValue) { * @return This builder for chaining. */ public Builder clearTableName() { + tableName_ = getDefaultInstance().getTableName(); - bitField0_ = (bitField0_ & ~0x00000004); onChanged(); return this; } @@ -7562,25 +7723,27 @@ java.lang.String defaultValue) { */ public Builder setTableNameBytes( com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + tableName_ = value; - bitField0_ |= 0x00000004; onChanged(); return this; } private int regionId_ ; /** - * optional uint32 region_id = 4; + * uint32 region_id = 4; * @return Whether the regionId field is set. */ @java.lang.Override public boolean hasRegionId() { - return ((bitField0_ & 0x00000008) != 0); + return ((bitField0_ & 0x00000001) != 0); } /** - * optional uint32 region_id = 4; + * uint32 region_id = 4; * @return The regionId. */ @java.lang.Override @@ -7588,23 +7751,22 @@ java.lang.String defaultValue) { return regionId_; } /** - * optional uint32 region_id = 4; + * uint32 region_id = 4; * @param value The regionId to set. * @return This builder for chaining. */ public Builder setRegionId(int value) { - + bitField0_ |= 0x00000001; regionId_ = value; - bitField0_ |= 0x00000008; onChanged(); return this; } /** - * optional uint32 region_id = 4; + * uint32 region_id = 4; * @return This builder for chaining. */ public Builder clearRegionId() { - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000001); regionId_ = 0; onChanged(); return this; @@ -7642,18 +7804,7 @@ java.lang.String defaultValue) { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); + return new FlushTableExpr(input, extensionRegistry); } }; @@ -7679,7 +7830,7 @@ java.lang.String defaultValue) { /** *
-     *TODO(hl): maybe rename to schema_name?
+     * TODO(hl): maybe rename to schema_name?
      * 
* * string database_name = 1; @@ -7688,7 +7839,7 @@ java.lang.String defaultValue) { java.lang.String getDatabaseName(); /** *
-     *TODO(hl): maybe rename to schema_name?
+     * TODO(hl): maybe rename to schema_name?
      * 
* * string database_name = 1; @@ -7731,6 +7882,54 @@ java.lang.String defaultValue) { getUnknownFields() { return this.unknownFields; } + private CreateDatabaseExpr( + 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: { + java.lang.String s = input.readStringRequireUtf8(); + + databaseName_ = s; + break; + } + case 16: { + + createIfNotExists_ = input.readBool(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.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 io.greptime.v1.Ddl.internal_static_greptime_v1_CreateDatabaseExpr_descriptor; @@ -7745,11 +7944,10 @@ java.lang.String defaultValue) { } public static final int DATABASE_NAME_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object databaseName_ = ""; + private volatile java.lang.Object databaseName_; /** *
-     *TODO(hl): maybe rename to schema_name?
+     * TODO(hl): maybe rename to schema_name?
      * 
* * string database_name = 1; @@ -7770,7 +7968,7 @@ java.lang.String defaultValue) { } /** *
-     *TODO(hl): maybe rename to schema_name?
+     * TODO(hl): maybe rename to schema_name?
      * 
* * string database_name = 1; @@ -7792,7 +7990,7 @@ java.lang.String defaultValue) { } public static final int CREATE_IF_NOT_EXISTS_FIELD_NUMBER = 2; - private boolean createIfNotExists_ = false; + private boolean createIfNotExists_; /** * bool create_if_not_exists = 2; * @return The createIfNotExists. @@ -7816,13 +8014,13 @@ java.lang.String defaultValue) { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(databaseName_)) { + if (!getDatabaseNameBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, databaseName_); } if (createIfNotExists_ != false) { output.writeBool(2, createIfNotExists_); } - getUnknownFields().writeTo(output); + unknownFields.writeTo(output); } @java.lang.Override @@ -7831,14 +8029,14 @@ java.lang.String defaultValue) { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(databaseName_)) { + if (!getDatabaseNameBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, databaseName_); } if (createIfNotExists_ != false) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(2, createIfNotExists_); } - size += getUnknownFields().getSerializedSize(); + size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @@ -7857,7 +8055,7 @@ java.lang.String defaultValue) { .equals(other.getDatabaseName())) return false; if (getCreateIfNotExists() != other.getCreateIfNotExists()) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -7873,7 +8071,7 @@ java.lang.String defaultValue) { hash = (37 * hash) + CREATE_IF_NOT_EXISTS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( getCreateIfNotExists()); - hash = (29 * hash) + getUnknownFields().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } @@ -7990,20 +8188,26 @@ java.lang.String defaultValue) { // Construct using io.greptime.v1.Ddl.CreateDatabaseExpr.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(); - bitField0_ = 0; databaseName_ = ""; + createIfNotExists_ = false; + return this; } @@ -8030,21 +8234,12 @@ java.lang.String defaultValue) { @java.lang.Override public io.greptime.v1.Ddl.CreateDatabaseExpr buildPartial() { io.greptime.v1.Ddl.CreateDatabaseExpr result = new io.greptime.v1.Ddl.CreateDatabaseExpr(this); - if (bitField0_ != 0) { buildPartial0(result); } + result.databaseName_ = databaseName_; + result.createIfNotExists_ = createIfNotExists_; onBuilt(); return result; } - private void buildPartial0(io.greptime.v1.Ddl.CreateDatabaseExpr result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.databaseName_ = databaseName_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.createIfNotExists_ = createIfNotExists_; - } - } - @java.lang.Override public Builder clone() { return super.clone(); @@ -8091,13 +8286,12 @@ java.lang.String defaultValue) { if (other == io.greptime.v1.Ddl.CreateDatabaseExpr.getDefaultInstance()) return this; if (!other.getDatabaseName().isEmpty()) { databaseName_ = other.databaseName_; - bitField0_ |= 0x00000001; onChanged(); } if (other.getCreateIfNotExists() != false) { setCreateIfNotExists(other.getCreateIfNotExists()); } - this.mergeUnknownFields(other.getUnknownFields()); + this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @@ -8112,48 +8306,24 @@ java.lang.String defaultValue) { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } + io.greptime.v1.Ddl.CreateDatabaseExpr parsedMessage = null; try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - databaseName_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 16: { - createIfNotExists_ = input.readBool(); - bitField0_ |= 0x00000002; - break; - } // case 16 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (io.greptime.v1.Ddl.CreateDatabaseExpr) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - onChanged(); - } // finally + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } return this; } - private int bitField0_; private java.lang.Object databaseName_ = ""; /** *
-       *TODO(hl): maybe rename to schema_name?
+       * TODO(hl): maybe rename to schema_name?
        * 
* * string database_name = 1; @@ -8173,7 +8343,7 @@ java.lang.String defaultValue) { } /** *
-       *TODO(hl): maybe rename to schema_name?
+       * TODO(hl): maybe rename to schema_name?
        * 
* * string database_name = 1; @@ -8194,7 +8364,7 @@ java.lang.String defaultValue) { } /** *
-       *TODO(hl): maybe rename to schema_name?
+       * TODO(hl): maybe rename to schema_name?
        * 
* * string database_name = 1; @@ -8203,29 +8373,31 @@ java.lang.String defaultValue) { */ public Builder setDatabaseName( java.lang.String value) { - if (value == null) { throw new NullPointerException(); } + if (value == null) { + throw new NullPointerException(); + } + databaseName_ = value; - bitField0_ |= 0x00000001; onChanged(); return this; } /** *
-       *TODO(hl): maybe rename to schema_name?
+       * TODO(hl): maybe rename to schema_name?
        * 
* * string database_name = 1; * @return This builder for chaining. */ public Builder clearDatabaseName() { + databaseName_ = getDefaultInstance().getDatabaseName(); - bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** *
-       *TODO(hl): maybe rename to schema_name?
+       * TODO(hl): maybe rename to schema_name?
        * 
* * string database_name = 1; @@ -8234,10 +8406,12 @@ java.lang.String defaultValue) { */ public Builder setDatabaseNameBytes( com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + databaseName_ = value; - bitField0_ |= 0x00000001; onChanged(); return this; } @@ -8259,7 +8433,6 @@ java.lang.String defaultValue) { public Builder setCreateIfNotExists(boolean value) { createIfNotExists_ = value; - bitField0_ |= 0x00000002; onChanged(); return this; } @@ -8268,7 +8441,7 @@ java.lang.String defaultValue) { * @return This builder for chaining. */ public Builder clearCreateIfNotExists() { - bitField0_ = (bitField0_ & ~0x00000002); + createIfNotExists_ = false; onChanged(); return this; @@ -8306,18 +8479,7 @@ java.lang.String defaultValue) { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); + return new CreateDatabaseExpr(input, extensionRegistry); } }; @@ -8393,6 +8555,56 @@ java.lang.String defaultValue) { getUnknownFields() { return this.unknownFields; } + private AddColumns( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + 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: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + addColumns_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + addColumns_.add( + input.readMessage(io.greptime.v1.Ddl.AddColumn.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + addColumns_ = java.util.Collections.unmodifiableList(addColumns_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.greptime.v1.Ddl.internal_static_greptime_v1_AddColumns_descriptor; @@ -8407,7 +8619,6 @@ java.lang.String defaultValue) { } public static final int ADD_COLUMNS_FIELD_NUMBER = 1; - @SuppressWarnings("serial") private java.util.List addColumns_; /** * repeated .greptime.v1.AddColumn add_columns = 1; @@ -8464,7 +8675,7 @@ java.lang.String defaultValue) { for (int i = 0; i < addColumns_.size(); i++) { output.writeMessage(1, addColumns_.get(i)); } - getUnknownFields().writeTo(output); + unknownFields.writeTo(output); } @java.lang.Override @@ -8477,7 +8688,7 @@ java.lang.String defaultValue) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, addColumns_.get(i)); } - size += getUnknownFields().getSerializedSize(); + size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @@ -8494,7 +8705,7 @@ java.lang.String defaultValue) { if (!getAddColumnsList() .equals(other.getAddColumnsList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -8509,7 +8720,7 @@ java.lang.String defaultValue) { hash = (37 * hash) + ADD_COLUMNS_FIELD_NUMBER; hash = (53 * hash) + getAddColumnsList().hashCode(); } - hash = (29 * hash) + getUnknownFields().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } @@ -8626,25 +8837,29 @@ java.lang.String defaultValue) { // Construct using io.greptime.v1.Ddl.AddColumns.newBuilder() private Builder() { - + maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getAddColumnsFieldBuilder(); + } } @java.lang.Override public Builder clear() { super.clear(); - bitField0_ = 0; if (addColumnsBuilder_ == null) { addColumns_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); } else { - addColumns_ = null; addColumnsBuilder_.clear(); } - bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -8671,13 +8886,7 @@ java.lang.String defaultValue) { @java.lang.Override public io.greptime.v1.Ddl.AddColumns buildPartial() { io.greptime.v1.Ddl.AddColumns result = new io.greptime.v1.Ddl.AddColumns(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.greptime.v1.Ddl.AddColumns result) { + int from_bitField0_ = bitField0_; if (addColumnsBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { addColumns_ = java.util.Collections.unmodifiableList(addColumns_); @@ -8687,10 +8896,8 @@ java.lang.String defaultValue) { } else { result.addColumns_ = addColumnsBuilder_.build(); } - } - - private void buildPartial0(io.greptime.v1.Ddl.AddColumns result) { - int from_bitField0_ = bitField0_; + onBuilt(); + return result; } @java.lang.Override @@ -8763,7 +8970,7 @@ java.lang.String defaultValue) { } } } - this.mergeUnknownFields(other.getUnknownFields()); + this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @@ -8778,43 +8985,17 @@ java.lang.String defaultValue) { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } + io.greptime.v1.Ddl.AddColumns parsedMessage = null; try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - io.greptime.v1.Ddl.AddColumn m = - input.readMessage( - io.greptime.v1.Ddl.AddColumn.parser(), - extensionRegistry); - if (addColumnsBuilder_ == null) { - ensureAddColumnsIsMutable(); - addColumns_.add(m); - } else { - addColumnsBuilder_.addMessage(m); - } - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (io.greptime.v1.Ddl.AddColumns) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - onChanged(); - } // finally + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } return this; } private int bitField0_; @@ -9091,18 +9272,7 @@ java.lang.String defaultValue) { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); + return new AddColumns(input, extensionRegistry); } }; @@ -9178,6 +9348,56 @@ java.lang.String defaultValue) { getUnknownFields() { return this.unknownFields; } + private DropColumns( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + 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: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + dropColumns_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + dropColumns_.add( + input.readMessage(io.greptime.v1.Ddl.DropColumn.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + dropColumns_ = java.util.Collections.unmodifiableList(dropColumns_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.greptime.v1.Ddl.internal_static_greptime_v1_DropColumns_descriptor; @@ -9192,7 +9412,6 @@ java.lang.String defaultValue) { } public static final int DROP_COLUMNS_FIELD_NUMBER = 1; - @SuppressWarnings("serial") private java.util.List dropColumns_; /** * repeated .greptime.v1.DropColumn drop_columns = 1; @@ -9249,7 +9468,7 @@ java.lang.String defaultValue) { for (int i = 0; i < dropColumns_.size(); i++) { output.writeMessage(1, dropColumns_.get(i)); } - getUnknownFields().writeTo(output); + unknownFields.writeTo(output); } @java.lang.Override @@ -9262,7 +9481,7 @@ java.lang.String defaultValue) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, dropColumns_.get(i)); } - size += getUnknownFields().getSerializedSize(); + size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @@ -9279,7 +9498,7 @@ java.lang.String defaultValue) { if (!getDropColumnsList() .equals(other.getDropColumnsList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -9294,7 +9513,7 @@ java.lang.String defaultValue) { hash = (37 * hash) + DROP_COLUMNS_FIELD_NUMBER; hash = (53 * hash) + getDropColumnsList().hashCode(); } - hash = (29 * hash) + getUnknownFields().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } @@ -9411,25 +9630,29 @@ java.lang.String defaultValue) { // Construct using io.greptime.v1.Ddl.DropColumns.newBuilder() private Builder() { - + maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getDropColumnsFieldBuilder(); + } } @java.lang.Override public Builder clear() { super.clear(); - bitField0_ = 0; if (dropColumnsBuilder_ == null) { dropColumns_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); } else { - dropColumns_ = null; dropColumnsBuilder_.clear(); } - bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -9456,13 +9679,7 @@ java.lang.String defaultValue) { @java.lang.Override public io.greptime.v1.Ddl.DropColumns buildPartial() { io.greptime.v1.Ddl.DropColumns result = new io.greptime.v1.Ddl.DropColumns(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.greptime.v1.Ddl.DropColumns result) { + int from_bitField0_ = bitField0_; if (dropColumnsBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { dropColumns_ = java.util.Collections.unmodifiableList(dropColumns_); @@ -9472,10 +9689,8 @@ java.lang.String defaultValue) { } else { result.dropColumns_ = dropColumnsBuilder_.build(); } - } - - private void buildPartial0(io.greptime.v1.Ddl.DropColumns result) { - int from_bitField0_ = bitField0_; + onBuilt(); + return result; } @java.lang.Override @@ -9548,7 +9763,7 @@ java.lang.String defaultValue) { } } } - this.mergeUnknownFields(other.getUnknownFields()); + this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @@ -9563,43 +9778,17 @@ java.lang.String defaultValue) { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } + io.greptime.v1.Ddl.DropColumns parsedMessage = null; try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - io.greptime.v1.Ddl.DropColumn m = - input.readMessage( - io.greptime.v1.Ddl.DropColumn.parser(), - extensionRegistry); - if (dropColumnsBuilder_ == null) { - ensureDropColumnsIsMutable(); - dropColumns_.add(m); - } else { - dropColumnsBuilder_.addMessage(m); - } - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (io.greptime.v1.Ddl.DropColumns) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - onChanged(); - } // finally + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } return this; } private int bitField0_; @@ -9876,18 +10065,7 @@ java.lang.String defaultValue) { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); + return new DropColumns(input, extensionRegistry); } }; @@ -9951,6 +10129,49 @@ java.lang.String defaultValue) { getUnknownFields() { return this.unknownFields; } + private RenameTable( + 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: { + java.lang.String s = input.readStringRequireUtf8(); + + newTableName_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.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 io.greptime.v1.Ddl.internal_static_greptime_v1_RenameTable_descriptor; @@ -9965,8 +10186,7 @@ java.lang.String defaultValue) { } public static final int NEW_TABLE_NAME_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object newTableName_ = ""; + private volatile java.lang.Object newTableName_; /** * string new_table_name = 1; * @return The newTableName. @@ -10017,10 +10237,10 @@ java.lang.String defaultValue) { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(newTableName_)) { + if (!getNewTableNameBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, newTableName_); } - getUnknownFields().writeTo(output); + unknownFields.writeTo(output); } @java.lang.Override @@ -10029,10 +10249,10 @@ java.lang.String defaultValue) { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(newTableName_)) { + if (!getNewTableNameBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, newTableName_); } - size += getUnknownFields().getSerializedSize(); + size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @@ -10049,7 +10269,7 @@ java.lang.String defaultValue) { if (!getNewTableName() .equals(other.getNewTableName())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -10062,7 +10282,7 @@ java.lang.String defaultValue) { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NEW_TABLE_NAME_FIELD_NUMBER; hash = (53 * hash) + getNewTableName().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } @@ -10179,19 +10399,24 @@ java.lang.String defaultValue) { // Construct using io.greptime.v1.Ddl.RenameTable.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(); - bitField0_ = 0; newTableName_ = ""; + return this; } @@ -10218,18 +10443,11 @@ java.lang.String defaultValue) { @java.lang.Override public io.greptime.v1.Ddl.RenameTable buildPartial() { io.greptime.v1.Ddl.RenameTable result = new io.greptime.v1.Ddl.RenameTable(this); - if (bitField0_ != 0) { buildPartial0(result); } + result.newTableName_ = newTableName_; onBuilt(); return result; } - private void buildPartial0(io.greptime.v1.Ddl.RenameTable result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.newTableName_ = newTableName_; - } - } - @java.lang.Override public Builder clone() { return super.clone(); @@ -10276,10 +10494,9 @@ java.lang.String defaultValue) { if (other == io.greptime.v1.Ddl.RenameTable.getDefaultInstance()) return this; if (!other.getNewTableName().isEmpty()) { newTableName_ = other.newTableName_; - bitField0_ |= 0x00000001; onChanged(); } - this.mergeUnknownFields(other.getUnknownFields()); + this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @@ -10294,38 +10511,19 @@ java.lang.String defaultValue) { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } + io.greptime.v1.Ddl.RenameTable parsedMessage = null; try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - newTableName_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (io.greptime.v1.Ddl.RenameTable) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - onChanged(); - } // finally + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } return this; } - private int bitField0_; private java.lang.Object newTableName_ = ""; /** @@ -10368,9 +10566,11 @@ java.lang.String defaultValue) { */ public Builder setNewTableName( java.lang.String value) { - if (value == null) { throw new NullPointerException(); } + if (value == null) { + throw new NullPointerException(); + } + newTableName_ = value; - bitField0_ |= 0x00000001; onChanged(); return this; } @@ -10379,8 +10579,8 @@ java.lang.String defaultValue) { * @return This builder for chaining. */ public Builder clearNewTableName() { + newTableName_ = getDefaultInstance().getNewTableName(); - bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } @@ -10391,10 +10591,12 @@ java.lang.String defaultValue) { */ public Builder setNewTableNameBytes( com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + newTableName_ = value; - bitField0_ |= 0x00000001; onChanged(); return this; } @@ -10431,18 +10633,7 @@ java.lang.String defaultValue) { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); + return new RenameTable(input, extensionRegistry); } }; @@ -10486,6 +10677,21 @@ java.lang.String defaultValue) { * @return The isKey. */ boolean getIsKey(); + + /** + * .greptime.v1.AddColumn.Location location = 3; + * @return Whether the location field is set. + */ + boolean hasLocation(); + /** + * .greptime.v1.AddColumn.Location location = 3; + * @return The location. + */ + io.greptime.v1.Ddl.AddColumn.Location getLocation(); + /** + * .greptime.v1.AddColumn.Location location = 3; + */ + io.greptime.v1.Ddl.AddColumn.LocationOrBuilder getLocationOrBuilder(); } /** * Protobuf type {@code greptime.v1.AddColumn} @@ -10514,6 +10720,74 @@ java.lang.String defaultValue) { getUnknownFields() { return this.unknownFields; } + private AddColumn( + 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.Columns.ColumnDef.Builder subBuilder = null; + if (columnDef_ != null) { + subBuilder = columnDef_.toBuilder(); + } + columnDef_ = input.readMessage(io.greptime.v1.Columns.ColumnDef.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(columnDef_); + columnDef_ = subBuilder.buildPartial(); + } + + break; + } + case 16: { + + isKey_ = input.readBool(); + break; + } + case 26: { + io.greptime.v1.Ddl.AddColumn.Location.Builder subBuilder = null; + if (location_ != null) { + subBuilder = location_.toBuilder(); + } + location_ = input.readMessage(io.greptime.v1.Ddl.AddColumn.Location.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(location_); + location_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.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 io.greptime.v1.Ddl.internal_static_greptime_v1_AddColumn_descriptor; @@ -10527,6 +10801,789 @@ java.lang.String defaultValue) { io.greptime.v1.Ddl.AddColumn.class, io.greptime.v1.Ddl.AddColumn.Builder.class); } + public interface LocationOrBuilder extends + // @@protoc_insertion_point(interface_extends:greptime.v1.AddColumn.Location) + com.google.protobuf.MessageOrBuilder { + + /** + * .greptime.v1.AddColumn.Location.LocationType location_type = 1; + * @return The enum numeric value on the wire for locationType. + */ + int getLocationTypeValue(); + /** + * .greptime.v1.AddColumn.Location.LocationType location_type = 1; + * @return The locationType. + */ + io.greptime.v1.Ddl.AddColumn.Location.LocationType getLocationType(); + + /** + * string after_cloumn_name = 2; + * @return The afterCloumnName. + */ + java.lang.String getAfterCloumnName(); + /** + * string after_cloumn_name = 2; + * @return The bytes for afterCloumnName. + */ + com.google.protobuf.ByteString + getAfterCloumnNameBytes(); + } + /** + * Protobuf type {@code greptime.v1.AddColumn.Location} + */ + public static final class Location extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:greptime.v1.AddColumn.Location) + LocationOrBuilder { + private static final long serialVersionUID = 0L; + // Use Location.newBuilder() to construct. + private Location(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Location() { + locationType_ = 0; + afterCloumnName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Location(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Location( + 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 8: { + int rawValue = input.readEnum(); + + locationType_ = rawValue; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + afterCloumnName_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.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 io.greptime.v1.Ddl.internal_static_greptime_v1_AddColumn_Location_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.greptime.v1.Ddl.internal_static_greptime_v1_AddColumn_Location_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.greptime.v1.Ddl.AddColumn.Location.class, io.greptime.v1.Ddl.AddColumn.Location.Builder.class); + } + + /** + * Protobuf enum {@code greptime.v1.AddColumn.Location.LocationType} + */ + public enum LocationType + implements com.google.protobuf.ProtocolMessageEnum { + /** + * FIRST = 0; + */ + FIRST(0), + /** + * AFTER = 1; + */ + AFTER(1), + UNRECOGNIZED(-1), + ; + + /** + * FIRST = 0; + */ + public static final int FIRST_VALUE = 0; + /** + * AFTER = 1; + */ + public static final int AFTER_VALUE = 1; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static LocationType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static LocationType forNumber(int value) { + switch (value) { + case 0: return FIRST; + case 1: return AFTER; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + LocationType> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public LocationType findValueByNumber(int number) { + return LocationType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return io.greptime.v1.Ddl.AddColumn.Location.getDescriptor().getEnumTypes().get(0); + } + + private static final LocationType[] VALUES = values(); + + public static LocationType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private LocationType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:greptime.v1.AddColumn.Location.LocationType) + } + + public static final int LOCATION_TYPE_FIELD_NUMBER = 1; + private int locationType_; + /** + * .greptime.v1.AddColumn.Location.LocationType location_type = 1; + * @return The enum numeric value on the wire for locationType. + */ + @java.lang.Override public int getLocationTypeValue() { + return locationType_; + } + /** + * .greptime.v1.AddColumn.Location.LocationType location_type = 1; + * @return The locationType. + */ + @java.lang.Override public io.greptime.v1.Ddl.AddColumn.Location.LocationType getLocationType() { + @SuppressWarnings("deprecation") + io.greptime.v1.Ddl.AddColumn.Location.LocationType result = io.greptime.v1.Ddl.AddColumn.Location.LocationType.valueOf(locationType_); + return result == null ? io.greptime.v1.Ddl.AddColumn.Location.LocationType.UNRECOGNIZED : result; + } + + public static final int AFTER_CLOUMN_NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object afterCloumnName_; + /** + * string after_cloumn_name = 2; + * @return The afterCloumnName. + */ + @java.lang.Override + public java.lang.String getAfterCloumnName() { + java.lang.Object ref = afterCloumnName_; + 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(); + afterCloumnName_ = s; + return s; + } + } + /** + * string after_cloumn_name = 2; + * @return The bytes for afterCloumnName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getAfterCloumnNameBytes() { + java.lang.Object ref = afterCloumnName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + afterCloumnName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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 (locationType_ != io.greptime.v1.Ddl.AddColumn.Location.LocationType.FIRST.getNumber()) { + output.writeEnum(1, locationType_); + } + if (!getAfterCloumnNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, afterCloumnName_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (locationType_ != io.greptime.v1.Ddl.AddColumn.Location.LocationType.FIRST.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, locationType_); + } + if (!getAfterCloumnNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, afterCloumnName_); + } + 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 io.greptime.v1.Ddl.AddColumn.Location)) { + return super.equals(obj); + } + io.greptime.v1.Ddl.AddColumn.Location other = (io.greptime.v1.Ddl.AddColumn.Location) obj; + + if (locationType_ != other.locationType_) return false; + if (!getAfterCloumnName() + .equals(other.getAfterCloumnName())) 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(); + hash = (37 * hash) + LOCATION_TYPE_FIELD_NUMBER; + hash = (53 * hash) + locationType_; + hash = (37 * hash) + AFTER_CLOUMN_NAME_FIELD_NUMBER; + hash = (53 * hash) + getAfterCloumnName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.greptime.v1.Ddl.AddColumn.Location parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.greptime.v1.Ddl.AddColumn.Location parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.greptime.v1.Ddl.AddColumn.Location parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.greptime.v1.Ddl.AddColumn.Location parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.greptime.v1.Ddl.AddColumn.Location parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.greptime.v1.Ddl.AddColumn.Location parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.greptime.v1.Ddl.AddColumn.Location parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.greptime.v1.Ddl.AddColumn.Location 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 io.greptime.v1.Ddl.AddColumn.Location parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.greptime.v1.Ddl.AddColumn.Location 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 io.greptime.v1.Ddl.AddColumn.Location parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.greptime.v1.Ddl.AddColumn.Location 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(io.greptime.v1.Ddl.AddColumn.Location 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.AddColumn.Location} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:greptime.v1.AddColumn.Location) + io.greptime.v1.Ddl.AddColumn.LocationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.greptime.v1.Ddl.internal_static_greptime_v1_AddColumn_Location_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.greptime.v1.Ddl.internal_static_greptime_v1_AddColumn_Location_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.greptime.v1.Ddl.AddColumn.Location.class, io.greptime.v1.Ddl.AddColumn.Location.Builder.class); + } + + // Construct using io.greptime.v1.Ddl.AddColumn.Location.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(); + locationType_ = 0; + + afterCloumnName_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.greptime.v1.Ddl.internal_static_greptime_v1_AddColumn_Location_descriptor; + } + + @java.lang.Override + public io.greptime.v1.Ddl.AddColumn.Location getDefaultInstanceForType() { + return io.greptime.v1.Ddl.AddColumn.Location.getDefaultInstance(); + } + + @java.lang.Override + public io.greptime.v1.Ddl.AddColumn.Location build() { + io.greptime.v1.Ddl.AddColumn.Location result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.greptime.v1.Ddl.AddColumn.Location buildPartial() { + io.greptime.v1.Ddl.AddColumn.Location result = new io.greptime.v1.Ddl.AddColumn.Location(this); + result.locationType_ = locationType_; + result.afterCloumnName_ = afterCloumnName_; + 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 io.greptime.v1.Ddl.AddColumn.Location) { + return mergeFrom((io.greptime.v1.Ddl.AddColumn.Location)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.greptime.v1.Ddl.AddColumn.Location other) { + if (other == io.greptime.v1.Ddl.AddColumn.Location.getDefaultInstance()) return this; + if (other.locationType_ != 0) { + setLocationTypeValue(other.getLocationTypeValue()); + } + if (!other.getAfterCloumnName().isEmpty()) { + afterCloumnName_ = other.afterCloumnName_; + onChanged(); + } + 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 { + io.greptime.v1.Ddl.AddColumn.Location parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (io.greptime.v1.Ddl.AddColumn.Location) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int locationType_ = 0; + /** + * .greptime.v1.AddColumn.Location.LocationType location_type = 1; + * @return The enum numeric value on the wire for locationType. + */ + @java.lang.Override public int getLocationTypeValue() { + return locationType_; + } + /** + * .greptime.v1.AddColumn.Location.LocationType location_type = 1; + * @param value The enum numeric value on the wire for locationType to set. + * @return This builder for chaining. + */ + public Builder setLocationTypeValue(int value) { + + locationType_ = value; + onChanged(); + return this; + } + /** + * .greptime.v1.AddColumn.Location.LocationType location_type = 1; + * @return The locationType. + */ + @java.lang.Override + public io.greptime.v1.Ddl.AddColumn.Location.LocationType getLocationType() { + @SuppressWarnings("deprecation") + io.greptime.v1.Ddl.AddColumn.Location.LocationType result = io.greptime.v1.Ddl.AddColumn.Location.LocationType.valueOf(locationType_); + return result == null ? io.greptime.v1.Ddl.AddColumn.Location.LocationType.UNRECOGNIZED : result; + } + /** + * .greptime.v1.AddColumn.Location.LocationType location_type = 1; + * @param value The locationType to set. + * @return This builder for chaining. + */ + public Builder setLocationType(io.greptime.v1.Ddl.AddColumn.Location.LocationType value) { + if (value == null) { + throw new NullPointerException(); + } + + locationType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .greptime.v1.AddColumn.Location.LocationType location_type = 1; + * @return This builder for chaining. + */ + public Builder clearLocationType() { + + locationType_ = 0; + onChanged(); + return this; + } + + private java.lang.Object afterCloumnName_ = ""; + /** + * string after_cloumn_name = 2; + * @return The afterCloumnName. + */ + public java.lang.String getAfterCloumnName() { + java.lang.Object ref = afterCloumnName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + afterCloumnName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string after_cloumn_name = 2; + * @return The bytes for afterCloumnName. + */ + public com.google.protobuf.ByteString + getAfterCloumnNameBytes() { + java.lang.Object ref = afterCloumnName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + afterCloumnName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string after_cloumn_name = 2; + * @param value The afterCloumnName to set. + * @return This builder for chaining. + */ + public Builder setAfterCloumnName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + afterCloumnName_ = value; + onChanged(); + return this; + } + /** + * string after_cloumn_name = 2; + * @return This builder for chaining. + */ + public Builder clearAfterCloumnName() { + + afterCloumnName_ = getDefaultInstance().getAfterCloumnName(); + onChanged(); + return this; + } + /** + * string after_cloumn_name = 2; + * @param value The bytes for afterCloumnName to set. + * @return This builder for chaining. + */ + public Builder setAfterCloumnNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + afterCloumnName_ = value; + onChanged(); + return this; + } + @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.AddColumn.Location) + } + + // @@protoc_insertion_point(class_scope:greptime.v1.AddColumn.Location) + private static final io.greptime.v1.Ddl.AddColumn.Location DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.greptime.v1.Ddl.AddColumn.Location(); + } + + public static io.greptime.v1.Ddl.AddColumn.Location getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Location parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Location(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 io.greptime.v1.Ddl.AddColumn.Location getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + public static final int COLUMN_DEF_FIELD_NUMBER = 1; private io.greptime.v1.Columns.ColumnDef columnDef_; /** @@ -10550,11 +11607,11 @@ java.lang.String defaultValue) { */ @java.lang.Override public io.greptime.v1.Columns.ColumnDefOrBuilder getColumnDefOrBuilder() { - return columnDef_ == null ? io.greptime.v1.Columns.ColumnDef.getDefaultInstance() : columnDef_; + return getColumnDef(); } public static final int IS_KEY_FIELD_NUMBER = 2; - private boolean isKey_ = false; + private boolean isKey_; /** * bool is_key = 2; * @return The isKey. @@ -10564,6 +11621,32 @@ java.lang.String defaultValue) { return isKey_; } + public static final int LOCATION_FIELD_NUMBER = 3; + private io.greptime.v1.Ddl.AddColumn.Location location_; + /** + * .greptime.v1.AddColumn.Location location = 3; + * @return Whether the location field is set. + */ + @java.lang.Override + public boolean hasLocation() { + return location_ != null; + } + /** + * .greptime.v1.AddColumn.Location location = 3; + * @return The location. + */ + @java.lang.Override + public io.greptime.v1.Ddl.AddColumn.Location getLocation() { + return location_ == null ? io.greptime.v1.Ddl.AddColumn.Location.getDefaultInstance() : location_; + } + /** + * .greptime.v1.AddColumn.Location location = 3; + */ + @java.lang.Override + public io.greptime.v1.Ddl.AddColumn.LocationOrBuilder getLocationOrBuilder() { + return getLocation(); + } + private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { @@ -10584,7 +11667,10 @@ java.lang.String defaultValue) { if (isKey_ != false) { output.writeBool(2, isKey_); } - getUnknownFields().writeTo(output); + if (location_ != null) { + output.writeMessage(3, getLocation()); + } + unknownFields.writeTo(output); } @java.lang.Override @@ -10601,7 +11687,11 @@ java.lang.String defaultValue) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(2, isKey_); } - size += getUnknownFields().getSerializedSize(); + if (location_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getLocation()); + } + size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @@ -10623,7 +11713,12 @@ java.lang.String defaultValue) { } if (getIsKey() != other.getIsKey()) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; + if (hasLocation() != other.hasLocation()) return false; + if (hasLocation()) { + if (!getLocation() + .equals(other.getLocation())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -10641,7 +11736,11 @@ java.lang.String defaultValue) { hash = (37 * hash) + IS_KEY_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( getIsKey()); - hash = (29 * hash) + getUnknownFields().hashCode(); + if (hasLocation()) { + hash = (37 * hash) + LOCATION_FIELD_NUMBER; + hash = (53 * hash) + getLocation().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } @@ -10758,24 +11857,36 @@ java.lang.String defaultValue) { // Construct using io.greptime.v1.Ddl.AddColumn.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(); - bitField0_ = 0; - columnDef_ = null; - if (columnDefBuilder_ != null) { - columnDefBuilder_.dispose(); + if (columnDefBuilder_ == null) { + columnDef_ = null; + } else { + columnDef_ = null; columnDefBuilder_ = null; } isKey_ = false; + + if (locationBuilder_ == null) { + location_ = null; + } else { + location_ = null; + locationBuilder_ = null; + } return this; } @@ -10802,23 +11913,21 @@ java.lang.String defaultValue) { @java.lang.Override public io.greptime.v1.Ddl.AddColumn buildPartial() { io.greptime.v1.Ddl.AddColumn result = new io.greptime.v1.Ddl.AddColumn(this); - if (bitField0_ != 0) { buildPartial0(result); } + if (columnDefBuilder_ == null) { + result.columnDef_ = columnDef_; + } else { + result.columnDef_ = columnDefBuilder_.build(); + } + result.isKey_ = isKey_; + if (locationBuilder_ == null) { + result.location_ = location_; + } else { + result.location_ = locationBuilder_.build(); + } onBuilt(); return result; } - private void buildPartial0(io.greptime.v1.Ddl.AddColumn result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.columnDef_ = columnDefBuilder_ == null - ? columnDef_ - : columnDefBuilder_.build(); - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.isKey_ = isKey_; - } - } - @java.lang.Override public Builder clone() { return super.clone(); @@ -10869,7 +11978,10 @@ java.lang.String defaultValue) { if (other.getIsKey() != false) { setIsKey(other.getIsKey()); } - this.mergeUnknownFields(other.getUnknownFields()); + if (other.hasLocation()) { + mergeLocation(other.getLocation()); + } + this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @@ -10884,45 +11996,19 @@ java.lang.String defaultValue) { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } + io.greptime.v1.Ddl.AddColumn parsedMessage = null; try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - input.readMessage( - getColumnDefFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 16: { - isKey_ = input.readBool(); - bitField0_ |= 0x00000002; - break; - } // case 16 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (io.greptime.v1.Ddl.AddColumn) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - onChanged(); - } // finally + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } return this; } - private int bitField0_; private io.greptime.v1.Columns.ColumnDef columnDef_; private com.google.protobuf.SingleFieldBuilderV3< @@ -10932,7 +12018,7 @@ java.lang.String defaultValue) { * @return Whether the columnDef field is set. */ public boolean hasColumnDef() { - return ((bitField0_ & 0x00000001) != 0); + return columnDefBuilder_ != null || columnDef_ != null; } /** * .greptime.v1.ColumnDef column_def = 1; @@ -10954,11 +12040,11 @@ java.lang.String defaultValue) { throw new NullPointerException(); } columnDef_ = value; + onChanged(); } else { columnDefBuilder_.setMessage(value); } - bitField0_ |= 0x00000001; - onChanged(); + return this; } /** @@ -10968,11 +12054,11 @@ java.lang.String defaultValue) { io.greptime.v1.Columns.ColumnDef.Builder builderForValue) { if (columnDefBuilder_ == null) { columnDef_ = builderForValue.build(); + onChanged(); } else { columnDefBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000001; - onChanged(); + return this; } /** @@ -10980,38 +12066,38 @@ java.lang.String defaultValue) { */ public Builder mergeColumnDef(io.greptime.v1.Columns.ColumnDef value) { if (columnDefBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - columnDef_ != null && - columnDef_ != io.greptime.v1.Columns.ColumnDef.getDefaultInstance()) { - getColumnDefBuilder().mergeFrom(value); + if (columnDef_ != null) { + columnDef_ = + io.greptime.v1.Columns.ColumnDef.newBuilder(columnDef_).mergeFrom(value).buildPartial(); } else { columnDef_ = value; } + onChanged(); } else { columnDefBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000001; - onChanged(); + return this; } /** * .greptime.v1.ColumnDef column_def = 1; */ public Builder clearColumnDef() { - bitField0_ = (bitField0_ & ~0x00000001); - columnDef_ = null; - if (columnDefBuilder_ != null) { - columnDefBuilder_.dispose(); + if (columnDefBuilder_ == null) { + columnDef_ = null; + onChanged(); + } else { + columnDef_ = null; columnDefBuilder_ = null; } - onChanged(); + return this; } /** * .greptime.v1.ColumnDef column_def = 1; */ public io.greptime.v1.Columns.ColumnDef.Builder getColumnDefBuilder() { - bitField0_ |= 0x00000001; + onChanged(); return getColumnDefFieldBuilder().getBuilder(); } @@ -11060,7 +12146,6 @@ java.lang.String defaultValue) { public Builder setIsKey(boolean value) { isKey_ = value; - bitField0_ |= 0x00000002; onChanged(); return this; } @@ -11069,11 +12154,130 @@ java.lang.String defaultValue) { * @return This builder for chaining. */ public Builder clearIsKey() { - bitField0_ = (bitField0_ & ~0x00000002); + isKey_ = false; onChanged(); return this; } + + private io.greptime.v1.Ddl.AddColumn.Location location_; + private com.google.protobuf.SingleFieldBuilderV3< + io.greptime.v1.Ddl.AddColumn.Location, io.greptime.v1.Ddl.AddColumn.Location.Builder, io.greptime.v1.Ddl.AddColumn.LocationOrBuilder> locationBuilder_; + /** + * .greptime.v1.AddColumn.Location location = 3; + * @return Whether the location field is set. + */ + public boolean hasLocation() { + return locationBuilder_ != null || location_ != null; + } + /** + * .greptime.v1.AddColumn.Location location = 3; + * @return The location. + */ + public io.greptime.v1.Ddl.AddColumn.Location getLocation() { + if (locationBuilder_ == null) { + return location_ == null ? io.greptime.v1.Ddl.AddColumn.Location.getDefaultInstance() : location_; + } else { + return locationBuilder_.getMessage(); + } + } + /** + * .greptime.v1.AddColumn.Location location = 3; + */ + public Builder setLocation(io.greptime.v1.Ddl.AddColumn.Location value) { + if (locationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + location_ = value; + onChanged(); + } else { + locationBuilder_.setMessage(value); + } + + return this; + } + /** + * .greptime.v1.AddColumn.Location location = 3; + */ + public Builder setLocation( + io.greptime.v1.Ddl.AddColumn.Location.Builder builderForValue) { + if (locationBuilder_ == null) { + location_ = builderForValue.build(); + onChanged(); + } else { + locationBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .greptime.v1.AddColumn.Location location = 3; + */ + public Builder mergeLocation(io.greptime.v1.Ddl.AddColumn.Location value) { + if (locationBuilder_ == null) { + if (location_ != null) { + location_ = + io.greptime.v1.Ddl.AddColumn.Location.newBuilder(location_).mergeFrom(value).buildPartial(); + } else { + location_ = value; + } + onChanged(); + } else { + locationBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .greptime.v1.AddColumn.Location location = 3; + */ + public Builder clearLocation() { + if (locationBuilder_ == null) { + location_ = null; + onChanged(); + } else { + location_ = null; + locationBuilder_ = null; + } + + return this; + } + /** + * .greptime.v1.AddColumn.Location location = 3; + */ + public io.greptime.v1.Ddl.AddColumn.Location.Builder getLocationBuilder() { + + onChanged(); + return getLocationFieldBuilder().getBuilder(); + } + /** + * .greptime.v1.AddColumn.Location location = 3; + */ + public io.greptime.v1.Ddl.AddColumn.LocationOrBuilder getLocationOrBuilder() { + if (locationBuilder_ != null) { + return locationBuilder_.getMessageOrBuilder(); + } else { + return location_ == null ? + io.greptime.v1.Ddl.AddColumn.Location.getDefaultInstance() : location_; + } + } + /** + * .greptime.v1.AddColumn.Location location = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.greptime.v1.Ddl.AddColumn.Location, io.greptime.v1.Ddl.AddColumn.Location.Builder, io.greptime.v1.Ddl.AddColumn.LocationOrBuilder> + getLocationFieldBuilder() { + if (locationBuilder_ == null) { + locationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.greptime.v1.Ddl.AddColumn.Location, io.greptime.v1.Ddl.AddColumn.Location.Builder, io.greptime.v1.Ddl.AddColumn.LocationOrBuilder>( + getLocation(), + getParentForChildren(), + isClean()); + location_ = null; + } + return locationBuilder_; + } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -11107,18 +12311,7 @@ java.lang.String defaultValue) { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); + return new AddColumn(input, extensionRegistry); } }; @@ -11182,6 +12375,49 @@ java.lang.String defaultValue) { getUnknownFields() { return this.unknownFields; } + private DropColumn( + 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: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.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 io.greptime.v1.Ddl.internal_static_greptime_v1_DropColumn_descriptor; @@ -11196,8 +12432,7 @@ java.lang.String defaultValue) { } public static final int NAME_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; + private volatile java.lang.Object name_; /** * string name = 1; * @return The name. @@ -11248,10 +12483,10 @@ java.lang.String defaultValue) { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + if (!getNameBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } - getUnknownFields().writeTo(output); + unknownFields.writeTo(output); } @java.lang.Override @@ -11260,10 +12495,10 @@ java.lang.String defaultValue) { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + if (!getNameBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } - size += getUnknownFields().getSerializedSize(); + size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @@ -11280,7 +12515,7 @@ java.lang.String defaultValue) { if (!getName() .equals(other.getName())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -11293,7 +12528,7 @@ java.lang.String defaultValue) { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } @@ -11410,19 +12645,24 @@ java.lang.String defaultValue) { // Construct using io.greptime.v1.Ddl.DropColumn.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(); - bitField0_ = 0; name_ = ""; + return this; } @@ -11449,18 +12689,11 @@ java.lang.String defaultValue) { @java.lang.Override public io.greptime.v1.Ddl.DropColumn buildPartial() { io.greptime.v1.Ddl.DropColumn result = new io.greptime.v1.Ddl.DropColumn(this); - if (bitField0_ != 0) { buildPartial0(result); } + result.name_ = name_; onBuilt(); return result; } - private void buildPartial0(io.greptime.v1.Ddl.DropColumn result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.name_ = name_; - } - } - @java.lang.Override public Builder clone() { return super.clone(); @@ -11507,10 +12740,9 @@ java.lang.String defaultValue) { if (other == io.greptime.v1.Ddl.DropColumn.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; - bitField0_ |= 0x00000001; onChanged(); } - this.mergeUnknownFields(other.getUnknownFields()); + this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @@ -11525,38 +12757,19 @@ java.lang.String defaultValue) { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } + io.greptime.v1.Ddl.DropColumn parsedMessage = null; try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (io.greptime.v1.Ddl.DropColumn) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - onChanged(); - } // finally + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } return this; } - private int bitField0_; private java.lang.Object name_ = ""; /** @@ -11599,9 +12812,11 @@ java.lang.String defaultValue) { */ public Builder setName( java.lang.String value) { - if (value == null) { throw new NullPointerException(); } + if (value == null) { + throw new NullPointerException(); + } + name_ = value; - bitField0_ |= 0x00000001; onChanged(); return this; } @@ -11610,8 +12825,8 @@ java.lang.String defaultValue) { * @return This builder for chaining. */ public Builder clearName() { + name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } @@ -11622,10 +12837,12 @@ java.lang.String defaultValue) { */ public Builder setNameBytes( com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; - bitField0_ |= 0x00000001; onChanged(); return this; } @@ -11662,18 +12879,7 @@ java.lang.String defaultValue) { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); + return new DropColumn(input, extensionRegistry); } }; @@ -11730,6 +12936,48 @@ java.lang.String defaultValue) { getUnknownFields() { return this.unknownFields; } + private TableId( + 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 8: { + + id_ = input.readUInt32(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.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 io.greptime.v1.Ddl.internal_static_greptime_v1_TableId_descriptor; @@ -11744,7 +12992,7 @@ java.lang.String defaultValue) { } public static final int ID_FIELD_NUMBER = 1; - private int id_ = 0; + private int id_; /** * uint32 id = 1; * @return The id. @@ -11771,7 +13019,7 @@ java.lang.String defaultValue) { if (id_ != 0) { output.writeUInt32(1, id_); } - getUnknownFields().writeTo(output); + unknownFields.writeTo(output); } @java.lang.Override @@ -11784,7 +13032,7 @@ java.lang.String defaultValue) { size += com.google.protobuf.CodedOutputStream .computeUInt32Size(1, id_); } - size += getUnknownFields().getSerializedSize(); + size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @@ -11801,7 +13049,7 @@ java.lang.String defaultValue) { if (getId() != other.getId()) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -11814,7 +13062,7 @@ java.lang.String defaultValue) { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + ID_FIELD_NUMBER; hash = (53 * hash) + getId(); - hash = (29 * hash) + getUnknownFields().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } @@ -11931,19 +13179,24 @@ java.lang.String defaultValue) { // Construct using io.greptime.v1.Ddl.TableId.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(); - bitField0_ = 0; id_ = 0; + return this; } @@ -11970,18 +13223,11 @@ java.lang.String defaultValue) { @java.lang.Override public io.greptime.v1.Ddl.TableId buildPartial() { io.greptime.v1.Ddl.TableId result = new io.greptime.v1.Ddl.TableId(this); - if (bitField0_ != 0) { buildPartial0(result); } + result.id_ = id_; onBuilt(); return result; } - private void buildPartial0(io.greptime.v1.Ddl.TableId result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.id_ = id_; - } - } - @java.lang.Override public Builder clone() { return super.clone(); @@ -12029,7 +13275,7 @@ java.lang.String defaultValue) { if (other.getId() != 0) { setId(other.getId()); } - this.mergeUnknownFields(other.getUnknownFields()); + this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @@ -12044,38 +13290,19 @@ java.lang.String defaultValue) { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } + io.greptime.v1.Ddl.TableId parsedMessage = null; try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - id_ = input.readUInt32(); - bitField0_ |= 0x00000001; - break; - } // case 8 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (io.greptime.v1.Ddl.TableId) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - onChanged(); - } // finally + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } return this; } - private int bitField0_; private int id_ ; /** @@ -12094,7 +13321,6 @@ java.lang.String defaultValue) { public Builder setId(int value) { id_ = value; - bitField0_ |= 0x00000001; onChanged(); return this; } @@ -12103,7 +13329,7 @@ java.lang.String defaultValue) { * @return This builder for chaining. */ public Builder clearId() { - bitField0_ = (bitField0_ & ~0x00000001); + id_ = 0; onChanged(); return this; @@ -12141,18 +13367,7 @@ java.lang.String defaultValue) { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); + return new TableId(input, extensionRegistry); } }; @@ -12227,6 +13442,11 @@ java.lang.String defaultValue) { private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_greptime_v1_AddColumn_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_greptime_v1_AddColumn_Location_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_greptime_v1_AddColumn_Location_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_greptime_v1_DropColumn_descriptor; private static final @@ -12281,12 +13501,17 @@ java.lang.String defaultValue) { "\013add_columns\030\001 \003(\0132\026.greptime.v1.AddColu" + "mn\"<\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\"G\n\tAddColumn\022*\n\n" + - "column_def\030\001 \001(\0132\026.greptime.v1.ColumnDef" + - "\022\016\n\006is_key\030\002 \001(\010\"\032\n\nDropColumn\022\014\n\004name\030\001" + - " \001(\t\"\025\n\007TableId\022\n\n\002id\030\001 \001(\rBL\n\016io.grepti" + - "me.v1B\003DdlZ5github.com/GreptimeTeam/grep" + - "time-proto/go/greptime/v1b\006proto3" + "\026\n\016new_table_name\030\001 \001(\t\"\215\002\n\tAddColumn\022*\n" + + "\ncolumn_def\030\001 \001(\0132\026.greptime.v1.ColumnDe" + + "f\022\016\n\006is_key\030\002 \001(\010\0221\n\010location\030\003 \001(\0132\037.gr" + + "eptime.v1.AddColumn.Location\032\220\001\n\010Locatio" + + "n\022C\n\rlocation_type\030\001 \001(\0162,.greptime.v1.A" + + "ddColumn.Location.LocationType\022\031\n\021after_" + + "cloumn_name\030\002 \001(\t\"$\n\014LocationType\022\t\n\005FIR" + + "ST\020\000\022\t\n\005AFTER\020\001\"\032\n\nDropColumn\022\014\n\004name\030\001 " + + "\001(\t\"\025\n\007TableId\022\n\n\002id\030\001 \001(\rBL\n\016io.greptim" + + "e.v1B\003DdlZ5github.com/GreptimeTeam/grept" + + "ime-proto/go/greptime/v1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, @@ -12358,7 +13583,13 @@ java.lang.String defaultValue) { internal_static_greptime_v1_AddColumn_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_greptime_v1_AddColumn_descriptor, - new java.lang.String[] { "ColumnDef", "IsKey", }); + new java.lang.String[] { "ColumnDef", "IsKey", "Location", }); + internal_static_greptime_v1_AddColumn_Location_descriptor = + internal_static_greptime_v1_AddColumn_descriptor.getNestedTypes().get(0); + internal_static_greptime_v1_AddColumn_Location_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_greptime_v1_AddColumn_Location_descriptor, + new java.lang.String[] { "LocationType", "AfterCloumnName", }); internal_static_greptime_v1_DropColumn_descriptor = getDescriptor().getMessageTypes().get(10); internal_static_greptime_v1_DropColumn_fieldAccessorTable = new diff --git a/proto/greptime/v1/ddl.proto b/proto/greptime/v1/ddl.proto index 9270cc8..2acd65f 100644 --- a/proto/greptime/v1/ddl.proto +++ b/proto/greptime/v1/ddl.proto @@ -90,6 +90,16 @@ message RenameTable { string new_table_name = 1; } message AddColumn { ColumnDef column_def = 1; bool is_key = 2; + + message Location { + enum LocationType { + FIRST = 0; + AFTER = 1; + } + LocationType location_type = 1; + string after_cloumn_name = 2; + } + Location location = 3; } message DropColumn { string name = 1; }