diff --git a/c++/greptime/v1/common.pb.cc b/c++/greptime/v1/common.pb.cc index d8b73511..3dcbcd9a 100644 --- a/c++/greptime/v1/common.pb.cc +++ b/c++/greptime/v1/common.pb.cc @@ -299,7 +299,7 @@ PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORIT } // namespace v1 } // namespace greptime static ::_pb::Metadata file_level_metadata_greptime_2fv1_2fcommon_2eproto[20]; -static const ::_pb::EnumDescriptor* file_level_enum_descriptors_greptime_2fv1_2fcommon_2eproto[2]; +static const ::_pb::EnumDescriptor* file_level_enum_descriptors_greptime_2fv1_2fcommon_2eproto[3]; static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_greptime_2fv1_2fcommon_2eproto = nullptr; const uint32_t TableStruct_greptime_2fv1_2fcommon_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { @@ -447,6 +447,7 @@ const uint32_t TableStruct_greptime_2fv1_2fcommon_2eproto::offsets[] PROTOBUF_SE ~0u, // no _weak_field_map_ ~0u, // no _inlined_string_donated_ ::_pbi::kInvalidFieldOffsetTag, + ::_pbi::kInvalidFieldOffsetTag, PROTOBUF_FIELD_OFFSET(::greptime::v1::ColumnDataTypeExtension, _impl_.type_ext_), ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::greptime::v1::DecimalTypeExtension, _internal_metadata_), @@ -492,9 +493,9 @@ static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protode { 120, -1, -1, sizeof(::greptime::v1::IntervalMonthDayNano)}, { 129, -1, -1, sizeof(::greptime::v1::Decimal128)}, { 137, -1, -1, sizeof(::greptime::v1::ColumnDataTypeExtension)}, - { 145, -1, -1, sizeof(::greptime::v1::DecimalTypeExtension)}, - { 153, 161, -1, sizeof(::greptime::v1::ColumnOptions_OptionsEntry_DoNotUse)}, - { 163, -1, -1, sizeof(::greptime::v1::ColumnOptions)}, + { 146, -1, -1, sizeof(::greptime::v1::DecimalTypeExtension)}, + { 154, 162, -1, sizeof(::greptime::v1::ColumnOptions_OptionsEntry_DoNotUse)}, + { 164, -1, -1, sizeof(::greptime::v1::ColumnOptions)}, }; static const ::_pb::Message* const file_default_instances[] = { @@ -550,33 +551,35 @@ const char descriptor_table_protodef_greptime_2fv1_2fcommon_2eproto[] PROTOBUF_S "2\024.greptime.v1.Metrics\"I\n\024IntervalMonthD" "ayNano\022\016\n\006months\030\001 \001(\005\022\014\n\004days\030\002 \001(\005\022\023\n\013" "nanoseconds\030\003 \001(\003\"$\n\nDecimal128\022\n\n\002hi\030\001 " - "\001(\003\022\n\n\002lo\030\002 \001(\003\"`\n\027ColumnDataTypeExtensi" - "on\0229\n\014decimal_type\030\001 \001(\0132!.greptime.v1.D" - "ecimalTypeExtensionH\000B\n\n\010type_ext\"8\n\024Dec" - "imalTypeExtension\022\021\n\tprecision\030\001 \001(\005\022\r\n\005" - "scale\030\002 \001(\005\"y\n\rColumnOptions\0228\n\007options\030" - "\001 \003(\0132\'.greptime.v1.ColumnOptions.Option" - "sEntry\032.\n\014OptionsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005v" - "alue\030\002 \001(\t:\0028\001*1\n\014SemanticType\022\007\n\003TAG\020\000\022" - "\t\n\005FIELD\020\001\022\r\n\tTIMESTAMP\020\002*\326\003\n\016ColumnData" - "Type\022\013\n\007BOOLEAN\020\000\022\010\n\004INT8\020\001\022\t\n\005INT16\020\002\022\t" - "\n\005INT32\020\003\022\t\n\005INT64\020\004\022\t\n\005UINT8\020\005\022\n\n\006UINT1" - "6\020\006\022\n\n\006UINT32\020\007\022\n\n\006UINT64\020\010\022\013\n\007FLOAT32\020\t" - "\022\013\n\007FLOAT64\020\n\022\n\n\006BINARY\020\013\022\n\n\006STRING\020\014\022\010\n" - "\004DATE\020\r\022\014\n\010DATETIME\020\016\022\024\n\020TIMESTAMP_SECON" - "D\020\017\022\031\n\025TIMESTAMP_MILLISECOND\020\020\022\031\n\025TIMEST" - "AMP_MICROSECOND\020\021\022\030\n\024TIMESTAMP_NANOSECON" - "D\020\022\022\017\n\013TIME_SECOND\020\023\022\024\n\020TIME_MILLISECOND" - "\020\024\022\024\n\020TIME_MICROSECOND\020\025\022\023\n\017TIME_NANOSEC" - "OND\020\026\022\027\n\023INTERVAL_YEAR_MONTH\020\027\022\025\n\021INTERV" - "AL_DAY_TIME\020\030\022\033\n\027INTERVAL_MONTH_DAY_NANO" - "\020\031\022\016\n\nDECIMAL128\020\036BO\n\016io.greptime.v1B\006Co" - "mmonZ5github.com/GreptimeTeam/greptime-p" - "roto/go/greptime/v1b\006proto3" + "\001(\003\022\n\n\002lo\030\002 \001(\003\"\225\001\n\027ColumnDataTypeExtens" + "ion\0229\n\014decimal_type\030\001 \001(\0132!.greptime.v1." + "DecimalTypeExtensionH\000\0223\n\tjson_type\030\002 \001(" + "\0162\036.greptime.v1.JsonTypeExtensionH\000B\n\n\010t" + "ype_ext\"8\n\024DecimalTypeExtension\022\021\n\tpreci" + "sion\030\001 \001(\005\022\r\n\005scale\030\002 \001(\005\"y\n\rColumnOptio" + "ns\0228\n\007options\030\001 \003(\0132\'.greptime.v1.Column" + "Options.OptionsEntry\032.\n\014OptionsEntry\022\013\n\003" + "key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001*1\n\014Semantic" + "Type\022\007\n\003TAG\020\000\022\t\n\005FIELD\020\001\022\r\n\tTIMESTAMP\020\002*" + "\326\003\n\016ColumnDataType\022\013\n\007BOOLEAN\020\000\022\010\n\004INT8\020" + "\001\022\t\n\005INT16\020\002\022\t\n\005INT32\020\003\022\t\n\005INT64\020\004\022\t\n\005UI" + "NT8\020\005\022\n\n\006UINT16\020\006\022\n\n\006UINT32\020\007\022\n\n\006UINT64\020" + "\010\022\013\n\007FLOAT32\020\t\022\013\n\007FLOAT64\020\n\022\n\n\006BINARY\020\013\022" + "\n\n\006STRING\020\014\022\010\n\004DATE\020\r\022\014\n\010DATETIME\020\016\022\024\n\020T" + "IMESTAMP_SECOND\020\017\022\031\n\025TIMESTAMP_MILLISECO" + "ND\020\020\022\031\n\025TIMESTAMP_MICROSECOND\020\021\022\030\n\024TIMES" + "TAMP_NANOSECOND\020\022\022\017\n\013TIME_SECOND\020\023\022\024\n\020TI" + "ME_MILLISECOND\020\024\022\024\n\020TIME_MICROSECOND\020\025\022\023" + "\n\017TIME_NANOSECOND\020\026\022\027\n\023INTERVAL_YEAR_MON" + "TH\020\027\022\025\n\021INTERVAL_DAY_TIME\020\030\022\033\n\027INTERVAL_" + "MONTH_DAY_NANO\020\031\022\016\n\nDECIMAL128\020\036*$\n\021Json" + "TypeExtension\022\017\n\013JSON_BINARY\020\000BO\n\016io.gre" + "ptime.v1B\006CommonZ5github.com/GreptimeTea" + "m/greptime-proto/go/greptime/v1b\006proto3" ; static ::_pbi::once_flag descriptor_table_greptime_2fv1_2fcommon_2eproto_once; const ::_pbi::DescriptorTable descriptor_table_greptime_2fv1_2fcommon_2eproto = { - false, false, 2067, descriptor_table_protodef_greptime_2fv1_2fcommon_2eproto, + false, false, 2159, descriptor_table_protodef_greptime_2fv1_2fcommon_2eproto, "greptime/v1/common.proto", &descriptor_table_greptime_2fv1_2fcommon_2eproto_once, nullptr, 0, 20, schemas, file_default_instances, TableStruct_greptime_2fv1_2fcommon_2eproto::offsets, @@ -645,6 +648,19 @@ bool ColumnDataType_IsValid(int value) { } } +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* JsonTypeExtension_descriptor() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_greptime_2fv1_2fcommon_2eproto); + return file_level_enum_descriptors_greptime_2fv1_2fcommon_2eproto[2]; +} +bool JsonTypeExtension_IsValid(int value) { + switch (value) { + case 0: + return true; + default: + return false; + } +} + // =================================================================== @@ -4309,6 +4325,10 @@ ColumnDataTypeExtension::ColumnDataTypeExtension(const ColumnDataTypeExtension& from._internal_decimal_type()); break; } + case kJsonType: { + _this->_internal_set_json_type(from._internal_json_type()); + break; + } case TYPE_EXT_NOT_SET: { break; } @@ -4357,6 +4377,10 @@ void ColumnDataTypeExtension::clear_type_ext() { } break; } + case kJsonType: { + // No need to clear + break; + } case TYPE_EXT_NOT_SET: { break; } @@ -4389,6 +4413,15 @@ const char* ColumnDataTypeExtension::_InternalParse(const char* ptr, ::_pbi::Par } else goto handle_unusual; continue; + // .greptime.v1.JsonTypeExtension json_type = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + _internal_set_json_type(static_cast<::greptime::v1::JsonTypeExtension>(val)); + } else + goto handle_unusual; + continue; default: goto handle_unusual; } // switch @@ -4425,6 +4458,13 @@ uint8_t* ColumnDataTypeExtension::_InternalSerialize( _Internal::decimal_type(this).GetCachedSize(), target, stream); } + // .greptime.v1.JsonTypeExtension json_type = 2; + if (_internal_has_json_type()) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 2, this->_internal_json_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); @@ -4449,6 +4489,12 @@ size_t ColumnDataTypeExtension::ByteSizeLong() const { *_impl_.type_ext_.decimal_type_); break; } + // .greptime.v1.JsonTypeExtension json_type = 2; + case kJsonType: { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_json_type()); + break; + } case TYPE_EXT_NOT_SET: { break; } @@ -4477,6 +4523,10 @@ void ColumnDataTypeExtension::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg from._internal_decimal_type()); break; } + case kJsonType: { + _this->_internal_set_json_type(from._internal_json_type()); + break; + } case TYPE_EXT_NOT_SET: { break; } diff --git a/c++/greptime/v1/common.pb.h b/c++/greptime/v1/common.pb.h index ded265d5..f54d13f5 100644 --- a/c++/greptime/v1/common.pb.h +++ b/c++/greptime/v1/common.pb.h @@ -213,6 +213,30 @@ inline bool ColumnDataType_Parse( return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( ColumnDataType_descriptor(), name, value); } +enum JsonTypeExtension : int { + JSON_BINARY = 0, + JsonTypeExtension_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits::min(), + JsonTypeExtension_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits::max() +}; +bool JsonTypeExtension_IsValid(int value); +constexpr JsonTypeExtension JsonTypeExtension_MIN = JSON_BINARY; +constexpr JsonTypeExtension JsonTypeExtension_MAX = JSON_BINARY; +constexpr int JsonTypeExtension_ARRAYSIZE = JsonTypeExtension_MAX + 1; + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* JsonTypeExtension_descriptor(); +template +inline const std::string& JsonTypeExtension_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function JsonTypeExtension_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + JsonTypeExtension_descriptor(), enum_t_value); +} +inline bool JsonTypeExtension_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, JsonTypeExtension* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( + JsonTypeExtension_descriptor(), name, value); +} // =================================================================== class QueryContext_ExtensionsEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal::MapEntry(_impl_.type_ext_.json_type_); + } + return static_cast< ::greptime::v1::JsonTypeExtension >(0); +} +inline ::greptime::v1::JsonTypeExtension ColumnDataTypeExtension::json_type() const { + // @@protoc_insertion_point(field_get:greptime.v1.ColumnDataTypeExtension.json_type) + return _internal_json_type(); +} +inline void ColumnDataTypeExtension::_internal_set_json_type(::greptime::v1::JsonTypeExtension value) { + if (!_internal_has_json_type()) { + clear_type_ext(); + set_has_json_type(); + } + _impl_.type_ext_.json_type_ = value; +} +inline void ColumnDataTypeExtension::set_json_type(::greptime::v1::JsonTypeExtension value) { + _internal_set_json_type(value); + // @@protoc_insertion_point(field_set:greptime.v1.ColumnDataTypeExtension.json_type) +} + inline bool ColumnDataTypeExtension::has_type_ext() const { return type_ext_case() != TYPE_EXT_NOT_SET; } @@ -5038,6 +5117,11 @@ template <> inline const EnumDescriptor* GetEnumDescriptor< ::greptime::v1::ColumnDataType>() { return ::greptime::v1::ColumnDataType_descriptor(); } +template <> struct is_proto_enum< ::greptime::v1::JsonTypeExtension> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::greptime::v1::JsonTypeExtension>() { + return ::greptime::v1::JsonTypeExtension_descriptor(); +} PROTOBUF_NAMESPACE_CLOSE diff --git a/go/greptime/v1/common.pb.go b/go/greptime/v1/common.pb.go index 3dd34491..269610ea 100644 --- a/go/greptime/v1/common.pb.go +++ b/go/greptime/v1/common.pb.go @@ -204,6 +204,49 @@ func (ColumnDataType) EnumDescriptor() ([]byte, []int) { return file_greptime_v1_common_proto_rawDescGZIP(), []int{1} } +type JsonTypeExtension int32 + +const ( + JsonTypeExtension_JSON_BINARY JsonTypeExtension = 0 +) + +// Enum value maps for JsonTypeExtension. +var ( + JsonTypeExtension_name = map[int32]string{ + 0: "JSON_BINARY", + } + JsonTypeExtension_value = map[string]int32{ + "JSON_BINARY": 0, + } +) + +func (x JsonTypeExtension) Enum() *JsonTypeExtension { + p := new(JsonTypeExtension) + *p = x + return p +} + +func (x JsonTypeExtension) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (JsonTypeExtension) Descriptor() protoreflect.EnumDescriptor { + return file_greptime_v1_common_proto_enumTypes[2].Descriptor() +} + +func (JsonTypeExtension) Type() protoreflect.EnumType { + return &file_greptime_v1_common_proto_enumTypes[2] +} + +func (x JsonTypeExtension) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use JsonTypeExtension.Descriptor instead. +func (JsonTypeExtension) EnumDescriptor() ([]byte, []int) { + return file_greptime_v1_common_proto_rawDescGZIP(), []int{2} +} + type QueryContext struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1050,6 +1093,7 @@ type ColumnDataTypeExtension struct { // Types that are assignable to TypeExt: // // *ColumnDataTypeExtension_DecimalType + // *ColumnDataTypeExtension_JsonType TypeExt isColumnDataTypeExtension_TypeExt `protobuf_oneof:"type_ext"` } @@ -1099,6 +1143,13 @@ func (x *ColumnDataTypeExtension) GetDecimalType() *DecimalTypeExtension { return nil } +func (x *ColumnDataTypeExtension) GetJsonType() JsonTypeExtension { + if x, ok := x.GetTypeExt().(*ColumnDataTypeExtension_JsonType); ok { + return x.JsonType + } + return JsonTypeExtension_JSON_BINARY +} + type isColumnDataTypeExtension_TypeExt interface { isColumnDataTypeExtension_TypeExt() } @@ -1107,8 +1158,15 @@ type ColumnDataTypeExtension_DecimalType struct { DecimalType *DecimalTypeExtension `protobuf:"bytes,1,opt,name=decimal_type,json=decimalType,proto3,oneof"` } +type ColumnDataTypeExtension_JsonType struct { + // Marks the binary column in proto is actually a JSON column. + JsonType JsonTypeExtension `protobuf:"varint,2,opt,name=json_type,json=jsonType,proto3,enum=greptime.v1.JsonTypeExtension,oneof"` +} + func (*ColumnDataTypeExtension_DecimalType) isColumnDataTypeExtension_TypeExt() {} +func (*ColumnDataTypeExtension_JsonType) isColumnDataTypeExtension_TypeExt() {} + type DecimalTypeExtension struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1329,13 +1387,17 @@ var file_greptime_v1_common_proto_rawDesc = []byte{ 0x0b, 0x6e, 0x61, 0x6e, 0x6f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x22, 0x2c, 0x0a, 0x0a, 0x44, 0x65, 0x63, 0x69, 0x6d, 0x61, 0x6c, 0x31, 0x32, 0x38, 0x12, 0x0e, 0x0a, 0x02, 0x68, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x68, 0x69, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x6f, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x6c, 0x6f, 0x22, 0x6d, 0x0a, 0x17, 0x43, 0x6f, - 0x6c, 0x75, 0x6d, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, 0x45, 0x78, 0x74, 0x65, - 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x46, 0x0a, 0x0c, 0x64, 0x65, 0x63, 0x69, 0x6d, 0x61, 0x6c, - 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x67, 0x72, - 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x63, 0x69, 0x6d, 0x61, - 0x6c, 0x54, 0x79, 0x70, 0x65, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x00, - 0x52, 0x0b, 0x64, 0x65, 0x63, 0x69, 0x6d, 0x61, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x42, 0x0a, 0x0a, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x6c, 0x6f, 0x22, 0xac, 0x01, 0x0a, 0x17, 0x43, + 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, 0x45, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x46, 0x0a, 0x0c, 0x64, 0x65, 0x63, 0x69, 0x6d, 0x61, + 0x6c, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x67, + 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x63, 0x69, 0x6d, + 0x61, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x48, + 0x00, 0x52, 0x0b, 0x64, 0x65, 0x63, 0x69, 0x6d, 0x61, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x12, 0x3d, + 0x0a, 0x09, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x1e, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, + 0x4a, 0x73, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x48, 0x00, 0x52, 0x08, 0x6a, 0x73, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x42, 0x0a, 0x0a, 0x08, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x65, 0x78, 0x74, 0x22, 0x4a, 0x0a, 0x14, 0x44, 0x65, 0x63, 0x69, 0x6d, 0x61, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x72, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, @@ -1383,12 +1445,15 @@ var file_greptime_v1_common_proto_rawDesc = []byte{ 0x49, 0x4d, 0x45, 0x10, 0x18, 0x12, 0x1b, 0x0a, 0x17, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x56, 0x41, 0x4c, 0x5f, 0x4d, 0x4f, 0x4e, 0x54, 0x48, 0x5f, 0x44, 0x41, 0x59, 0x5f, 0x4e, 0x41, 0x4e, 0x4f, 0x10, 0x19, 0x12, 0x0e, 0x0a, 0x0a, 0x44, 0x45, 0x43, 0x49, 0x4d, 0x41, 0x4c, 0x31, 0x32, 0x38, - 0x10, 0x1e, 0x42, 0x4f, 0x0a, 0x0e, 0x69, 0x6f, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, - 0x65, 0x2e, 0x76, 0x31, 0x42, 0x06, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 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, + 0x10, 0x1e, 0x2a, 0x24, 0x0a, 0x11, 0x4a, 0x73, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x45, 0x78, + 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x0f, 0x0a, 0x0b, 0x4a, 0x53, 0x4f, 0x4e, 0x5f, + 0x42, 0x49, 0x4e, 0x41, 0x52, 0x59, 0x10, 0x00, 0x42, 0x4f, 0x0a, 0x0e, 0x69, 0x6f, 0x2e, 0x67, + 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x06, 0x43, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 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 ( @@ -1403,48 +1468,50 @@ func file_greptime_v1_common_proto_rawDescGZIP() []byte { return file_greptime_v1_common_proto_rawDescData } -var file_greptime_v1_common_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_greptime_v1_common_proto_enumTypes = make([]protoimpl.EnumInfo, 3) var file_greptime_v1_common_proto_msgTypes = make([]protoimpl.MessageInfo, 20) var file_greptime_v1_common_proto_goTypes = []interface{}{ (SemanticType)(0), // 0: greptime.v1.SemanticType (ColumnDataType)(0), // 1: greptime.v1.ColumnDataType - (*QueryContext)(nil), // 2: greptime.v1.QueryContext - (*RequestHeader)(nil), // 3: greptime.v1.RequestHeader - (*ResponseHeader)(nil), // 4: greptime.v1.ResponseHeader - (*Status)(nil), // 5: greptime.v1.Status - (*AuthHeader)(nil), // 6: greptime.v1.AuthHeader - (*Basic)(nil), // 7: greptime.v1.Basic - (*Token)(nil), // 8: greptime.v1.Token - (*TableName)(nil), // 9: greptime.v1.TableName - (*AffectedRows)(nil), // 10: greptime.v1.AffectedRows - (*Metrics)(nil), // 11: greptime.v1.Metrics - (*ExpireAfter)(nil), // 12: greptime.v1.ExpireAfter - (*FlightMetadata)(nil), // 13: greptime.v1.FlightMetadata - (*IntervalMonthDayNano)(nil), // 14: greptime.v1.IntervalMonthDayNano - (*Decimal128)(nil), // 15: greptime.v1.Decimal128 - (*ColumnDataTypeExtension)(nil), // 16: greptime.v1.ColumnDataTypeExtension - (*DecimalTypeExtension)(nil), // 17: greptime.v1.DecimalTypeExtension - (*ColumnOptions)(nil), // 18: greptime.v1.ColumnOptions - nil, // 19: greptime.v1.QueryContext.ExtensionsEntry - nil, // 20: greptime.v1.RequestHeader.TracingContextEntry - nil, // 21: greptime.v1.ColumnOptions.OptionsEntry + (JsonTypeExtension)(0), // 2: greptime.v1.JsonTypeExtension + (*QueryContext)(nil), // 3: greptime.v1.QueryContext + (*RequestHeader)(nil), // 4: greptime.v1.RequestHeader + (*ResponseHeader)(nil), // 5: greptime.v1.ResponseHeader + (*Status)(nil), // 6: greptime.v1.Status + (*AuthHeader)(nil), // 7: greptime.v1.AuthHeader + (*Basic)(nil), // 8: greptime.v1.Basic + (*Token)(nil), // 9: greptime.v1.Token + (*TableName)(nil), // 10: greptime.v1.TableName + (*AffectedRows)(nil), // 11: greptime.v1.AffectedRows + (*Metrics)(nil), // 12: greptime.v1.Metrics + (*ExpireAfter)(nil), // 13: greptime.v1.ExpireAfter + (*FlightMetadata)(nil), // 14: greptime.v1.FlightMetadata + (*IntervalMonthDayNano)(nil), // 15: greptime.v1.IntervalMonthDayNano + (*Decimal128)(nil), // 16: greptime.v1.Decimal128 + (*ColumnDataTypeExtension)(nil), // 17: greptime.v1.ColumnDataTypeExtension + (*DecimalTypeExtension)(nil), // 18: greptime.v1.DecimalTypeExtension + (*ColumnOptions)(nil), // 19: greptime.v1.ColumnOptions + nil, // 20: greptime.v1.QueryContext.ExtensionsEntry + nil, // 21: greptime.v1.RequestHeader.TracingContextEntry + nil, // 22: greptime.v1.ColumnOptions.OptionsEntry } var file_greptime_v1_common_proto_depIdxs = []int32{ - 19, // 0: greptime.v1.QueryContext.extensions:type_name -> greptime.v1.QueryContext.ExtensionsEntry - 6, // 1: greptime.v1.RequestHeader.authorization:type_name -> greptime.v1.AuthHeader - 20, // 2: greptime.v1.RequestHeader.tracing_context:type_name -> greptime.v1.RequestHeader.TracingContextEntry - 5, // 3: greptime.v1.ResponseHeader.status:type_name -> greptime.v1.Status - 7, // 4: greptime.v1.AuthHeader.basic:type_name -> greptime.v1.Basic - 8, // 5: greptime.v1.AuthHeader.token:type_name -> greptime.v1.Token - 10, // 6: greptime.v1.FlightMetadata.affected_rows:type_name -> greptime.v1.AffectedRows - 11, // 7: greptime.v1.FlightMetadata.metrics:type_name -> greptime.v1.Metrics - 17, // 8: greptime.v1.ColumnDataTypeExtension.decimal_type:type_name -> greptime.v1.DecimalTypeExtension - 21, // 9: greptime.v1.ColumnOptions.options:type_name -> greptime.v1.ColumnOptions.OptionsEntry - 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 + 20, // 0: greptime.v1.QueryContext.extensions:type_name -> greptime.v1.QueryContext.ExtensionsEntry + 7, // 1: greptime.v1.RequestHeader.authorization:type_name -> greptime.v1.AuthHeader + 21, // 2: greptime.v1.RequestHeader.tracing_context:type_name -> greptime.v1.RequestHeader.TracingContextEntry + 6, // 3: greptime.v1.ResponseHeader.status:type_name -> greptime.v1.Status + 8, // 4: greptime.v1.AuthHeader.basic:type_name -> greptime.v1.Basic + 9, // 5: greptime.v1.AuthHeader.token:type_name -> greptime.v1.Token + 11, // 6: greptime.v1.FlightMetadata.affected_rows:type_name -> greptime.v1.AffectedRows + 12, // 7: greptime.v1.FlightMetadata.metrics:type_name -> greptime.v1.Metrics + 18, // 8: greptime.v1.ColumnDataTypeExtension.decimal_type:type_name -> greptime.v1.DecimalTypeExtension + 2, // 9: greptime.v1.ColumnDataTypeExtension.json_type:type_name -> greptime.v1.JsonTypeExtension + 22, // 10: greptime.v1.ColumnOptions.options:type_name -> greptime.v1.ColumnOptions.OptionsEntry + 11, // [11:11] is the sub-list for method output_type + 11, // [11:11] is the sub-list for method input_type + 11, // [11:11] is the sub-list for extension type_name + 11, // [11:11] is the sub-list for extension extendee + 0, // [0:11] is the sub-list for field type_name } func init() { file_greptime_v1_common_proto_init() } @@ -1664,13 +1731,14 @@ func file_greptime_v1_common_proto_init() { } file_greptime_v1_common_proto_msgTypes[14].OneofWrappers = []interface{}{ (*ColumnDataTypeExtension_DecimalType)(nil), + (*ColumnDataTypeExtension_JsonType)(nil), } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_greptime_v1_common_proto_rawDesc, - NumEnums: 2, + NumEnums: 3, NumMessages: 20, NumExtensions: 0, NumServices: 0, diff --git a/java/src/main/java/io/greptime/v1/Common.java b/java/src/main/java/io/greptime/v1/Common.java index c45dee34..d71febb3 100644 --- a/java/src/main/java/io/greptime/v1/Common.java +++ b/java/src/main/java/io/greptime/v1/Common.java @@ -464,6 +464,105 @@ private ColumnDataType(int value) { // @@protoc_insertion_point(enum_scope:greptime.v1.ColumnDataType) } + /** + * Protobuf enum {@code greptime.v1.JsonTypeExtension} + */ + public enum JsonTypeExtension + implements com.google.protobuf.ProtocolMessageEnum { + /** + * JSON_BINARY = 0; + */ + JSON_BINARY(0), + UNRECOGNIZED(-1), + ; + + /** + * JSON_BINARY = 0; + */ + public static final int JSON_BINARY_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 JsonTypeExtension 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 JsonTypeExtension forNumber(int value) { + switch (value) { + case 0: return JSON_BINARY; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + JsonTypeExtension> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public JsonTypeExtension findValueByNumber(int number) { + return JsonTypeExtension.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.Common.getDescriptor().getEnumTypes().get(2); + } + + private static final JsonTypeExtension[] VALUES = values(); + + public static JsonTypeExtension 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 JsonTypeExtension(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:greptime.v1.JsonTypeExtension) + } + public interface QueryContextOrBuilder extends // @@protoc_insertion_point(interface_extends:greptime.v1.QueryContext) com.google.protobuf.MessageOrBuilder { @@ -11476,6 +11575,34 @@ public interface ColumnDataTypeExtensionOrBuilder extends */ io.greptime.v1.Common.DecimalTypeExtensionOrBuilder getDecimalTypeOrBuilder(); + /** + *
+     * Marks the binary column in proto is actually a JSON column.
+     * 
+ * + * .greptime.v1.JsonTypeExtension json_type = 2; + * @return Whether the jsonType field is set. + */ + boolean hasJsonType(); + /** + *
+     * Marks the binary column in proto is actually a JSON column.
+     * 
+ * + * .greptime.v1.JsonTypeExtension json_type = 2; + * @return The enum numeric value on the wire for jsonType. + */ + int getJsonTypeValue(); + /** + *
+     * Marks the binary column in proto is actually a JSON column.
+     * 
+ * + * .greptime.v1.JsonTypeExtension json_type = 2; + * @return The jsonType. + */ + io.greptime.v1.Common.JsonTypeExtension getJsonType(); + public io.greptime.v1.Common.ColumnDataTypeExtension.TypeExtCase getTypeExtCase(); } /** @@ -11541,6 +11668,12 @@ private ColumnDataTypeExtension( typeExtCase_ = 1; break; } + case 16: { + int rawValue = input.readEnum(); + typeExtCase_ = 2; + typeExt_ = rawValue; + break; + } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { @@ -11581,6 +11714,7 @@ public enum TypeExtCase implements com.google.protobuf.Internal.EnumLite, com.google.protobuf.AbstractMessage.InternalOneOfEnum { DECIMAL_TYPE(1), + JSON_TYPE(2), TYPEEXT_NOT_SET(0); private final int value; private TypeExtCase(int value) { @@ -11599,6 +11733,7 @@ public static TypeExtCase valueOf(int value) { public static TypeExtCase forNumber(int value) { switch (value) { case 1: return DECIMAL_TYPE; + case 2: return JSON_TYPE; case 0: return TYPEEXT_NOT_SET; default: return null; } @@ -11645,6 +11780,50 @@ public io.greptime.v1.Common.DecimalTypeExtensionOrBuilder getDecimalTypeOrBuild return io.greptime.v1.Common.DecimalTypeExtension.getDefaultInstance(); } + public static final int JSON_TYPE_FIELD_NUMBER = 2; + /** + *
+     * Marks the binary column in proto is actually a JSON column.
+     * 
+ * + * .greptime.v1.JsonTypeExtension json_type = 2; + * @return Whether the jsonType field is set. + */ + public boolean hasJsonType() { + return typeExtCase_ == 2; + } + /** + *
+     * Marks the binary column in proto is actually a JSON column.
+     * 
+ * + * .greptime.v1.JsonTypeExtension json_type = 2; + * @return The enum numeric value on the wire for jsonType. + */ + public int getJsonTypeValue() { + if (typeExtCase_ == 2) { + return (java.lang.Integer) typeExt_; + } + return 0; + } + /** + *
+     * Marks the binary column in proto is actually a JSON column.
+     * 
+ * + * .greptime.v1.JsonTypeExtension json_type = 2; + * @return The jsonType. + */ + public io.greptime.v1.Common.JsonTypeExtension getJsonType() { + if (typeExtCase_ == 2) { + @SuppressWarnings("deprecation") + io.greptime.v1.Common.JsonTypeExtension result = io.greptime.v1.Common.JsonTypeExtension.valueOf( + (java.lang.Integer) typeExt_); + return result == null ? io.greptime.v1.Common.JsonTypeExtension.UNRECOGNIZED : result; + } + return io.greptime.v1.Common.JsonTypeExtension.JSON_BINARY; + } + private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { @@ -11662,6 +11841,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (typeExtCase_ == 1) { output.writeMessage(1, (io.greptime.v1.Common.DecimalTypeExtension) typeExt_); } + if (typeExtCase_ == 2) { + output.writeEnum(2, ((java.lang.Integer) typeExt_)); + } unknownFields.writeTo(output); } @@ -11675,6 +11857,10 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, (io.greptime.v1.Common.DecimalTypeExtension) typeExt_); } + if (typeExtCase_ == 2) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, ((java.lang.Integer) typeExt_)); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -11696,6 +11882,10 @@ public boolean equals(final java.lang.Object obj) { if (!getDecimalType() .equals(other.getDecimalType())) return false; break; + case 2: + if (getJsonTypeValue() + != other.getJsonTypeValue()) return false; + break; case 0: default: } @@ -11715,6 +11905,10 @@ public int hashCode() { hash = (37 * hash) + DECIMAL_TYPE_FIELD_NUMBER; hash = (53 * hash) + getDecimalType().hashCode(); break; + case 2: + hash = (37 * hash) + JSON_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getJsonTypeValue(); + break; case 0: default: } @@ -11890,6 +12084,9 @@ public io.greptime.v1.Common.ColumnDataTypeExtension buildPartial() { result.typeExt_ = decimalTypeBuilder_.build(); } } + if (typeExtCase_ == 2) { + result.typeExt_ = typeExt_; + } result.typeExtCase_ = typeExtCase_; onBuilt(); return result; @@ -11944,6 +12141,10 @@ public Builder mergeFrom(io.greptime.v1.Common.ColumnDataTypeExtension other) { mergeDecimalType(other.getDecimalType()); break; } + case JSON_TYPE: { + setJsonTypeValue(other.getJsonTypeValue()); + break; + } case TYPEEXT_NOT_SET: { break; } @@ -12133,6 +12334,101 @@ public io.greptime.v1.Common.DecimalTypeExtensionOrBuilder getDecimalTypeOrBuild onChanged();; return decimalTypeBuilder_; } + + /** + *
+       * Marks the binary column in proto is actually a JSON column.
+       * 
+ * + * .greptime.v1.JsonTypeExtension json_type = 2; + * @return Whether the jsonType field is set. + */ + @java.lang.Override + public boolean hasJsonType() { + return typeExtCase_ == 2; + } + /** + *
+       * Marks the binary column in proto is actually a JSON column.
+       * 
+ * + * .greptime.v1.JsonTypeExtension json_type = 2; + * @return The enum numeric value on the wire for jsonType. + */ + @java.lang.Override + public int getJsonTypeValue() { + if (typeExtCase_ == 2) { + return ((java.lang.Integer) typeExt_).intValue(); + } + return 0; + } + /** + *
+       * Marks the binary column in proto is actually a JSON column.
+       * 
+ * + * .greptime.v1.JsonTypeExtension json_type = 2; + * @param value The enum numeric value on the wire for jsonType to set. + * @return This builder for chaining. + */ + public Builder setJsonTypeValue(int value) { + typeExtCase_ = 2; + typeExt_ = value; + onChanged(); + return this; + } + /** + *
+       * Marks the binary column in proto is actually a JSON column.
+       * 
+ * + * .greptime.v1.JsonTypeExtension json_type = 2; + * @return The jsonType. + */ + @java.lang.Override + public io.greptime.v1.Common.JsonTypeExtension getJsonType() { + if (typeExtCase_ == 2) { + @SuppressWarnings("deprecation") + io.greptime.v1.Common.JsonTypeExtension result = io.greptime.v1.Common.JsonTypeExtension.valueOf( + (java.lang.Integer) typeExt_); + return result == null ? io.greptime.v1.Common.JsonTypeExtension.UNRECOGNIZED : result; + } + return io.greptime.v1.Common.JsonTypeExtension.JSON_BINARY; + } + /** + *
+       * Marks the binary column in proto is actually a JSON column.
+       * 
+ * + * .greptime.v1.JsonTypeExtension json_type = 2; + * @param value The jsonType to set. + * @return This builder for chaining. + */ + public Builder setJsonType(io.greptime.v1.Common.JsonTypeExtension value) { + if (value == null) { + throw new NullPointerException(); + } + typeExtCase_ = 2; + typeExt_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+       * Marks the binary column in proto is actually a JSON column.
+       * 
+ * + * .greptime.v1.JsonTypeExtension json_type = 2; + * @return This builder for chaining. + */ + public Builder clearJsonType() { + if (typeExtCase_ == 2) { + typeExtCase_ = 0; + typeExt_ = null; + onChanged(); + } + return this; + } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -13925,29 +14221,31 @@ public io.greptime.v1.Common.ColumnOptions getDefaultInstanceForType() { "2\024.greptime.v1.Metrics\"I\n\024IntervalMonthD" + "ayNano\022\016\n\006months\030\001 \001(\005\022\014\n\004days\030\002 \001(\005\022\023\n\013" + "nanoseconds\030\003 \001(\003\"$\n\nDecimal128\022\n\n\002hi\030\001 " + - "\001(\003\022\n\n\002lo\030\002 \001(\003\"`\n\027ColumnDataTypeExtensi" + - "on\0229\n\014decimal_type\030\001 \001(\0132!.greptime.v1.D" + - "ecimalTypeExtensionH\000B\n\n\010type_ext\"8\n\024Dec" + - "imalTypeExtension\022\021\n\tprecision\030\001 \001(\005\022\r\n\005" + - "scale\030\002 \001(\005\"y\n\rColumnOptions\0228\n\007options\030" + - "\001 \003(\0132\'.greptime.v1.ColumnOptions.Option" + - "sEntry\032.\n\014OptionsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005v" + - "alue\030\002 \001(\t:\0028\001*1\n\014SemanticType\022\007\n\003TAG\020\000\022" + - "\t\n\005FIELD\020\001\022\r\n\tTIMESTAMP\020\002*\326\003\n\016ColumnData" + - "Type\022\013\n\007BOOLEAN\020\000\022\010\n\004INT8\020\001\022\t\n\005INT16\020\002\022\t" + - "\n\005INT32\020\003\022\t\n\005INT64\020\004\022\t\n\005UINT8\020\005\022\n\n\006UINT1" + - "6\020\006\022\n\n\006UINT32\020\007\022\n\n\006UINT64\020\010\022\013\n\007FLOAT32\020\t" + - "\022\013\n\007FLOAT64\020\n\022\n\n\006BINARY\020\013\022\n\n\006STRING\020\014\022\010\n" + - "\004DATE\020\r\022\014\n\010DATETIME\020\016\022\024\n\020TIMESTAMP_SECON" + - "D\020\017\022\031\n\025TIMESTAMP_MILLISECOND\020\020\022\031\n\025TIMEST" + - "AMP_MICROSECOND\020\021\022\030\n\024TIMESTAMP_NANOSECON" + - "D\020\022\022\017\n\013TIME_SECOND\020\023\022\024\n\020TIME_MILLISECOND" + - "\020\024\022\024\n\020TIME_MICROSECOND\020\025\022\023\n\017TIME_NANOSEC" + - "OND\020\026\022\027\n\023INTERVAL_YEAR_MONTH\020\027\022\025\n\021INTERV" + - "AL_DAY_TIME\020\030\022\033\n\027INTERVAL_MONTH_DAY_NANO" + - "\020\031\022\016\n\nDECIMAL128\020\036BO\n\016io.greptime.v1B\006Co" + - "mmonZ5github.com/GreptimeTeam/greptime-p" + - "roto/go/greptime/v1b\006proto3" + "\001(\003\022\n\n\002lo\030\002 \001(\003\"\225\001\n\027ColumnDataTypeExtens" + + "ion\0229\n\014decimal_type\030\001 \001(\0132!.greptime.v1." + + "DecimalTypeExtensionH\000\0223\n\tjson_type\030\002 \001(" + + "\0162\036.greptime.v1.JsonTypeExtensionH\000B\n\n\010t" + + "ype_ext\"8\n\024DecimalTypeExtension\022\021\n\tpreci" + + "sion\030\001 \001(\005\022\r\n\005scale\030\002 \001(\005\"y\n\rColumnOptio" + + "ns\0228\n\007options\030\001 \003(\0132\'.greptime.v1.Column" + + "Options.OptionsEntry\032.\n\014OptionsEntry\022\013\n\003" + + "key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001*1\n\014Semantic" + + "Type\022\007\n\003TAG\020\000\022\t\n\005FIELD\020\001\022\r\n\tTIMESTAMP\020\002*" + + "\326\003\n\016ColumnDataType\022\013\n\007BOOLEAN\020\000\022\010\n\004INT8\020" + + "\001\022\t\n\005INT16\020\002\022\t\n\005INT32\020\003\022\t\n\005INT64\020\004\022\t\n\005UI" + + "NT8\020\005\022\n\n\006UINT16\020\006\022\n\n\006UINT32\020\007\022\n\n\006UINT64\020" + + "\010\022\013\n\007FLOAT32\020\t\022\013\n\007FLOAT64\020\n\022\n\n\006BINARY\020\013\022" + + "\n\n\006STRING\020\014\022\010\n\004DATE\020\r\022\014\n\010DATETIME\020\016\022\024\n\020T" + + "IMESTAMP_SECOND\020\017\022\031\n\025TIMESTAMP_MILLISECO" + + "ND\020\020\022\031\n\025TIMESTAMP_MICROSECOND\020\021\022\030\n\024TIMES" + + "TAMP_NANOSECOND\020\022\022\017\n\013TIME_SECOND\020\023\022\024\n\020TI" + + "ME_MILLISECOND\020\024\022\024\n\020TIME_MICROSECOND\020\025\022\023" + + "\n\017TIME_NANOSECOND\020\026\022\027\n\023INTERVAL_YEAR_MON" + + "TH\020\027\022\025\n\021INTERVAL_DAY_TIME\020\030\022\033\n\027INTERVAL_" + + "MONTH_DAY_NANO\020\031\022\016\n\nDECIMAL128\020\036*$\n\021Json" + + "TypeExtension\022\017\n\013JSON_BINARY\020\000BO\n\016io.gre" + + "ptime.v1B\006CommonZ5github.com/GreptimeTea" + + "m/greptime-proto/go/greptime/v1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, @@ -14054,7 +14352,7 @@ public io.greptime.v1.Common.ColumnOptions getDefaultInstanceForType() { internal_static_greptime_v1_ColumnDataTypeExtension_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_greptime_v1_ColumnDataTypeExtension_descriptor, - new java.lang.String[] { "DecimalType", "TypeExt", }); + new java.lang.String[] { "DecimalType", "JsonType", "TypeExt", }); internal_static_greptime_v1_DecimalTypeExtension_descriptor = getDescriptor().getMessageTypes().get(15); internal_static_greptime_v1_DecimalTypeExtension_fieldAccessorTable = new diff --git a/proto/greptime/v1/common.proto b/proto/greptime/v1/common.proto index d56aa925..5124f41f 100644 --- a/proto/greptime/v1/common.proto +++ b/proto/greptime/v1/common.proto @@ -133,7 +133,11 @@ message Decimal128 { // Type extension for some complex types message ColumnDataTypeExtension { - oneof type_ext { DecimalTypeExtension decimal_type = 1; } + oneof type_ext { + DecimalTypeExtension decimal_type = 1; + // Marks the binary column in proto is actually a JSON column. + JsonTypeExtension json_type = 2; + } } message DecimalTypeExtension { @@ -141,6 +145,10 @@ message DecimalTypeExtension { int32 scale = 2; } +enum JsonTypeExtension { + JSON_BINARY = 0; +} + // Additional options for the column. message ColumnOptions { // Supported keys: