feat: add new json format (#281)
* feat: add new json format
* refactor: rename native format
* chore: store nested data type in json_native_extension
* feat: use json as a concrete type in proto
* Revert "feat: add `BuildIndexRequest` to `RegionRequestHeader` (#276)"
This reverts commit ee46a0eeaa.
This commit is contained in:
+35
-22
@@ -179,6 +179,7 @@ type Column_Values struct {
|
||||
Decimal128Values []*Decimal128 `protobuf:"bytes,31,rep,name=decimal128_values,json=decimal128Values,proto3" json:"decimal128_values,omitempty"`
|
||||
ListValues []*ListValue `protobuf:"bytes,40,rep,name=list_values,json=listValues,proto3" json:"list_values,omitempty"`
|
||||
StructValues []*StructValue `protobuf:"bytes,41,rep,name=struct_values,json=structValues,proto3" json:"struct_values,omitempty"`
|
||||
JsonValues []*Column_Values `protobuf:"bytes,42,rep,name=json_values,json=jsonValues,proto3" json:"json_values,omitempty"`
|
||||
}
|
||||
|
||||
func (x *Column_Values) Reset() {
|
||||
@@ -416,6 +417,13 @@ func (x *Column_Values) GetStructValues() []*StructValue {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Column_Values) GetJsonValues() []*Column_Values {
|
||||
if x != nil {
|
||||
return x.JsonValues
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_greptime_v1_column_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_greptime_v1_column_proto_rawDesc = []byte{
|
||||
@@ -424,7 +432,7 @@ var file_greptime_v1_column_proto_rawDesc = []byte{
|
||||
0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x18, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d,
|
||||
0x65, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x1a, 0x15, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x72,
|
||||
0x6f, 0x77, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xdb, 0x0d, 0x0a, 0x06, 0x43, 0x6f, 0x6c,
|
||||
0x6f, 0x77, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x98, 0x0e, 0x0a, 0x06, 0x43, 0x6f, 0x6c,
|
||||
0x75, 0x6d, 0x6e, 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, 0x3e, 0x0a, 0x0d, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63,
|
||||
@@ -448,7 +456,7 @@ var file_greptime_v1_column_proto_rawDesc = []byte{
|
||||
0x69, 0x6f, 0x6e, 0x12, 0x34, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x07,
|
||||
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, 0x1a, 0xda, 0x0a, 0x0a, 0x06, 0x56, 0x61,
|
||||
0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x97, 0x0b, 0x0a, 0x06, 0x56, 0x61,
|
||||
0x6c, 0x75, 0x65, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x69, 0x38, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65,
|
||||
0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, 0x52, 0x08, 0x69, 0x38, 0x56, 0x61, 0x6c, 0x75, 0x65,
|
||||
0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x31, 0x36, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18,
|
||||
@@ -534,12 +542,16 @@ var file_greptime_v1_column_proto_rawDesc = []byte{
|
||||
0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x29, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18,
|
||||
0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72,
|
||||
0x75, 0x63, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0c, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74,
|
||||
0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x42, 0x50, 0x0a, 0x0e, 0x69, 0x6f, 0x2e, 0x67, 0x72, 0x65,
|
||||
0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x07, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e,
|
||||
0x73, 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,
|
||||
0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x3b, 0x0a, 0x0b, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x76,
|
||||
0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x2a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x72,
|
||||
0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e,
|
||||
0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x52, 0x0a, 0x6a, 0x73, 0x6f, 0x6e, 0x56, 0x61, 0x6c,
|
||||
0x75, 0x65, 0x73, 0x42, 0x50, 0x0a, 0x0e, 0x69, 0x6f, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69,
|
||||
0x6d, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x07, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 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 (
|
||||
@@ -568,20 +580,21 @@ var file_greptime_v1_column_proto_goTypes = []interface{}{
|
||||
(*StructValue)(nil), // 9: greptime.v1.StructValue
|
||||
}
|
||||
var file_greptime_v1_column_proto_depIdxs = []int32{
|
||||
2, // 0: greptime.v1.Column.semantic_type:type_name -> greptime.v1.SemanticType
|
||||
1, // 1: greptime.v1.Column.values:type_name -> greptime.v1.Column.Values
|
||||
3, // 2: greptime.v1.Column.datatype:type_name -> greptime.v1.ColumnDataType
|
||||
4, // 3: greptime.v1.Column.datatype_extension:type_name -> greptime.v1.ColumnDataTypeExtension
|
||||
5, // 4: greptime.v1.Column.options:type_name -> greptime.v1.ColumnOptions
|
||||
6, // 5: greptime.v1.Column.Values.interval_month_day_nano_values:type_name -> greptime.v1.IntervalMonthDayNano
|
||||
7, // 6: greptime.v1.Column.Values.decimal128_values:type_name -> greptime.v1.Decimal128
|
||||
8, // 7: greptime.v1.Column.Values.list_values:type_name -> greptime.v1.ListValue
|
||||
9, // 8: greptime.v1.Column.Values.struct_values:type_name -> greptime.v1.StructValue
|
||||
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.Column.semantic_type:type_name -> greptime.v1.SemanticType
|
||||
1, // 1: greptime.v1.Column.values:type_name -> greptime.v1.Column.Values
|
||||
3, // 2: greptime.v1.Column.datatype:type_name -> greptime.v1.ColumnDataType
|
||||
4, // 3: greptime.v1.Column.datatype_extension:type_name -> greptime.v1.ColumnDataTypeExtension
|
||||
5, // 4: greptime.v1.Column.options:type_name -> greptime.v1.ColumnOptions
|
||||
6, // 5: greptime.v1.Column.Values.interval_month_day_nano_values:type_name -> greptime.v1.IntervalMonthDayNano
|
||||
7, // 6: greptime.v1.Column.Values.decimal128_values:type_name -> greptime.v1.Decimal128
|
||||
8, // 7: greptime.v1.Column.Values.list_values:type_name -> greptime.v1.ListValue
|
||||
9, // 8: greptime.v1.Column.Values.struct_values:type_name -> greptime.v1.StructValue
|
||||
1, // 9: greptime.v1.Column.Values.json_values:type_name -> greptime.v1.Column.Values
|
||||
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_column_proto_init() }
|
||||
|
||||
Reference in New Issue
Block a user