feat: interal type for row protocol, and multi row deletes (#80)

This commit is contained in:
JeremyHi
2023-08-16 15:09:24 +08:00
committed by GitHub
parent dbb8e524ca
commit fa79839bbb
20 changed files with 3928 additions and 1783 deletions
+81 -19
View File
@@ -229,6 +229,9 @@ type Value struct {
// *Value_TimeMillisecondValue
// *Value_TimeMicrosecondValue
// *Value_TimeNanosecondValue
// *Value_IntervalYearMonthValues
// *Value_IntervalDayTimeValues
// *Value_IntervalMonthDayNanoValues
ValueData isValue_ValueData `protobuf_oneof:"value_data"`
}
@@ -432,6 +435,27 @@ func (x *Value) GetTimeNanosecondValue() int64 {
return 0
}
func (x *Value) GetIntervalYearMonthValues() int32 {
if x, ok := x.GetValueData().(*Value_IntervalYearMonthValues); ok {
return x.IntervalYearMonthValues
}
return 0
}
func (x *Value) GetIntervalDayTimeValues() int64 {
if x, ok := x.GetValueData().(*Value_IntervalDayTimeValues); ok {
return x.IntervalDayTimeValues
}
return 0
}
func (x *Value) GetIntervalMonthDayNanoValues() *IntervalMonthDayNano {
if x, ok := x.GetValueData().(*Value_IntervalMonthDayNanoValues); ok {
return x.IntervalMonthDayNanoValues
}
return nil
}
type isValue_ValueData interface {
isValue_ValueData()
}
@@ -528,6 +552,18 @@ type Value_TimeNanosecondValue struct {
TimeNanosecondValue int64 `protobuf:"varint,23,opt,name=time_nanosecond_value,json=timeNanosecondValue,proto3,oneof"`
}
type Value_IntervalYearMonthValues struct {
IntervalYearMonthValues int32 `protobuf:"varint,24,opt,name=interval_year_month_values,json=intervalYearMonthValues,proto3,oneof"`
}
type Value_IntervalDayTimeValues struct {
IntervalDayTimeValues int64 `protobuf:"varint,25,opt,name=interval_day_time_values,json=intervalDayTimeValues,proto3,oneof"`
}
type Value_IntervalMonthDayNanoValues struct {
IntervalMonthDayNanoValues *IntervalMonthDayNano `protobuf:"bytes,26,opt,name=interval_month_day_nano_values,json=intervalMonthDayNanoValues,proto3,oneof"`
}
func (*Value_I8Value) isValue_ValueData() {}
func (*Value_I16Value) isValue_ValueData() {}
@@ -574,6 +610,12 @@ func (*Value_TimeMicrosecondValue) isValue_ValueData() {}
func (*Value_TimeNanosecondValue) isValue_ValueData() {}
func (*Value_IntervalYearMonthValues) isValue_ValueData() {}
func (*Value_IntervalDayTimeValues) isValue_ValueData() {}
func (*Value_IntervalMonthDayNanoValues) isValue_ValueData() {}
var File_greptime_v1_row_proto protoreflect.FileDescriptor
var file_greptime_v1_row_proto_rawDesc = []byte{
@@ -600,7 +642,7 @@ var file_greptime_v1_row_proto_rawDesc = []byte{
0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 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, 0x22, 0x94, 0x07,
0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x22, 0xf7, 0x08,
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,
@@ -657,13 +699,28 @@ var file_greptime_v1_row_proto_rawDesc = []byte{
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, 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,
0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x3d, 0x0a, 0x1a, 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, 0x73, 0x18, 0x18, 0x20, 0x01, 0x28, 0x05, 0x48, 0x00, 0x52, 0x17, 0x69, 0x6e,
0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x59, 0x65, 0x61, 0x72, 0x4d, 0x6f, 0x6e, 0x74, 0x68, 0x56,
0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x39, 0x0a, 0x18, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61,
0x6c, 0x5f, 0x64, 0x61, 0x79, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65,
0x73, 0x18, 0x19, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x15, 0x69, 0x6e, 0x74, 0x65, 0x72,
0x76, 0x61, 0x6c, 0x44, 0x61, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73,
0x12, 0x67, 0x0a, 0x1e, 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, 0x73, 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, 0x1a, 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, 0x73, 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 (
@@ -680,12 +737,13 @@ func file_greptime_v1_row_proto_rawDescGZIP() []byte {
var file_greptime_v1_row_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
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
(*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
(*IntervalMonthDayNano)(nil), // 6: greptime.v1.IntervalMonthDayNano
}
var file_greptime_v1_row_proto_depIdxs = []int32{
1, // 0: greptime.v1.Rows.schema:type_name -> greptime.v1.ColumnSchema
@@ -693,11 +751,12 @@ var file_greptime_v1_row_proto_depIdxs = []int32{
4, // 2: greptime.v1.ColumnSchema.datatype:type_name -> greptime.v1.ColumnDataType
5, // 3: greptime.v1.ColumnSchema.semantic_type:type_name -> greptime.v1.SemanticType
3, // 4: greptime.v1.Row.values:type_name -> greptime.v1.Value
5, // [5:5] is the sub-list for method output_type
5, // [5:5] is the sub-list for method input_type
5, // [5:5] is the sub-list for extension type_name
5, // [5:5] is the sub-list for extension extendee
0, // [0:5] is the sub-list for field type_name
6, // 5: greptime.v1.Value.interval_month_day_nano_values:type_name -> greptime.v1.IntervalMonthDayNano
6, // [6:6] is the sub-list for method output_type
6, // [6:6] is the sub-list for method input_type
6, // [6:6] is the sub-list for extension type_name
6, // [6:6] is the sub-list for extension extendee
0, // [0:6] is the sub-list for field type_name
}
func init() { file_greptime_v1_row_proto_init() }
@@ -780,6 +839,9 @@ func file_greptime_v1_row_proto_init() {
(*Value_TimeMillisecondValue)(nil),
(*Value_TimeMicrosecondValue)(nil),
(*Value_TimeNanosecondValue)(nil),
(*Value_IntervalYearMonthValues)(nil),
(*Value_IntervalDayTimeValues)(nil),
(*Value_IntervalMonthDayNanoValues)(nil),
}
type x struct{}
out := protoimpl.TypeBuilder{