diff --git a/c++/greptime/v1/row.pb.cc b/c++/greptime/v1/row.pb.cc index 6832b50..72aa020 100644 --- a/c++/greptime/v1/row.pb.cc +++ b/c++/greptime/v1/row.pb.cc @@ -257,6 +257,7 @@ const uint32_t TableStruct_greptime_2fv1_2frow_2eproto::offsets[] PROTOBUF_SECTI ::_pbi::kInvalidFieldOffsetTag, ::_pbi::kInvalidFieldOffsetTag, ::_pbi::kInvalidFieldOffsetTag, + ::_pbi::kInvalidFieldOffsetTag, PROTOBUF_FIELD_OFFSET(::greptime::v1::JsonValue, _impl_.value_), ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::greptime::v1::JsonList, _internal_metadata_), @@ -289,9 +290,9 @@ static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protode { 63, -1, -1, sizeof(::greptime::v1::ListValue)}, { 70, -1, -1, sizeof(::greptime::v1::StructValue)}, { 77, -1, -1, sizeof(::greptime::v1::JsonValue)}, - { 91, -1, -1, sizeof(::greptime::v1::JsonList)}, - { 98, -1, -1, sizeof(::greptime::v1::JsonObject_Entry)}, - { 106, -1, -1, sizeof(::greptime::v1::JsonObject)}, + { 92, -1, -1, sizeof(::greptime::v1::JsonList)}, + { 99, -1, -1, sizeof(::greptime::v1::JsonObject_Entry)}, + { 107, -1, -1, sizeof(::greptime::v1::JsonObject)}, }; static const ::_pb::Message* const file_default_instances[] = { @@ -345,25 +346,26 @@ const char descriptor_table_protodef_greptime_2fv1_2frow_2eproto[] PROTOBUF_SECT "e\030* \001(\0132\026.greptime.v1.JsonValueH\000B\014\n\nval" "ue_data\".\n\tListValue\022!\n\005items\030\001 \003(\0132\022.gr" "eptime.v1.Value\"0\n\013StructValue\022!\n\005items\030" - "\002 \003(\0132\022.greptime.v1.Value\"\271\001\n\tJsonValue\022" + "\002 \003(\0132\022.greptime.v1.Value\"\314\001\n\tJsonValue\022" "\021\n\007boolean\030\001 \001(\010H\000\022\r\n\003int\030\002 \001(\003H\000\022\016\n\004uin" "t\030\003 \001(\004H\000\022\017\n\005float\030\004 \001(\001H\000\022\r\n\003str\030\005 \001(\tH" "\000\022&\n\005array\030\006 \001(\0132\025.greptime.v1.JsonListH" "\000\022)\n\006object\030\007 \001(\0132\027.greptime.v1.JsonObje" - "ctH\000B\007\n\005value\"1\n\010JsonList\022%\n\005items\030\001 \003(\013" - "2\026.greptime.v1.JsonValue\"y\n\nJsonObject\022." - "\n\007entries\030\001 \003(\0132\035.greptime.v1.JsonObject" - ".Entry\032;\n\005Entry\022\013\n\003key\030\001 \001(\t\022%\n\005value\030\002 " - "\001(\0132\026.greptime.v1.JsonValueBP\n\016io.grepti" - "me.v1B\007RowDataZ5github.com/GreptimeTeam/" - "greptime-proto/go/greptime/v1b\006proto3" + "ctH\000\022\021\n\007variant\030\010 \001(\014H\000B\007\n\005value\"1\n\010Json" + "List\022%\n\005items\030\001 \003(\0132\026.greptime.v1.JsonVa" + "lue\"y\n\nJsonObject\022.\n\007entries\030\001 \003(\0132\035.gre" + "ptime.v1.JsonObject.Entry\032;\n\005Entry\022\013\n\003ke" + "y\030\001 \001(\t\022%\n\005value\030\002 \001(\0132\026.greptime.v1.Jso" + "nValueBP\n\016io.greptime.v1B\007RowDataZ5githu" + "b.com/GreptimeTeam/greptime-proto/go/gre" + "ptime/v1b\006proto3" ; 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, 1957, descriptor_table_protodef_greptime_2fv1_2frow_2eproto, + false, false, 1976, 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, 10, schemas, file_default_instances, TableStruct_greptime_2fv1_2frow_2eproto::offsets, @@ -2912,6 +2914,10 @@ JsonValue::JsonValue(const JsonValue& from) from._internal_object()); break; } + case kVariant: { + _this->_internal_set_variant(from._internal_variant()); + break; + } case VALUE_NOT_SET: { break; } @@ -2986,6 +2992,10 @@ void JsonValue::clear_value() { } break; } + case kVariant: { + _impl_.value_.variant_.Destroy(); + break; + } case VALUE_NOT_SET: { break; } @@ -3068,6 +3078,15 @@ const char* JsonValue::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx } else goto handle_unusual; continue; + // bytes variant = 8; + case 8: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 66)) { + auto str = _internal_mutable_variant(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; default: goto handle_unusual; } // switch @@ -3145,6 +3164,12 @@ uint8_t* JsonValue::_InternalSerialize( _Internal::object(this).GetCachedSize(), target, stream); } + // bytes variant = 8; + if (_internal_has_variant()) { + target = stream->WriteBytesMaybeAliased( + 8, this->_internal_variant(), 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); @@ -3203,6 +3228,13 @@ size_t JsonValue::ByteSizeLong() const { *_impl_.value_.object_); break; } + // bytes variant = 8; + case kVariant: { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_variant()); + break; + } case VALUE_NOT_SET: { break; } @@ -3256,6 +3288,10 @@ void JsonValue::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROT from._internal_object()); break; } + case kVariant: { + _this->_internal_set_variant(from._internal_variant()); + break; + } case VALUE_NOT_SET: { break; } diff --git a/c++/greptime/v1/row.pb.h b/c++/greptime/v1/row.pb.h index ae10789..31c2134 100644 --- a/c++/greptime/v1/row.pb.h +++ b/c++/greptime/v1/row.pb.h @@ -1707,6 +1707,7 @@ class JsonValue final : kStr = 5, kArray = 6, kObject = 7, + kVariant = 8, VALUE_NOT_SET = 0, }; @@ -1795,6 +1796,7 @@ class JsonValue final : kStrFieldNumber = 5, kArrayFieldNumber = 6, kObjectFieldNumber = 7, + kVariantFieldNumber = 8, }; // bool boolean = 1; bool has_boolean() const; @@ -1902,6 +1904,24 @@ class JsonValue final : ::greptime::v1::JsonObject* object); ::greptime::v1::JsonObject* unsafe_arena_release_object(); + // bytes variant = 8; + bool has_variant() const; + private: + bool _internal_has_variant() const; + public: + void clear_variant(); + const std::string& variant() const; + template + void set_variant(ArgT0&& arg0, ArgT... args); + std::string* mutable_variant(); + PROTOBUF_NODISCARD std::string* release_variant(); + void set_allocated_variant(std::string* variant); + private: + const std::string& _internal_variant() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_variant(const std::string& value); + std::string* _internal_mutable_variant(); + public: + void clear_value(); ValueCase value_case() const; // @@protoc_insertion_point(class_scope:greptime.v1.JsonValue) @@ -1914,6 +1934,7 @@ class JsonValue final : void set_has_str(); void set_has_array(); void set_has_object(); + void set_has_variant(); inline bool has_value() const; inline void clear_has_value(); @@ -1932,6 +1953,7 @@ class JsonValue final : ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr str_; ::greptime::v1::JsonList* array_; ::greptime::v1::JsonObject* object_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr variant_; } value_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; uint32_t _oneof_case_[1]; @@ -4692,6 +4714,83 @@ inline ::greptime::v1::JsonObject* JsonValue::mutable_object() { return _msg; } +// bytes variant = 8; +inline bool JsonValue::_internal_has_variant() const { + return value_case() == kVariant; +} +inline bool JsonValue::has_variant() const { + return _internal_has_variant(); +} +inline void JsonValue::set_has_variant() { + _impl_._oneof_case_[0] = kVariant; +} +inline void JsonValue::clear_variant() { + if (_internal_has_variant()) { + _impl_.value_.variant_.Destroy(); + clear_has_value(); + } +} +inline const std::string& JsonValue::variant() const { + // @@protoc_insertion_point(field_get:greptime.v1.JsonValue.variant) + return _internal_variant(); +} +template +inline void JsonValue::set_variant(ArgT0&& arg0, ArgT... args) { + if (!_internal_has_variant()) { + clear_value(); + set_has_variant(); + _impl_.value_.variant_.InitDefault(); + } + _impl_.value_.variant_.SetBytes( static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:greptime.v1.JsonValue.variant) +} +inline std::string* JsonValue::mutable_variant() { + std::string* _s = _internal_mutable_variant(); + // @@protoc_insertion_point(field_mutable:greptime.v1.JsonValue.variant) + return _s; +} +inline const std::string& JsonValue::_internal_variant() const { + if (_internal_has_variant()) { + return _impl_.value_.variant_.Get(); + } + return ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(); +} +inline void JsonValue::_internal_set_variant(const std::string& value) { + if (!_internal_has_variant()) { + clear_value(); + set_has_variant(); + _impl_.value_.variant_.InitDefault(); + } + _impl_.value_.variant_.Set(value, GetArenaForAllocation()); +} +inline std::string* JsonValue::_internal_mutable_variant() { + if (!_internal_has_variant()) { + clear_value(); + set_has_variant(); + _impl_.value_.variant_.InitDefault(); + } + return _impl_.value_.variant_.Mutable( GetArenaForAllocation()); +} +inline std::string* JsonValue::release_variant() { + // @@protoc_insertion_point(field_release:greptime.v1.JsonValue.variant) + if (_internal_has_variant()) { + clear_has_value(); + return _impl_.value_.variant_.Release(); + } else { + return nullptr; + } +} +inline void JsonValue::set_allocated_variant(std::string* variant) { + if (has_value()) { + clear_value(); + } + if (variant != nullptr) { + set_has_variant(); + _impl_.value_.variant_.InitAllocated(variant, GetArenaForAllocation()); + } + // @@protoc_insertion_point(field_set_allocated:greptime.v1.JsonValue.variant) +} + inline bool JsonValue::has_value() const { return value_case() != VALUE_NOT_SET; } diff --git a/go/greptime/v1/row.pb.go b/go/greptime/v1/row.pb.go index 1d0a97e..9ba85e6 100644 --- a/go/greptime/v1/row.pb.go +++ b/go/greptime/v1/row.pb.go @@ -798,6 +798,7 @@ type JsonValue struct { // *JsonValue_Str // *JsonValue_Array // *JsonValue_Object + // *JsonValue_Variant Value isJsonValue_Value `protobuf_oneof:"value"` } @@ -889,6 +890,13 @@ func (x *JsonValue) GetObject() *JsonObject { return nil } +func (x *JsonValue) GetVariant() []byte { + if x, ok := x.GetValue().(*JsonValue_Variant); ok { + return x.Variant + } + return nil +} + type isJsonValue_Value interface { isJsonValue_Value() } @@ -921,6 +929,10 @@ type JsonValue_Object struct { Object *JsonObject `protobuf:"bytes,7,opt,name=object,proto3,oneof"` } +type JsonValue_Variant struct { + Variant []byte `protobuf:"bytes,8,opt,name=variant,proto3,oneof"` +} + func (*JsonValue_Boolean) isJsonValue_Value() {} func (*JsonValue_Int) isJsonValue_Value() {} @@ -935,6 +947,8 @@ func (*JsonValue_Array) isJsonValue_Value() {} func (*JsonValue_Object) isJsonValue_Value() {} +func (*JsonValue_Variant) isJsonValue_Value() {} + type JsonList struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1216,7 +1230,7 @@ var file_greptime_v1_row_proto_rawDesc = []byte{ 0x6d, 0x73, 0x22, 0x37, 0x0a, 0x0b, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x28, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x02, 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, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x22, 0xe8, 0x01, 0x0a, 0x09, + 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x22, 0x84, 0x02, 0x0a, 0x09, 0x4a, 0x73, 0x6f, 0x6e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1a, 0x0a, 0x07, 0x62, 0x6f, 0x6f, 0x6c, 0x65, 0x61, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x07, 0x62, 0x6f, 0x6f, 0x6c, 0x65, 0x61, 0x6e, 0x12, 0x12, 0x0a, 0x03, 0x69, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, @@ -1230,26 +1244,28 @@ var file_greptime_v1_row_proto_rawDesc = []byte{ 0x74, 0x48, 0x00, 0x52, 0x05, 0x61, 0x72, 0x72, 0x61, 0x79, 0x12, 0x31, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4a, 0x73, 0x6f, 0x6e, 0x4f, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x48, 0x00, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x42, 0x07, 0x0a, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x38, 0x0a, 0x08, 0x4a, 0x73, 0x6f, 0x6e, 0x4c, 0x69, - 0x73, 0x74, 0x12, 0x2c, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, - 0x4a, 0x73, 0x6f, 0x6e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, - 0x22, 0x8e, 0x01, 0x0a, 0x0a, 0x4a, 0x73, 0x6f, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, - 0x37, 0x0a, 0x07, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x1d, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4a, - 0x73, 0x6f, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, - 0x07, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x1a, 0x47, 0x0a, 0x05, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x6b, 0x65, 0x79, 0x12, 0x2c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, - 0x2e, 0x4a, 0x73, 0x6f, 0x6e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 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, + 0x65, 0x63, 0x74, 0x48, 0x00, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x1a, 0x0a, + 0x07, 0x76, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, + 0x52, 0x07, 0x76, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x42, 0x07, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x22, 0x38, 0x0a, 0x08, 0x4a, 0x73, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x2c, + 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, + 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4a, 0x73, 0x6f, 0x6e, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x22, 0x8e, 0x01, 0x0a, + 0x0a, 0x4a, 0x73, 0x6f, 0x6e, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x37, 0x0a, 0x07, 0x65, + 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, + 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4a, 0x73, 0x6f, 0x6e, 0x4f, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x65, 0x6e, 0x74, + 0x72, 0x69, 0x65, 0x73, 0x1a, 0x47, 0x0a, 0x05, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, + 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, + 0x2c, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, + 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4a, 0x73, 0x6f, + 0x6e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 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 ( @@ -1478,6 +1494,7 @@ func file_greptime_v1_row_proto_init() { (*JsonValue_Str)(nil), (*JsonValue_Array)(nil), (*JsonValue_Object)(nil), + (*JsonValue_Variant)(nil), } type x struct{} out := protoimpl.TypeBuilder{ diff --git a/java/src/main/java/io/greptime/v1/RowData.java b/java/src/main/java/io/greptime/v1/RowData.java index 99cc0e8..e4a1a9a 100644 --- a/java/src/main/java/io/greptime/v1/RowData.java +++ b/java/src/main/java/io/greptime/v1/RowData.java @@ -9325,6 +9325,17 @@ public final class RowData { */ io.greptime.v1.RowData.JsonObjectOrBuilder getObjectOrBuilder(); + /** + * bytes variant = 8; + * @return Whether the variant field is set. + */ + boolean hasVariant(); + /** + * bytes variant = 8; + * @return The variant. + */ + com.google.protobuf.ByteString getVariant(); + public io.greptime.v1.RowData.JsonValue.ValueCase getValueCase(); } /** @@ -9426,6 +9437,11 @@ public final class RowData { valueCase_ = 7; break; } + case 66: { + value_ = input.readBytes(); + valueCase_ = 8; + break; + } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { @@ -9472,6 +9488,7 @@ public final class RowData { STR(5), ARRAY(6), OBJECT(7), + VARIANT(8), VALUE_NOT_SET(0); private final int value; private ValueCase(int value) { @@ -9496,6 +9513,7 @@ public final class RowData { case 5: return STR; case 6: return ARRAY; case 7: return OBJECT; + case 8: return VARIANT; case 0: return VALUE_NOT_SET; default: return null; } @@ -9709,6 +9727,27 @@ public final class RowData { return io.greptime.v1.RowData.JsonObject.getDefaultInstance(); } + public static final int VARIANT_FIELD_NUMBER = 8; + /** + * bytes variant = 8; + * @return Whether the variant field is set. + */ + @java.lang.Override + public boolean hasVariant() { + return valueCase_ == 8; + } + /** + * bytes variant = 8; + * @return The variant. + */ + @java.lang.Override + public com.google.protobuf.ByteString getVariant() { + if (valueCase_ == 8) { + return (com.google.protobuf.ByteString) value_; + } + return com.google.protobuf.ByteString.EMPTY; + } + private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { @@ -9748,6 +9787,10 @@ public final class RowData { if (valueCase_ == 7) { output.writeMessage(7, (io.greptime.v1.RowData.JsonObject) value_); } + if (valueCase_ == 8) { + output.writeBytes( + 8, (com.google.protobuf.ByteString) value_); + } unknownFields.writeTo(output); } @@ -9788,6 +9831,11 @@ public final class RowData { size += com.google.protobuf.CodedOutputStream .computeMessageSize(7, (io.greptime.v1.RowData.JsonObject) value_); } + if (valueCase_ == 8) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize( + 8, (com.google.protobuf.ByteString) value_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -9834,6 +9882,10 @@ public final class RowData { if (!getObject() .equals(other.getObject())) return false; break; + case 8: + if (!getVariant() + .equals(other.getVariant())) return false; + break; case 0: default: } @@ -9881,6 +9933,10 @@ public final class RowData { hash = (37 * hash) + OBJECT_FIELD_NUMBER; hash = (53 * hash) + getObject().hashCode(); break; + case 8: + hash = (37 * hash) + VARIANT_FIELD_NUMBER; + hash = (53 * hash) + getVariant().hashCode(); + break; case 0: default: } @@ -10074,6 +10130,9 @@ public final class RowData { result.value_ = objectBuilder_.build(); } } + if (valueCase_ == 8) { + result.value_ = value_; + } result.valueCase_ = valueCase_; onBuilt(); return result; @@ -10154,6 +10213,10 @@ public final class RowData { mergeObject(other.getObject()); break; } + case VARIANT: { + setVariant(other.getVariant()); + break; + } case VALUE_NOT_SET: { break; } @@ -10746,6 +10809,50 @@ public final class RowData { onChanged();; return objectBuilder_; } + + /** + * bytes variant = 8; + * @return Whether the variant field is set. + */ + public boolean hasVariant() { + return valueCase_ == 8; + } + /** + * bytes variant = 8; + * @return The variant. + */ + public com.google.protobuf.ByteString getVariant() { + if (valueCase_ == 8) { + return (com.google.protobuf.ByteString) value_; + } + return com.google.protobuf.ByteString.EMPTY; + } + /** + * bytes variant = 8; + * @param value The variant to set. + * @return This builder for chaining. + */ + public Builder setVariant(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + valueCase_ = 8; + value_ = value; + onChanged(); + return this; + } + /** + * bytes variant = 8; + * @return This builder for chaining. + */ + public Builder clearVariant() { + if (valueCase_ == 8) { + valueCase_ = 0; + value_ = null; + onChanged(); + } + return this; + } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -13258,18 +13365,19 @@ public final class RowData { "e\030* \001(\0132\026.greptime.v1.JsonValueH\000B\014\n\nval" + "ue_data\".\n\tListValue\022!\n\005items\030\001 \003(\0132\022.gr" + "eptime.v1.Value\"0\n\013StructValue\022!\n\005items\030" + - "\002 \003(\0132\022.greptime.v1.Value\"\271\001\n\tJsonValue\022" + + "\002 \003(\0132\022.greptime.v1.Value\"\314\001\n\tJsonValue\022" + "\021\n\007boolean\030\001 \001(\010H\000\022\r\n\003int\030\002 \001(\003H\000\022\016\n\004uin" + "t\030\003 \001(\004H\000\022\017\n\005float\030\004 \001(\001H\000\022\r\n\003str\030\005 \001(\tH" + "\000\022&\n\005array\030\006 \001(\0132\025.greptime.v1.JsonListH" + "\000\022)\n\006object\030\007 \001(\0132\027.greptime.v1.JsonObje" + - "ctH\000B\007\n\005value\"1\n\010JsonList\022%\n\005items\030\001 \003(\013" + - "2\026.greptime.v1.JsonValue\"y\n\nJsonObject\022." + - "\n\007entries\030\001 \003(\0132\035.greptime.v1.JsonObject" + - ".Entry\032;\n\005Entry\022\013\n\003key\030\001 \001(\t\022%\n\005value\030\002 " + - "\001(\0132\026.greptime.v1.JsonValueBP\n\016io.grepti" + - "me.v1B\007RowDataZ5github.com/GreptimeTeam/" + - "greptime-proto/go/greptime/v1b\006proto3" + "ctH\000\022\021\n\007variant\030\010 \001(\014H\000B\007\n\005value\"1\n\010Json" + + "List\022%\n\005items\030\001 \003(\0132\026.greptime.v1.JsonVa" + + "lue\"y\n\nJsonObject\022.\n\007entries\030\001 \003(\0132\035.gre" + + "ptime.v1.JsonObject.Entry\032;\n\005Entry\022\013\n\003ke" + + "y\030\001 \001(\t\022%\n\005value\030\002 \001(\0132\026.greptime.v1.Jso" + + "nValueBP\n\016io.greptime.v1B\007RowDataZ5githu" + + "b.com/GreptimeTeam/greptime-proto/go/gre" + + "ptime/v1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, @@ -13317,7 +13425,7 @@ public final class RowData { internal_static_greptime_v1_JsonValue_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_greptime_v1_JsonValue_descriptor, - new java.lang.String[] { "Boolean", "Int", "Uint", "Float", "Str", "Array", "Object", "Value", }); + new java.lang.String[] { "Boolean", "Int", "Uint", "Float", "Str", "Array", "Object", "Variant", "Value", }); internal_static_greptime_v1_JsonList_descriptor = getDescriptor().getMessageTypes().get(7); internal_static_greptime_v1_JsonList_fieldAccessorTable = new diff --git a/proto/greptime/v1/row.proto b/proto/greptime/v1/row.proto index baf5b74..637e5ad 100644 --- a/proto/greptime/v1/row.proto +++ b/proto/greptime/v1/row.proto @@ -100,6 +100,7 @@ message JsonValue { string str = 5; JsonList array = 6; JsonObject object = 7; + bytes variant = 8; } } diff --git a/src/generated/greptime.v1.rs b/src/generated/greptime.v1.rs index e050d48..e9fc308 100644 --- a/src/generated/greptime.v1.rs +++ b/src/generated/greptime.v1.rs @@ -634,7 +634,7 @@ pub struct StructValue { } #[derive(Clone, PartialEq, ::prost::Message)] pub struct JsonValue { - #[prost(oneof = "json_value::Value", tags = "1, 2, 3, 4, 5, 6, 7")] + #[prost(oneof = "json_value::Value", tags = "1, 2, 3, 4, 5, 6, 7, 8")] pub value: ::core::option::Option, } /// Nested message and enum types in `JsonValue`. @@ -655,6 +655,8 @@ pub mod json_value { Array(super::JsonList), #[prost(message, tag = "7")] Object(super::JsonObject), + #[prost(bytes, tag = "8")] + Variant(::prost::alloc::vec::Vec), } } #[derive(Clone, PartialEq, ::prost::Message)] diff --git a/src/generated/greptime_grpc_desc.bin b/src/generated/greptime_grpc_desc.bin index ed6aa0b..9a046eb 100644 Binary files a/src/generated/greptime_grpc_desc.bin and b/src/generated/greptime_grpc_desc.bin differ