From 8b38a6357d79fc81ed497c3b366aeed433fa5b73 Mon Sep 17 00:00:00 2001 From: yuanbohan Date: Wed, 22 May 2024 16:11:04 +0800 Subject: [PATCH 1/3] column option --- .gitignore | 1 + go/greptime/v1/row.pb.go | 235 +++++++++++++++++++----------------- proto/greptime/v1/row.proto | 3 + 3 files changed, 131 insertions(+), 108 deletions(-) diff --git a/.gitignore b/.gitignore index 4d48f5a7..71d136a1 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,4 @@ Cargo.lock # ccls cache dir .ccls-cache/ +java/target/ diff --git a/go/greptime/v1/row.pb.go b/go/greptime/v1/row.pb.go index 5d647e96..d039df42 100644 --- a/go/greptime/v1/row.pb.go +++ b/go/greptime/v1/row.pb.go @@ -99,6 +99,8 @@ type ColumnSchema struct { SemanticType SemanticType `protobuf:"varint,3,opt,name=semantic_type,json=semanticType,proto3,enum=greptime.v1.SemanticType" json:"semantic_type,omitempty"` // Extension for ColumnDataType. DatatypeExtension *ColumnDataTypeExtension `protobuf:"bytes,4,opt,name=datatype_extension,json=datatypeExtension,proto3" json:"datatype_extension,omitempty"` + // "index.type": "inverted" to indicate inverted index + Options map[string]string `protobuf:"bytes,5,rep,name=options,proto3" json:"options,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } func (x *ColumnSchema) Reset() { @@ -161,6 +163,13 @@ func (x *ColumnSchema) GetDatatypeExtension() *ColumnDataTypeExtension { return nil } +func (x *ColumnSchema) GetOptions() map[string]string { + if x != nil { + return x.Options + } + return nil +} + type Row struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -652,7 +661,7 @@ var file_greptime_v1_row_proto_rawDesc = []byte{ 0x61, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x24, 0x0a, 0x04, 0x72, 0x6f, 0x77, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x6f, 0x77, 0x52, 0x04, 0x72, 0x6f, 0x77, 0x73, 0x22, - 0xfd, 0x01, 0x0a, 0x0c, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, + 0xfb, 0x02, 0x0a, 0x0c, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x37, 0x0a, 0x08, 0x64, 0x61, 0x74, 0x61, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, @@ -667,95 +676,103 @@ var file_greptime_v1_row_proto_rawDesc = []byte{ 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x11, 0x64, 0x61, - 0x74, 0x61, 0x74, 0x79, 0x70, 0x65, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, - 0x31, 0x0a, 0x03, 0x52, 0x6f, 0x77, 0x12, 0x2a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, - 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x73, 0x22, 0xef, 0x09, 0x0a, 0x05, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1b, 0x0a, 0x08, - 0x69, 0x38, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x48, 0x00, - 0x52, 0x07, 0x69, 0x38, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1d, 0x0a, 0x09, 0x69, 0x31, 0x36, - 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x48, 0x00, 0x52, 0x08, - 0x69, 0x31, 0x36, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1d, 0x0a, 0x09, 0x69, 0x33, 0x32, 0x5f, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x48, 0x00, 0x52, 0x08, 0x69, - 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1d, 0x0a, 0x09, 0x69, 0x36, 0x34, 0x5f, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x08, 0x69, 0x36, - 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1b, 0x0a, 0x08, 0x75, 0x38, 0x5f, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x07, 0x75, 0x38, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x12, 0x1d, 0x0a, 0x09, 0x75, 0x31, 0x36, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x08, 0x75, 0x31, 0x36, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x12, 0x1d, 0x0a, 0x09, 0x75, 0x33, 0x32, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x07, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x08, 0x75, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x12, 0x1d, 0x0a, 0x09, 0x75, 0x36, 0x34, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x08, - 0x20, 0x01, 0x28, 0x04, 0x48, 0x00, 0x52, 0x08, 0x75, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x12, 0x1d, 0x0a, 0x09, 0x66, 0x33, 0x32, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x09, 0x20, - 0x01, 0x28, 0x02, 0x48, 0x00, 0x52, 0x08, 0x66, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, - 0x1d, 0x0a, 0x09, 0x66, 0x36, 0x34, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0a, 0x20, 0x01, - 0x28, 0x01, 0x48, 0x00, 0x52, 0x08, 0x66, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1f, - 0x0a, 0x0a, 0x62, 0x6f, 0x6f, 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0b, 0x20, 0x01, - 0x28, 0x08, 0x48, 0x00, 0x52, 0x09, 0x62, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, - 0x23, 0x0a, 0x0c, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x0c, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x0b, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x12, 0x23, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x74, - 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1f, 0x0a, 0x0a, 0x64, 0x61, 0x74, - 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x05, 0x48, 0x00, 0x52, - 0x09, 0x64, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x27, 0x0a, 0x0e, 0x64, 0x61, - 0x74, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0f, 0x20, 0x01, - 0x28, 0x03, 0x48, 0x00, 0x52, 0x0d, 0x64, 0x61, 0x74, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x12, 0x36, 0x0a, 0x16, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x10, 0x20, - 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x14, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x40, 0x0a, 0x1b, 0x74, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x5f, 0x6d, 0x69, 0x6c, 0x6c, 0x69, 0x73, 0x65, - 0x63, 0x6f, 0x6e, 0x64, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x11, 0x20, 0x01, 0x28, 0x03, - 0x48, 0x00, 0x52, 0x19, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x4d, 0x69, 0x6c, - 0x6c, 0x69, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x40, 0x0a, - 0x1b, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x5f, 0x6d, 0x69, 0x63, 0x72, 0x6f, - 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x12, 0x20, 0x01, - 0x28, 0x03, 0x48, 0x00, 0x52, 0x19, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x4d, - 0x69, 0x63, 0x72, 0x6f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, - 0x3e, 0x0a, 0x1a, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x5f, 0x6e, 0x61, 0x6e, - 0x6f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x13, 0x20, - 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x18, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x4e, 0x61, 0x6e, 0x6f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, - 0x2c, 0x0a, 0x11, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x5f, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x14, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x0f, 0x74, 0x69, - 0x6d, 0x65, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x36, 0x0a, - 0x16, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6d, 0x69, 0x6c, 0x6c, 0x69, 0x73, 0x65, 0x63, 0x6f, 0x6e, - 0x64, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x15, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, - 0x14, 0x74, 0x69, 0x6d, 0x65, 0x4d, 0x69, 0x6c, 0x6c, 0x69, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x36, 0x0a, 0x16, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6d, 0x69, - 0x63, 0x72, 0x6f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x16, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x14, 0x74, 0x69, 0x6d, 0x65, 0x4d, 0x69, 0x63, - 0x72, 0x6f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x34, 0x0a, - 0x15, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6e, 0x61, 0x6e, 0x6f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, - 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x17, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x13, - 0x74, 0x69, 0x6d, 0x65, 0x4e, 0x61, 0x6e, 0x6f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x12, 0x3b, 0x0a, 0x19, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x5f, - 0x79, 0x65, 0x61, 0x72, 0x5f, 0x6d, 0x6f, 0x6e, 0x74, 0x68, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x18, 0x18, 0x20, 0x01, 0x28, 0x05, 0x48, 0x00, 0x52, 0x16, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, - 0x61, 0x6c, 0x59, 0x65, 0x61, 0x72, 0x4d, 0x6f, 0x6e, 0x74, 0x68, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x12, 0x37, 0x0a, 0x17, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x5f, 0x64, 0x61, 0x79, - 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x19, 0x20, 0x01, 0x28, - 0x03, 0x48, 0x00, 0x52, 0x14, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x44, 0x61, 0x79, - 0x54, 0x69, 0x6d, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x65, 0x0a, 0x1d, 0x69, 0x6e, 0x74, - 0x65, 0x72, 0x76, 0x61, 0x6c, 0x5f, 0x6d, 0x6f, 0x6e, 0x74, 0x68, 0x5f, 0x64, 0x61, 0x79, 0x5f, - 0x6e, 0x61, 0x6e, 0x6f, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x21, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x49, - 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x4d, 0x6f, 0x6e, 0x74, 0x68, 0x44, 0x61, 0x79, 0x4e, - 0x61, 0x6e, 0x6f, 0x48, 0x00, 0x52, 0x19, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x4d, - 0x6f, 0x6e, 0x74, 0x68, 0x44, 0x61, 0x79, 0x4e, 0x61, 0x6e, 0x6f, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x12, 0x44, 0x0a, 0x10, 0x64, 0x65, 0x63, 0x69, 0x6d, 0x61, 0x6c, 0x31, 0x32, 0x38, 0x5f, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x65, - 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x63, 0x69, 0x6d, 0x61, 0x6c, - 0x31, 0x32, 0x38, 0x48, 0x00, 0x52, 0x0f, 0x64, 0x65, 0x63, 0x69, 0x6d, 0x61, 0x6c, 0x31, 0x32, - 0x38, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x0c, 0x0a, 0x0a, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, - 0x64, 0x61, 0x74, 0x61, 0x42, 0x50, 0x0a, 0x0e, 0x69, 0x6f, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, - 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x07, 0x52, 0x6f, 0x77, 0x44, 0x61, 0x74, 0x61, 0x5a, - 0x35, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x70, - 0x74, 0x69, 0x6d, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, - 0x65, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74, - 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x61, 0x74, 0x79, 0x70, 0x65, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, + 0x40, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x26, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, + 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x4f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x1a, 0x3a, 0x0a, 0x0c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x31, 0x0a, + 0x03, 0x52, 0x6f, 0x77, 0x12, 0x2a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, + 0x76, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, + 0x22, 0xef, 0x09, 0x0a, 0x05, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1b, 0x0a, 0x08, 0x69, 0x38, + 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x48, 0x00, 0x52, 0x07, + 0x69, 0x38, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1d, 0x0a, 0x09, 0x69, 0x31, 0x36, 0x5f, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x48, 0x00, 0x52, 0x08, 0x69, 0x31, + 0x36, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1d, 0x0a, 0x09, 0x69, 0x33, 0x32, 0x5f, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x48, 0x00, 0x52, 0x08, 0x69, 0x33, 0x32, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1d, 0x0a, 0x09, 0x69, 0x36, 0x34, 0x5f, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x08, 0x69, 0x36, 0x34, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1b, 0x0a, 0x08, 0x75, 0x38, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x07, 0x75, 0x38, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x12, 0x1d, 0x0a, 0x09, 0x75, 0x31, 0x36, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x08, 0x75, 0x31, 0x36, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x12, 0x1d, 0x0a, 0x09, 0x75, 0x33, 0x32, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x08, 0x75, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, + 0x1d, 0x0a, 0x09, 0x75, 0x36, 0x34, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x08, 0x20, 0x01, + 0x28, 0x04, 0x48, 0x00, 0x52, 0x08, 0x75, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1d, + 0x0a, 0x09, 0x66, 0x33, 0x32, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, + 0x02, 0x48, 0x00, 0x52, 0x08, 0x66, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1d, 0x0a, + 0x09, 0x66, 0x36, 0x34, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x01, + 0x48, 0x00, 0x52, 0x08, 0x66, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1f, 0x0a, 0x0a, + 0x62, 0x6f, 0x6f, 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, + 0x48, 0x00, 0x52, 0x09, 0x62, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x23, 0x0a, + 0x0c, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0c, 0x20, + 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x0b, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x12, 0x23, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, + 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1f, 0x0a, 0x0a, 0x64, 0x61, 0x74, 0x65, 0x5f, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x05, 0x48, 0x00, 0x52, 0x09, 0x64, + 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x27, 0x0a, 0x0e, 0x64, 0x61, 0x74, 0x65, + 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x03, + 0x48, 0x00, 0x52, 0x0d, 0x64, 0x61, 0x74, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x12, 0x36, 0x0a, 0x16, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x5f, 0x73, + 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x10, 0x20, 0x01, 0x28, + 0x03, 0x48, 0x00, 0x52, 0x14, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x53, 0x65, + 0x63, 0x6f, 0x6e, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x40, 0x0a, 0x1b, 0x74, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x5f, 0x6d, 0x69, 0x6c, 0x6c, 0x69, 0x73, 0x65, 0x63, 0x6f, + 0x6e, 0x64, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x11, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, + 0x52, 0x19, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x4d, 0x69, 0x6c, 0x6c, 0x69, + 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x40, 0x0a, 0x1b, 0x74, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x5f, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x65, + 0x63, 0x6f, 0x6e, 0x64, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x12, 0x20, 0x01, 0x28, 0x03, + 0x48, 0x00, 0x52, 0x19, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x4d, 0x69, 0x63, + 0x72, 0x6f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x3e, 0x0a, + 0x1a, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x5f, 0x6e, 0x61, 0x6e, 0x6f, 0x73, + 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x13, 0x20, 0x01, 0x28, + 0x03, 0x48, 0x00, 0x52, 0x18, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x4e, 0x61, + 0x6e, 0x6f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2c, 0x0a, + 0x11, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x5f, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x14, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x0f, 0x74, 0x69, 0x6d, 0x65, + 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x36, 0x0a, 0x16, 0x74, + 0x69, 0x6d, 0x65, 0x5f, 0x6d, 0x69, 0x6c, 0x6c, 0x69, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x5f, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x15, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x14, 0x74, + 0x69, 0x6d, 0x65, 0x4d, 0x69, 0x6c, 0x6c, 0x69, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x12, 0x36, 0x0a, 0x16, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6d, 0x69, 0x63, 0x72, + 0x6f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x16, 0x20, + 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x14, 0x74, 0x69, 0x6d, 0x65, 0x4d, 0x69, 0x63, 0x72, 0x6f, + 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x34, 0x0a, 0x15, 0x74, + 0x69, 0x6d, 0x65, 0x5f, 0x6e, 0x61, 0x6e, 0x6f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x5f, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x17, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x13, 0x74, 0x69, + 0x6d, 0x65, 0x4e, 0x61, 0x6e, 0x6f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x12, 0x3b, 0x0a, 0x19, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x5f, 0x79, 0x65, + 0x61, 0x72, 0x5f, 0x6d, 0x6f, 0x6e, 0x74, 0x68, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x18, + 0x20, 0x01, 0x28, 0x05, 0x48, 0x00, 0x52, 0x16, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, + 0x59, 0x65, 0x61, 0x72, 0x4d, 0x6f, 0x6e, 0x74, 0x68, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x37, + 0x0a, 0x17, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x5f, 0x64, 0x61, 0x79, 0x5f, 0x74, + 0x69, 0x6d, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x19, 0x20, 0x01, 0x28, 0x03, 0x48, + 0x00, 0x52, 0x14, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x44, 0x61, 0x79, 0x54, 0x69, + 0x6d, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x65, 0x0a, 0x1d, 0x69, 0x6e, 0x74, 0x65, 0x72, + 0x76, 0x61, 0x6c, 0x5f, 0x6d, 0x6f, 0x6e, 0x74, 0x68, 0x5f, 0x64, 0x61, 0x79, 0x5f, 0x6e, 0x61, + 0x6e, 0x6f, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, + 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x74, + 0x65, 0x72, 0x76, 0x61, 0x6c, 0x4d, 0x6f, 0x6e, 0x74, 0x68, 0x44, 0x61, 0x79, 0x4e, 0x61, 0x6e, + 0x6f, 0x48, 0x00, 0x52, 0x19, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x4d, 0x6f, 0x6e, + 0x74, 0x68, 0x44, 0x61, 0x79, 0x4e, 0x61, 0x6e, 0x6f, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x44, + 0x0a, 0x10, 0x64, 0x65, 0x63, 0x69, 0x6d, 0x61, 0x6c, 0x31, 0x32, 0x38, 0x5f, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, + 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x63, 0x69, 0x6d, 0x61, 0x6c, 0x31, 0x32, + 0x38, 0x48, 0x00, 0x52, 0x0f, 0x64, 0x65, 0x63, 0x69, 0x6d, 0x61, 0x6c, 0x31, 0x32, 0x38, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x42, 0x0c, 0x0a, 0x0a, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x64, 0x61, + 0x74, 0x61, 0x42, 0x50, 0x0a, 0x0e, 0x69, 0x6f, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, + 0x65, 0x2e, 0x76, 0x31, 0x42, 0x07, 0x52, 0x6f, 0x77, 0x44, 0x61, 0x74, 0x61, 0x5a, 0x35, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x70, 0x74, 0x69, + 0x6d, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2d, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, + 0x65, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -770,32 +787,34 @@ func file_greptime_v1_row_proto_rawDescGZIP() []byte { return file_greptime_v1_row_proto_rawDescData } -var file_greptime_v1_row_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_greptime_v1_row_proto_msgTypes = make([]protoimpl.MessageInfo, 5) var file_greptime_v1_row_proto_goTypes = []interface{}{ (*Rows)(nil), // 0: greptime.v1.Rows (*ColumnSchema)(nil), // 1: greptime.v1.ColumnSchema (*Row)(nil), // 2: greptime.v1.Row (*Value)(nil), // 3: greptime.v1.Value - (ColumnDataType)(0), // 4: greptime.v1.ColumnDataType - (SemanticType)(0), // 5: greptime.v1.SemanticType - (*ColumnDataTypeExtension)(nil), // 6: greptime.v1.ColumnDataTypeExtension - (*IntervalMonthDayNano)(nil), // 7: greptime.v1.IntervalMonthDayNano - (*Decimal128)(nil), // 8: greptime.v1.Decimal128 + nil, // 4: greptime.v1.ColumnSchema.OptionsEntry + (ColumnDataType)(0), // 5: greptime.v1.ColumnDataType + (SemanticType)(0), // 6: greptime.v1.SemanticType + (*ColumnDataTypeExtension)(nil), // 7: greptime.v1.ColumnDataTypeExtension + (*IntervalMonthDayNano)(nil), // 8: greptime.v1.IntervalMonthDayNano + (*Decimal128)(nil), // 9: greptime.v1.Decimal128 } var file_greptime_v1_row_proto_depIdxs = []int32{ 1, // 0: greptime.v1.Rows.schema:type_name -> greptime.v1.ColumnSchema 2, // 1: greptime.v1.Rows.rows:type_name -> greptime.v1.Row - 4, // 2: greptime.v1.ColumnSchema.datatype:type_name -> greptime.v1.ColumnDataType - 5, // 3: greptime.v1.ColumnSchema.semantic_type:type_name -> greptime.v1.SemanticType - 6, // 4: greptime.v1.ColumnSchema.datatype_extension:type_name -> greptime.v1.ColumnDataTypeExtension - 3, // 5: greptime.v1.Row.values:type_name -> greptime.v1.Value - 7, // 6: greptime.v1.Value.interval_month_day_nano_value:type_name -> greptime.v1.IntervalMonthDayNano - 8, // 7: greptime.v1.Value.decimal128_value:type_name -> greptime.v1.Decimal128 - 8, // [8:8] is the sub-list for method output_type - 8, // [8:8] is the sub-list for method input_type - 8, // [8:8] is the sub-list for extension type_name - 8, // [8:8] is the sub-list for extension extendee - 0, // [0:8] is the sub-list for field type_name + 5, // 2: greptime.v1.ColumnSchema.datatype:type_name -> greptime.v1.ColumnDataType + 6, // 3: greptime.v1.ColumnSchema.semantic_type:type_name -> greptime.v1.SemanticType + 7, // 4: greptime.v1.ColumnSchema.datatype_extension:type_name -> greptime.v1.ColumnDataTypeExtension + 4, // 5: greptime.v1.ColumnSchema.options:type_name -> greptime.v1.ColumnSchema.OptionsEntry + 3, // 6: greptime.v1.Row.values:type_name -> greptime.v1.Value + 8, // 7: greptime.v1.Value.interval_month_day_nano_value:type_name -> greptime.v1.IntervalMonthDayNano + 9, // 8: greptime.v1.Value.decimal128_value:type_name -> greptime.v1.Decimal128 + 9, // [9:9] is the sub-list for method output_type + 9, // [9:9] is the sub-list for method input_type + 9, // [9:9] is the sub-list for extension type_name + 9, // [9:9] is the sub-list for extension extendee + 0, // [0:9] is the sub-list for field type_name } func init() { file_greptime_v1_row_proto_init() } @@ -889,7 +908,7 @@ func file_greptime_v1_row_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_greptime_v1_row_proto_rawDesc, NumEnums: 0, - NumMessages: 4, + NumMessages: 5, NumExtensions: 0, NumServices: 0, }, diff --git a/proto/greptime/v1/row.proto b/proto/greptime/v1/row.proto index f0fc5a75..d226a235 100644 --- a/proto/greptime/v1/row.proto +++ b/proto/greptime/v1/row.proto @@ -33,6 +33,9 @@ message ColumnSchema { SemanticType semantic_type = 3; // Extension for ColumnDataType. ColumnDataTypeExtension datatype_extension = 4; + + // "index.type": "inverted" to indicate inverted index + map options = 5; } message Row { repeated Value values = 1; } From 674da334b74d5677e588f524e8f33524d412860f Mon Sep 17 00:00:00 2001 From: yuanbohan Date: Fri, 31 May 2024 17:56:01 +0800 Subject: [PATCH 2/3] message and enum --- go/greptime/v1/row.pb.go | 209 +++++++++++++++++++++++++++--------- proto/greptime/v1/row.proto | 11 +- 2 files changed, 167 insertions(+), 53 deletions(-) diff --git a/go/greptime/v1/row.pb.go b/go/greptime/v1/row.pb.go index d039df42..5ac55110 100644 --- a/go/greptime/v1/row.pb.go +++ b/go/greptime/v1/row.pb.go @@ -34,6 +34,49 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +type IndexType int32 + +const ( + IndexType_INVERTED IndexType = 0 +) + +// Enum value maps for IndexType. +var ( + IndexType_name = map[int32]string{ + 0: "INVERTED", + } + IndexType_value = map[string]int32{ + "INVERTED": 0, + } +) + +func (x IndexType) Enum() *IndexType { + p := new(IndexType) + *p = x + return p +} + +func (x IndexType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (IndexType) Descriptor() protoreflect.EnumDescriptor { + return file_greptime_v1_row_proto_enumTypes[0].Descriptor() +} + +func (IndexType) Type() protoreflect.EnumType { + return &file_greptime_v1_row_proto_enumTypes[0] +} + +func (x IndexType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use IndexType.Descriptor instead. +func (IndexType) EnumDescriptor() ([]byte, []int) { + return file_greptime_v1_row_proto_rawDescGZIP(), []int{0} +} + type Rows struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -99,8 +142,7 @@ type ColumnSchema struct { SemanticType SemanticType `protobuf:"varint,3,opt,name=semantic_type,json=semanticType,proto3,enum=greptime.v1.SemanticType" json:"semantic_type,omitempty"` // Extension for ColumnDataType. DatatypeExtension *ColumnDataTypeExtension `protobuf:"bytes,4,opt,name=datatype_extension,json=datatypeExtension,proto3" json:"datatype_extension,omitempty"` - // "index.type": "inverted" to indicate inverted index - Options map[string]string `protobuf:"bytes,5,rep,name=options,proto3" json:"options,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Options *ColumnOptions `protobuf:"bytes,5,opt,name=options,proto3" json:"options,omitempty"` } func (x *ColumnSchema) Reset() { @@ -163,13 +205,60 @@ func (x *ColumnSchema) GetDatatypeExtension() *ColumnDataTypeExtension { return nil } -func (x *ColumnSchema) GetOptions() map[string]string { +func (x *ColumnSchema) GetOptions() *ColumnOptions { if x != nil { return x.Options } return nil } +type ColumnOptions struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + IndexType IndexType `protobuf:"varint,1,opt,name=index_type,json=indexType,proto3,enum=greptime.v1.IndexType" json:"index_type,omitempty"` +} + +func (x *ColumnOptions) Reset() { + *x = ColumnOptions{} + if protoimpl.UnsafeEnabled { + mi := &file_greptime_v1_row_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ColumnOptions) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ColumnOptions) ProtoMessage() {} + +func (x *ColumnOptions) ProtoReflect() protoreflect.Message { + mi := &file_greptime_v1_row_proto_msgTypes[2] + 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 ColumnOptions.ProtoReflect.Descriptor instead. +func (*ColumnOptions) Descriptor() ([]byte, []int) { + return file_greptime_v1_row_proto_rawDescGZIP(), []int{2} +} + +func (x *ColumnOptions) GetIndexType() IndexType { + if x != nil { + return x.IndexType + } + return IndexType_INVERTED +} + type Row struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -181,7 +270,7 @@ type Row struct { func (x *Row) Reset() { *x = Row{} if protoimpl.UnsafeEnabled { - mi := &file_greptime_v1_row_proto_msgTypes[2] + mi := &file_greptime_v1_row_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -194,7 +283,7 @@ func (x *Row) String() string { func (*Row) ProtoMessage() {} func (x *Row) ProtoReflect() protoreflect.Message { - mi := &file_greptime_v1_row_proto_msgTypes[2] + mi := &file_greptime_v1_row_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -207,7 +296,7 @@ func (x *Row) ProtoReflect() protoreflect.Message { // Deprecated: Use Row.ProtoReflect.Descriptor instead. func (*Row) Descriptor() ([]byte, []int) { - return file_greptime_v1_row_proto_rawDescGZIP(), []int{2} + return file_greptime_v1_row_proto_rawDescGZIP(), []int{3} } func (x *Row) GetValues() []*Value { @@ -257,7 +346,7 @@ type Value struct { func (x *Value) Reset() { *x = Value{} if protoimpl.UnsafeEnabled { - mi := &file_greptime_v1_row_proto_msgTypes[3] + mi := &file_greptime_v1_row_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -270,7 +359,7 @@ func (x *Value) String() string { func (*Value) ProtoMessage() {} func (x *Value) ProtoReflect() protoreflect.Message { - mi := &file_greptime_v1_row_proto_msgTypes[3] + mi := &file_greptime_v1_row_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -283,7 +372,7 @@ func (x *Value) ProtoReflect() protoreflect.Message { // Deprecated: Use Value.ProtoReflect.Descriptor instead. func (*Value) Descriptor() ([]byte, []int) { - return file_greptime_v1_row_proto_rawDescGZIP(), []int{3} + return file_greptime_v1_row_proto_rawDescGZIP(), []int{4} } func (m *Value) GetValueData() isValue_ValueData { @@ -661,7 +750,7 @@ var file_greptime_v1_row_proto_rawDesc = []byte{ 0x61, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x24, 0x0a, 0x04, 0x72, 0x6f, 0x77, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x6f, 0x77, 0x52, 0x04, 0x72, 0x6f, 0x77, 0x73, 0x22, - 0xfb, 0x02, 0x0a, 0x0c, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, + 0xb3, 0x02, 0x0a, 0x0c, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x37, 0x0a, 0x08, 0x64, 0x61, 0x74, 0x61, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, @@ -677,14 +766,14 @@ var file_greptime_v1_row_proto_rawDesc = []byte{ 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x11, 0x64, 0x61, 0x74, 0x61, 0x74, 0x79, 0x70, 0x65, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, - 0x40, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x26, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, - 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x4f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x1a, 0x3a, 0x0a, 0x0c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x31, 0x0a, + 0x34, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1a, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, + 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x46, 0x0a, 0x0d, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x35, 0x0a, 0x0a, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x5f, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x67, 0x72, 0x65, + 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x54, 0x79, + 0x70, 0x65, 0x52, 0x09, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x54, 0x79, 0x70, 0x65, 0x22, 0x31, 0x0a, 0x03, 0x52, 0x6f, 0x77, 0x12, 0x2a, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, @@ -767,12 +856,14 @@ var file_greptime_v1_row_proto_rawDesc = []byte{ 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x63, 0x69, 0x6d, 0x61, 0x6c, 0x31, 0x32, 0x38, 0x48, 0x00, 0x52, 0x0f, 0x64, 0x65, 0x63, 0x69, 0x6d, 0x61, 0x6c, 0x31, 0x32, 0x38, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x0c, 0x0a, 0x0a, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x64, 0x61, - 0x74, 0x61, 0x42, 0x50, 0x0a, 0x0e, 0x69, 0x6f, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, - 0x65, 0x2e, 0x76, 0x31, 0x42, 0x07, 0x52, 0x6f, 0x77, 0x44, 0x61, 0x74, 0x61, 0x5a, 0x35, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x70, 0x74, 0x69, - 0x6d, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2d, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, - 0x65, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x61, 0x2a, 0x19, 0x0a, 0x09, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x0c, 0x0a, 0x08, 0x49, 0x4e, 0x56, 0x45, 0x52, 0x54, 0x45, 0x44, 0x10, 0x00, 0x42, 0x50, 0x0a, + 0x0e, 0x69, 0x6f, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x42, + 0x07, 0x52, 0x6f, 0x77, 0x44, 0x61, 0x74, 0x61, 0x5a, 0x35, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x54, 0x65, 0x61, + 0x6d, 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -787,34 +878,37 @@ func file_greptime_v1_row_proto_rawDescGZIP() []byte { return file_greptime_v1_row_proto_rawDescData } +var file_greptime_v1_row_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_greptime_v1_row_proto_msgTypes = make([]protoimpl.MessageInfo, 5) var file_greptime_v1_row_proto_goTypes = []interface{}{ - (*Rows)(nil), // 0: greptime.v1.Rows - (*ColumnSchema)(nil), // 1: greptime.v1.ColumnSchema - (*Row)(nil), // 2: greptime.v1.Row - (*Value)(nil), // 3: greptime.v1.Value - nil, // 4: greptime.v1.ColumnSchema.OptionsEntry - (ColumnDataType)(0), // 5: greptime.v1.ColumnDataType - (SemanticType)(0), // 6: greptime.v1.SemanticType - (*ColumnDataTypeExtension)(nil), // 7: greptime.v1.ColumnDataTypeExtension - (*IntervalMonthDayNano)(nil), // 8: greptime.v1.IntervalMonthDayNano - (*Decimal128)(nil), // 9: greptime.v1.Decimal128 + (IndexType)(0), // 0: greptime.v1.IndexType + (*Rows)(nil), // 1: greptime.v1.Rows + (*ColumnSchema)(nil), // 2: greptime.v1.ColumnSchema + (*ColumnOptions)(nil), // 3: greptime.v1.ColumnOptions + (*Row)(nil), // 4: greptime.v1.Row + (*Value)(nil), // 5: greptime.v1.Value + (ColumnDataType)(0), // 6: greptime.v1.ColumnDataType + (SemanticType)(0), // 7: greptime.v1.SemanticType + (*ColumnDataTypeExtension)(nil), // 8: greptime.v1.ColumnDataTypeExtension + (*IntervalMonthDayNano)(nil), // 9: greptime.v1.IntervalMonthDayNano + (*Decimal128)(nil), // 10: greptime.v1.Decimal128 } var file_greptime_v1_row_proto_depIdxs = []int32{ - 1, // 0: greptime.v1.Rows.schema:type_name -> greptime.v1.ColumnSchema - 2, // 1: greptime.v1.Rows.rows:type_name -> greptime.v1.Row - 5, // 2: greptime.v1.ColumnSchema.datatype:type_name -> greptime.v1.ColumnDataType - 6, // 3: greptime.v1.ColumnSchema.semantic_type:type_name -> greptime.v1.SemanticType - 7, // 4: greptime.v1.ColumnSchema.datatype_extension:type_name -> greptime.v1.ColumnDataTypeExtension - 4, // 5: greptime.v1.ColumnSchema.options:type_name -> greptime.v1.ColumnSchema.OptionsEntry - 3, // 6: greptime.v1.Row.values:type_name -> greptime.v1.Value - 8, // 7: greptime.v1.Value.interval_month_day_nano_value:type_name -> greptime.v1.IntervalMonthDayNano - 9, // 8: greptime.v1.Value.decimal128_value:type_name -> greptime.v1.Decimal128 - 9, // [9:9] is the sub-list for method output_type - 9, // [9:9] is the sub-list for method input_type - 9, // [9:9] is the sub-list for extension type_name - 9, // [9:9] is the sub-list for extension extendee - 0, // [0:9] is the sub-list for field type_name + 2, // 0: greptime.v1.Rows.schema:type_name -> greptime.v1.ColumnSchema + 4, // 1: greptime.v1.Rows.rows:type_name -> greptime.v1.Row + 6, // 2: greptime.v1.ColumnSchema.datatype:type_name -> greptime.v1.ColumnDataType + 7, // 3: greptime.v1.ColumnSchema.semantic_type:type_name -> greptime.v1.SemanticType + 8, // 4: greptime.v1.ColumnSchema.datatype_extension:type_name -> greptime.v1.ColumnDataTypeExtension + 3, // 5: greptime.v1.ColumnSchema.options:type_name -> greptime.v1.ColumnOptions + 0, // 6: greptime.v1.ColumnOptions.index_type:type_name -> greptime.v1.IndexType + 5, // 7: greptime.v1.Row.values:type_name -> greptime.v1.Value + 9, // 8: greptime.v1.Value.interval_month_day_nano_value:type_name -> greptime.v1.IntervalMonthDayNano + 10, // 9: greptime.v1.Value.decimal128_value:type_name -> greptime.v1.Decimal128 + 10, // [10:10] is the sub-list for method output_type + 10, // [10:10] is the sub-list for method input_type + 10, // [10:10] is the sub-list for extension type_name + 10, // [10:10] is the sub-list for extension extendee + 0, // [0:10] is the sub-list for field type_name } func init() { file_greptime_v1_row_proto_init() } @@ -849,7 +943,7 @@ func file_greptime_v1_row_proto_init() { } } file_greptime_v1_row_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Row); i { + switch v := v.(*ColumnOptions); i { case 0: return &v.state case 1: @@ -861,6 +955,18 @@ func file_greptime_v1_row_proto_init() { } } file_greptime_v1_row_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Row); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_greptime_v1_row_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Value); i { case 0: return &v.state @@ -873,7 +979,7 @@ func file_greptime_v1_row_proto_init() { } } } - file_greptime_v1_row_proto_msgTypes[3].OneofWrappers = []interface{}{ + file_greptime_v1_row_proto_msgTypes[4].OneofWrappers = []interface{}{ (*Value_I8Value)(nil), (*Value_I16Value)(nil), (*Value_I32Value)(nil), @@ -907,13 +1013,14 @@ func file_greptime_v1_row_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_greptime_v1_row_proto_rawDesc, - NumEnums: 0, + NumEnums: 1, NumMessages: 5, NumExtensions: 0, NumServices: 0, }, GoTypes: file_greptime_v1_row_proto_goTypes, DependencyIndexes: file_greptime_v1_row_proto_depIdxs, + EnumInfos: file_greptime_v1_row_proto_enumTypes, MessageInfos: file_greptime_v1_row_proto_msgTypes, }.Build() File_greptime_v1_row_proto = out.File diff --git a/proto/greptime/v1/row.proto b/proto/greptime/v1/row.proto index d226a235..b28ffd8d 100644 --- a/proto/greptime/v1/row.proto +++ b/proto/greptime/v1/row.proto @@ -34,8 +34,15 @@ message ColumnSchema { // Extension for ColumnDataType. ColumnDataTypeExtension datatype_extension = 4; - // "index.type": "inverted" to indicate inverted index - map options = 5; + ColumnOptions options = 5; +} + +message ColumnOptions { + IndexType index_type = 1; +} + +enum IndexType { + INVERTED = 0; } message Row { repeated Value values = 1; } From f8de97d2253f4b0bd5db1b22afce69fa68b2597c Mon Sep 17 00:00:00 2001 From: yuanbohan Date: Fri, 31 May 2024 17:57:48 +0800 Subject: [PATCH 3/3] make --- c++/greptime/v1/row.pb.cc | 335 ++++- c++/greptime/v1/row.pb.h | 327 +++- .../src/main/java/io/greptime/v1/RowData.java | 1330 ++++++++++++++--- 3 files changed, 1713 insertions(+), 279 deletions(-) diff --git a/c++/greptime/v1/row.pb.cc b/c++/greptime/v1/row.pb.cc index 3e8c0942..a175bf31 100644 --- a/c++/greptime/v1/row.pb.cc +++ b/c++/greptime/v1/row.pb.cc @@ -40,6 +40,7 @@ PROTOBUF_CONSTEXPR ColumnSchema::ColumnSchema( ::_pbi::ConstantInitialized): _impl_{ /*decltype(_impl_.column_name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} , /*decltype(_impl_.datatype_extension_)*/nullptr + , /*decltype(_impl_.options_)*/nullptr , /*decltype(_impl_.datatype_)*/0 , /*decltype(_impl_.semantic_type_)*/0 , /*decltype(_impl_._cached_size_)*/{}} {} @@ -52,6 +53,19 @@ struct ColumnSchemaDefaultTypeInternal { }; }; PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ColumnSchemaDefaultTypeInternal _ColumnSchema_default_instance_; +PROTOBUF_CONSTEXPR ColumnOptions::ColumnOptions( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.index_type_)*/0 + , /*decltype(_impl_._cached_size_)*/{}} {} +struct ColumnOptionsDefaultTypeInternal { + PROTOBUF_CONSTEXPR ColumnOptionsDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~ColumnOptionsDefaultTypeInternal() {} + union { + ColumnOptions _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ColumnOptionsDefaultTypeInternal _ColumnOptions_default_instance_; PROTOBUF_CONSTEXPR Row::Row( ::_pbi::ConstantInitialized): _impl_{ /*decltype(_impl_.values_)*/{} @@ -81,8 +95,8 @@ struct ValueDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ValueDefaultTypeInternal _Value_default_instance_; } // namespace v1 } // namespace greptime -static ::_pb::Metadata file_level_metadata_greptime_2fv1_2frow_2eproto[4]; -static constexpr ::_pb::EnumDescriptor const** file_level_enum_descriptors_greptime_2fv1_2frow_2eproto = nullptr; +static ::_pb::Metadata file_level_metadata_greptime_2fv1_2frow_2eproto[5]; +static const ::_pb::EnumDescriptor* file_level_enum_descriptors_greptime_2fv1_2frow_2eproto[1]; static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_greptime_2fv1_2frow_2eproto = nullptr; const uint32_t TableStruct_greptime_2fv1_2frow_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { @@ -104,6 +118,14 @@ const uint32_t TableStruct_greptime_2fv1_2frow_2eproto::offsets[] PROTOBUF_SECTI PROTOBUF_FIELD_OFFSET(::greptime::v1::ColumnSchema, _impl_.datatype_), PROTOBUF_FIELD_OFFSET(::greptime::v1::ColumnSchema, _impl_.semantic_type_), PROTOBUF_FIELD_OFFSET(::greptime::v1::ColumnSchema, _impl_.datatype_extension_), + PROTOBUF_FIELD_OFFSET(::greptime::v1::ColumnSchema, _impl_.options_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::greptime::v1::ColumnOptions, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::greptime::v1::ColumnOptions, _impl_.index_type_), ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::greptime::v1::Row, _internal_metadata_), ~0u, // no _extensions_ @@ -149,13 +171,15 @@ const uint32_t TableStruct_greptime_2fv1_2frow_2eproto::offsets[] PROTOBUF_SECTI static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { { 0, -1, -1, sizeof(::greptime::v1::Rows)}, { 8, -1, -1, sizeof(::greptime::v1::ColumnSchema)}, - { 18, -1, -1, sizeof(::greptime::v1::Row)}, - { 25, -1, -1, sizeof(::greptime::v1::Value)}, + { 19, -1, -1, sizeof(::greptime::v1::ColumnOptions)}, + { 26, -1, -1, sizeof(::greptime::v1::Row)}, + { 33, -1, -1, sizeof(::greptime::v1::Value)}, }; static const ::_pb::Message* const file_default_instances[] = { &::greptime::v1::_Rows_default_instance_._instance, &::greptime::v1::_ColumnSchema_default_instance_._instance, + &::greptime::v1::_ColumnOptions_default_instance_._instance, &::greptime::v1::_Row_default_instance_._instance, &::greptime::v1::_Value_default_instance_._instance, }; @@ -164,45 +188,49 @@ const char descriptor_table_protodef_greptime_2fv1_2frow_2eproto[] PROTOBUF_SECT "\n\025greptime/v1/row.proto\022\013greptime.v1\032\030gr" "eptime/v1/common.proto\"Q\n\004Rows\022)\n\006schema" "\030\001 \003(\0132\031.greptime.v1.ColumnSchema\022\036\n\004row" - "s\030\002 \003(\0132\020.greptime.v1.Row\"\306\001\n\014ColumnSche" + "s\030\002 \003(\0132\020.greptime.v1.Row\"\363\001\n\014ColumnSche" "ma\022\023\n\013column_name\030\001 \001(\t\022-\n\010datatype\030\002 \001(" "\0162\033.greptime.v1.ColumnDataType\0220\n\rsemant" "ic_type\030\003 \001(\0162\031.greptime.v1.SemanticType" "\022@\n\022datatype_extension\030\004 \001(\0132$.greptime." - "v1.ColumnDataTypeExtension\")\n\003Row\022\"\n\006val" - "ues\030\001 \003(\0132\022.greptime.v1.Value\"\274\006\n\005Value\022" - "\022\n\010i8_value\030\001 \001(\005H\000\022\023\n\ti16_value\030\002 \001(\005H\000" - "\022\023\n\ti32_value\030\003 \001(\005H\000\022\023\n\ti64_value\030\004 \001(\003" - "H\000\022\022\n\010u8_value\030\005 \001(\rH\000\022\023\n\tu16_value\030\006 \001(" - "\rH\000\022\023\n\tu32_value\030\007 \001(\rH\000\022\023\n\tu64_value\030\010 " - "\001(\004H\000\022\023\n\tf32_value\030\t \001(\002H\000\022\023\n\tf64_value\030" - "\n \001(\001H\000\022\024\n\nbool_value\030\013 \001(\010H\000\022\026\n\014binary_" - "value\030\014 \001(\014H\000\022\026\n\014string_value\030\r \001(\tH\000\022\024\n" - "\ndate_value\030\016 \001(\005H\000\022\030\n\016datetime_value\030\017 " - "\001(\003H\000\022 \n\026timestamp_second_value\030\020 \001(\003H\000\022" - "%\n\033timestamp_millisecond_value\030\021 \001(\003H\000\022%" - "\n\033timestamp_microsecond_value\030\022 \001(\003H\000\022$\n" - "\032timestamp_nanosecond_value\030\023 \001(\003H\000\022\033\n\021t" - "ime_second_value\030\024 \001(\003H\000\022 \n\026time_millise" - "cond_value\030\025 \001(\003H\000\022 \n\026time_microsecond_v" - "alue\030\026 \001(\003H\000\022\037\n\025time_nanosecond_value\030\027 " - "\001(\003H\000\022#\n\031interval_year_month_value\030\030 \001(\005" - "H\000\022!\n\027interval_day_time_value\030\031 \001(\003H\000\022J\n" - "\035interval_month_day_nano_value\030\032 \001(\0132!.g" - "reptime.v1.IntervalMonthDayNanoH\000\0223\n\020dec" - "imal128_value\030\037 \001(\0132\027.greptime.v1.Decima" - "l128H\000B\014\n\nvalue_dataBP\n\016io.greptime.v1B\007" - "RowDataZ5github.com/GreptimeTeam/greptim" - "e-proto/go/greptime/v1b\006proto3" + "v1.ColumnDataTypeExtension\022+\n\007options\030\005 " + "\001(\0132\032.greptime.v1.ColumnOptions\";\n\rColum" + "nOptions\022*\n\nindex_type\030\001 \001(\0162\026.greptime." + "v1.IndexType\")\n\003Row\022\"\n\006values\030\001 \003(\0132\022.gr" + "eptime.v1.Value\"\274\006\n\005Value\022\022\n\010i8_value\030\001 " + "\001(\005H\000\022\023\n\ti16_value\030\002 \001(\005H\000\022\023\n\ti32_value\030" + "\003 \001(\005H\000\022\023\n\ti64_value\030\004 \001(\003H\000\022\022\n\010u8_value" + "\030\005 \001(\rH\000\022\023\n\tu16_value\030\006 \001(\rH\000\022\023\n\tu32_val" + "ue\030\007 \001(\rH\000\022\023\n\tu64_value\030\010 \001(\004H\000\022\023\n\tf32_v" + "alue\030\t \001(\002H\000\022\023\n\tf64_value\030\n \001(\001H\000\022\024\n\nboo" + "l_value\030\013 \001(\010H\000\022\026\n\014binary_value\030\014 \001(\014H\000\022" + "\026\n\014string_value\030\r \001(\tH\000\022\024\n\ndate_value\030\016 " + "\001(\005H\000\022\030\n\016datetime_value\030\017 \001(\003H\000\022 \n\026times" + "tamp_second_value\030\020 \001(\003H\000\022%\n\033timestamp_m" + "illisecond_value\030\021 \001(\003H\000\022%\n\033timestamp_mi" + "crosecond_value\030\022 \001(\003H\000\022$\n\032timestamp_nan" + "osecond_value\030\023 \001(\003H\000\022\033\n\021time_second_val" + "ue\030\024 \001(\003H\000\022 \n\026time_millisecond_value\030\025 \001" + "(\003H\000\022 \n\026time_microsecond_value\030\026 \001(\003H\000\022\037" + "\n\025time_nanosecond_value\030\027 \001(\003H\000\022#\n\031inter" + "val_year_month_value\030\030 \001(\005H\000\022!\n\027interval" + "_day_time_value\030\031 \001(\003H\000\022J\n\035interval_mont" + "h_day_nano_value\030\032 \001(\0132!.greptime.v1.Int" + "ervalMonthDayNanoH\000\0223\n\020decimal128_value\030" + "\037 \001(\0132\027.greptime.v1.Decimal128H\000B\014\n\nvalu" + "e_data*\031\n\tIndexType\022\014\n\010INVERTED\020\000BP\n\016io." + "greptime.v1B\007RowDataZ5github.com/Greptim" + "eTeam/greptime-proto/go/greptime/v1b\006pro" + "to3" ; static const ::_pbi::DescriptorTable* const descriptor_table_greptime_2fv1_2frow_2eproto_deps[1] = { &::descriptor_table_greptime_2fv1_2fcommon_2eproto, }; static ::_pbi::once_flag descriptor_table_greptime_2fv1_2frow_2eproto_once; const ::_pbi::DescriptorTable descriptor_table_greptime_2fv1_2frow_2eproto = { - false, false, 1310, descriptor_table_protodef_greptime_2fv1_2frow_2eproto, + false, false, 1443, descriptor_table_protodef_greptime_2fv1_2frow_2eproto, "greptime/v1/row.proto", - &descriptor_table_greptime_2fv1_2frow_2eproto_once, descriptor_table_greptime_2fv1_2frow_2eproto_deps, 1, 4, + &descriptor_table_greptime_2fv1_2frow_2eproto_once, descriptor_table_greptime_2fv1_2frow_2eproto_deps, 1, 5, schemas, file_default_instances, TableStruct_greptime_2fv1_2frow_2eproto::offsets, file_level_metadata_greptime_2fv1_2frow_2eproto, file_level_enum_descriptors_greptime_2fv1_2frow_2eproto, file_level_service_descriptors_greptime_2fv1_2frow_2eproto, @@ -215,6 +243,19 @@ PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_greptime PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_greptime_2fv1_2frow_2eproto(&descriptor_table_greptime_2fv1_2frow_2eproto); namespace greptime { namespace v1 { +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* IndexType_descriptor() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_greptime_2fv1_2frow_2eproto); + return file_level_enum_descriptors_greptime_2fv1_2frow_2eproto[0]; +} +bool IndexType_IsValid(int value) { + switch (value) { + case 0: + return true; + default: + return false; + } +} + // =================================================================== @@ -440,12 +481,17 @@ ::PROTOBUF_NAMESPACE_ID::Metadata Rows::GetMetadata() const { class ColumnSchema::_Internal { public: static const ::greptime::v1::ColumnDataTypeExtension& datatype_extension(const ColumnSchema* msg); + static const ::greptime::v1::ColumnOptions& options(const ColumnSchema* msg); }; const ::greptime::v1::ColumnDataTypeExtension& ColumnSchema::_Internal::datatype_extension(const ColumnSchema* msg) { return *msg->_impl_.datatype_extension_; } +const ::greptime::v1::ColumnOptions& +ColumnSchema::_Internal::options(const ColumnSchema* msg) { + return *msg->_impl_.options_; +} void ColumnSchema::clear_datatype_extension() { if (GetArenaForAllocation() == nullptr && _impl_.datatype_extension_ != nullptr) { delete _impl_.datatype_extension_; @@ -464,6 +510,7 @@ ColumnSchema::ColumnSchema(const ColumnSchema& from) new (&_impl_) Impl_{ decltype(_impl_.column_name_){} , decltype(_impl_.datatype_extension_){nullptr} + , decltype(_impl_.options_){nullptr} , decltype(_impl_.datatype_){} , decltype(_impl_.semantic_type_){} , /*decltype(_impl_._cached_size_)*/{}}; @@ -480,6 +527,9 @@ ColumnSchema::ColumnSchema(const ColumnSchema& from) if (from._internal_has_datatype_extension()) { _this->_impl_.datatype_extension_ = new ::greptime::v1::ColumnDataTypeExtension(*from._impl_.datatype_extension_); } + if (from._internal_has_options()) { + _this->_impl_.options_ = new ::greptime::v1::ColumnOptions(*from._impl_.options_); + } ::memcpy(&_impl_.datatype_, &from._impl_.datatype_, static_cast(reinterpret_cast(&_impl_.semantic_type_) - reinterpret_cast(&_impl_.datatype_)) + sizeof(_impl_.semantic_type_)); @@ -493,6 +543,7 @@ inline void ColumnSchema::SharedCtor( new (&_impl_) Impl_{ decltype(_impl_.column_name_){} , decltype(_impl_.datatype_extension_){nullptr} + , decltype(_impl_.options_){nullptr} , decltype(_impl_.datatype_){0} , decltype(_impl_.semantic_type_){0} , /*decltype(_impl_._cached_size_)*/{} @@ -516,6 +567,7 @@ inline void ColumnSchema::SharedDtor() { GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); _impl_.column_name_.Destroy(); if (this != internal_default_instance()) delete _impl_.datatype_extension_; + if (this != internal_default_instance()) delete _impl_.options_; } void ColumnSchema::SetCachedSize(int size) const { @@ -533,6 +585,10 @@ void ColumnSchema::Clear() { delete _impl_.datatype_extension_; } _impl_.datatype_extension_ = nullptr; + if (GetArenaForAllocation() == nullptr && _impl_.options_ != nullptr) { + delete _impl_.options_; + } + _impl_.options_ = nullptr; ::memset(&_impl_.datatype_, 0, static_cast( reinterpret_cast(&_impl_.semantic_type_) - reinterpret_cast(&_impl_.datatype_)) + sizeof(_impl_.semantic_type_)); @@ -581,6 +637,14 @@ const char* ColumnSchema::_InternalParse(const char* ptr, ::_pbi::ParseContext* } else goto handle_unusual; continue; + // .greptime.v1.ColumnOptions options = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 42)) { + ptr = ctx->ParseMessage(_internal_mutable_options(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; default: goto handle_unusual; } // switch @@ -641,6 +705,13 @@ uint8_t* ColumnSchema::_InternalSerialize( _Internal::datatype_extension(this).GetCachedSize(), target, stream); } + // .greptime.v1.ColumnOptions options = 5; + if (this->_internal_has_options()) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(5, _Internal::options(this), + _Internal::options(this).GetCachedSize(), target, stream); + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); @@ -671,6 +742,13 @@ size_t ColumnSchema::ByteSizeLong() const { *_impl_.datatype_extension_); } + // .greptime.v1.ColumnOptions options = 5; + if (this->_internal_has_options()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *_impl_.options_); + } + // .greptime.v1.ColumnDataType datatype = 2; if (this->_internal_datatype() != 0) { total_size += 1 + @@ -708,6 +786,10 @@ void ColumnSchema::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::P _this->_internal_mutable_datatype_extension()->::greptime::v1::ColumnDataTypeExtension::MergeFrom( from._internal_datatype_extension()); } + if (from._internal_has_options()) { + _this->_internal_mutable_options()->::greptime::v1::ColumnOptions::MergeFrom( + from._internal_options()); + } if (from._internal_datatype() != 0) { _this->_internal_set_datatype(from._internal_datatype()); } @@ -753,6 +835,187 @@ ::PROTOBUF_NAMESPACE_ID::Metadata ColumnSchema::GetMetadata() const { // =================================================================== +class ColumnOptions::_Internal { + public: +}; + +ColumnOptions::ColumnOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:greptime.v1.ColumnOptions) +} +ColumnOptions::ColumnOptions(const ColumnOptions& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + ColumnOptions* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.index_type_){} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _this->_impl_.index_type_ = from._impl_.index_type_; + // @@protoc_insertion_point(copy_constructor:greptime.v1.ColumnOptions) +} + +inline void ColumnOptions::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.index_type_){0} + , /*decltype(_impl_._cached_size_)*/{} + }; +} + +ColumnOptions::~ColumnOptions() { + // @@protoc_insertion_point(destructor:greptime.v1.ColumnOptions) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void ColumnOptions::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); +} + +void ColumnOptions::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void ColumnOptions::Clear() { +// @@protoc_insertion_point(message_clear_start:greptime.v1.ColumnOptions) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.index_type_ = 0; + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* ColumnOptions::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // .greptime.v1.IndexType index_type = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + _internal_set_index_type(static_cast<::greptime::v1::IndexType>(val)); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* ColumnOptions::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:greptime.v1.ColumnOptions) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // .greptime.v1.IndexType index_type = 1; + if (this->_internal_index_type() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 1, this->_internal_index_type(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:greptime.v1.ColumnOptions) + return target; +} + +size_t ColumnOptions::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:greptime.v1.ColumnOptions) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // .greptime.v1.IndexType index_type = 1; + if (this->_internal_index_type() != 0) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_index_type()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ColumnOptions::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + ColumnOptions::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ColumnOptions::GetClassData() const { return &_class_data_; } + + +void ColumnOptions::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:greptime.v1.ColumnOptions) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (from._internal_index_type() != 0) { + _this->_internal_set_index_type(from._internal_index_type()); + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void ColumnOptions::CopyFrom(const ColumnOptions& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:greptime.v1.ColumnOptions) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ColumnOptions::IsInitialized() const { + return true; +} + +void ColumnOptions::InternalSwap(ColumnOptions* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_.index_type_, other->_impl_.index_type_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata ColumnOptions::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_greptime_2fv1_2frow_2eproto_getter, &descriptor_table_greptime_2fv1_2frow_2eproto_once, + file_level_metadata_greptime_2fv1_2frow_2eproto[2]); +} + +// =================================================================== + class Row::_Internal { public: }; @@ -933,7 +1196,7 @@ void Row::InternalSwap(Row* other) { ::PROTOBUF_NAMESPACE_ID::Metadata Row::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_greptime_2fv1_2frow_2eproto_getter, &descriptor_table_greptime_2fv1_2frow_2eproto_once, - file_level_metadata_greptime_2fv1_2frow_2eproto[2]); + file_level_metadata_greptime_2fv1_2frow_2eproto[3]); } // =================================================================== @@ -2062,7 +2325,7 @@ void Value::InternalSwap(Value* other) { ::PROTOBUF_NAMESPACE_ID::Metadata Value::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_greptime_2fv1_2frow_2eproto_getter, &descriptor_table_greptime_2fv1_2frow_2eproto_once, - file_level_metadata_greptime_2fv1_2frow_2eproto[3]); + file_level_metadata_greptime_2fv1_2frow_2eproto[4]); } // @@protoc_insertion_point(namespace_scope) @@ -2077,6 +2340,10 @@ template<> PROTOBUF_NOINLINE ::greptime::v1::ColumnSchema* Arena::CreateMaybeMessage< ::greptime::v1::ColumnSchema >(Arena* arena) { return Arena::CreateMessageInternal< ::greptime::v1::ColumnSchema >(arena); } +template<> PROTOBUF_NOINLINE ::greptime::v1::ColumnOptions* +Arena::CreateMaybeMessage< ::greptime::v1::ColumnOptions >(Arena* arena) { + return Arena::CreateMessageInternal< ::greptime::v1::ColumnOptions >(arena); +} template<> PROTOBUF_NOINLINE ::greptime::v1::Row* Arena::CreateMaybeMessage< ::greptime::v1::Row >(Arena* arena) { return Arena::CreateMessageInternal< ::greptime::v1::Row >(arena); diff --git a/c++/greptime/v1/row.pb.h b/c++/greptime/v1/row.pb.h index 8c26c24a..e1cb84e3 100644 --- a/c++/greptime/v1/row.pb.h +++ b/c++/greptime/v1/row.pb.h @@ -29,6 +29,7 @@ #include #include // IWYU pragma: export #include // IWYU pragma: export +#include #include #include "greptime/v1/common.pb.h" // @@protoc_insertion_point(includes) @@ -47,6 +48,9 @@ struct TableStruct_greptime_2fv1_2frow_2eproto { extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_greptime_2fv1_2frow_2eproto; namespace greptime { namespace v1 { +class ColumnOptions; +struct ColumnOptionsDefaultTypeInternal; +extern ColumnOptionsDefaultTypeInternal _ColumnOptions_default_instance_; class ColumnSchema; struct ColumnSchemaDefaultTypeInternal; extern ColumnSchemaDefaultTypeInternal _ColumnSchema_default_instance_; @@ -62,6 +66,7 @@ extern ValueDefaultTypeInternal _Value_default_instance_; } // namespace v1 } // namespace greptime PROTOBUF_NAMESPACE_OPEN +template<> ::greptime::v1::ColumnOptions* Arena::CreateMaybeMessage<::greptime::v1::ColumnOptions>(Arena*); template<> ::greptime::v1::ColumnSchema* Arena::CreateMaybeMessage<::greptime::v1::ColumnSchema>(Arena*); template<> ::greptime::v1::Row* Arena::CreateMaybeMessage<::greptime::v1::Row>(Arena*); template<> ::greptime::v1::Rows* Arena::CreateMaybeMessage<::greptime::v1::Rows>(Arena*); @@ -70,6 +75,30 @@ PROTOBUF_NAMESPACE_CLOSE namespace greptime { namespace v1 { +enum IndexType : int { + INVERTED = 0, + IndexType_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits::min(), + IndexType_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits::max() +}; +bool IndexType_IsValid(int value); +constexpr IndexType IndexType_MIN = INVERTED; +constexpr IndexType IndexType_MAX = INVERTED; +constexpr int IndexType_ARRAYSIZE = IndexType_MAX + 1; + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* IndexType_descriptor(); +template +inline const std::string& IndexType_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function IndexType_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + IndexType_descriptor(), enum_t_value); +} +inline bool IndexType_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, IndexType* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( + IndexType_descriptor(), name, value); +} // =================================================================== class Rows final : @@ -372,6 +401,7 @@ class ColumnSchema final : enum : int { kColumnNameFieldNumber = 1, kDatatypeExtensionFieldNumber = 4, + kOptionsFieldNumber = 5, kDatatypeFieldNumber = 2, kSemanticTypeFieldNumber = 3, }; @@ -407,6 +437,24 @@ class ColumnSchema final : ::greptime::v1::ColumnDataTypeExtension* datatype_extension); ::greptime::v1::ColumnDataTypeExtension* unsafe_arena_release_datatype_extension(); + // .greptime.v1.ColumnOptions options = 5; + bool has_options() const; + private: + bool _internal_has_options() const; + public: + void clear_options(); + const ::greptime::v1::ColumnOptions& options() const; + PROTOBUF_NODISCARD ::greptime::v1::ColumnOptions* release_options(); + ::greptime::v1::ColumnOptions* mutable_options(); + void set_allocated_options(::greptime::v1::ColumnOptions* options); + private: + const ::greptime::v1::ColumnOptions& _internal_options() const; + ::greptime::v1::ColumnOptions* _internal_mutable_options(); + public: + void unsafe_arena_set_allocated_options( + ::greptime::v1::ColumnOptions* options); + ::greptime::v1::ColumnOptions* unsafe_arena_release_options(); + // .greptime.v1.ColumnDataType datatype = 2; void clear_datatype(); ::greptime::v1::ColumnDataType datatype() const; @@ -435,6 +483,7 @@ class ColumnSchema final : struct Impl_ { ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr column_name_; ::greptime::v1::ColumnDataTypeExtension* datatype_extension_; + ::greptime::v1::ColumnOptions* options_; int datatype_; int semantic_type_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; @@ -444,6 +493,154 @@ class ColumnSchema final : }; // ------------------------------------------------------------------- +class ColumnOptions final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:greptime.v1.ColumnOptions) */ { + public: + inline ColumnOptions() : ColumnOptions(nullptr) {} + ~ColumnOptions() override; + explicit PROTOBUF_CONSTEXPR ColumnOptions(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ColumnOptions(const ColumnOptions& from); + ColumnOptions(ColumnOptions&& from) noexcept + : ColumnOptions() { + *this = ::std::move(from); + } + + inline ColumnOptions& operator=(const ColumnOptions& from) { + CopyFrom(from); + return *this; + } + inline ColumnOptions& operator=(ColumnOptions&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const ColumnOptions& default_instance() { + return *internal_default_instance(); + } + static inline const ColumnOptions* internal_default_instance() { + return reinterpret_cast( + &_ColumnOptions_default_instance_); + } + static constexpr int kIndexInFileMessages = + 2; + + friend void swap(ColumnOptions& a, ColumnOptions& b) { + a.Swap(&b); + } + inline void Swap(ColumnOptions* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(ColumnOptions* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ColumnOptions* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const ColumnOptions& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const ColumnOptions& from) { + ColumnOptions::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(ColumnOptions* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "greptime.v1.ColumnOptions"; + } + protected: + explicit ColumnOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kIndexTypeFieldNumber = 1, + }; + // .greptime.v1.IndexType index_type = 1; + void clear_index_type(); + ::greptime::v1::IndexType index_type() const; + void set_index_type(::greptime::v1::IndexType value); + private: + ::greptime::v1::IndexType _internal_index_type() const; + void _internal_set_index_type(::greptime::v1::IndexType value); + public: + + // @@protoc_insertion_point(class_scope:greptime.v1.ColumnOptions) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + int index_type_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_greptime_2fv1_2frow_2eproto; +}; +// ------------------------------------------------------------------- + class Row final : public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:greptime.v1.Row) */ { public: @@ -492,7 +689,7 @@ class Row final : &_Row_default_instance_); } static constexpr int kIndexInFileMessages = - 2; + 3; friend void swap(Row& a, Row& b) { a.Swap(&b); @@ -680,7 +877,7 @@ class Value final : &_Value_default_instance_); } static constexpr int kIndexInFileMessages = - 3; + 4; friend void swap(Value& a, Value& b) { a.Swap(&b); @@ -1500,6 +1697,120 @@ inline void ColumnSchema::set_allocated_datatype_extension(::greptime::v1::Colum // @@protoc_insertion_point(field_set_allocated:greptime.v1.ColumnSchema.datatype_extension) } +// .greptime.v1.ColumnOptions options = 5; +inline bool ColumnSchema::_internal_has_options() const { + return this != internal_default_instance() && _impl_.options_ != nullptr; +} +inline bool ColumnSchema::has_options() const { + return _internal_has_options(); +} +inline void ColumnSchema::clear_options() { + if (GetArenaForAllocation() == nullptr && _impl_.options_ != nullptr) { + delete _impl_.options_; + } + _impl_.options_ = nullptr; +} +inline const ::greptime::v1::ColumnOptions& ColumnSchema::_internal_options() const { + const ::greptime::v1::ColumnOptions* p = _impl_.options_; + return p != nullptr ? *p : reinterpret_cast( + ::greptime::v1::_ColumnOptions_default_instance_); +} +inline const ::greptime::v1::ColumnOptions& ColumnSchema::options() const { + // @@protoc_insertion_point(field_get:greptime.v1.ColumnSchema.options) + return _internal_options(); +} +inline void ColumnSchema::unsafe_arena_set_allocated_options( + ::greptime::v1::ColumnOptions* options) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.options_); + } + _impl_.options_ = options; + if (options) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:greptime.v1.ColumnSchema.options) +} +inline ::greptime::v1::ColumnOptions* ColumnSchema::release_options() { + + ::greptime::v1::ColumnOptions* temp = _impl_.options_; + _impl_.options_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::greptime::v1::ColumnOptions* ColumnSchema::unsafe_arena_release_options() { + // @@protoc_insertion_point(field_release:greptime.v1.ColumnSchema.options) + + ::greptime::v1::ColumnOptions* temp = _impl_.options_; + _impl_.options_ = nullptr; + return temp; +} +inline ::greptime::v1::ColumnOptions* ColumnSchema::_internal_mutable_options() { + + if (_impl_.options_ == nullptr) { + auto* p = CreateMaybeMessage<::greptime::v1::ColumnOptions>(GetArenaForAllocation()); + _impl_.options_ = p; + } + return _impl_.options_; +} +inline ::greptime::v1::ColumnOptions* ColumnSchema::mutable_options() { + ::greptime::v1::ColumnOptions* _msg = _internal_mutable_options(); + // @@protoc_insertion_point(field_mutable:greptime.v1.ColumnSchema.options) + return _msg; +} +inline void ColumnSchema::set_allocated_options(::greptime::v1::ColumnOptions* options) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete _impl_.options_; + } + if (options) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(options); + if (message_arena != submessage_arena) { + options = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, options, submessage_arena); + } + + } else { + + } + _impl_.options_ = options; + // @@protoc_insertion_point(field_set_allocated:greptime.v1.ColumnSchema.options) +} + +// ------------------------------------------------------------------- + +// ColumnOptions + +// .greptime.v1.IndexType index_type = 1; +inline void ColumnOptions::clear_index_type() { + _impl_.index_type_ = 0; +} +inline ::greptime::v1::IndexType ColumnOptions::_internal_index_type() const { + return static_cast< ::greptime::v1::IndexType >(_impl_.index_type_); +} +inline ::greptime::v1::IndexType ColumnOptions::index_type() const { + // @@protoc_insertion_point(field_get:greptime.v1.ColumnOptions.index_type) + return _internal_index_type(); +} +inline void ColumnOptions::_internal_set_index_type(::greptime::v1::IndexType value) { + + _impl_.index_type_ = value; +} +inline void ColumnOptions::set_index_type(::greptime::v1::IndexType value) { + _internal_set_index_type(value); + // @@protoc_insertion_point(field_set:greptime.v1.ColumnOptions.index_type) +} + // ------------------------------------------------------------------- // Row @@ -2726,12 +3037,24 @@ inline Value::ValueDataCase Value::value_data_case() const { // ------------------------------------------------------------------- +// ------------------------------------------------------------------- + // @@protoc_insertion_point(namespace_scope) } // namespace v1 } // namespace greptime +PROTOBUF_NAMESPACE_OPEN + +template <> struct is_proto_enum< ::greptime::v1::IndexType> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::greptime::v1::IndexType>() { + return ::greptime::v1::IndexType_descriptor(); +} + +PROTOBUF_NAMESPACE_CLOSE + // @@protoc_insertion_point(global_scope) #include diff --git a/java/src/main/java/io/greptime/v1/RowData.java b/java/src/main/java/io/greptime/v1/RowData.java index e43c659b..4203ab3f 100644 --- a/java/src/main/java/io/greptime/v1/RowData.java +++ b/java/src/main/java/io/greptime/v1/RowData.java @@ -14,6 +14,105 @@ public static void registerAllExtensions( registerAllExtensions( (com.google.protobuf.ExtensionRegistryLite) registry); } + /** + * Protobuf enum {@code greptime.v1.IndexType} + */ + public enum IndexType + implements com.google.protobuf.ProtocolMessageEnum { + /** + * INVERTED = 0; + */ + INVERTED(0), + UNRECOGNIZED(-1), + ; + + /** + * INVERTED = 0; + */ + public static final int INVERTED_VALUE = 0; + + + 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 IndexType 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 IndexType forNumber(int value) { + switch (value) { + case 0: return INVERTED; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + IndexType> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public IndexType findValueByNumber(int number) { + return IndexType.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.RowData.getDescriptor().getEnumTypes().get(0); + } + + private static final IndexType[] VALUES = values(); + + public static IndexType 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 IndexType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:greptime.v1.IndexType) + } + public interface RowsOrBuilder extends // @@protoc_insertion_point(interface_extends:greptime.v1.Rows) com.google.protobuf.MessageOrBuilder { @@ -1245,6 +1344,21 @@ public interface ColumnSchemaOrBuilder extends * .greptime.v1.ColumnDataTypeExtension datatype_extension = 4; */ io.greptime.v1.Common.ColumnDataTypeExtensionOrBuilder getDatatypeExtensionOrBuilder(); + + /** + * .greptime.v1.ColumnOptions options = 5; + * @return Whether the options field is set. + */ + boolean hasOptions(); + /** + * .greptime.v1.ColumnOptions options = 5; + * @return The options. + */ + io.greptime.v1.RowData.ColumnOptions getOptions(); + /** + * .greptime.v1.ColumnOptions options = 5; + */ + io.greptime.v1.RowData.ColumnOptionsOrBuilder getOptionsOrBuilder(); } /** * Protobuf type {@code greptime.v1.ColumnSchema} @@ -1325,6 +1439,19 @@ private ColumnSchema( break; } + case 42: { + io.greptime.v1.RowData.ColumnOptions.Builder subBuilder = null; + if (options_ != null) { + subBuilder = options_.toBuilder(); + } + options_ = input.readMessage(io.greptime.v1.RowData.ColumnOptions.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(options_); + options_ = subBuilder.buildPartial(); + } + + break; + } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { @@ -1473,6 +1600,32 @@ public io.greptime.v1.Common.ColumnDataTypeExtensionOrBuilder getDatatypeExtensi return getDatatypeExtension(); } + public static final int OPTIONS_FIELD_NUMBER = 5; + private io.greptime.v1.RowData.ColumnOptions options_; + /** + * .greptime.v1.ColumnOptions options = 5; + * @return Whether the options field is set. + */ + @java.lang.Override + public boolean hasOptions() { + return options_ != null; + } + /** + * .greptime.v1.ColumnOptions options = 5; + * @return The options. + */ + @java.lang.Override + public io.greptime.v1.RowData.ColumnOptions getOptions() { + return options_ == null ? io.greptime.v1.RowData.ColumnOptions.getDefaultInstance() : options_; + } + /** + * .greptime.v1.ColumnOptions options = 5; + */ + @java.lang.Override + public io.greptime.v1.RowData.ColumnOptionsOrBuilder getOptionsOrBuilder() { + return getOptions(); + } + private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { @@ -1499,6 +1652,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (datatypeExtension_ != null) { output.writeMessage(4, getDatatypeExtension()); } + if (options_ != null) { + output.writeMessage(5, getOptions()); + } unknownFields.writeTo(output); } @@ -1523,6 +1679,10 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(4, getDatatypeExtension()); } + if (options_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getOptions()); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -1547,6 +1707,11 @@ public boolean equals(final java.lang.Object obj) { if (!getDatatypeExtension() .equals(other.getDatatypeExtension())) return false; } + if (hasOptions() != other.hasOptions()) return false; + if (hasOptions()) { + if (!getOptions() + .equals(other.getOptions())) return false; + } if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -1568,6 +1733,10 @@ public int hashCode() { hash = (37 * hash) + DATATYPE_EXTENSION_FIELD_NUMBER; hash = (53 * hash) + getDatatypeExtension().hashCode(); } + if (hasOptions()) { + hash = (37 * hash) + OPTIONS_FIELD_NUMBER; + hash = (53 * hash) + getOptions().hashCode(); + } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -1713,6 +1882,12 @@ public Builder clear() { datatypeExtension_ = null; datatypeExtensionBuilder_ = null; } + if (optionsBuilder_ == null) { + options_ = null; + } else { + options_ = null; + optionsBuilder_ = null; + } return this; } @@ -1747,6 +1922,11 @@ public io.greptime.v1.RowData.ColumnSchema buildPartial() { } else { result.datatypeExtension_ = datatypeExtensionBuilder_.build(); } + if (optionsBuilder_ == null) { + result.options_ = options_; + } else { + result.options_ = optionsBuilder_.build(); + } onBuilt(); return result; } @@ -1808,6 +1988,9 @@ public Builder mergeFrom(io.greptime.v1.RowData.ColumnSchema other) { if (other.hasDatatypeExtension()) { mergeDatatypeExtension(other.getDatatypeExtension()); } + if (other.hasOptions()) { + mergeOptions(other.getOptions()); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -1932,249 +2115,895 @@ public Builder setDatatypeValue(int value) { onChanged(); return this; } - /** - * .greptime.v1.ColumnDataType datatype = 2; - * @return The datatype. - */ + /** + * .greptime.v1.ColumnDataType datatype = 2; + * @return The datatype. + */ + @java.lang.Override + public io.greptime.v1.Common.ColumnDataType getDatatype() { + @SuppressWarnings("deprecation") + io.greptime.v1.Common.ColumnDataType result = io.greptime.v1.Common.ColumnDataType.valueOf(datatype_); + return result == null ? io.greptime.v1.Common.ColumnDataType.UNRECOGNIZED : result; + } + /** + * .greptime.v1.ColumnDataType datatype = 2; + * @param value The datatype to set. + * @return This builder for chaining. + */ + public Builder setDatatype(io.greptime.v1.Common.ColumnDataType value) { + if (value == null) { + throw new NullPointerException(); + } + + datatype_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .greptime.v1.ColumnDataType datatype = 2; + * @return This builder for chaining. + */ + public Builder clearDatatype() { + + datatype_ = 0; + onChanged(); + return this; + } + + private int semanticType_ = 0; + /** + * .greptime.v1.SemanticType semantic_type = 3; + * @return The enum numeric value on the wire for semanticType. + */ + @java.lang.Override public int getSemanticTypeValue() { + return semanticType_; + } + /** + * .greptime.v1.SemanticType semantic_type = 3; + * @param value The enum numeric value on the wire for semanticType to set. + * @return This builder for chaining. + */ + public Builder setSemanticTypeValue(int value) { + + semanticType_ = value; + onChanged(); + return this; + } + /** + * .greptime.v1.SemanticType semantic_type = 3; + * @return The semanticType. + */ + @java.lang.Override + public io.greptime.v1.Common.SemanticType getSemanticType() { + @SuppressWarnings("deprecation") + io.greptime.v1.Common.SemanticType result = io.greptime.v1.Common.SemanticType.valueOf(semanticType_); + return result == null ? io.greptime.v1.Common.SemanticType.UNRECOGNIZED : result; + } + /** + * .greptime.v1.SemanticType semantic_type = 3; + * @param value The semanticType to set. + * @return This builder for chaining. + */ + public Builder setSemanticType(io.greptime.v1.Common.SemanticType value) { + if (value == null) { + throw new NullPointerException(); + } + + semanticType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .greptime.v1.SemanticType semantic_type = 3; + * @return This builder for chaining. + */ + public Builder clearSemanticType() { + + semanticType_ = 0; + onChanged(); + return this; + } + + private io.greptime.v1.Common.ColumnDataTypeExtension datatypeExtension_; + private com.google.protobuf.SingleFieldBuilderV3< + io.greptime.v1.Common.ColumnDataTypeExtension, io.greptime.v1.Common.ColumnDataTypeExtension.Builder, io.greptime.v1.Common.ColumnDataTypeExtensionOrBuilder> datatypeExtensionBuilder_; + /** + *
+       * Extension for ColumnDataType.
+       * 
+ * + * .greptime.v1.ColumnDataTypeExtension datatype_extension = 4; + * @return Whether the datatypeExtension field is set. + */ + public boolean hasDatatypeExtension() { + return datatypeExtensionBuilder_ != null || datatypeExtension_ != null; + } + /** + *
+       * Extension for ColumnDataType.
+       * 
+ * + * .greptime.v1.ColumnDataTypeExtension datatype_extension = 4; + * @return The datatypeExtension. + */ + public io.greptime.v1.Common.ColumnDataTypeExtension getDatatypeExtension() { + if (datatypeExtensionBuilder_ == null) { + return datatypeExtension_ == null ? io.greptime.v1.Common.ColumnDataTypeExtension.getDefaultInstance() : datatypeExtension_; + } else { + return datatypeExtensionBuilder_.getMessage(); + } + } + /** + *
+       * Extension for ColumnDataType.
+       * 
+ * + * .greptime.v1.ColumnDataTypeExtension datatype_extension = 4; + */ + public Builder setDatatypeExtension(io.greptime.v1.Common.ColumnDataTypeExtension value) { + if (datatypeExtensionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + datatypeExtension_ = value; + onChanged(); + } else { + datatypeExtensionBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * Extension for ColumnDataType.
+       * 
+ * + * .greptime.v1.ColumnDataTypeExtension datatype_extension = 4; + */ + public Builder setDatatypeExtension( + io.greptime.v1.Common.ColumnDataTypeExtension.Builder builderForValue) { + if (datatypeExtensionBuilder_ == null) { + datatypeExtension_ = builderForValue.build(); + onChanged(); + } else { + datatypeExtensionBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * Extension for ColumnDataType.
+       * 
+ * + * .greptime.v1.ColumnDataTypeExtension datatype_extension = 4; + */ + public Builder mergeDatatypeExtension(io.greptime.v1.Common.ColumnDataTypeExtension value) { + if (datatypeExtensionBuilder_ == null) { + if (datatypeExtension_ != null) { + datatypeExtension_ = + io.greptime.v1.Common.ColumnDataTypeExtension.newBuilder(datatypeExtension_).mergeFrom(value).buildPartial(); + } else { + datatypeExtension_ = value; + } + onChanged(); + } else { + datatypeExtensionBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * Extension for ColumnDataType.
+       * 
+ * + * .greptime.v1.ColumnDataTypeExtension datatype_extension = 4; + */ + public Builder clearDatatypeExtension() { + if (datatypeExtensionBuilder_ == null) { + datatypeExtension_ = null; + onChanged(); + } else { + datatypeExtension_ = null; + datatypeExtensionBuilder_ = null; + } + + return this; + } + /** + *
+       * Extension for ColumnDataType.
+       * 
+ * + * .greptime.v1.ColumnDataTypeExtension datatype_extension = 4; + */ + public io.greptime.v1.Common.ColumnDataTypeExtension.Builder getDatatypeExtensionBuilder() { + + onChanged(); + return getDatatypeExtensionFieldBuilder().getBuilder(); + } + /** + *
+       * Extension for ColumnDataType.
+       * 
+ * + * .greptime.v1.ColumnDataTypeExtension datatype_extension = 4; + */ + public io.greptime.v1.Common.ColumnDataTypeExtensionOrBuilder getDatatypeExtensionOrBuilder() { + if (datatypeExtensionBuilder_ != null) { + return datatypeExtensionBuilder_.getMessageOrBuilder(); + } else { + return datatypeExtension_ == null ? + io.greptime.v1.Common.ColumnDataTypeExtension.getDefaultInstance() : datatypeExtension_; + } + } + /** + *
+       * Extension for ColumnDataType.
+       * 
+ * + * .greptime.v1.ColumnDataTypeExtension datatype_extension = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.greptime.v1.Common.ColumnDataTypeExtension, io.greptime.v1.Common.ColumnDataTypeExtension.Builder, io.greptime.v1.Common.ColumnDataTypeExtensionOrBuilder> + getDatatypeExtensionFieldBuilder() { + if (datatypeExtensionBuilder_ == null) { + datatypeExtensionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.greptime.v1.Common.ColumnDataTypeExtension, io.greptime.v1.Common.ColumnDataTypeExtension.Builder, io.greptime.v1.Common.ColumnDataTypeExtensionOrBuilder>( + getDatatypeExtension(), + getParentForChildren(), + isClean()); + datatypeExtension_ = null; + } + return datatypeExtensionBuilder_; + } + + private io.greptime.v1.RowData.ColumnOptions options_; + private com.google.protobuf.SingleFieldBuilderV3< + io.greptime.v1.RowData.ColumnOptions, io.greptime.v1.RowData.ColumnOptions.Builder, io.greptime.v1.RowData.ColumnOptionsOrBuilder> optionsBuilder_; + /** + * .greptime.v1.ColumnOptions options = 5; + * @return Whether the options field is set. + */ + public boolean hasOptions() { + return optionsBuilder_ != null || options_ != null; + } + /** + * .greptime.v1.ColumnOptions options = 5; + * @return The options. + */ + public io.greptime.v1.RowData.ColumnOptions getOptions() { + if (optionsBuilder_ == null) { + return options_ == null ? io.greptime.v1.RowData.ColumnOptions.getDefaultInstance() : options_; + } else { + return optionsBuilder_.getMessage(); + } + } + /** + * .greptime.v1.ColumnOptions options = 5; + */ + public Builder setOptions(io.greptime.v1.RowData.ColumnOptions value) { + if (optionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + options_ = value; + onChanged(); + } else { + optionsBuilder_.setMessage(value); + } + + return this; + } + /** + * .greptime.v1.ColumnOptions options = 5; + */ + public Builder setOptions( + io.greptime.v1.RowData.ColumnOptions.Builder builderForValue) { + if (optionsBuilder_ == null) { + options_ = builderForValue.build(); + onChanged(); + } else { + optionsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .greptime.v1.ColumnOptions options = 5; + */ + public Builder mergeOptions(io.greptime.v1.RowData.ColumnOptions value) { + if (optionsBuilder_ == null) { + if (options_ != null) { + options_ = + io.greptime.v1.RowData.ColumnOptions.newBuilder(options_).mergeFrom(value).buildPartial(); + } else { + options_ = value; + } + onChanged(); + } else { + optionsBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .greptime.v1.ColumnOptions options = 5; + */ + public Builder clearOptions() { + if (optionsBuilder_ == null) { + options_ = null; + onChanged(); + } else { + options_ = null; + optionsBuilder_ = null; + } + + return this; + } + /** + * .greptime.v1.ColumnOptions options = 5; + */ + public io.greptime.v1.RowData.ColumnOptions.Builder getOptionsBuilder() { + + onChanged(); + return getOptionsFieldBuilder().getBuilder(); + } + /** + * .greptime.v1.ColumnOptions options = 5; + */ + public io.greptime.v1.RowData.ColumnOptionsOrBuilder getOptionsOrBuilder() { + if (optionsBuilder_ != null) { + return optionsBuilder_.getMessageOrBuilder(); + } else { + return options_ == null ? + io.greptime.v1.RowData.ColumnOptions.getDefaultInstance() : options_; + } + } + /** + * .greptime.v1.ColumnOptions options = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.greptime.v1.RowData.ColumnOptions, io.greptime.v1.RowData.ColumnOptions.Builder, io.greptime.v1.RowData.ColumnOptionsOrBuilder> + getOptionsFieldBuilder() { + if (optionsBuilder_ == null) { + optionsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.greptime.v1.RowData.ColumnOptions, io.greptime.v1.RowData.ColumnOptions.Builder, io.greptime.v1.RowData.ColumnOptionsOrBuilder>( + getOptions(), + getParentForChildren(), + isClean()); + options_ = null; + } + return optionsBuilder_; + } + @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.ColumnSchema) + } + + // @@protoc_insertion_point(class_scope:greptime.v1.ColumnSchema) + private static final io.greptime.v1.RowData.ColumnSchema DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.greptime.v1.RowData.ColumnSchema(); + } + + public static io.greptime.v1.RowData.ColumnSchema getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ColumnSchema parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ColumnSchema(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.RowData.ColumnSchema getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ColumnOptionsOrBuilder extends + // @@protoc_insertion_point(interface_extends:greptime.v1.ColumnOptions) + com.google.protobuf.MessageOrBuilder { + + /** + * .greptime.v1.IndexType index_type = 1; + * @return The enum numeric value on the wire for indexType. + */ + int getIndexTypeValue(); + /** + * .greptime.v1.IndexType index_type = 1; + * @return The indexType. + */ + io.greptime.v1.RowData.IndexType getIndexType(); + } + /** + * Protobuf type {@code greptime.v1.ColumnOptions} + */ + public static final class ColumnOptions extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:greptime.v1.ColumnOptions) + ColumnOptionsOrBuilder { + private static final long serialVersionUID = 0L; + // Use ColumnOptions.newBuilder() to construct. + private ColumnOptions(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ColumnOptions() { + indexType_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ColumnOptions(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ColumnOptions( + 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(); + + indexType_ = rawValue; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.greptime.v1.RowData.internal_static_greptime_v1_ColumnOptions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.greptime.v1.RowData.internal_static_greptime_v1_ColumnOptions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.greptime.v1.RowData.ColumnOptions.class, io.greptime.v1.RowData.ColumnOptions.Builder.class); + } + + public static final int INDEX_TYPE_FIELD_NUMBER = 1; + private int indexType_; + /** + * .greptime.v1.IndexType index_type = 1; + * @return The enum numeric value on the wire for indexType. + */ + @java.lang.Override public int getIndexTypeValue() { + return indexType_; + } + /** + * .greptime.v1.IndexType index_type = 1; + * @return The indexType. + */ + @java.lang.Override public io.greptime.v1.RowData.IndexType getIndexType() { + @SuppressWarnings("deprecation") + io.greptime.v1.RowData.IndexType result = io.greptime.v1.RowData.IndexType.valueOf(indexType_); + return result == null ? io.greptime.v1.RowData.IndexType.UNRECOGNIZED : result; + } + + 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 (indexType_ != io.greptime.v1.RowData.IndexType.INVERTED.getNumber()) { + output.writeEnum(1, indexType_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (indexType_ != io.greptime.v1.RowData.IndexType.INVERTED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, indexType_); + } + 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.RowData.ColumnOptions)) { + return super.equals(obj); + } + io.greptime.v1.RowData.ColumnOptions other = (io.greptime.v1.RowData.ColumnOptions) obj; + + if (indexType_ != other.indexType_) 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) + INDEX_TYPE_FIELD_NUMBER; + hash = (53 * hash) + indexType_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.greptime.v1.RowData.ColumnOptions parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.greptime.v1.RowData.ColumnOptions 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.RowData.ColumnOptions parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.greptime.v1.RowData.ColumnOptions 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.RowData.ColumnOptions parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.greptime.v1.RowData.ColumnOptions parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.greptime.v1.RowData.ColumnOptions parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.greptime.v1.RowData.ColumnOptions 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.RowData.ColumnOptions parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.greptime.v1.RowData.ColumnOptions 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.RowData.ColumnOptions parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.greptime.v1.RowData.ColumnOptions 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.RowData.ColumnOptions 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.ColumnOptions} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:greptime.v1.ColumnOptions) + io.greptime.v1.RowData.ColumnOptionsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.greptime.v1.RowData.internal_static_greptime_v1_ColumnOptions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.greptime.v1.RowData.internal_static_greptime_v1_ColumnOptions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.greptime.v1.RowData.ColumnOptions.class, io.greptime.v1.RowData.ColumnOptions.Builder.class); + } + + // Construct using io.greptime.v1.RowData.ColumnOptions.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(); + indexType_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.greptime.v1.RowData.internal_static_greptime_v1_ColumnOptions_descriptor; + } + + @java.lang.Override + public io.greptime.v1.RowData.ColumnOptions getDefaultInstanceForType() { + return io.greptime.v1.RowData.ColumnOptions.getDefaultInstance(); + } + + @java.lang.Override + public io.greptime.v1.RowData.ColumnOptions build() { + io.greptime.v1.RowData.ColumnOptions result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.greptime.v1.RowData.ColumnOptions buildPartial() { + io.greptime.v1.RowData.ColumnOptions result = new io.greptime.v1.RowData.ColumnOptions(this); + result.indexType_ = indexType_; + 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 io.greptime.v1.Common.ColumnDataType getDatatype() { - @SuppressWarnings("deprecation") - io.greptime.v1.Common.ColumnDataType result = io.greptime.v1.Common.ColumnDataType.valueOf(datatype_); - return result == null ? io.greptime.v1.Common.ColumnDataType.UNRECOGNIZED : result; + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); } - /** - * .greptime.v1.ColumnDataType datatype = 2; - * @param value The datatype to set. - * @return This builder for chaining. - */ - public Builder setDatatype(io.greptime.v1.Common.ColumnDataType value) { - if (value == null) { - throw new NullPointerException(); + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.greptime.v1.RowData.ColumnOptions) { + return mergeFrom((io.greptime.v1.RowData.ColumnOptions)other); + } else { + super.mergeFrom(other); + return this; } - - datatype_ = value.getNumber(); + } + + public Builder mergeFrom(io.greptime.v1.RowData.ColumnOptions other) { + if (other == io.greptime.v1.RowData.ColumnOptions.getDefaultInstance()) return this; + if (other.indexType_ != 0) { + setIndexTypeValue(other.getIndexTypeValue()); + } + this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } - /** - * .greptime.v1.ColumnDataType datatype = 2; - * @return This builder for chaining. - */ - public Builder clearDatatype() { - - datatype_ = 0; - onChanged(); + + @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.RowData.ColumnOptions parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (io.greptime.v1.RowData.ColumnOptions) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } return this; } - private int semanticType_ = 0; + private int indexType_ = 0; /** - * .greptime.v1.SemanticType semantic_type = 3; - * @return The enum numeric value on the wire for semanticType. + * .greptime.v1.IndexType index_type = 1; + * @return The enum numeric value on the wire for indexType. */ - @java.lang.Override public int getSemanticTypeValue() { - return semanticType_; + @java.lang.Override public int getIndexTypeValue() { + return indexType_; } /** - * .greptime.v1.SemanticType semantic_type = 3; - * @param value The enum numeric value on the wire for semanticType to set. + * .greptime.v1.IndexType index_type = 1; + * @param value The enum numeric value on the wire for indexType to set. * @return This builder for chaining. */ - public Builder setSemanticTypeValue(int value) { + public Builder setIndexTypeValue(int value) { - semanticType_ = value; + indexType_ = value; onChanged(); return this; } /** - * .greptime.v1.SemanticType semantic_type = 3; - * @return The semanticType. + * .greptime.v1.IndexType index_type = 1; + * @return The indexType. */ @java.lang.Override - public io.greptime.v1.Common.SemanticType getSemanticType() { + public io.greptime.v1.RowData.IndexType getIndexType() { @SuppressWarnings("deprecation") - io.greptime.v1.Common.SemanticType result = io.greptime.v1.Common.SemanticType.valueOf(semanticType_); - return result == null ? io.greptime.v1.Common.SemanticType.UNRECOGNIZED : result; + io.greptime.v1.RowData.IndexType result = io.greptime.v1.RowData.IndexType.valueOf(indexType_); + return result == null ? io.greptime.v1.RowData.IndexType.UNRECOGNIZED : result; } /** - * .greptime.v1.SemanticType semantic_type = 3; - * @param value The semanticType to set. + * .greptime.v1.IndexType index_type = 1; + * @param value The indexType to set. * @return This builder for chaining. */ - public Builder setSemanticType(io.greptime.v1.Common.SemanticType value) { + public Builder setIndexType(io.greptime.v1.RowData.IndexType value) { if (value == null) { throw new NullPointerException(); } - semanticType_ = value.getNumber(); + indexType_ = value.getNumber(); onChanged(); return this; } /** - * .greptime.v1.SemanticType semantic_type = 3; + * .greptime.v1.IndexType index_type = 1; * @return This builder for chaining. */ - public Builder clearSemanticType() { + public Builder clearIndexType() { - semanticType_ = 0; + indexType_ = 0; onChanged(); return this; } - - private io.greptime.v1.Common.ColumnDataTypeExtension datatypeExtension_; - private com.google.protobuf.SingleFieldBuilderV3< - io.greptime.v1.Common.ColumnDataTypeExtension, io.greptime.v1.Common.ColumnDataTypeExtension.Builder, io.greptime.v1.Common.ColumnDataTypeExtensionOrBuilder> datatypeExtensionBuilder_; - /** - *
-       * Extension for ColumnDataType.
-       * 
- * - * .greptime.v1.ColumnDataTypeExtension datatype_extension = 4; - * @return Whether the datatypeExtension field is set. - */ - public boolean hasDatatypeExtension() { - return datatypeExtensionBuilder_ != null || datatypeExtension_ != null; - } - /** - *
-       * Extension for ColumnDataType.
-       * 
- * - * .greptime.v1.ColumnDataTypeExtension datatype_extension = 4; - * @return The datatypeExtension. - */ - public io.greptime.v1.Common.ColumnDataTypeExtension getDatatypeExtension() { - if (datatypeExtensionBuilder_ == null) { - return datatypeExtension_ == null ? io.greptime.v1.Common.ColumnDataTypeExtension.getDefaultInstance() : datatypeExtension_; - } else { - return datatypeExtensionBuilder_.getMessage(); - } - } - /** - *
-       * Extension for ColumnDataType.
-       * 
- * - * .greptime.v1.ColumnDataTypeExtension datatype_extension = 4; - */ - public Builder setDatatypeExtension(io.greptime.v1.Common.ColumnDataTypeExtension value) { - if (datatypeExtensionBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - datatypeExtension_ = value; - onChanged(); - } else { - datatypeExtensionBuilder_.setMessage(value); - } - - return this; - } - /** - *
-       * Extension for ColumnDataType.
-       * 
- * - * .greptime.v1.ColumnDataTypeExtension datatype_extension = 4; - */ - public Builder setDatatypeExtension( - io.greptime.v1.Common.ColumnDataTypeExtension.Builder builderForValue) { - if (datatypeExtensionBuilder_ == null) { - datatypeExtension_ = builderForValue.build(); - onChanged(); - } else { - datatypeExtensionBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - *
-       * Extension for ColumnDataType.
-       * 
- * - * .greptime.v1.ColumnDataTypeExtension datatype_extension = 4; - */ - public Builder mergeDatatypeExtension(io.greptime.v1.Common.ColumnDataTypeExtension value) { - if (datatypeExtensionBuilder_ == null) { - if (datatypeExtension_ != null) { - datatypeExtension_ = - io.greptime.v1.Common.ColumnDataTypeExtension.newBuilder(datatypeExtension_).mergeFrom(value).buildPartial(); - } else { - datatypeExtension_ = value; - } - onChanged(); - } else { - datatypeExtensionBuilder_.mergeFrom(value); - } - - return this; - } - /** - *
-       * Extension for ColumnDataType.
-       * 
- * - * .greptime.v1.ColumnDataTypeExtension datatype_extension = 4; - */ - public Builder clearDatatypeExtension() { - if (datatypeExtensionBuilder_ == null) { - datatypeExtension_ = null; - onChanged(); - } else { - datatypeExtension_ = null; - datatypeExtensionBuilder_ = null; - } - - return this; - } - /** - *
-       * Extension for ColumnDataType.
-       * 
- * - * .greptime.v1.ColumnDataTypeExtension datatype_extension = 4; - */ - public io.greptime.v1.Common.ColumnDataTypeExtension.Builder getDatatypeExtensionBuilder() { - - onChanged(); - return getDatatypeExtensionFieldBuilder().getBuilder(); - } - /** - *
-       * Extension for ColumnDataType.
-       * 
- * - * .greptime.v1.ColumnDataTypeExtension datatype_extension = 4; - */ - public io.greptime.v1.Common.ColumnDataTypeExtensionOrBuilder getDatatypeExtensionOrBuilder() { - if (datatypeExtensionBuilder_ != null) { - return datatypeExtensionBuilder_.getMessageOrBuilder(); - } else { - return datatypeExtension_ == null ? - io.greptime.v1.Common.ColumnDataTypeExtension.getDefaultInstance() : datatypeExtension_; - } - } - /** - *
-       * Extension for ColumnDataType.
-       * 
- * - * .greptime.v1.ColumnDataTypeExtension datatype_extension = 4; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.greptime.v1.Common.ColumnDataTypeExtension, io.greptime.v1.Common.ColumnDataTypeExtension.Builder, io.greptime.v1.Common.ColumnDataTypeExtensionOrBuilder> - getDatatypeExtensionFieldBuilder() { - if (datatypeExtensionBuilder_ == null) { - datatypeExtensionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.greptime.v1.Common.ColumnDataTypeExtension, io.greptime.v1.Common.ColumnDataTypeExtension.Builder, io.greptime.v1.Common.ColumnDataTypeExtensionOrBuilder>( - getDatatypeExtension(), - getParentForChildren(), - isClean()); - datatypeExtension_ = null; - } - return datatypeExtensionBuilder_; - } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -2188,41 +3017,41 @@ public final Builder mergeUnknownFields( } - // @@protoc_insertion_point(builder_scope:greptime.v1.ColumnSchema) + // @@protoc_insertion_point(builder_scope:greptime.v1.ColumnOptions) } - // @@protoc_insertion_point(class_scope:greptime.v1.ColumnSchema) - private static final io.greptime.v1.RowData.ColumnSchema DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:greptime.v1.ColumnOptions) + private static final io.greptime.v1.RowData.ColumnOptions DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new io.greptime.v1.RowData.ColumnSchema(); + DEFAULT_INSTANCE = new io.greptime.v1.RowData.ColumnOptions(); } - public static io.greptime.v1.RowData.ColumnSchema getDefaultInstance() { + public static io.greptime.v1.RowData.ColumnOptions getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override - public ColumnSchema parsePartialFrom( + public ColumnOptions parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ColumnSchema(input, extensionRegistry); + return new ColumnOptions(input, extensionRegistry); } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public io.greptime.v1.RowData.ColumnSchema getDefaultInstanceForType() { + public io.greptime.v1.RowData.ColumnOptions getDefaultInstanceForType() { return DEFAULT_INSTANCE; } @@ -6697,6 +7526,11 @@ public io.greptime.v1.RowData.Value getDefaultInstanceForType() { private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_greptime_v1_ColumnSchema_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_greptime_v1_ColumnOptions_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_greptime_v1_ColumnOptions_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_greptime_v1_Row_descriptor; private static final @@ -6719,36 +7553,40 @@ public io.greptime.v1.RowData.Value getDefaultInstanceForType() { "\n\025greptime/v1/row.proto\022\013greptime.v1\032\030gr" + "eptime/v1/common.proto\"Q\n\004Rows\022)\n\006schema" + "\030\001 \003(\0132\031.greptime.v1.ColumnSchema\022\036\n\004row" + - "s\030\002 \003(\0132\020.greptime.v1.Row\"\306\001\n\014ColumnSche" + + "s\030\002 \003(\0132\020.greptime.v1.Row\"\363\001\n\014ColumnSche" + "ma\022\023\n\013column_name\030\001 \001(\t\022-\n\010datatype\030\002 \001(" + "\0162\033.greptime.v1.ColumnDataType\0220\n\rsemant" + "ic_type\030\003 \001(\0162\031.greptime.v1.SemanticType" + "\022@\n\022datatype_extension\030\004 \001(\0132$.greptime." + - "v1.ColumnDataTypeExtension\")\n\003Row\022\"\n\006val" + - "ues\030\001 \003(\0132\022.greptime.v1.Value\"\274\006\n\005Value\022" + - "\022\n\010i8_value\030\001 \001(\005H\000\022\023\n\ti16_value\030\002 \001(\005H\000" + - "\022\023\n\ti32_value\030\003 \001(\005H\000\022\023\n\ti64_value\030\004 \001(\003" + - "H\000\022\022\n\010u8_value\030\005 \001(\rH\000\022\023\n\tu16_value\030\006 \001(" + - "\rH\000\022\023\n\tu32_value\030\007 \001(\rH\000\022\023\n\tu64_value\030\010 " + - "\001(\004H\000\022\023\n\tf32_value\030\t \001(\002H\000\022\023\n\tf64_value\030" + - "\n \001(\001H\000\022\024\n\nbool_value\030\013 \001(\010H\000\022\026\n\014binary_" + - "value\030\014 \001(\014H\000\022\026\n\014string_value\030\r \001(\tH\000\022\024\n" + - "\ndate_value\030\016 \001(\005H\000\022\030\n\016datetime_value\030\017 " + - "\001(\003H\000\022 \n\026timestamp_second_value\030\020 \001(\003H\000\022" + - "%\n\033timestamp_millisecond_value\030\021 \001(\003H\000\022%" + - "\n\033timestamp_microsecond_value\030\022 \001(\003H\000\022$\n" + - "\032timestamp_nanosecond_value\030\023 \001(\003H\000\022\033\n\021t" + - "ime_second_value\030\024 \001(\003H\000\022 \n\026time_millise" + - "cond_value\030\025 \001(\003H\000\022 \n\026time_microsecond_v" + - "alue\030\026 \001(\003H\000\022\037\n\025time_nanosecond_value\030\027 " + - "\001(\003H\000\022#\n\031interval_year_month_value\030\030 \001(\005" + - "H\000\022!\n\027interval_day_time_value\030\031 \001(\003H\000\022J\n" + - "\035interval_month_day_nano_value\030\032 \001(\0132!.g" + - "reptime.v1.IntervalMonthDayNanoH\000\0223\n\020dec" + - "imal128_value\030\037 \001(\0132\027.greptime.v1.Decima" + - "l128H\000B\014\n\nvalue_dataBP\n\016io.greptime.v1B\007" + - "RowDataZ5github.com/GreptimeTeam/greptim" + - "e-proto/go/greptime/v1b\006proto3" + "v1.ColumnDataTypeExtension\022+\n\007options\030\005 " + + "\001(\0132\032.greptime.v1.ColumnOptions\";\n\rColum" + + "nOptions\022*\n\nindex_type\030\001 \001(\0162\026.greptime." + + "v1.IndexType\")\n\003Row\022\"\n\006values\030\001 \003(\0132\022.gr" + + "eptime.v1.Value\"\274\006\n\005Value\022\022\n\010i8_value\030\001 " + + "\001(\005H\000\022\023\n\ti16_value\030\002 \001(\005H\000\022\023\n\ti32_value\030" + + "\003 \001(\005H\000\022\023\n\ti64_value\030\004 \001(\003H\000\022\022\n\010u8_value" + + "\030\005 \001(\rH\000\022\023\n\tu16_value\030\006 \001(\rH\000\022\023\n\tu32_val" + + "ue\030\007 \001(\rH\000\022\023\n\tu64_value\030\010 \001(\004H\000\022\023\n\tf32_v" + + "alue\030\t \001(\002H\000\022\023\n\tf64_value\030\n \001(\001H\000\022\024\n\nboo" + + "l_value\030\013 \001(\010H\000\022\026\n\014binary_value\030\014 \001(\014H\000\022" + + "\026\n\014string_value\030\r \001(\tH\000\022\024\n\ndate_value\030\016 " + + "\001(\005H\000\022\030\n\016datetime_value\030\017 \001(\003H\000\022 \n\026times" + + "tamp_second_value\030\020 \001(\003H\000\022%\n\033timestamp_m" + + "illisecond_value\030\021 \001(\003H\000\022%\n\033timestamp_mi" + + "crosecond_value\030\022 \001(\003H\000\022$\n\032timestamp_nan" + + "osecond_value\030\023 \001(\003H\000\022\033\n\021time_second_val" + + "ue\030\024 \001(\003H\000\022 \n\026time_millisecond_value\030\025 \001" + + "(\003H\000\022 \n\026time_microsecond_value\030\026 \001(\003H\000\022\037" + + "\n\025time_nanosecond_value\030\027 \001(\003H\000\022#\n\031inter" + + "val_year_month_value\030\030 \001(\005H\000\022!\n\027interval" + + "_day_time_value\030\031 \001(\003H\000\022J\n\035interval_mont" + + "h_day_nano_value\030\032 \001(\0132!.greptime.v1.Int" + + "ervalMonthDayNanoH\000\0223\n\020decimal128_value\030" + + "\037 \001(\0132\027.greptime.v1.Decimal128H\000B\014\n\nvalu" + + "e_data*\031\n\tIndexType\022\014\n\010INVERTED\020\000BP\n\016io." + + "greptime.v1B\007RowDataZ5github.com/Greptim" + + "eTeam/greptime-proto/go/greptime/v1b\006pro" + + "to3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, @@ -6766,15 +7604,21 @@ public io.greptime.v1.RowData.Value getDefaultInstanceForType() { internal_static_greptime_v1_ColumnSchema_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_greptime_v1_ColumnSchema_descriptor, - new java.lang.String[] { "ColumnName", "Datatype", "SemanticType", "DatatypeExtension", }); - internal_static_greptime_v1_Row_descriptor = + new java.lang.String[] { "ColumnName", "Datatype", "SemanticType", "DatatypeExtension", "Options", }); + internal_static_greptime_v1_ColumnOptions_descriptor = getDescriptor().getMessageTypes().get(2); + internal_static_greptime_v1_ColumnOptions_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_greptime_v1_ColumnOptions_descriptor, + new java.lang.String[] { "IndexType", }); + internal_static_greptime_v1_Row_descriptor = + getDescriptor().getMessageTypes().get(3); internal_static_greptime_v1_Row_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_greptime_v1_Row_descriptor, new java.lang.String[] { "Values", }); internal_static_greptime_v1_Value_descriptor = - getDescriptor().getMessageTypes().get(3); + getDescriptor().getMessageTypes().get(4); internal_static_greptime_v1_Value_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_greptime_v1_Value_descriptor,