From 3d82c5cca84bdad16422eac895a724ca7f615543 Mon Sep 17 00:00:00 2001 From: discord9 Date: Wed, 13 Nov 2024 20:50:46 +0800 Subject: [PATCH 1/6] feat: flow replace --- proto/greptime/v1/flow/server.proto | 2 ++ 1 file changed, 2 insertions(+) diff --git a/proto/greptime/v1/flow/server.proto b/proto/greptime/v1/flow/server.proto index f7e17530..e4cd87a4 100644 --- a/proto/greptime/v1/flow/server.proto +++ b/proto/greptime/v1/flow/server.proto @@ -79,6 +79,8 @@ message CreateRequest { string comment = 6; string sql = 7; map flow_options = 8; + // Set to true if the flow should be created or replaced. + bool is_create_or_replace = 9; } message DropRequest { FlowId flow_id = 1; } From de9731b0814a067dc8cc335f0655813ba9f6f392 Mon Sep 17 00:00:00 2001 From: discord9 Date: Wed, 13 Nov 2024 20:52:24 +0800 Subject: [PATCH 2/6] chore: make --- c++/greptime/v1/common.pb.cc | 330 ++++- c++/greptime/v1/common.pb.h | 279 ++++- c++/greptime/v1/flow/server.pb.cc | 71 +- c++/greptime/v1/flow/server.pb.h | 31 + go/greptime/v1/common.pb.go | 237 ++-- java/src/main/java/io/greptime/v1/Common.java | 1058 ++++++++++++++--- .../main/java/io/greptime/v1/flow/Server.java | 120 +- 7 files changed, 1825 insertions(+), 301 deletions(-) diff --git a/c++/greptime/v1/common.pb.cc b/c++/greptime/v1/common.pb.cc index f3b74907..cb6e6c96 100644 --- a/c++/greptime/v1/common.pb.cc +++ b/c++/greptime/v1/common.pb.cc @@ -272,6 +272,19 @@ struct DecimalTypeExtensionDefaultTypeInternal { }; }; PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 DecimalTypeExtensionDefaultTypeInternal _DecimalTypeExtension_default_instance_; +PROTOBUF_CONSTEXPR VectorTypeExtension::VectorTypeExtension( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.dim_)*/0u + , /*decltype(_impl_._cached_size_)*/{}} {} +struct VectorTypeExtensionDefaultTypeInternal { + PROTOBUF_CONSTEXPR VectorTypeExtensionDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~VectorTypeExtensionDefaultTypeInternal() {} + union { + VectorTypeExtension _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 VectorTypeExtensionDefaultTypeInternal _VectorTypeExtension_default_instance_; PROTOBUF_CONSTEXPR ColumnOptions_OptionsEntry_DoNotUse::ColumnOptions_OptionsEntry_DoNotUse( ::_pbi::ConstantInitialized) {} struct ColumnOptions_OptionsEntry_DoNotUseDefaultTypeInternal { @@ -298,7 +311,7 @@ struct ColumnOptionsDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ColumnOptionsDefaultTypeInternal _ColumnOptions_default_instance_; } // namespace v1 } // namespace greptime -static ::_pb::Metadata file_level_metadata_greptime_2fv1_2fcommon_2eproto[20]; +static ::_pb::Metadata file_level_metadata_greptime_2fv1_2fcommon_2eproto[21]; 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; @@ -448,6 +461,7 @@ const uint32_t TableStruct_greptime_2fv1_2fcommon_2eproto::offsets[] PROTOBUF_SE ~0u, // no _inlined_string_donated_ ::_pbi::kInvalidFieldOffsetTag, ::_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_), @@ -457,6 +471,13 @@ const uint32_t TableStruct_greptime_2fv1_2fcommon_2eproto::offsets[] PROTOBUF_SE ~0u, // no _inlined_string_donated_ PROTOBUF_FIELD_OFFSET(::greptime::v1::DecimalTypeExtension, _impl_.precision_), PROTOBUF_FIELD_OFFSET(::greptime::v1::DecimalTypeExtension, _impl_.scale_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::greptime::v1::VectorTypeExtension, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::greptime::v1::VectorTypeExtension, _impl_.dim_), PROTOBUF_FIELD_OFFSET(::greptime::v1::ColumnOptions_OptionsEntry_DoNotUse, _has_bits_), PROTOBUF_FIELD_OFFSET(::greptime::v1::ColumnOptions_OptionsEntry_DoNotUse, _internal_metadata_), ~0u, // no _extensions_ @@ -493,9 +514,10 @@ 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)}, - { 146, -1, -1, sizeof(::greptime::v1::DecimalTypeExtension)}, - { 154, 162, -1, sizeof(::greptime::v1::ColumnOptions_OptionsEntry_DoNotUse)}, - { 164, -1, -1, sizeof(::greptime::v1::ColumnOptions)}, + { 147, -1, -1, sizeof(::greptime::v1::DecimalTypeExtension)}, + { 155, -1, -1, sizeof(::greptime::v1::VectorTypeExtension)}, + { 162, 170, -1, sizeof(::greptime::v1::ColumnOptions_OptionsEntry_DoNotUse)}, + { 172, -1, -1, sizeof(::greptime::v1::ColumnOptions)}, }; static const ::_pb::Message* const file_default_instances[] = { @@ -517,6 +539,7 @@ static const ::_pb::Message* const file_default_instances[] = { &::greptime::v1::_Decimal128_default_instance_._instance, &::greptime::v1::_ColumnDataTypeExtension_default_instance_._instance, &::greptime::v1::_DecimalTypeExtension_default_instance_._instance, + &::greptime::v1::_VectorTypeExtension_default_instance_._instance, &::greptime::v1::_ColumnOptions_OptionsEntry_DoNotUse_default_instance_._instance, &::greptime::v1::_ColumnOptions_default_instance_._instance, }; @@ -551,38 +574,40 @@ 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\"\225\001\n\027ColumnDataTypeExtens" + "\001(\003\022\n\n\002lo\030\002 \001(\003\"\316\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*" - "\340\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\022\010\n\004JSON" - "\020\037*$\n\021JsonTypeExtension\022\017\n\013JSON_BINARY\020\000" - "BO\n\016io.greptime.v1B\006CommonZ5github.com/G" - "reptimeTeam/greptime-proto/go/greptime/v" - "1b\006proto3" + "\0162\036.greptime.v1.JsonTypeExtensionH\000\0227\n\013v" + "ector_type\030\003 \001(\0132 .greptime.v1.VectorTyp" + "eExtensionH\000B\n\n\010type_ext\"8\n\024DecimalTypeE" + "xtension\022\021\n\tprecision\030\001 \001(\005\022\r\n\005scale\030\002 \001" + "(\005\"\"\n\023VectorTypeExtension\022\013\n\003dim\030\001 \001(\r\"y" + "\n\rColumnOptions\0228\n\007options\030\001 \003(\0132\'.grept" + "ime.v1.ColumnOptions.OptionsEntry\032.\n\014Opt" + "ionsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\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*\354\003\n\016ColumnDataType\022\013\n\007BOOLE" + "AN\020\000\022\010\n\004INT8\020\001\022\t\n\005INT16\020\002\022\t\n\005INT32\020\003\022\t\n\005" + "INT64\020\004\022\t\n\005UINT8\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\010DA" + "TETIME\020\016\022\024\n\020TIMESTAMP_SECOND\020\017\022\031\n\025TIMEST" + "AMP_MILLISECOND\020\020\022\031\n\025TIMESTAMP_MICROSECO" + "ND\020\021\022\030\n\024TIMESTAMP_NANOSECOND\020\022\022\017\n\013TIME_S" + "ECOND\020\023\022\024\n\020TIME_MILLISECOND\020\024\022\024\n\020TIME_MI" + "CROSECOND\020\025\022\023\n\017TIME_NANOSECOND\020\026\022\027\n\023INTE" + "RVAL_YEAR_MONTH\020\027\022\025\n\021INTERVAL_DAY_TIME\020\030" + "\022\033\n\027INTERVAL_MONTH_DAY_NANO\020\031\022\016\n\nDECIMAL" + "128\020\036\022\010\n\004JSON\020\037\022\n\n\006VECTOR\020 *$\n\021JsonTypeE" + "xtension\022\017\n\013JSON_BINARY\020\000BO\n\016io.greptime" + ".v1B\006CommonZ5github.com/GreptimeTeam/gre" + "ptime-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, 2169, descriptor_table_protodef_greptime_2fv1_2fcommon_2eproto, + false, false, 2274, descriptor_table_protodef_greptime_2fv1_2fcommon_2eproto, "greptime/v1/common.proto", - &descriptor_table_greptime_2fv1_2fcommon_2eproto_once, nullptr, 0, 20, + &descriptor_table_greptime_2fv1_2fcommon_2eproto_once, nullptr, 0, 21, schemas, file_default_instances, TableStruct_greptime_2fv1_2fcommon_2eproto::offsets, file_level_metadata_greptime_2fv1_2fcommon_2eproto, file_level_enum_descriptors_greptime_2fv1_2fcommon_2eproto, file_level_service_descriptors_greptime_2fv1_2fcommon_2eproto, @@ -644,6 +669,7 @@ bool ColumnDataType_IsValid(int value) { case 25: case 30: case 31: + case 32: return true; default: return false; @@ -4284,12 +4310,17 @@ ::PROTOBUF_NAMESPACE_ID::Metadata Decimal128::GetMetadata() const { class ColumnDataTypeExtension::_Internal { public: static const ::greptime::v1::DecimalTypeExtension& decimal_type(const ColumnDataTypeExtension* msg); + static const ::greptime::v1::VectorTypeExtension& vector_type(const ColumnDataTypeExtension* msg); }; const ::greptime::v1::DecimalTypeExtension& ColumnDataTypeExtension::_Internal::decimal_type(const ColumnDataTypeExtension* msg) { return *msg->_impl_.type_ext_.decimal_type_; } +const ::greptime::v1::VectorTypeExtension& +ColumnDataTypeExtension::_Internal::vector_type(const ColumnDataTypeExtension* msg) { + return *msg->_impl_.type_ext_.vector_type_; +} void ColumnDataTypeExtension::set_allocated_decimal_type(::greptime::v1::DecimalTypeExtension* decimal_type) { ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); clear_type_ext(); @@ -4305,6 +4336,21 @@ void ColumnDataTypeExtension::set_allocated_decimal_type(::greptime::v1::Decimal } // @@protoc_insertion_point(field_set_allocated:greptime.v1.ColumnDataTypeExtension.decimal_type) } +void ColumnDataTypeExtension::set_allocated_vector_type(::greptime::v1::VectorTypeExtension* vector_type) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + clear_type_ext(); + if (vector_type) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(vector_type); + if (message_arena != submessage_arena) { + vector_type = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, vector_type, submessage_arena); + } + set_has_vector_type(); + _impl_.type_ext_.vector_type_ = vector_type; + } + // @@protoc_insertion_point(field_set_allocated:greptime.v1.ColumnDataTypeExtension.vector_type) +} ColumnDataTypeExtension::ColumnDataTypeExtension(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned) : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { @@ -4331,6 +4377,11 @@ ColumnDataTypeExtension::ColumnDataTypeExtension(const ColumnDataTypeExtension& _this->_internal_set_json_type(from._internal_json_type()); break; } + case kVectorType: { + _this->_internal_mutable_vector_type()->::greptime::v1::VectorTypeExtension::MergeFrom( + from._internal_vector_type()); + break; + } case TYPE_EXT_NOT_SET: { break; } @@ -4383,6 +4434,12 @@ void ColumnDataTypeExtension::clear_type_ext() { // No need to clear break; } + case kVectorType: { + if (GetArenaForAllocation() == nullptr) { + delete _impl_.type_ext_.vector_type_; + } + break; + } case TYPE_EXT_NOT_SET: { break; } @@ -4424,6 +4481,14 @@ const char* ColumnDataTypeExtension::_InternalParse(const char* ptr, ::_pbi::Par } else goto handle_unusual; continue; + // .greptime.v1.VectorTypeExtension vector_type = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { + ptr = ctx->ParseMessage(_internal_mutable_vector_type(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; default: goto handle_unusual; } // switch @@ -4467,6 +4532,13 @@ uint8_t* ColumnDataTypeExtension::_InternalSerialize( 2, this->_internal_json_type(), target); } + // .greptime.v1.VectorTypeExtension vector_type = 3; + if (_internal_has_vector_type()) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(3, _Internal::vector_type(this), + _Internal::vector_type(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); @@ -4497,6 +4569,13 @@ size_t ColumnDataTypeExtension::ByteSizeLong() const { ::_pbi::WireFormatLite::EnumSize(this->_internal_json_type()); break; } + // .greptime.v1.VectorTypeExtension vector_type = 3; + case kVectorType: { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *_impl_.type_ext_.vector_type_); + break; + } case TYPE_EXT_NOT_SET: { break; } @@ -4529,6 +4608,11 @@ void ColumnDataTypeExtension::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg _this->_internal_set_json_type(from._internal_json_type()); break; } + case kVectorType: { + _this->_internal_mutable_vector_type()->::greptime::v1::VectorTypeExtension::MergeFrom( + from._internal_vector_type()); + break; + } case TYPE_EXT_NOT_SET: { break; } @@ -4773,6 +4857,184 @@ ::PROTOBUF_NAMESPACE_ID::Metadata DecimalTypeExtension::GetMetadata() const { // =================================================================== +class VectorTypeExtension::_Internal { + public: +}; + +VectorTypeExtension::VectorTypeExtension(::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.VectorTypeExtension) +} +VectorTypeExtension::VectorTypeExtension(const VectorTypeExtension& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + VectorTypeExtension* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.dim_){} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _this->_impl_.dim_ = from._impl_.dim_; + // @@protoc_insertion_point(copy_constructor:greptime.v1.VectorTypeExtension) +} + +inline void VectorTypeExtension::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.dim_){0u} + , /*decltype(_impl_._cached_size_)*/{} + }; +} + +VectorTypeExtension::~VectorTypeExtension() { + // @@protoc_insertion_point(destructor:greptime.v1.VectorTypeExtension) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void VectorTypeExtension::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); +} + +void VectorTypeExtension::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void VectorTypeExtension::Clear() { +// @@protoc_insertion_point(message_clear_start:greptime.v1.VectorTypeExtension) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.dim_ = 0u; + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* VectorTypeExtension::_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) { + // uint32 dim = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + _impl_.dim_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } 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* VectorTypeExtension::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:greptime.v1.VectorTypeExtension) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // uint32 dim = 1; + if (this->_internal_dim() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray(1, this->_internal_dim(), 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.VectorTypeExtension) + return target; +} + +size_t VectorTypeExtension::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:greptime.v1.VectorTypeExtension) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // uint32 dim = 1; + if (this->_internal_dim() != 0) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_dim()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData VectorTypeExtension::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + VectorTypeExtension::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*VectorTypeExtension::GetClassData() const { return &_class_data_; } + + +void VectorTypeExtension::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.VectorTypeExtension) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (from._internal_dim() != 0) { + _this->_internal_set_dim(from._internal_dim()); + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void VectorTypeExtension::CopyFrom(const VectorTypeExtension& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:greptime.v1.VectorTypeExtension) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool VectorTypeExtension::IsInitialized() const { + return true; +} + +void VectorTypeExtension::InternalSwap(VectorTypeExtension* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_.dim_, other->_impl_.dim_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata VectorTypeExtension::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_greptime_2fv1_2fcommon_2eproto_getter, &descriptor_table_greptime_2fv1_2fcommon_2eproto_once, + file_level_metadata_greptime_2fv1_2fcommon_2eproto[18]); +} + +// =================================================================== + ColumnOptions_OptionsEntry_DoNotUse::ColumnOptions_OptionsEntry_DoNotUse() {} ColumnOptions_OptionsEntry_DoNotUse::ColumnOptions_OptionsEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena) : SuperType(arena) {} @@ -4782,7 +5044,7 @@ void ColumnOptions_OptionsEntry_DoNotUse::MergeFrom(const ColumnOptions_OptionsE ::PROTOBUF_NAMESPACE_ID::Metadata ColumnOptions_OptionsEntry_DoNotUse::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_greptime_2fv1_2fcommon_2eproto_getter, &descriptor_table_greptime_2fv1_2fcommon_2eproto_once, - file_level_metadata_greptime_2fv1_2fcommon_2eproto[18]); + file_level_metadata_greptime_2fv1_2fcommon_2eproto[19]); } // =================================================================== @@ -5001,7 +5263,7 @@ void ColumnOptions::InternalSwap(ColumnOptions* other) { ::PROTOBUF_NAMESPACE_ID::Metadata ColumnOptions::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_greptime_2fv1_2fcommon_2eproto_getter, &descriptor_table_greptime_2fv1_2fcommon_2eproto_once, - file_level_metadata_greptime_2fv1_2fcommon_2eproto[19]); + file_level_metadata_greptime_2fv1_2fcommon_2eproto[20]); } // @@protoc_insertion_point(namespace_scope) @@ -5080,6 +5342,10 @@ template<> PROTOBUF_NOINLINE ::greptime::v1::DecimalTypeExtension* Arena::CreateMaybeMessage< ::greptime::v1::DecimalTypeExtension >(Arena* arena) { return Arena::CreateMessageInternal< ::greptime::v1::DecimalTypeExtension >(arena); } +template<> PROTOBUF_NOINLINE ::greptime::v1::VectorTypeExtension* +Arena::CreateMaybeMessage< ::greptime::v1::VectorTypeExtension >(Arena* arena) { + return Arena::CreateMessageInternal< ::greptime::v1::VectorTypeExtension >(arena); +} template<> PROTOBUF_NOINLINE ::greptime::v1::ColumnOptions_OptionsEntry_DoNotUse* Arena::CreateMaybeMessage< ::greptime::v1::ColumnOptions_OptionsEntry_DoNotUse >(Arena* arena) { return Arena::CreateMessageInternal< ::greptime::v1::ColumnOptions_OptionsEntry_DoNotUse >(arena); diff --git a/c++/greptime/v1/common.pb.h b/c++/greptime/v1/common.pb.h index 11676054..06c3109b 100644 --- a/c++/greptime/v1/common.pb.h +++ b/c++/greptime/v1/common.pb.h @@ -110,6 +110,9 @@ extern TableNameDefaultTypeInternal _TableName_default_instance_; class Token; struct TokenDefaultTypeInternal; extern TokenDefaultTypeInternal _Token_default_instance_; +class VectorTypeExtension; +struct VectorTypeExtensionDefaultTypeInternal; +extern VectorTypeExtensionDefaultTypeInternal _VectorTypeExtension_default_instance_; } // namespace v1 } // namespace greptime PROTOBUF_NAMESPACE_OPEN @@ -133,6 +136,7 @@ template<> ::greptime::v1::ResponseHeader* Arena::CreateMaybeMessage<::greptime: template<> ::greptime::v1::Status* Arena::CreateMaybeMessage<::greptime::v1::Status>(Arena*); template<> ::greptime::v1::TableName* Arena::CreateMaybeMessage<::greptime::v1::TableName>(Arena*); template<> ::greptime::v1::Token* Arena::CreateMaybeMessage<::greptime::v1::Token>(Arena*); +template<> ::greptime::v1::VectorTypeExtension* Arena::CreateMaybeMessage<::greptime::v1::VectorTypeExtension>(Arena*); PROTOBUF_NAMESPACE_CLOSE namespace greptime { namespace v1 { @@ -192,12 +196,13 @@ enum ColumnDataType : int { INTERVAL_MONTH_DAY_NANO = 25, DECIMAL128 = 30, JSON = 31, + VECTOR = 32, ColumnDataType_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits::min(), ColumnDataType_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits::max() }; bool ColumnDataType_IsValid(int value); constexpr ColumnDataType ColumnDataType_MIN = BOOLEAN; -constexpr ColumnDataType ColumnDataType_MAX = JSON; +constexpr ColumnDataType ColumnDataType_MAX = VECTOR; constexpr int ColumnDataType_ARRAYSIZE = ColumnDataType_MAX + 1; const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* ColumnDataType_descriptor(); @@ -2790,6 +2795,7 @@ class ColumnDataTypeExtension final : enum TypeExtCase { kDecimalType = 1, kJsonType = 2, + kVectorType = 3, TYPE_EXT_NOT_SET = 0, }; @@ -2873,6 +2879,7 @@ class ColumnDataTypeExtension final : enum : int { kDecimalTypeFieldNumber = 1, kJsonTypeFieldNumber = 2, + kVectorTypeFieldNumber = 3, }; // .greptime.v1.DecimalTypeExtension decimal_type = 1; bool has_decimal_type() const; @@ -2905,6 +2912,24 @@ class ColumnDataTypeExtension final : void _internal_set_json_type(::greptime::v1::JsonTypeExtension value); public: + // .greptime.v1.VectorTypeExtension vector_type = 3; + bool has_vector_type() const; + private: + bool _internal_has_vector_type() const; + public: + void clear_vector_type(); + const ::greptime::v1::VectorTypeExtension& vector_type() const; + PROTOBUF_NODISCARD ::greptime::v1::VectorTypeExtension* release_vector_type(); + ::greptime::v1::VectorTypeExtension* mutable_vector_type(); + void set_allocated_vector_type(::greptime::v1::VectorTypeExtension* vector_type); + private: + const ::greptime::v1::VectorTypeExtension& _internal_vector_type() const; + ::greptime::v1::VectorTypeExtension* _internal_mutable_vector_type(); + public: + void unsafe_arena_set_allocated_vector_type( + ::greptime::v1::VectorTypeExtension* vector_type); + ::greptime::v1::VectorTypeExtension* unsafe_arena_release_vector_type(); + void clear_type_ext(); TypeExtCase type_ext_case() const; // @@protoc_insertion_point(class_scope:greptime.v1.ColumnDataTypeExtension) @@ -2912,6 +2937,7 @@ class ColumnDataTypeExtension final : class _Internal; void set_has_decimal_type(); void set_has_json_type(); + void set_has_vector_type(); inline bool has_type_ext() const; inline void clear_has_type_ext(); @@ -2925,6 +2951,7 @@ class ColumnDataTypeExtension final : ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; ::greptime::v1::DecimalTypeExtension* decimal_type_; int json_type_; + ::greptime::v1::VectorTypeExtension* vector_type_; } type_ext_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; uint32_t _oneof_case_[1]; @@ -3094,6 +3121,154 @@ class DecimalTypeExtension final : }; // ------------------------------------------------------------------- +class VectorTypeExtension final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:greptime.v1.VectorTypeExtension) */ { + public: + inline VectorTypeExtension() : VectorTypeExtension(nullptr) {} + ~VectorTypeExtension() override; + explicit PROTOBUF_CONSTEXPR VectorTypeExtension(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + VectorTypeExtension(const VectorTypeExtension& from); + VectorTypeExtension(VectorTypeExtension&& from) noexcept + : VectorTypeExtension() { + *this = ::std::move(from); + } + + inline VectorTypeExtension& operator=(const VectorTypeExtension& from) { + CopyFrom(from); + return *this; + } + inline VectorTypeExtension& operator=(VectorTypeExtension&& 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 VectorTypeExtension& default_instance() { + return *internal_default_instance(); + } + static inline const VectorTypeExtension* internal_default_instance() { + return reinterpret_cast( + &_VectorTypeExtension_default_instance_); + } + static constexpr int kIndexInFileMessages = + 18; + + friend void swap(VectorTypeExtension& a, VectorTypeExtension& b) { + a.Swap(&b); + } + inline void Swap(VectorTypeExtension* 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(VectorTypeExtension* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + VectorTypeExtension* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const VectorTypeExtension& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const VectorTypeExtension& from) { + VectorTypeExtension::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(VectorTypeExtension* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "greptime.v1.VectorTypeExtension"; + } + protected: + explicit VectorTypeExtension(::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 { + kDimFieldNumber = 1, + }; + // uint32 dim = 1; + void clear_dim(); + uint32_t dim() const; + void set_dim(uint32_t value); + private: + uint32_t _internal_dim() const; + void _internal_set_dim(uint32_t value); + public: + + // @@protoc_insertion_point(class_scope:greptime.v1.VectorTypeExtension) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + uint32_t dim_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_greptime_2fv1_2fcommon_2eproto; +}; +// ------------------------------------------------------------------- + class ColumnOptions_OptionsEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal::MapEntry(::greptime::v1::_VectorTypeExtension_default_instance_); +} +inline const ::greptime::v1::VectorTypeExtension& ColumnDataTypeExtension::vector_type() const { + // @@protoc_insertion_point(field_get:greptime.v1.ColumnDataTypeExtension.vector_type) + return _internal_vector_type(); +} +inline ::greptime::v1::VectorTypeExtension* ColumnDataTypeExtension::unsafe_arena_release_vector_type() { + // @@protoc_insertion_point(field_unsafe_arena_release:greptime.v1.ColumnDataTypeExtension.vector_type) + if (_internal_has_vector_type()) { + clear_has_type_ext(); + ::greptime::v1::VectorTypeExtension* temp = _impl_.type_ext_.vector_type_; + _impl_.type_ext_.vector_type_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void ColumnDataTypeExtension::unsafe_arena_set_allocated_vector_type(::greptime::v1::VectorTypeExtension* vector_type) { + clear_type_ext(); + if (vector_type) { + set_has_vector_type(); + _impl_.type_ext_.vector_type_ = vector_type; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:greptime.v1.ColumnDataTypeExtension.vector_type) +} +inline ::greptime::v1::VectorTypeExtension* ColumnDataTypeExtension::_internal_mutable_vector_type() { + if (!_internal_has_vector_type()) { + clear_type_ext(); + set_has_vector_type(); + _impl_.type_ext_.vector_type_ = CreateMaybeMessage< ::greptime::v1::VectorTypeExtension >(GetArenaForAllocation()); + } + return _impl_.type_ext_.vector_type_; +} +inline ::greptime::v1::VectorTypeExtension* ColumnDataTypeExtension::mutable_vector_type() { + ::greptime::v1::VectorTypeExtension* _msg = _internal_mutable_vector_type(); + // @@protoc_insertion_point(field_mutable:greptime.v1.ColumnDataTypeExtension.vector_type) + return _msg; +} + inline bool ColumnDataTypeExtension::has_type_ext() const { return type_ext_case() != TYPE_EXT_NOT_SET; } @@ -5026,6 +5275,30 @@ inline void DecimalTypeExtension::set_scale(int32_t value) { // ------------------------------------------------------------------- +// VectorTypeExtension + +// uint32 dim = 1; +inline void VectorTypeExtension::clear_dim() { + _impl_.dim_ = 0u; +} +inline uint32_t VectorTypeExtension::_internal_dim() const { + return _impl_.dim_; +} +inline uint32_t VectorTypeExtension::dim() const { + // @@protoc_insertion_point(field_get:greptime.v1.VectorTypeExtension.dim) + return _internal_dim(); +} +inline void VectorTypeExtension::_internal_set_dim(uint32_t value) { + + _impl_.dim_ = value; +} +inline void VectorTypeExtension::set_dim(uint32_t value) { + _internal_set_dim(value); + // @@protoc_insertion_point(field_set:greptime.v1.VectorTypeExtension.dim) +} + +// ------------------------------------------------------------------- + // ------------------------------------------------------------------- // ColumnOptions @@ -5100,6 +5373,8 @@ ColumnOptions::mutable_options() { // ------------------------------------------------------------------- +// ------------------------------------------------------------------- + // @@protoc_insertion_point(namespace_scope) diff --git a/c++/greptime/v1/flow/server.pb.cc b/c++/greptime/v1/flow/server.pb.cc index 823973eb..b8c75002 100644 --- a/c++/greptime/v1/flow/server.pb.cc +++ b/c++/greptime/v1/flow/server.pb.cc @@ -138,6 +138,7 @@ PROTOBUF_CONSTEXPR CreateRequest::CreateRequest( , /*decltype(_impl_.sink_table_name_)*/nullptr , /*decltype(_impl_.expire_after_)*/nullptr , /*decltype(_impl_.create_if_not_exists_)*/false + , /*decltype(_impl_.is_create_or_replace_)*/false , /*decltype(_impl_._cached_size_)*/{}} {} struct CreateRequestDefaultTypeInternal { PROTOBUF_CONSTEXPR CreateRequestDefaultTypeInternal() @@ -270,6 +271,7 @@ const uint32_t TableStruct_greptime_2fv1_2fflow_2fserver_2eproto::offsets[] PROT PROTOBUF_FIELD_OFFSET(::greptime::v1::flow::CreateRequest, _impl_.comment_), PROTOBUF_FIELD_OFFSET(::greptime::v1::flow::CreateRequest, _impl_.sql_), PROTOBUF_FIELD_OFFSET(::greptime::v1::flow::CreateRequest, _impl_.flow_options_), + PROTOBUF_FIELD_OFFSET(::greptime::v1::flow::CreateRequest, _impl_.is_create_or_replace_), ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::greptime::v1::flow::DropRequest, _internal_metadata_), ~0u, // no _extensions_ @@ -295,8 +297,8 @@ static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protode { 54, -1, -1, sizeof(::greptime::v1::flow::FlowResponse)}, { 64, 72, -1, sizeof(::greptime::v1::flow::CreateRequest_FlowOptionsEntry_DoNotUse)}, { 74, -1, -1, sizeof(::greptime::v1::flow::CreateRequest)}, - { 88, -1, -1, sizeof(::greptime::v1::flow::DropRequest)}, - { 95, -1, -1, sizeof(::greptime::v1::flow::FlushFlow)}, + { 89, -1, -1, sizeof(::greptime::v1::flow::DropRequest)}, + { 96, -1, -1, sizeof(::greptime::v1::flow::FlushFlow)}, }; static const ::_pb::Message* const file_default_instances[] = { @@ -337,7 +339,7 @@ const char descriptor_table_protodef_greptime_2fv1_2fflow_2fserver_2eproto[] PRO ".greptime.v1.FlowId\022B\n\nextensions\030\004 \003(\0132" "..greptime.v1.flow.FlowResponse.Extensio" "nsEntry\0321\n\017ExtensionsEntry\022\013\n\003key\030\001 \001(\t\022" - "\r\n\005value\030\002 \001(\014:\0028\001\"\376\002\n\rCreateRequest\022$\n\007" + "\r\n\005value\030\002 \001(\014:\0028\001\"\234\003\n\rCreateRequest\022$\n\007" "flow_id\030\001 \001(\0132\023.greptime.v1.FlowId\022.\n\020so" "urce_table_ids\030\002 \003(\0132\024.greptime.v1.Table" "Id\022/\n\017sink_table_name\030\003 \001(\0132\026.greptime.v" @@ -345,18 +347,19 @@ const char descriptor_table_protodef_greptime_2fv1_2fflow_2fserver_2eproto[] PRO "\010\022.\n\014expire_after\030\005 \001(\0132\030.greptime.v1.Ex" "pireAfter\022\017\n\007comment\030\006 \001(\t\022\013\n\003sql\030\007 \001(\t\022" "F\n\014flow_options\030\010 \003(\01320.greptime.v1.flow" - ".CreateRequest.FlowOptionsEntry\0322\n\020FlowO" - "ptionsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:" - "\0028\001\"3\n\013DropRequest\022$\n\007flow_id\030\001 \001(\0132\023.gr" - "eptime.v1.FlowId\"1\n\tFlushFlow\022$\n\007flow_id" - "\030\001 \001(\0132\023.greptime.v1.FlowId2\264\001\n\004Flow\022S\n\022" - "HandleCreateRemove\022\035.greptime.v1.flow.Fl" - "owRequest\032\036.greptime.v1.flow.FlowRespons" - "e\022W\n\023HandleMirrorRequest\022 .greptime.v1.f" - "low.InsertRequests\032\036.greptime.v1.flow.Fl" - "owResponseBY\n\023io.greptime.v1.flowB\006Serve" - "rZ:github.com/GreptimeTeam/greptime-prot" - "o/go/greptime/v1/flowb\006proto3" + ".CreateRequest.FlowOptionsEntry\022\034\n\024is_cr" + "eate_or_replace\030\t \001(\010\0322\n\020FlowOptionsEntr" + "y\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"3\n\013Dro" + "pRequest\022$\n\007flow_id\030\001 \001(\0132\023.greptime.v1." + "FlowId\"1\n\tFlushFlow\022$\n\007flow_id\030\001 \001(\0132\023.g" + "reptime.v1.FlowId2\264\001\n\004Flow\022S\n\022HandleCrea" + "teRemove\022\035.greptime.v1.flow.FlowRequest\032" + "\036.greptime.v1.flow.FlowResponse\022W\n\023Handl" + "eMirrorRequest\022 .greptime.v1.flow.Insert" + "Requests\032\036.greptime.v1.flow.FlowResponse" + "BY\n\023io.greptime.v1.flowB\006ServerZ:github." + "com/GreptimeTeam/greptime-proto/go/grept" + "ime/v1/flowb\006proto3" ; static const ::_pbi::DescriptorTable* const descriptor_table_greptime_2fv1_2fflow_2fserver_2eproto_deps[3] = { &::descriptor_table_greptime_2fv1_2fcommon_2eproto, @@ -365,7 +368,7 @@ static const ::_pbi::DescriptorTable* const descriptor_table_greptime_2fv1_2fflo }; static ::_pbi::once_flag descriptor_table_greptime_2fv1_2fflow_2fserver_2eproto_once; const ::_pbi::DescriptorTable descriptor_table_greptime_2fv1_2fflow_2fserver_2eproto = { - false, false, 1709, descriptor_table_protodef_greptime_2fv1_2fflow_2fserver_2eproto, + false, false, 1739, descriptor_table_protodef_greptime_2fv1_2fflow_2fserver_2eproto, "greptime/v1/flow/server.proto", &descriptor_table_greptime_2fv1_2fflow_2fserver_2eproto_once, descriptor_table_greptime_2fv1_2fflow_2fserver_2eproto_deps, 3, 11, schemas, file_default_instances, TableStruct_greptime_2fv1_2fflow_2fserver_2eproto::offsets, @@ -1905,6 +1908,7 @@ CreateRequest::CreateRequest(const CreateRequest& from) , decltype(_impl_.sink_table_name_){nullptr} , decltype(_impl_.expire_after_){nullptr} , decltype(_impl_.create_if_not_exists_){} + , decltype(_impl_.is_create_or_replace_){} , /*decltype(_impl_._cached_size_)*/{}}; _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); @@ -1934,7 +1938,9 @@ CreateRequest::CreateRequest(const CreateRequest& from) if (from._internal_has_expire_after()) { _this->_impl_.expire_after_ = new ::greptime::v1::ExpireAfter(*from._impl_.expire_after_); } - _this->_impl_.create_if_not_exists_ = from._impl_.create_if_not_exists_; + ::memcpy(&_impl_.create_if_not_exists_, &from._impl_.create_if_not_exists_, + static_cast(reinterpret_cast(&_impl_.is_create_or_replace_) - + reinterpret_cast(&_impl_.create_if_not_exists_)) + sizeof(_impl_.is_create_or_replace_)); // @@protoc_insertion_point(copy_constructor:greptime.v1.flow.CreateRequest) } @@ -1951,6 +1957,7 @@ inline void CreateRequest::SharedCtor( , decltype(_impl_.sink_table_name_){nullptr} , decltype(_impl_.expire_after_){nullptr} , decltype(_impl_.create_if_not_exists_){false} + , decltype(_impl_.is_create_or_replace_){false} , /*decltype(_impl_._cached_size_)*/{} }; _impl_.comment_.InitDefault(); @@ -2015,7 +2022,9 @@ void CreateRequest::Clear() { delete _impl_.expire_after_; } _impl_.expire_after_ = nullptr; - _impl_.create_if_not_exists_ = false; + ::memset(&_impl_.create_if_not_exists_, 0, static_cast( + reinterpret_cast(&_impl_.is_create_or_replace_) - + reinterpret_cast(&_impl_.create_if_not_exists_)) + sizeof(_impl_.is_create_or_replace_)); _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } @@ -2103,6 +2112,14 @@ const char* CreateRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* } else goto handle_unusual; continue; + // bool is_create_or_replace = 9; + case 9: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 72)) { + _impl_.is_create_or_replace_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; default: goto handle_unusual; } // switch @@ -2217,6 +2234,12 @@ uint8_t* CreateRequest::_InternalSerialize( } } + // bool is_create_or_replace = 9; + if (this->_internal_is_create_or_replace() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray(9, this->_internal_is_create_or_replace(), 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); @@ -2289,6 +2312,11 @@ size_t CreateRequest::ByteSizeLong() const { total_size += 1 + 1; } + // bool is_create_or_replace = 9; + if (this->_internal_is_create_or_replace() != 0) { + total_size += 1 + 1; + } + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); } @@ -2330,6 +2358,9 @@ void CreateRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const :: if (from._internal_create_if_not_exists() != 0) { _this->_internal_set_create_if_not_exists(from._internal_create_if_not_exists()); } + if (from._internal_is_create_or_replace() != 0) { + _this->_internal_set_is_create_or_replace(from._internal_is_create_or_replace()); + } _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); } @@ -2360,8 +2391,8 @@ void CreateRequest::InternalSwap(CreateRequest* other) { &other->_impl_.sql_, rhs_arena ); ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(CreateRequest, _impl_.create_if_not_exists_) - + sizeof(CreateRequest::_impl_.create_if_not_exists_) + PROTOBUF_FIELD_OFFSET(CreateRequest, _impl_.is_create_or_replace_) + + sizeof(CreateRequest::_impl_.is_create_or_replace_) - PROTOBUF_FIELD_OFFSET(CreateRequest, _impl_.flow_id_)>( reinterpret_cast(&_impl_.flow_id_), reinterpret_cast(&other->_impl_.flow_id_)); diff --git a/c++/greptime/v1/flow/server.pb.h b/c++/greptime/v1/flow/server.pb.h index f41e186c..403ea6be 100644 --- a/c++/greptime/v1/flow/server.pb.h +++ b/c++/greptime/v1/flow/server.pb.h @@ -1282,6 +1282,7 @@ class CreateRequest final : kSinkTableNameFieldNumber = 3, kExpireAfterFieldNumber = 5, kCreateIfNotExistsFieldNumber = 4, + kIsCreateOrReplaceFieldNumber = 9, }; // repeated .greptime.v1.TableId source_table_ids = 2; int source_table_ids_size() const; @@ -1409,6 +1410,15 @@ class CreateRequest final : void _internal_set_create_if_not_exists(bool value); public: + // bool is_create_or_replace = 9; + void clear_is_create_or_replace(); + bool is_create_or_replace() const; + void set_is_create_or_replace(bool value); + private: + bool _internal_is_create_or_replace() const; + void _internal_set_is_create_or_replace(bool value); + public: + // @@protoc_insertion_point(class_scope:greptime.v1.flow.CreateRequest) private: class _Internal; @@ -1429,6 +1439,7 @@ class CreateRequest final : ::greptime::v1::TableName* sink_table_name_; ::greptime::v1::ExpireAfter* expire_after_; bool create_if_not_exists_; + bool is_create_or_replace_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; }; union { Impl_ _impl_; }; @@ -2977,6 +2988,26 @@ CreateRequest::mutable_flow_options() { return _internal_mutable_flow_options(); } +// bool is_create_or_replace = 9; +inline void CreateRequest::clear_is_create_or_replace() { + _impl_.is_create_or_replace_ = false; +} +inline bool CreateRequest::_internal_is_create_or_replace() const { + return _impl_.is_create_or_replace_; +} +inline bool CreateRequest::is_create_or_replace() const { + // @@protoc_insertion_point(field_get:greptime.v1.flow.CreateRequest.is_create_or_replace) + return _internal_is_create_or_replace(); +} +inline void CreateRequest::_internal_set_is_create_or_replace(bool value) { + + _impl_.is_create_or_replace_ = value; +} +inline void CreateRequest::set_is_create_or_replace(bool value) { + _internal_set_is_create_or_replace(value); + // @@protoc_insertion_point(field_set:greptime.v1.flow.CreateRequest.is_create_or_replace) +} + // ------------------------------------------------------------------- // DropRequest diff --git a/go/greptime/v1/common.pb.go b/go/greptime/v1/common.pb.go index a487279a..263db8d2 100644 --- a/go/greptime/v1/common.pb.go +++ b/go/greptime/v1/common.pb.go @@ -114,6 +114,7 @@ const ( ColumnDataType_INTERVAL_MONTH_DAY_NANO ColumnDataType = 25 ColumnDataType_DECIMAL128 ColumnDataType = 30 ColumnDataType_JSON ColumnDataType = 31 + ColumnDataType_VECTOR ColumnDataType = 32 ) // Enum value maps for ColumnDataType. @@ -147,6 +148,7 @@ var ( 25: "INTERVAL_MONTH_DAY_NANO", 30: "DECIMAL128", 31: "JSON", + 32: "VECTOR", } ColumnDataType_value = map[string]int32{ "BOOLEAN": 0, @@ -177,6 +179,7 @@ var ( "INTERVAL_MONTH_DAY_NANO": 25, "DECIMAL128": 30, "JSON": 31, + "VECTOR": 32, } ) @@ -1097,6 +1100,7 @@ type ColumnDataTypeExtension struct { // // *ColumnDataTypeExtension_DecimalType // *ColumnDataTypeExtension_JsonType + // *ColumnDataTypeExtension_VectorType TypeExt isColumnDataTypeExtension_TypeExt `protobuf_oneof:"type_ext"` } @@ -1153,6 +1157,13 @@ func (x *ColumnDataTypeExtension) GetJsonType() JsonTypeExtension { return JsonTypeExtension_JSON_BINARY } +func (x *ColumnDataTypeExtension) GetVectorType() *VectorTypeExtension { + if x, ok := x.GetTypeExt().(*ColumnDataTypeExtension_VectorType); ok { + return x.VectorType + } + return nil +} + type isColumnDataTypeExtension_TypeExt interface { isColumnDataTypeExtension_TypeExt() } @@ -1166,10 +1177,16 @@ type ColumnDataTypeExtension_JsonType struct { JsonType JsonTypeExtension `protobuf:"varint,2,opt,name=json_type,json=jsonType,proto3,enum=greptime.v1.JsonTypeExtension,oneof"` } +type ColumnDataTypeExtension_VectorType struct { + VectorType *VectorTypeExtension `protobuf:"bytes,3,opt,name=vector_type,json=vectorType,proto3,oneof"` +} + func (*ColumnDataTypeExtension_DecimalType) isColumnDataTypeExtension_TypeExt() {} func (*ColumnDataTypeExtension_JsonType) isColumnDataTypeExtension_TypeExt() {} +func (*ColumnDataTypeExtension_VectorType) isColumnDataTypeExtension_TypeExt() {} + type DecimalTypeExtension struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1225,6 +1242,53 @@ func (x *DecimalTypeExtension) GetScale() int32 { return 0 } +type VectorTypeExtension struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Dim uint32 `protobuf:"varint,1,opt,name=dim,proto3" json:"dim,omitempty"` +} + +func (x *VectorTypeExtension) Reset() { + *x = VectorTypeExtension{} + if protoimpl.UnsafeEnabled { + mi := &file_greptime_v1_common_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *VectorTypeExtension) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VectorTypeExtension) ProtoMessage() {} + +func (x *VectorTypeExtension) ProtoReflect() protoreflect.Message { + mi := &file_greptime_v1_common_proto_msgTypes[16] + 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 VectorTypeExtension.ProtoReflect.Descriptor instead. +func (*VectorTypeExtension) Descriptor() ([]byte, []int) { + return file_greptime_v1_common_proto_rawDescGZIP(), []int{16} +} + +func (x *VectorTypeExtension) GetDim() uint32 { + if x != nil { + return x.Dim + } + return 0 +} + // Additional options for the column. type ColumnOptions struct { state protoimpl.MessageState @@ -1257,7 +1321,7 @@ type ColumnOptions struct { func (x *ColumnOptions) Reset() { *x = ColumnOptions{} if protoimpl.UnsafeEnabled { - mi := &file_greptime_v1_common_proto_msgTypes[16] + mi := &file_greptime_v1_common_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1270,7 +1334,7 @@ func (x *ColumnOptions) String() string { func (*ColumnOptions) ProtoMessage() {} func (x *ColumnOptions) ProtoReflect() protoreflect.Message { - mi := &file_greptime_v1_common_proto_msgTypes[16] + mi := &file_greptime_v1_common_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1283,7 +1347,7 @@ func (x *ColumnOptions) ProtoReflect() protoreflect.Message { // Deprecated: Use ColumnOptions.ProtoReflect.Descriptor instead. func (*ColumnOptions) Descriptor() ([]byte, []int) { - return file_greptime_v1_common_proto_rawDescGZIP(), []int{16} + return file_greptime_v1_common_proto_rawDescGZIP(), []int{17} } func (x *ColumnOptions) GetOptions() map[string]string { @@ -1390,7 +1454,7 @@ 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, 0xac, 0x01, 0x0a, 0x17, 0x43, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x6c, 0x6f, 0x22, 0xf1, 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, @@ -1400,63 +1464,71 @@ var file_greptime_v1_common_proto_rawDesc = []byte{ 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, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x70, 0x72, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, - 0x14, 0x0a, 0x05, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, - 0x73, 0x63, 0x61, 0x6c, 0x65, 0x22, 0x8e, 0x01, 0x0a, 0x0d, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x41, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 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, 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, 0x2a, 0x31, 0x0a, 0x0c, 0x53, 0x65, 0x6d, 0x61, 0x6e, 0x74, - 0x69, 0x63, 0x54, 0x79, 0x70, 0x65, 0x12, 0x07, 0x0a, 0x03, 0x54, 0x41, 0x47, 0x10, 0x00, 0x12, - 0x09, 0x0a, 0x05, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x54, 0x49, - 0x4d, 0x45, 0x53, 0x54, 0x41, 0x4d, 0x50, 0x10, 0x02, 0x2a, 0xe0, 0x03, 0x0a, 0x0e, 0x43, 0x6f, - 0x6c, 0x75, 0x6d, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, - 0x42, 0x4f, 0x4f, 0x4c, 0x45, 0x41, 0x4e, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x49, 0x4e, 0x54, - 0x38, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x49, 0x4e, 0x54, 0x31, 0x36, 0x10, 0x02, 0x12, 0x09, - 0x0a, 0x05, 0x49, 0x4e, 0x54, 0x33, 0x32, 0x10, 0x03, 0x12, 0x09, 0x0a, 0x05, 0x49, 0x4e, 0x54, - 0x36, 0x34, 0x10, 0x04, 0x12, 0x09, 0x0a, 0x05, 0x55, 0x49, 0x4e, 0x54, 0x38, 0x10, 0x05, 0x12, - 0x0a, 0x0a, 0x06, 0x55, 0x49, 0x4e, 0x54, 0x31, 0x36, 0x10, 0x06, 0x12, 0x0a, 0x0a, 0x06, 0x55, - 0x49, 0x4e, 0x54, 0x33, 0x32, 0x10, 0x07, 0x12, 0x0a, 0x0a, 0x06, 0x55, 0x49, 0x4e, 0x54, 0x36, - 0x34, 0x10, 0x08, 0x12, 0x0b, 0x0a, 0x07, 0x46, 0x4c, 0x4f, 0x41, 0x54, 0x33, 0x32, 0x10, 0x09, - 0x12, 0x0b, 0x0a, 0x07, 0x46, 0x4c, 0x4f, 0x41, 0x54, 0x36, 0x34, 0x10, 0x0a, 0x12, 0x0a, 0x0a, - 0x06, 0x42, 0x49, 0x4e, 0x41, 0x52, 0x59, 0x10, 0x0b, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x54, 0x52, - 0x49, 0x4e, 0x47, 0x10, 0x0c, 0x12, 0x08, 0x0a, 0x04, 0x44, 0x41, 0x54, 0x45, 0x10, 0x0d, 0x12, - 0x0c, 0x0a, 0x08, 0x44, 0x41, 0x54, 0x45, 0x54, 0x49, 0x4d, 0x45, 0x10, 0x0e, 0x12, 0x14, 0x0a, - 0x10, 0x54, 0x49, 0x4d, 0x45, 0x53, 0x54, 0x41, 0x4d, 0x50, 0x5f, 0x53, 0x45, 0x43, 0x4f, 0x4e, - 0x44, 0x10, 0x0f, 0x12, 0x19, 0x0a, 0x15, 0x54, 0x49, 0x4d, 0x45, 0x53, 0x54, 0x41, 0x4d, 0x50, - 0x5f, 0x4d, 0x49, 0x4c, 0x4c, 0x49, 0x53, 0x45, 0x43, 0x4f, 0x4e, 0x44, 0x10, 0x10, 0x12, 0x19, - 0x0a, 0x15, 0x54, 0x49, 0x4d, 0x45, 0x53, 0x54, 0x41, 0x4d, 0x50, 0x5f, 0x4d, 0x49, 0x43, 0x52, - 0x4f, 0x53, 0x45, 0x43, 0x4f, 0x4e, 0x44, 0x10, 0x11, 0x12, 0x18, 0x0a, 0x14, 0x54, 0x49, 0x4d, - 0x45, 0x53, 0x54, 0x41, 0x4d, 0x50, 0x5f, 0x4e, 0x41, 0x4e, 0x4f, 0x53, 0x45, 0x43, 0x4f, 0x4e, - 0x44, 0x10, 0x12, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x49, 0x4d, 0x45, 0x5f, 0x53, 0x45, 0x43, 0x4f, - 0x4e, 0x44, 0x10, 0x13, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x49, 0x4d, 0x45, 0x5f, 0x4d, 0x49, 0x4c, - 0x4c, 0x49, 0x53, 0x45, 0x43, 0x4f, 0x4e, 0x44, 0x10, 0x14, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x49, - 0x4d, 0x45, 0x5f, 0x4d, 0x49, 0x43, 0x52, 0x4f, 0x53, 0x45, 0x43, 0x4f, 0x4e, 0x44, 0x10, 0x15, - 0x12, 0x13, 0x0a, 0x0f, 0x54, 0x49, 0x4d, 0x45, 0x5f, 0x4e, 0x41, 0x4e, 0x4f, 0x53, 0x45, 0x43, - 0x4f, 0x4e, 0x44, 0x10, 0x16, 0x12, 0x17, 0x0a, 0x13, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x56, 0x41, - 0x4c, 0x5f, 0x59, 0x45, 0x41, 0x52, 0x5f, 0x4d, 0x4f, 0x4e, 0x54, 0x48, 0x10, 0x17, 0x12, 0x15, - 0x0a, 0x11, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x56, 0x41, 0x4c, 0x5f, 0x44, 0x41, 0x59, 0x5f, 0x54, - 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, 0x12, 0x08, 0x0a, 0x04, 0x4a, 0x53, 0x4f, 0x4e, 0x10, 0x1f, 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, + 0x6e, 0x48, 0x00, 0x52, 0x08, 0x6a, 0x73, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x43, 0x0a, + 0x0b, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, + 0x2e, 0x56, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x54, 0x79, 0x70, 0x65, 0x45, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0a, 0x76, 0x65, 0x63, 0x74, 0x6f, 0x72, 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, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x70, 0x72, 0x65, 0x63, 0x69, + 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x22, 0x27, 0x0a, 0x13, 0x56, 0x65, + 0x63, 0x74, 0x6f, 0x72, 0x54, 0x79, 0x70, 0x65, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x69, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, + 0x64, 0x69, 0x6d, 0x22, 0x8e, 0x01, 0x0a, 0x0d, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x41, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 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, 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, 0x2a, 0x31, 0x0a, 0x0c, 0x53, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, + 0x54, 0x79, 0x70, 0x65, 0x12, 0x07, 0x0a, 0x03, 0x54, 0x41, 0x47, 0x10, 0x00, 0x12, 0x09, 0x0a, + 0x05, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x54, 0x49, 0x4d, 0x45, + 0x53, 0x54, 0x41, 0x4d, 0x50, 0x10, 0x02, 0x2a, 0xec, 0x03, 0x0a, 0x0e, 0x43, 0x6f, 0x6c, 0x75, + 0x6d, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x42, 0x4f, + 0x4f, 0x4c, 0x45, 0x41, 0x4e, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x49, 0x4e, 0x54, 0x38, 0x10, + 0x01, 0x12, 0x09, 0x0a, 0x05, 0x49, 0x4e, 0x54, 0x31, 0x36, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, + 0x49, 0x4e, 0x54, 0x33, 0x32, 0x10, 0x03, 0x12, 0x09, 0x0a, 0x05, 0x49, 0x4e, 0x54, 0x36, 0x34, + 0x10, 0x04, 0x12, 0x09, 0x0a, 0x05, 0x55, 0x49, 0x4e, 0x54, 0x38, 0x10, 0x05, 0x12, 0x0a, 0x0a, + 0x06, 0x55, 0x49, 0x4e, 0x54, 0x31, 0x36, 0x10, 0x06, 0x12, 0x0a, 0x0a, 0x06, 0x55, 0x49, 0x4e, + 0x54, 0x33, 0x32, 0x10, 0x07, 0x12, 0x0a, 0x0a, 0x06, 0x55, 0x49, 0x4e, 0x54, 0x36, 0x34, 0x10, + 0x08, 0x12, 0x0b, 0x0a, 0x07, 0x46, 0x4c, 0x4f, 0x41, 0x54, 0x33, 0x32, 0x10, 0x09, 0x12, 0x0b, + 0x0a, 0x07, 0x46, 0x4c, 0x4f, 0x41, 0x54, 0x36, 0x34, 0x10, 0x0a, 0x12, 0x0a, 0x0a, 0x06, 0x42, + 0x49, 0x4e, 0x41, 0x52, 0x59, 0x10, 0x0b, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x54, 0x52, 0x49, 0x4e, + 0x47, 0x10, 0x0c, 0x12, 0x08, 0x0a, 0x04, 0x44, 0x41, 0x54, 0x45, 0x10, 0x0d, 0x12, 0x0c, 0x0a, + 0x08, 0x44, 0x41, 0x54, 0x45, 0x54, 0x49, 0x4d, 0x45, 0x10, 0x0e, 0x12, 0x14, 0x0a, 0x10, 0x54, + 0x49, 0x4d, 0x45, 0x53, 0x54, 0x41, 0x4d, 0x50, 0x5f, 0x53, 0x45, 0x43, 0x4f, 0x4e, 0x44, 0x10, + 0x0f, 0x12, 0x19, 0x0a, 0x15, 0x54, 0x49, 0x4d, 0x45, 0x53, 0x54, 0x41, 0x4d, 0x50, 0x5f, 0x4d, + 0x49, 0x4c, 0x4c, 0x49, 0x53, 0x45, 0x43, 0x4f, 0x4e, 0x44, 0x10, 0x10, 0x12, 0x19, 0x0a, 0x15, + 0x54, 0x49, 0x4d, 0x45, 0x53, 0x54, 0x41, 0x4d, 0x50, 0x5f, 0x4d, 0x49, 0x43, 0x52, 0x4f, 0x53, + 0x45, 0x43, 0x4f, 0x4e, 0x44, 0x10, 0x11, 0x12, 0x18, 0x0a, 0x14, 0x54, 0x49, 0x4d, 0x45, 0x53, + 0x54, 0x41, 0x4d, 0x50, 0x5f, 0x4e, 0x41, 0x4e, 0x4f, 0x53, 0x45, 0x43, 0x4f, 0x4e, 0x44, 0x10, + 0x12, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x49, 0x4d, 0x45, 0x5f, 0x53, 0x45, 0x43, 0x4f, 0x4e, 0x44, + 0x10, 0x13, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x49, 0x4d, 0x45, 0x5f, 0x4d, 0x49, 0x4c, 0x4c, 0x49, + 0x53, 0x45, 0x43, 0x4f, 0x4e, 0x44, 0x10, 0x14, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x49, 0x4d, 0x45, + 0x5f, 0x4d, 0x49, 0x43, 0x52, 0x4f, 0x53, 0x45, 0x43, 0x4f, 0x4e, 0x44, 0x10, 0x15, 0x12, 0x13, + 0x0a, 0x0f, 0x54, 0x49, 0x4d, 0x45, 0x5f, 0x4e, 0x41, 0x4e, 0x4f, 0x53, 0x45, 0x43, 0x4f, 0x4e, + 0x44, 0x10, 0x16, 0x12, 0x17, 0x0a, 0x13, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x56, 0x41, 0x4c, 0x5f, + 0x59, 0x45, 0x41, 0x52, 0x5f, 0x4d, 0x4f, 0x4e, 0x54, 0x48, 0x10, 0x17, 0x12, 0x15, 0x0a, 0x11, + 0x49, 0x4e, 0x54, 0x45, 0x52, 0x56, 0x41, 0x4c, 0x5f, 0x44, 0x41, 0x59, 0x5f, 0x54, 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, + 0x12, 0x08, 0x0a, 0x04, 0x4a, 0x53, 0x4f, 0x4e, 0x10, 0x1f, 0x12, 0x0a, 0x0a, 0x06, 0x56, 0x45, + 0x43, 0x54, 0x4f, 0x52, 0x10, 0x20, 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 ( @@ -1472,7 +1544,7 @@ func file_greptime_v1_common_proto_rawDescGZIP() []byte { } 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_msgTypes = make([]protoimpl.MessageInfo, 21) var file_greptime_v1_common_proto_goTypes = []interface{}{ (SemanticType)(0), // 0: greptime.v1.SemanticType (ColumnDataType)(0), // 1: greptime.v1.ColumnDataType @@ -1493,15 +1565,16 @@ var file_greptime_v1_common_proto_goTypes = []interface{}{ (*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 + (*VectorTypeExtension)(nil), // 19: greptime.v1.VectorTypeExtension + (*ColumnOptions)(nil), // 20: greptime.v1.ColumnOptions + nil, // 21: greptime.v1.QueryContext.ExtensionsEntry + nil, // 22: greptime.v1.RequestHeader.TracingContextEntry + nil, // 23: greptime.v1.ColumnOptions.OptionsEntry } var file_greptime_v1_common_proto_depIdxs = []int32{ - 20, // 0: greptime.v1.QueryContext.extensions:type_name -> greptime.v1.QueryContext.ExtensionsEntry + 21, // 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 + 22, // 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 @@ -1509,12 +1582,13 @@ var file_greptime_v1_common_proto_depIdxs = []int32{ 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 + 19, // 10: greptime.v1.ColumnDataTypeExtension.vector_type:type_name -> greptime.v1.VectorTypeExtension + 23, // 11: greptime.v1.ColumnOptions.options:type_name -> greptime.v1.ColumnOptions.OptionsEntry + 12, // [12:12] is the sub-list for method output_type + 12, // [12:12] is the sub-list for method input_type + 12, // [12:12] is the sub-list for extension type_name + 12, // [12:12] is the sub-list for extension extendee + 0, // [0:12] is the sub-list for field type_name } func init() { file_greptime_v1_common_proto_init() } @@ -1716,6 +1790,18 @@ func file_greptime_v1_common_proto_init() { } } file_greptime_v1_common_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*VectorTypeExtension); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_greptime_v1_common_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ColumnOptions); i { case 0: return &v.state @@ -1735,6 +1821,7 @@ func file_greptime_v1_common_proto_init() { file_greptime_v1_common_proto_msgTypes[14].OneofWrappers = []interface{}{ (*ColumnDataTypeExtension_DecimalType)(nil), (*ColumnDataTypeExtension_JsonType)(nil), + (*ColumnDataTypeExtension_VectorType)(nil), } type x struct{} out := protoimpl.TypeBuilder{ @@ -1742,7 +1829,7 @@ func file_greptime_v1_common_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_greptime_v1_common_proto_rawDesc, NumEnums: 3, - NumMessages: 20, + NumMessages: 21, 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 ee44c842..bc292476 100644 --- a/java/src/main/java/io/greptime/v1/Common.java +++ b/java/src/main/java/io/greptime/v1/Common.java @@ -248,6 +248,10 @@ public enum ColumnDataType * JSON = 31; */ JSON(31), + /** + * VECTOR = 32; + */ + VECTOR(32), UNRECOGNIZED(-1), ; @@ -363,6 +367,10 @@ public enum ColumnDataType * JSON = 31; */ public static final int JSON_VALUE = 31; + /** + * VECTOR = 32; + */ + public static final int VECTOR_VALUE = 32; public final int getNumber() { @@ -417,6 +425,7 @@ public static ColumnDataType forNumber(int value) { case 25: return INTERVAL_MONTH_DAY_NANO; case 30: return DECIMAL128; case 31: return JSON; + case 32: return VECTOR; default: return null; } } @@ -11612,6 +11621,21 @@ public interface ColumnDataTypeExtensionOrBuilder extends */ io.greptime.v1.Common.JsonTypeExtension getJsonType(); + /** + * .greptime.v1.VectorTypeExtension vector_type = 3; + * @return Whether the vectorType field is set. + */ + boolean hasVectorType(); + /** + * .greptime.v1.VectorTypeExtension vector_type = 3; + * @return The vectorType. + */ + io.greptime.v1.Common.VectorTypeExtension getVectorType(); + /** + * .greptime.v1.VectorTypeExtension vector_type = 3; + */ + io.greptime.v1.Common.VectorTypeExtensionOrBuilder getVectorTypeOrBuilder(); + public io.greptime.v1.Common.ColumnDataTypeExtension.TypeExtCase getTypeExtCase(); } /** @@ -11683,6 +11707,20 @@ private ColumnDataTypeExtension( typeExt_ = rawValue; break; } + case 26: { + io.greptime.v1.Common.VectorTypeExtension.Builder subBuilder = null; + if (typeExtCase_ == 3) { + subBuilder = ((io.greptime.v1.Common.VectorTypeExtension) typeExt_).toBuilder(); + } + typeExt_ = + input.readMessage(io.greptime.v1.Common.VectorTypeExtension.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((io.greptime.v1.Common.VectorTypeExtension) typeExt_); + typeExt_ = subBuilder.buildPartial(); + } + typeExtCase_ = 3; + break; + } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { @@ -11724,6 +11762,7 @@ public enum TypeExtCase com.google.protobuf.AbstractMessage.InternalOneOfEnum { DECIMAL_TYPE(1), JSON_TYPE(2), + VECTOR_TYPE(3), TYPEEXT_NOT_SET(0); private final int value; private TypeExtCase(int value) { @@ -11743,6 +11782,7 @@ public static TypeExtCase forNumber(int value) { switch (value) { case 1: return DECIMAL_TYPE; case 2: return JSON_TYPE; + case 3: return VECTOR_TYPE; case 0: return TYPEEXT_NOT_SET; default: return null; } @@ -11833,6 +11873,37 @@ public io.greptime.v1.Common.JsonTypeExtension getJsonType() { return io.greptime.v1.Common.JsonTypeExtension.JSON_BINARY; } + public static final int VECTOR_TYPE_FIELD_NUMBER = 3; + /** + * .greptime.v1.VectorTypeExtension vector_type = 3; + * @return Whether the vectorType field is set. + */ + @java.lang.Override + public boolean hasVectorType() { + return typeExtCase_ == 3; + } + /** + * .greptime.v1.VectorTypeExtension vector_type = 3; + * @return The vectorType. + */ + @java.lang.Override + public io.greptime.v1.Common.VectorTypeExtension getVectorType() { + if (typeExtCase_ == 3) { + return (io.greptime.v1.Common.VectorTypeExtension) typeExt_; + } + return io.greptime.v1.Common.VectorTypeExtension.getDefaultInstance(); + } + /** + * .greptime.v1.VectorTypeExtension vector_type = 3; + */ + @java.lang.Override + public io.greptime.v1.Common.VectorTypeExtensionOrBuilder getVectorTypeOrBuilder() { + if (typeExtCase_ == 3) { + return (io.greptime.v1.Common.VectorTypeExtension) typeExt_; + } + return io.greptime.v1.Common.VectorTypeExtension.getDefaultInstance(); + } + private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { @@ -11853,6 +11924,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (typeExtCase_ == 2) { output.writeEnum(2, ((java.lang.Integer) typeExt_)); } + if (typeExtCase_ == 3) { + output.writeMessage(3, (io.greptime.v1.Common.VectorTypeExtension) typeExt_); + } unknownFields.writeTo(output); } @@ -11870,6 +11944,10 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeEnumSize(2, ((java.lang.Integer) typeExt_)); } + if (typeExtCase_ == 3) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, (io.greptime.v1.Common.VectorTypeExtension) typeExt_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -11895,6 +11973,10 @@ public boolean equals(final java.lang.Object obj) { if (getJsonTypeValue() != other.getJsonTypeValue()) return false; break; + case 3: + if (!getVectorType() + .equals(other.getVectorType())) return false; + break; case 0: default: } @@ -11918,6 +12000,10 @@ public int hashCode() { hash = (37 * hash) + JSON_TYPE_FIELD_NUMBER; hash = (53 * hash) + getJsonTypeValue(); break; + case 3: + hash = (37 * hash) + VECTOR_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getVectorType().hashCode(); + break; case 0: default: } @@ -12096,6 +12182,13 @@ public io.greptime.v1.Common.ColumnDataTypeExtension buildPartial() { if (typeExtCase_ == 2) { result.typeExt_ = typeExt_; } + if (typeExtCase_ == 3) { + if (vectorTypeBuilder_ == null) { + result.typeExt_ = typeExt_; + } else { + result.typeExt_ = vectorTypeBuilder_.build(); + } + } result.typeExtCase_ = typeExtCase_; onBuilt(); return result; @@ -12154,6 +12247,10 @@ public Builder mergeFrom(io.greptime.v1.Common.ColumnDataTypeExtension other) { setJsonTypeValue(other.getJsonTypeValue()); break; } + case VECTOR_TYPE: { + mergeVectorType(other.getVectorType()); + break; + } case TYPEEXT_NOT_SET: { break; } @@ -12438,6 +12535,148 @@ public Builder clearJsonType() { } return this; } + + private com.google.protobuf.SingleFieldBuilderV3< + io.greptime.v1.Common.VectorTypeExtension, io.greptime.v1.Common.VectorTypeExtension.Builder, io.greptime.v1.Common.VectorTypeExtensionOrBuilder> vectorTypeBuilder_; + /** + * .greptime.v1.VectorTypeExtension vector_type = 3; + * @return Whether the vectorType field is set. + */ + @java.lang.Override + public boolean hasVectorType() { + return typeExtCase_ == 3; + } + /** + * .greptime.v1.VectorTypeExtension vector_type = 3; + * @return The vectorType. + */ + @java.lang.Override + public io.greptime.v1.Common.VectorTypeExtension getVectorType() { + if (vectorTypeBuilder_ == null) { + if (typeExtCase_ == 3) { + return (io.greptime.v1.Common.VectorTypeExtension) typeExt_; + } + return io.greptime.v1.Common.VectorTypeExtension.getDefaultInstance(); + } else { + if (typeExtCase_ == 3) { + return vectorTypeBuilder_.getMessage(); + } + return io.greptime.v1.Common.VectorTypeExtension.getDefaultInstance(); + } + } + /** + * .greptime.v1.VectorTypeExtension vector_type = 3; + */ + public Builder setVectorType(io.greptime.v1.Common.VectorTypeExtension value) { + if (vectorTypeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + typeExt_ = value; + onChanged(); + } else { + vectorTypeBuilder_.setMessage(value); + } + typeExtCase_ = 3; + return this; + } + /** + * .greptime.v1.VectorTypeExtension vector_type = 3; + */ + public Builder setVectorType( + io.greptime.v1.Common.VectorTypeExtension.Builder builderForValue) { + if (vectorTypeBuilder_ == null) { + typeExt_ = builderForValue.build(); + onChanged(); + } else { + vectorTypeBuilder_.setMessage(builderForValue.build()); + } + typeExtCase_ = 3; + return this; + } + /** + * .greptime.v1.VectorTypeExtension vector_type = 3; + */ + public Builder mergeVectorType(io.greptime.v1.Common.VectorTypeExtension value) { + if (vectorTypeBuilder_ == null) { + if (typeExtCase_ == 3 && + typeExt_ != io.greptime.v1.Common.VectorTypeExtension.getDefaultInstance()) { + typeExt_ = io.greptime.v1.Common.VectorTypeExtension.newBuilder((io.greptime.v1.Common.VectorTypeExtension) typeExt_) + .mergeFrom(value).buildPartial(); + } else { + typeExt_ = value; + } + onChanged(); + } else { + if (typeExtCase_ == 3) { + vectorTypeBuilder_.mergeFrom(value); + } else { + vectorTypeBuilder_.setMessage(value); + } + } + typeExtCase_ = 3; + return this; + } + /** + * .greptime.v1.VectorTypeExtension vector_type = 3; + */ + public Builder clearVectorType() { + if (vectorTypeBuilder_ == null) { + if (typeExtCase_ == 3) { + typeExtCase_ = 0; + typeExt_ = null; + onChanged(); + } + } else { + if (typeExtCase_ == 3) { + typeExtCase_ = 0; + typeExt_ = null; + } + vectorTypeBuilder_.clear(); + } + return this; + } + /** + * .greptime.v1.VectorTypeExtension vector_type = 3; + */ + public io.greptime.v1.Common.VectorTypeExtension.Builder getVectorTypeBuilder() { + return getVectorTypeFieldBuilder().getBuilder(); + } + /** + * .greptime.v1.VectorTypeExtension vector_type = 3; + */ + @java.lang.Override + public io.greptime.v1.Common.VectorTypeExtensionOrBuilder getVectorTypeOrBuilder() { + if ((typeExtCase_ == 3) && (vectorTypeBuilder_ != null)) { + return vectorTypeBuilder_.getMessageOrBuilder(); + } else { + if (typeExtCase_ == 3) { + return (io.greptime.v1.Common.VectorTypeExtension) typeExt_; + } + return io.greptime.v1.Common.VectorTypeExtension.getDefaultInstance(); + } + } + /** + * .greptime.v1.VectorTypeExtension vector_type = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.greptime.v1.Common.VectorTypeExtension, io.greptime.v1.Common.VectorTypeExtension.Builder, io.greptime.v1.Common.VectorTypeExtensionOrBuilder> + getVectorTypeFieldBuilder() { + if (vectorTypeBuilder_ == null) { + if (!(typeExtCase_ == 3)) { + typeExt_ = io.greptime.v1.Common.VectorTypeExtension.getDefaultInstance(); + } + vectorTypeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.greptime.v1.Common.VectorTypeExtension, io.greptime.v1.Common.VectorTypeExtension.Builder, io.greptime.v1.Common.VectorTypeExtensionOrBuilder>( + (io.greptime.v1.Common.VectorTypeExtension) typeExt_, + getParentForChildren(), + isClean()); + typeExt_ = null; + } + typeExtCase_ = 3; + onChanged();; + return vectorTypeBuilder_; + } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -13051,146 +13290,636 @@ public io.greptime.v1.Common.DecimalTypeExtension getDefaultInstanceForType() { } - public interface ColumnOptionsOrBuilder extends - // @@protoc_insertion_point(interface_extends:greptime.v1.ColumnOptions) + public interface VectorTypeExtensionOrBuilder extends + // @@protoc_insertion_point(interface_extends:greptime.v1.VectorTypeExtension) com.google.protobuf.MessageOrBuilder { /** - *
-     * Supported keys:
-     *   "fulltext":
-     *      A JSON encoded string containing full-text search options for the column.
-     *      The fulltext options JSON structure:
-     *      {
-     *        "enable": bool,          // Indicates whether full-text search is
-     *                                 // enabled for the column.
-     *        "analyzer": string,      // The language-specific text analyzer to
-     *                                 // use for indexing and searching text.
-     *                                 // Supported values: ["English" (Default), "Chinese"].
-     *        "case-sensitive": bool   // Indicates whether the text should be treated
-     *                                 // as case-sensitive during full-text search.
-     *      }
-     *      Example:
-     *      "fulltext": "{\"enable\": true, \"analyzer\": \"English\", \"case-sensitive\": false}"
-     * 
- * - * map<string, string> options = 1; - */ - int getOptionsCount(); - /** - *
-     * Supported keys:
-     *   "fulltext":
-     *      A JSON encoded string containing full-text search options for the column.
-     *      The fulltext options JSON structure:
-     *      {
-     *        "enable": bool,          // Indicates whether full-text search is
-     *                                 // enabled for the column.
-     *        "analyzer": string,      // The language-specific text analyzer to
-     *                                 // use for indexing and searching text.
-     *                                 // Supported values: ["English" (Default), "Chinese"].
-     *        "case-sensitive": bool   // Indicates whether the text should be treated
-     *                                 // as case-sensitive during full-text search.
-     *      }
-     *      Example:
-     *      "fulltext": "{\"enable\": true, \"analyzer\": \"English\", \"case-sensitive\": false}"
-     * 
- * - * map<string, string> options = 1; - */ - boolean containsOptions( - java.lang.String key); - /** - * Use {@link #getOptionsMap()} instead. - */ - @java.lang.Deprecated - java.util.Map - getOptions(); - /** - *
-     * Supported keys:
-     *   "fulltext":
-     *      A JSON encoded string containing full-text search options for the column.
-     *      The fulltext options JSON structure:
-     *      {
-     *        "enable": bool,          // Indicates whether full-text search is
-     *                                 // enabled for the column.
-     *        "analyzer": string,      // The language-specific text analyzer to
-     *                                 // use for indexing and searching text.
-     *                                 // Supported values: ["English" (Default), "Chinese"].
-     *        "case-sensitive": bool   // Indicates whether the text should be treated
-     *                                 // as case-sensitive during full-text search.
-     *      }
-     *      Example:
-     *      "fulltext": "{\"enable\": true, \"analyzer\": \"English\", \"case-sensitive\": false}"
-     * 
- * - * map<string, string> options = 1; - */ - java.util.Map - getOptionsMap(); - /** - *
-     * Supported keys:
-     *   "fulltext":
-     *      A JSON encoded string containing full-text search options for the column.
-     *      The fulltext options JSON structure:
-     *      {
-     *        "enable": bool,          // Indicates whether full-text search is
-     *                                 // enabled for the column.
-     *        "analyzer": string,      // The language-specific text analyzer to
-     *                                 // use for indexing and searching text.
-     *                                 // Supported values: ["English" (Default), "Chinese"].
-     *        "case-sensitive": bool   // Indicates whether the text should be treated
-     *                                 // as case-sensitive during full-text search.
-     *      }
-     *      Example:
-     *      "fulltext": "{\"enable\": true, \"analyzer\": \"English\", \"case-sensitive\": false}"
-     * 
- * - * map<string, string> options = 1; - */ - - /* nullable */ -java.lang.String getOptionsOrDefault( - java.lang.String key, - /* nullable */ -java.lang.String defaultValue); - /** - *
-     * Supported keys:
-     *   "fulltext":
-     *      A JSON encoded string containing full-text search options for the column.
-     *      The fulltext options JSON structure:
-     *      {
-     *        "enable": bool,          // Indicates whether full-text search is
-     *                                 // enabled for the column.
-     *        "analyzer": string,      // The language-specific text analyzer to
-     *                                 // use for indexing and searching text.
-     *                                 // Supported values: ["English" (Default), "Chinese"].
-     *        "case-sensitive": bool   // Indicates whether the text should be treated
-     *                                 // as case-sensitive during full-text search.
-     *      }
-     *      Example:
-     *      "fulltext": "{\"enable\": true, \"analyzer\": \"English\", \"case-sensitive\": false}"
-     * 
- * - * map<string, string> options = 1; + * uint32 dim = 1; + * @return The dim. */ - - java.lang.String getOptionsOrThrow( - java.lang.String key); + int getDim(); } /** - *
-   * Additional options for the column.
-   * 
- * - * Protobuf type {@code greptime.v1.ColumnOptions} + * Protobuf type {@code greptime.v1.VectorTypeExtension} */ - public static final class ColumnOptions extends + public static final class VectorTypeExtension extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:greptime.v1.ColumnOptions) + // @@protoc_insertion_point(message_implements:greptime.v1.VectorTypeExtension) + VectorTypeExtensionOrBuilder { + private static final long serialVersionUID = 0L; + // Use VectorTypeExtension.newBuilder() to construct. + private VectorTypeExtension(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private VectorTypeExtension() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new VectorTypeExtension(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private VectorTypeExtension( + 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: { + + dim_ = input.readUInt32(); + 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.Common.internal_static_greptime_v1_VectorTypeExtension_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.greptime.v1.Common.internal_static_greptime_v1_VectorTypeExtension_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.greptime.v1.Common.VectorTypeExtension.class, io.greptime.v1.Common.VectorTypeExtension.Builder.class); + } + + public static final int DIM_FIELD_NUMBER = 1; + private int dim_; + /** + * uint32 dim = 1; + * @return The dim. + */ + @java.lang.Override + public int getDim() { + return dim_; + } + + 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 (dim_ != 0) { + output.writeUInt32(1, dim_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (dim_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(1, dim_); + } + 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.Common.VectorTypeExtension)) { + return super.equals(obj); + } + io.greptime.v1.Common.VectorTypeExtension other = (io.greptime.v1.Common.VectorTypeExtension) obj; + + if (getDim() + != other.getDim()) 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) + DIM_FIELD_NUMBER; + hash = (53 * hash) + getDim(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.greptime.v1.Common.VectorTypeExtension parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.greptime.v1.Common.VectorTypeExtension 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.Common.VectorTypeExtension parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.greptime.v1.Common.VectorTypeExtension 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.Common.VectorTypeExtension parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.greptime.v1.Common.VectorTypeExtension parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.greptime.v1.Common.VectorTypeExtension parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.greptime.v1.Common.VectorTypeExtension 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.Common.VectorTypeExtension parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.greptime.v1.Common.VectorTypeExtension 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.Common.VectorTypeExtension parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.greptime.v1.Common.VectorTypeExtension 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.Common.VectorTypeExtension 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.VectorTypeExtension} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:greptime.v1.VectorTypeExtension) + io.greptime.v1.Common.VectorTypeExtensionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.greptime.v1.Common.internal_static_greptime_v1_VectorTypeExtension_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.greptime.v1.Common.internal_static_greptime_v1_VectorTypeExtension_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.greptime.v1.Common.VectorTypeExtension.class, io.greptime.v1.Common.VectorTypeExtension.Builder.class); + } + + // Construct using io.greptime.v1.Common.VectorTypeExtension.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(); + dim_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.greptime.v1.Common.internal_static_greptime_v1_VectorTypeExtension_descriptor; + } + + @java.lang.Override + public io.greptime.v1.Common.VectorTypeExtension getDefaultInstanceForType() { + return io.greptime.v1.Common.VectorTypeExtension.getDefaultInstance(); + } + + @java.lang.Override + public io.greptime.v1.Common.VectorTypeExtension build() { + io.greptime.v1.Common.VectorTypeExtension result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.greptime.v1.Common.VectorTypeExtension buildPartial() { + io.greptime.v1.Common.VectorTypeExtension result = new io.greptime.v1.Common.VectorTypeExtension(this); + result.dim_ = dim_; + 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 Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.greptime.v1.Common.VectorTypeExtension) { + return mergeFrom((io.greptime.v1.Common.VectorTypeExtension)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.greptime.v1.Common.VectorTypeExtension other) { + if (other == io.greptime.v1.Common.VectorTypeExtension.getDefaultInstance()) return this; + if (other.getDim() != 0) { + setDim(other.getDim()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @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.Common.VectorTypeExtension parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (io.greptime.v1.Common.VectorTypeExtension) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int dim_ ; + /** + * uint32 dim = 1; + * @return The dim. + */ + @java.lang.Override + public int getDim() { + return dim_; + } + /** + * uint32 dim = 1; + * @param value The dim to set. + * @return This builder for chaining. + */ + public Builder setDim(int value) { + + dim_ = value; + onChanged(); + return this; + } + /** + * uint32 dim = 1; + * @return This builder for chaining. + */ + public Builder clearDim() { + + dim_ = 0; + onChanged(); + return this; + } + @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.VectorTypeExtension) + } + + // @@protoc_insertion_point(class_scope:greptime.v1.VectorTypeExtension) + private static final io.greptime.v1.Common.VectorTypeExtension DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.greptime.v1.Common.VectorTypeExtension(); + } + + public static io.greptime.v1.Common.VectorTypeExtension getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VectorTypeExtension parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new VectorTypeExtension(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.Common.VectorTypeExtension getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ColumnOptionsOrBuilder extends + // @@protoc_insertion_point(interface_extends:greptime.v1.ColumnOptions) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Supported keys:
+     *   "fulltext":
+     *      A JSON encoded string containing full-text search options for the column.
+     *      The fulltext options JSON structure:
+     *      {
+     *        "enable": bool,          // Indicates whether full-text search is
+     *                                 // enabled for the column.
+     *        "analyzer": string,      // The language-specific text analyzer to
+     *                                 // use for indexing and searching text.
+     *                                 // Supported values: ["English" (Default), "Chinese"].
+     *        "case-sensitive": bool   // Indicates whether the text should be treated
+     *                                 // as case-sensitive during full-text search.
+     *      }
+     *      Example:
+     *      "fulltext": "{\"enable\": true, \"analyzer\": \"English\", \"case-sensitive\": false}"
+     * 
+ * + * map<string, string> options = 1; + */ + int getOptionsCount(); + /** + *
+     * Supported keys:
+     *   "fulltext":
+     *      A JSON encoded string containing full-text search options for the column.
+     *      The fulltext options JSON structure:
+     *      {
+     *        "enable": bool,          // Indicates whether full-text search is
+     *                                 // enabled for the column.
+     *        "analyzer": string,      // The language-specific text analyzer to
+     *                                 // use for indexing and searching text.
+     *                                 // Supported values: ["English" (Default), "Chinese"].
+     *        "case-sensitive": bool   // Indicates whether the text should be treated
+     *                                 // as case-sensitive during full-text search.
+     *      }
+     *      Example:
+     *      "fulltext": "{\"enable\": true, \"analyzer\": \"English\", \"case-sensitive\": false}"
+     * 
+ * + * map<string, string> options = 1; + */ + boolean containsOptions( + java.lang.String key); + /** + * Use {@link #getOptionsMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getOptions(); + /** + *
+     * Supported keys:
+     *   "fulltext":
+     *      A JSON encoded string containing full-text search options for the column.
+     *      The fulltext options JSON structure:
+     *      {
+     *        "enable": bool,          // Indicates whether full-text search is
+     *                                 // enabled for the column.
+     *        "analyzer": string,      // The language-specific text analyzer to
+     *                                 // use for indexing and searching text.
+     *                                 // Supported values: ["English" (Default), "Chinese"].
+     *        "case-sensitive": bool   // Indicates whether the text should be treated
+     *                                 // as case-sensitive during full-text search.
+     *      }
+     *      Example:
+     *      "fulltext": "{\"enable\": true, \"analyzer\": \"English\", \"case-sensitive\": false}"
+     * 
+ * + * map<string, string> options = 1; + */ + java.util.Map + getOptionsMap(); + /** + *
+     * Supported keys:
+     *   "fulltext":
+     *      A JSON encoded string containing full-text search options for the column.
+     *      The fulltext options JSON structure:
+     *      {
+     *        "enable": bool,          // Indicates whether full-text search is
+     *                                 // enabled for the column.
+     *        "analyzer": string,      // The language-specific text analyzer to
+     *                                 // use for indexing and searching text.
+     *                                 // Supported values: ["English" (Default), "Chinese"].
+     *        "case-sensitive": bool   // Indicates whether the text should be treated
+     *                                 // as case-sensitive during full-text search.
+     *      }
+     *      Example:
+     *      "fulltext": "{\"enable\": true, \"analyzer\": \"English\", \"case-sensitive\": false}"
+     * 
+ * + * map<string, string> options = 1; + */ + + /* nullable */ +java.lang.String getOptionsOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue); + /** + *
+     * Supported keys:
+     *   "fulltext":
+     *      A JSON encoded string containing full-text search options for the column.
+     *      The fulltext options JSON structure:
+     *      {
+     *        "enable": bool,          // Indicates whether full-text search is
+     *                                 // enabled for the column.
+     *        "analyzer": string,      // The language-specific text analyzer to
+     *                                 // use for indexing and searching text.
+     *                                 // Supported values: ["English" (Default), "Chinese"].
+     *        "case-sensitive": bool   // Indicates whether the text should be treated
+     *                                 // as case-sensitive during full-text search.
+     *      }
+     *      Example:
+     *      "fulltext": "{\"enable\": true, \"analyzer\": \"English\", \"case-sensitive\": false}"
+     * 
+ * + * map<string, string> options = 1; + */ + + java.lang.String getOptionsOrThrow( + java.lang.String key); + } + /** + *
+   * Additional options for the column.
+   * 
+ * + * 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. @@ -14182,6 +14911,11 @@ public io.greptime.v1.Common.ColumnOptions getDefaultInstanceForType() { private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_greptime_v1_DecimalTypeExtension_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_greptime_v1_VectorTypeExtension_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_greptime_v1_VectorTypeExtension_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_greptime_v1_ColumnOptions_descriptor; private static final @@ -14230,32 +14964,34 @@ 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\"\225\001\n\027ColumnDataTypeExtens" + + "\001(\003\022\n\n\002lo\030\002 \001(\003\"\316\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*" + - "\340\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\022\010\n\004JSON" + - "\020\037*$\n\021JsonTypeExtension\022\017\n\013JSON_BINARY\020\000" + - "BO\n\016io.greptime.v1B\006CommonZ5github.com/G" + - "reptimeTeam/greptime-proto/go/greptime/v" + - "1b\006proto3" + "\0162\036.greptime.v1.JsonTypeExtensionH\000\0227\n\013v" + + "ector_type\030\003 \001(\0132 .greptime.v1.VectorTyp" + + "eExtensionH\000B\n\n\010type_ext\"8\n\024DecimalTypeE" + + "xtension\022\021\n\tprecision\030\001 \001(\005\022\r\n\005scale\030\002 \001" + + "(\005\"\"\n\023VectorTypeExtension\022\013\n\003dim\030\001 \001(\r\"y" + + "\n\rColumnOptions\0228\n\007options\030\001 \003(\0132\'.grept" + + "ime.v1.ColumnOptions.OptionsEntry\032.\n\014Opt" + + "ionsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\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*\354\003\n\016ColumnDataType\022\013\n\007BOOLE" + + "AN\020\000\022\010\n\004INT8\020\001\022\t\n\005INT16\020\002\022\t\n\005INT32\020\003\022\t\n\005" + + "INT64\020\004\022\t\n\005UINT8\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\010DA" + + "TETIME\020\016\022\024\n\020TIMESTAMP_SECOND\020\017\022\031\n\025TIMEST" + + "AMP_MILLISECOND\020\020\022\031\n\025TIMESTAMP_MICROSECO" + + "ND\020\021\022\030\n\024TIMESTAMP_NANOSECOND\020\022\022\017\n\013TIME_S" + + "ECOND\020\023\022\024\n\020TIME_MILLISECOND\020\024\022\024\n\020TIME_MI" + + "CROSECOND\020\025\022\023\n\017TIME_NANOSECOND\020\026\022\027\n\023INTE" + + "RVAL_YEAR_MONTH\020\027\022\025\n\021INTERVAL_DAY_TIME\020\030" + + "\022\033\n\027INTERVAL_MONTH_DAY_NANO\020\031\022\016\n\nDECIMAL" + + "128\020\036\022\010\n\004JSON\020\037\022\n\n\006VECTOR\020 *$\n\021JsonTypeE" + + "xtension\022\017\n\013JSON_BINARY\020\000BO\n\016io.greptime" + + ".v1B\006CommonZ5github.com/GreptimeTeam/gre" + + "ptime-proto/go/greptime/v1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, @@ -14362,15 +15098,21 @@ 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", "JsonType", "TypeExt", }); + new java.lang.String[] { "DecimalType", "JsonType", "VectorType", "TypeExt", }); internal_static_greptime_v1_DecimalTypeExtension_descriptor = getDescriptor().getMessageTypes().get(15); internal_static_greptime_v1_DecimalTypeExtension_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_greptime_v1_DecimalTypeExtension_descriptor, new java.lang.String[] { "Precision", "Scale", }); - internal_static_greptime_v1_ColumnOptions_descriptor = + internal_static_greptime_v1_VectorTypeExtension_descriptor = getDescriptor().getMessageTypes().get(16); + internal_static_greptime_v1_VectorTypeExtension_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_greptime_v1_VectorTypeExtension_descriptor, + new java.lang.String[] { "Dim", }); + internal_static_greptime_v1_ColumnOptions_descriptor = + getDescriptor().getMessageTypes().get(17); internal_static_greptime_v1_ColumnOptions_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_greptime_v1_ColumnOptions_descriptor, diff --git a/java/src/main/java/io/greptime/v1/flow/Server.java b/java/src/main/java/io/greptime/v1/flow/Server.java index 115f06a4..cc987031 100644 --- a/java/src/main/java/io/greptime/v1/flow/Server.java +++ b/java/src/main/java/io/greptime/v1/flow/Server.java @@ -5628,6 +5628,16 @@ java.lang.String getFlowOptionsOrDefault( java.lang.String getFlowOptionsOrThrow( java.lang.String key); + + /** + *
+     * Set to true if the flow should be created or replaced.
+     * 
+ * + * bool is_create_or_replace = 9; + * @return The isCreateOrReplace. + */ + boolean getIsCreateOrReplace(); } /** *
@@ -5762,6 +5772,11 @@ private CreateRequest(
                   flowOptions__.getKey(), flowOptions__.getValue());
               break;
             }
+            case 72: {
+
+              isCreateOrReplace_ = input.readBool();
+              break;
+            }
             default: {
               if (!parseUnknownField(
                   input, unknownFields, extensionRegistry, tag)) {
@@ -6109,6 +6124,21 @@ public java.lang.String getFlowOptionsOrThrow(
       return map.get(key);
     }
 
+    public static final int IS_CREATE_OR_REPLACE_FIELD_NUMBER = 9;
+    private boolean isCreateOrReplace_;
+    /**
+     * 
+     * Set to true if the flow should be created or replaced.
+     * 
+ * + * bool is_create_or_replace = 9; + * @return The isCreateOrReplace. + */ + @java.lang.Override + public boolean getIsCreateOrReplace() { + return isCreateOrReplace_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { @@ -6150,6 +6180,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) internalGetFlowOptions(), FlowOptionsDefaultEntryHolder.defaultEntry, 8); + if (isCreateOrReplace_ != false) { + output.writeBool(9, isCreateOrReplace_); + } unknownFields.writeTo(output); } @@ -6195,6 +6228,10 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(8, flowOptions__); } + if (isCreateOrReplace_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(9, isCreateOrReplace_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -6235,6 +6272,8 @@ public boolean equals(final java.lang.Object obj) { .equals(other.getSql())) return false; if (!internalGetFlowOptions().equals( other.internalGetFlowOptions())) return false; + if (getIsCreateOrReplace() + != other.getIsCreateOrReplace()) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -6273,6 +6312,9 @@ public int hashCode() { hash = (37 * hash) + FLOW_OPTIONS_FIELD_NUMBER; hash = (53 * hash) + internalGetFlowOptions().hashCode(); } + hash = (37 * hash) + IS_CREATE_OR_REPLACE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getIsCreateOrReplace()); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -6466,6 +6508,8 @@ public Builder clear() { sql_ = ""; internalGetMutableFlowOptions().clear(); + isCreateOrReplace_ = false; + return this; } @@ -6522,6 +6566,7 @@ public io.greptime.v1.flow.Server.CreateRequest buildPartial() { result.sql_ = sql_; result.flowOptions_ = internalGetFlowOptions(); result.flowOptions_.makeImmutable(); + result.isCreateOrReplace_ = isCreateOrReplace_; onBuilt(); return result; } @@ -6618,6 +6663,9 @@ public Builder mergeFrom(io.greptime.v1.flow.Server.CreateRequest other) { } internalGetMutableFlowOptions().mergeFrom( other.internalGetFlowOptions()); + if (other.getIsCreateOrReplace() != false) { + setIsCreateOrReplace(other.getIsCreateOrReplace()); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -7594,6 +7642,49 @@ public Builder putAllFlowOptions( .putAll(values); return this; } + + private boolean isCreateOrReplace_ ; + /** + *
+       * Set to true if the flow should be created or replaced.
+       * 
+ * + * bool is_create_or_replace = 9; + * @return The isCreateOrReplace. + */ + @java.lang.Override + public boolean getIsCreateOrReplace() { + return isCreateOrReplace_; + } + /** + *
+       * Set to true if the flow should be created or replaced.
+       * 
+ * + * bool is_create_or_replace = 9; + * @param value The isCreateOrReplace to set. + * @return This builder for chaining. + */ + public Builder setIsCreateOrReplace(boolean value) { + + isCreateOrReplace_ = value; + onChanged(); + return this; + } + /** + *
+       * Set to true if the flow should be created or replaced.
+       * 
+ * + * bool is_create_or_replace = 9; + * @return This builder for chaining. + */ + public Builder clearIsCreateOrReplace() { + + isCreateOrReplace_ = false; + onChanged(); + return this; + } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -8980,7 +9071,7 @@ public io.greptime.v1.flow.Server.FlushFlow getDefaultInstanceForType() { ".greptime.v1.FlowId\022B\n\nextensions\030\004 \003(\0132" + "..greptime.v1.flow.FlowResponse.Extensio" + "nsEntry\0321\n\017ExtensionsEntry\022\013\n\003key\030\001 \001(\t\022" + - "\r\n\005value\030\002 \001(\014:\0028\001\"\376\002\n\rCreateRequest\022$\n\007" + + "\r\n\005value\030\002 \001(\014:\0028\001\"\234\003\n\rCreateRequest\022$\n\007" + "flow_id\030\001 \001(\0132\023.greptime.v1.FlowId\022.\n\020so" + "urce_table_ids\030\002 \003(\0132\024.greptime.v1.Table" + "Id\022/\n\017sink_table_name\030\003 \001(\0132\026.greptime.v" + @@ -8988,18 +9079,19 @@ public io.greptime.v1.flow.Server.FlushFlow getDefaultInstanceForType() { "\010\022.\n\014expire_after\030\005 \001(\0132\030.greptime.v1.Ex" + "pireAfter\022\017\n\007comment\030\006 \001(\t\022\013\n\003sql\030\007 \001(\t\022" + "F\n\014flow_options\030\010 \003(\01320.greptime.v1.flow" + - ".CreateRequest.FlowOptionsEntry\0322\n\020FlowO" + - "ptionsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:" + - "\0028\001\"3\n\013DropRequest\022$\n\007flow_id\030\001 \001(\0132\023.gr" + - "eptime.v1.FlowId\"1\n\tFlushFlow\022$\n\007flow_id" + - "\030\001 \001(\0132\023.greptime.v1.FlowId2\264\001\n\004Flow\022S\n\022" + - "HandleCreateRemove\022\035.greptime.v1.flow.Fl" + - "owRequest\032\036.greptime.v1.flow.FlowRespons" + - "e\022W\n\023HandleMirrorRequest\022 .greptime.v1.f" + - "low.InsertRequests\032\036.greptime.v1.flow.Fl" + - "owResponseBY\n\023io.greptime.v1.flowB\006Serve" + - "rZ:github.com/GreptimeTeam/greptime-prot" + - "o/go/greptime/v1/flowb\006proto3" + ".CreateRequest.FlowOptionsEntry\022\034\n\024is_cr" + + "eate_or_replace\030\t \001(\010\0322\n\020FlowOptionsEntr" + + "y\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"3\n\013Dro" + + "pRequest\022$\n\007flow_id\030\001 \001(\0132\023.greptime.v1." + + "FlowId\"1\n\tFlushFlow\022$\n\007flow_id\030\001 \001(\0132\023.g" + + "reptime.v1.FlowId2\264\001\n\004Flow\022S\n\022HandleCrea" + + "teRemove\022\035.greptime.v1.flow.FlowRequest\032" + + "\036.greptime.v1.flow.FlowResponse\022W\n\023Handl" + + "eMirrorRequest\022 .greptime.v1.flow.Insert" + + "Requests\032\036.greptime.v1.flow.FlowResponse" + + "BY\n\023io.greptime.v1.flowB\006ServerZ:github." + + "com/GreptimeTeam/greptime-proto/go/grept" + + "ime/v1/flowb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, @@ -9055,7 +9147,7 @@ public io.greptime.v1.flow.Server.FlushFlow getDefaultInstanceForType() { internal_static_greptime_v1_flow_CreateRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_greptime_v1_flow_CreateRequest_descriptor, - new java.lang.String[] { "FlowId", "SourceTableIds", "SinkTableName", "CreateIfNotExists", "ExpireAfter", "Comment", "Sql", "FlowOptions", }); + new java.lang.String[] { "FlowId", "SourceTableIds", "SinkTableName", "CreateIfNotExists", "ExpireAfter", "Comment", "Sql", "FlowOptions", "IsCreateOrReplace", }); internal_static_greptime_v1_flow_CreateRequest_FlowOptionsEntry_descriptor = internal_static_greptime_v1_flow_CreateRequest_descriptor.getNestedTypes().get(0); internal_static_greptime_v1_flow_CreateRequest_FlowOptionsEntry_fieldAccessorTable = new From 73c578e8769323a0d5827ac07bf205e21bc5a00e Mon Sep 17 00:00:00 2001 From: discord9 Date: Thu, 14 Nov 2024 11:07:50 +0800 Subject: [PATCH 3/6] refactor: rename --- proto/greptime/v1/flow/server.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proto/greptime/v1/flow/server.proto b/proto/greptime/v1/flow/server.proto index e4cd87a4..fa17e053 100644 --- a/proto/greptime/v1/flow/server.proto +++ b/proto/greptime/v1/flow/server.proto @@ -80,7 +80,7 @@ message CreateRequest { string sql = 7; map flow_options = 8; // Set to true if the flow should be created or replaced. - bool is_create_or_replace = 9; + bool is_replace = 9; } message DropRequest { FlowId flow_id = 1; } From e455152255c6fc99f41d78aa05ee360b58ee807b Mon Sep 17 00:00:00 2001 From: discord9 Date: Thu, 14 Nov 2024 11:08:16 +0800 Subject: [PATCH 4/6] chore: make all --- c++/greptime/v1/flow/server.pb.cc | 68 ++++++------- c++/greptime/v1/flow/server.pb.h | 42 ++++---- .../main/java/io/greptime/v1/flow/Server.java | 98 +++++++++---------- 3 files changed, 104 insertions(+), 104 deletions(-) diff --git a/c++/greptime/v1/flow/server.pb.cc b/c++/greptime/v1/flow/server.pb.cc index b8c75002..514824d9 100644 --- a/c++/greptime/v1/flow/server.pb.cc +++ b/c++/greptime/v1/flow/server.pb.cc @@ -138,7 +138,7 @@ PROTOBUF_CONSTEXPR CreateRequest::CreateRequest( , /*decltype(_impl_.sink_table_name_)*/nullptr , /*decltype(_impl_.expire_after_)*/nullptr , /*decltype(_impl_.create_if_not_exists_)*/false - , /*decltype(_impl_.is_create_or_replace_)*/false + , /*decltype(_impl_.is_replace_)*/false , /*decltype(_impl_._cached_size_)*/{}} {} struct CreateRequestDefaultTypeInternal { PROTOBUF_CONSTEXPR CreateRequestDefaultTypeInternal() @@ -271,7 +271,7 @@ const uint32_t TableStruct_greptime_2fv1_2fflow_2fserver_2eproto::offsets[] PROT PROTOBUF_FIELD_OFFSET(::greptime::v1::flow::CreateRequest, _impl_.comment_), PROTOBUF_FIELD_OFFSET(::greptime::v1::flow::CreateRequest, _impl_.sql_), PROTOBUF_FIELD_OFFSET(::greptime::v1::flow::CreateRequest, _impl_.flow_options_), - PROTOBUF_FIELD_OFFSET(::greptime::v1::flow::CreateRequest, _impl_.is_create_or_replace_), + PROTOBUF_FIELD_OFFSET(::greptime::v1::flow::CreateRequest, _impl_.is_replace_), ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::greptime::v1::flow::DropRequest, _internal_metadata_), ~0u, // no _extensions_ @@ -339,7 +339,7 @@ const char descriptor_table_protodef_greptime_2fv1_2fflow_2fserver_2eproto[] PRO ".greptime.v1.FlowId\022B\n\nextensions\030\004 \003(\0132" "..greptime.v1.flow.FlowResponse.Extensio" "nsEntry\0321\n\017ExtensionsEntry\022\013\n\003key\030\001 \001(\t\022" - "\r\n\005value\030\002 \001(\014:\0028\001\"\234\003\n\rCreateRequest\022$\n\007" + "\r\n\005value\030\002 \001(\014:\0028\001\"\222\003\n\rCreateRequest\022$\n\007" "flow_id\030\001 \001(\0132\023.greptime.v1.FlowId\022.\n\020so" "urce_table_ids\030\002 \003(\0132\024.greptime.v1.Table" "Id\022/\n\017sink_table_name\030\003 \001(\0132\026.greptime.v" @@ -347,19 +347,19 @@ const char descriptor_table_protodef_greptime_2fv1_2fflow_2fserver_2eproto[] PRO "\010\022.\n\014expire_after\030\005 \001(\0132\030.greptime.v1.Ex" "pireAfter\022\017\n\007comment\030\006 \001(\t\022\013\n\003sql\030\007 \001(\t\022" "F\n\014flow_options\030\010 \003(\01320.greptime.v1.flow" - ".CreateRequest.FlowOptionsEntry\022\034\n\024is_cr" - "eate_or_replace\030\t \001(\010\0322\n\020FlowOptionsEntr" - "y\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"3\n\013Dro" - "pRequest\022$\n\007flow_id\030\001 \001(\0132\023.greptime.v1." - "FlowId\"1\n\tFlushFlow\022$\n\007flow_id\030\001 \001(\0132\023.g" - "reptime.v1.FlowId2\264\001\n\004Flow\022S\n\022HandleCrea" - "teRemove\022\035.greptime.v1.flow.FlowRequest\032" - "\036.greptime.v1.flow.FlowResponse\022W\n\023Handl" - "eMirrorRequest\022 .greptime.v1.flow.Insert" - "Requests\032\036.greptime.v1.flow.FlowResponse" - "BY\n\023io.greptime.v1.flowB\006ServerZ:github." - "com/GreptimeTeam/greptime-proto/go/grept" - "ime/v1/flowb\006proto3" + ".CreateRequest.FlowOptionsEntry\022\022\n\nis_re" + "place\030\t \001(\010\0322\n\020FlowOptionsEntry\022\013\n\003key\030\001" + " \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"3\n\013DropRequest\022$" + "\n\007flow_id\030\001 \001(\0132\023.greptime.v1.FlowId\"1\n\t" + "FlushFlow\022$\n\007flow_id\030\001 \001(\0132\023.greptime.v1" + ".FlowId2\264\001\n\004Flow\022S\n\022HandleCreateRemove\022\035" + ".greptime.v1.flow.FlowRequest\032\036.greptime" + ".v1.flow.FlowResponse\022W\n\023HandleMirrorReq" + "uest\022 .greptime.v1.flow.InsertRequests\032\036" + ".greptime.v1.flow.FlowResponseBY\n\023io.gre" + "ptime.v1.flowB\006ServerZ:github.com/Grepti" + "meTeam/greptime-proto/go/greptime/v1/flo" + "wb\006proto3" ; static const ::_pbi::DescriptorTable* const descriptor_table_greptime_2fv1_2fflow_2fserver_2eproto_deps[3] = { &::descriptor_table_greptime_2fv1_2fcommon_2eproto, @@ -368,7 +368,7 @@ static const ::_pbi::DescriptorTable* const descriptor_table_greptime_2fv1_2fflo }; static ::_pbi::once_flag descriptor_table_greptime_2fv1_2fflow_2fserver_2eproto_once; const ::_pbi::DescriptorTable descriptor_table_greptime_2fv1_2fflow_2fserver_2eproto = { - false, false, 1739, descriptor_table_protodef_greptime_2fv1_2fflow_2fserver_2eproto, + false, false, 1729, descriptor_table_protodef_greptime_2fv1_2fflow_2fserver_2eproto, "greptime/v1/flow/server.proto", &descriptor_table_greptime_2fv1_2fflow_2fserver_2eproto_once, descriptor_table_greptime_2fv1_2fflow_2fserver_2eproto_deps, 3, 11, schemas, file_default_instances, TableStruct_greptime_2fv1_2fflow_2fserver_2eproto::offsets, @@ -1908,7 +1908,7 @@ CreateRequest::CreateRequest(const CreateRequest& from) , decltype(_impl_.sink_table_name_){nullptr} , decltype(_impl_.expire_after_){nullptr} , decltype(_impl_.create_if_not_exists_){} - , decltype(_impl_.is_create_or_replace_){} + , decltype(_impl_.is_replace_){} , /*decltype(_impl_._cached_size_)*/{}}; _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); @@ -1939,8 +1939,8 @@ CreateRequest::CreateRequest(const CreateRequest& from) _this->_impl_.expire_after_ = new ::greptime::v1::ExpireAfter(*from._impl_.expire_after_); } ::memcpy(&_impl_.create_if_not_exists_, &from._impl_.create_if_not_exists_, - static_cast(reinterpret_cast(&_impl_.is_create_or_replace_) - - reinterpret_cast(&_impl_.create_if_not_exists_)) + sizeof(_impl_.is_create_or_replace_)); + static_cast(reinterpret_cast(&_impl_.is_replace_) - + reinterpret_cast(&_impl_.create_if_not_exists_)) + sizeof(_impl_.is_replace_)); // @@protoc_insertion_point(copy_constructor:greptime.v1.flow.CreateRequest) } @@ -1957,7 +1957,7 @@ inline void CreateRequest::SharedCtor( , decltype(_impl_.sink_table_name_){nullptr} , decltype(_impl_.expire_after_){nullptr} , decltype(_impl_.create_if_not_exists_){false} - , decltype(_impl_.is_create_or_replace_){false} + , decltype(_impl_.is_replace_){false} , /*decltype(_impl_._cached_size_)*/{} }; _impl_.comment_.InitDefault(); @@ -2023,8 +2023,8 @@ void CreateRequest::Clear() { } _impl_.expire_after_ = nullptr; ::memset(&_impl_.create_if_not_exists_, 0, static_cast( - reinterpret_cast(&_impl_.is_create_or_replace_) - - reinterpret_cast(&_impl_.create_if_not_exists_)) + sizeof(_impl_.is_create_or_replace_)); + reinterpret_cast(&_impl_.is_replace_) - + reinterpret_cast(&_impl_.create_if_not_exists_)) + sizeof(_impl_.is_replace_)); _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } @@ -2112,10 +2112,10 @@ const char* CreateRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* } else goto handle_unusual; continue; - // bool is_create_or_replace = 9; + // bool is_replace = 9; case 9: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 72)) { - _impl_.is_create_or_replace_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + _impl_.is_replace_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; @@ -2234,10 +2234,10 @@ uint8_t* CreateRequest::_InternalSerialize( } } - // bool is_create_or_replace = 9; - if (this->_internal_is_create_or_replace() != 0) { + // bool is_replace = 9; + if (this->_internal_is_replace() != 0) { target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray(9, this->_internal_is_create_or_replace(), target); + target = ::_pbi::WireFormatLite::WriteBoolToArray(9, this->_internal_is_replace(), target); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { @@ -2312,8 +2312,8 @@ size_t CreateRequest::ByteSizeLong() const { total_size += 1 + 1; } - // bool is_create_or_replace = 9; - if (this->_internal_is_create_or_replace() != 0) { + // bool is_replace = 9; + if (this->_internal_is_replace() != 0) { total_size += 1 + 1; } @@ -2358,8 +2358,8 @@ void CreateRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const :: if (from._internal_create_if_not_exists() != 0) { _this->_internal_set_create_if_not_exists(from._internal_create_if_not_exists()); } - if (from._internal_is_create_or_replace() != 0) { - _this->_internal_set_is_create_or_replace(from._internal_is_create_or_replace()); + if (from._internal_is_replace() != 0) { + _this->_internal_set_is_replace(from._internal_is_replace()); } _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); } @@ -2391,8 +2391,8 @@ void CreateRequest::InternalSwap(CreateRequest* other) { &other->_impl_.sql_, rhs_arena ); ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(CreateRequest, _impl_.is_create_or_replace_) - + sizeof(CreateRequest::_impl_.is_create_or_replace_) + PROTOBUF_FIELD_OFFSET(CreateRequest, _impl_.is_replace_) + + sizeof(CreateRequest::_impl_.is_replace_) - PROTOBUF_FIELD_OFFSET(CreateRequest, _impl_.flow_id_)>( reinterpret_cast(&_impl_.flow_id_), reinterpret_cast(&other->_impl_.flow_id_)); diff --git a/c++/greptime/v1/flow/server.pb.h b/c++/greptime/v1/flow/server.pb.h index 403ea6be..7eb25db7 100644 --- a/c++/greptime/v1/flow/server.pb.h +++ b/c++/greptime/v1/flow/server.pb.h @@ -1282,7 +1282,7 @@ class CreateRequest final : kSinkTableNameFieldNumber = 3, kExpireAfterFieldNumber = 5, kCreateIfNotExistsFieldNumber = 4, - kIsCreateOrReplaceFieldNumber = 9, + kIsReplaceFieldNumber = 9, }; // repeated .greptime.v1.TableId source_table_ids = 2; int source_table_ids_size() const; @@ -1410,13 +1410,13 @@ class CreateRequest final : void _internal_set_create_if_not_exists(bool value); public: - // bool is_create_or_replace = 9; - void clear_is_create_or_replace(); - bool is_create_or_replace() const; - void set_is_create_or_replace(bool value); + // bool is_replace = 9; + void clear_is_replace(); + bool is_replace() const; + void set_is_replace(bool value); private: - bool _internal_is_create_or_replace() const; - void _internal_set_is_create_or_replace(bool value); + bool _internal_is_replace() const; + void _internal_set_is_replace(bool value); public: // @@protoc_insertion_point(class_scope:greptime.v1.flow.CreateRequest) @@ -1439,7 +1439,7 @@ class CreateRequest final : ::greptime::v1::TableName* sink_table_name_; ::greptime::v1::ExpireAfter* expire_after_; bool create_if_not_exists_; - bool is_create_or_replace_; + bool is_replace_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; }; union { Impl_ _impl_; }; @@ -2988,24 +2988,24 @@ CreateRequest::mutable_flow_options() { return _internal_mutable_flow_options(); } -// bool is_create_or_replace = 9; -inline void CreateRequest::clear_is_create_or_replace() { - _impl_.is_create_or_replace_ = false; +// bool is_replace = 9; +inline void CreateRequest::clear_is_replace() { + _impl_.is_replace_ = false; } -inline bool CreateRequest::_internal_is_create_or_replace() const { - return _impl_.is_create_or_replace_; +inline bool CreateRequest::_internal_is_replace() const { + return _impl_.is_replace_; } -inline bool CreateRequest::is_create_or_replace() const { - // @@protoc_insertion_point(field_get:greptime.v1.flow.CreateRequest.is_create_or_replace) - return _internal_is_create_or_replace(); +inline bool CreateRequest::is_replace() const { + // @@protoc_insertion_point(field_get:greptime.v1.flow.CreateRequest.is_replace) + return _internal_is_replace(); } -inline void CreateRequest::_internal_set_is_create_or_replace(bool value) { +inline void CreateRequest::_internal_set_is_replace(bool value) { - _impl_.is_create_or_replace_ = value; + _impl_.is_replace_ = value; } -inline void CreateRequest::set_is_create_or_replace(bool value) { - _internal_set_is_create_or_replace(value); - // @@protoc_insertion_point(field_set:greptime.v1.flow.CreateRequest.is_create_or_replace) +inline void CreateRequest::set_is_replace(bool value) { + _internal_set_is_replace(value); + // @@protoc_insertion_point(field_set:greptime.v1.flow.CreateRequest.is_replace) } // ------------------------------------------------------------------- diff --git a/java/src/main/java/io/greptime/v1/flow/Server.java b/java/src/main/java/io/greptime/v1/flow/Server.java index cc987031..a9a0d533 100644 --- a/java/src/main/java/io/greptime/v1/flow/Server.java +++ b/java/src/main/java/io/greptime/v1/flow/Server.java @@ -5634,10 +5634,10 @@ java.lang.String getFlowOptionsOrThrow( * Set to true if the flow should be created or replaced. *
* - * bool is_create_or_replace = 9; - * @return The isCreateOrReplace. + * bool is_replace = 9; + * @return The isReplace. */ - boolean getIsCreateOrReplace(); + boolean getIsReplace(); } /** *
@@ -5774,7 +5774,7 @@ private CreateRequest(
             }
             case 72: {
 
-              isCreateOrReplace_ = input.readBool();
+              isReplace_ = input.readBool();
               break;
             }
             default: {
@@ -6124,19 +6124,19 @@ public java.lang.String getFlowOptionsOrThrow(
       return map.get(key);
     }
 
-    public static final int IS_CREATE_OR_REPLACE_FIELD_NUMBER = 9;
-    private boolean isCreateOrReplace_;
+    public static final int IS_REPLACE_FIELD_NUMBER = 9;
+    private boolean isReplace_;
     /**
      * 
      * Set to true if the flow should be created or replaced.
      * 
* - * bool is_create_or_replace = 9; - * @return The isCreateOrReplace. + * bool is_replace = 9; + * @return The isReplace. */ @java.lang.Override - public boolean getIsCreateOrReplace() { - return isCreateOrReplace_; + public boolean getIsReplace() { + return isReplace_; } private byte memoizedIsInitialized = -1; @@ -6180,8 +6180,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) internalGetFlowOptions(), FlowOptionsDefaultEntryHolder.defaultEntry, 8); - if (isCreateOrReplace_ != false) { - output.writeBool(9, isCreateOrReplace_); + if (isReplace_ != false) { + output.writeBool(9, isReplace_); } unknownFields.writeTo(output); } @@ -6228,9 +6228,9 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(8, flowOptions__); } - if (isCreateOrReplace_ != false) { + if (isReplace_ != false) { size += com.google.protobuf.CodedOutputStream - .computeBoolSize(9, isCreateOrReplace_); + .computeBoolSize(9, isReplace_); } size += unknownFields.getSerializedSize(); memoizedSize = size; @@ -6272,8 +6272,8 @@ public boolean equals(final java.lang.Object obj) { .equals(other.getSql())) return false; if (!internalGetFlowOptions().equals( other.internalGetFlowOptions())) return false; - if (getIsCreateOrReplace() - != other.getIsCreateOrReplace()) return false; + if (getIsReplace() + != other.getIsReplace()) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -6312,9 +6312,9 @@ public int hashCode() { hash = (37 * hash) + FLOW_OPTIONS_FIELD_NUMBER; hash = (53 * hash) + internalGetFlowOptions().hashCode(); } - hash = (37 * hash) + IS_CREATE_OR_REPLACE_FIELD_NUMBER; + hash = (37 * hash) + IS_REPLACE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getIsCreateOrReplace()); + getIsReplace()); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -6508,7 +6508,7 @@ public Builder clear() { sql_ = ""; internalGetMutableFlowOptions().clear(); - isCreateOrReplace_ = false; + isReplace_ = false; return this; } @@ -6566,7 +6566,7 @@ public io.greptime.v1.flow.Server.CreateRequest buildPartial() { result.sql_ = sql_; result.flowOptions_ = internalGetFlowOptions(); result.flowOptions_.makeImmutable(); - result.isCreateOrReplace_ = isCreateOrReplace_; + result.isReplace_ = isReplace_; onBuilt(); return result; } @@ -6663,8 +6663,8 @@ public Builder mergeFrom(io.greptime.v1.flow.Server.CreateRequest other) { } internalGetMutableFlowOptions().mergeFrom( other.internalGetFlowOptions()); - if (other.getIsCreateOrReplace() != false) { - setIsCreateOrReplace(other.getIsCreateOrReplace()); + if (other.getIsReplace() != false) { + setIsReplace(other.getIsReplace()); } this.mergeUnknownFields(other.unknownFields); onChanged(); @@ -7643,31 +7643,31 @@ public Builder putAllFlowOptions( return this; } - private boolean isCreateOrReplace_ ; + private boolean isReplace_ ; /** *
        * Set to true if the flow should be created or replaced.
        * 
* - * bool is_create_or_replace = 9; - * @return The isCreateOrReplace. + * bool is_replace = 9; + * @return The isReplace. */ @java.lang.Override - public boolean getIsCreateOrReplace() { - return isCreateOrReplace_; + public boolean getIsReplace() { + return isReplace_; } /** *
        * Set to true if the flow should be created or replaced.
        * 
* - * bool is_create_or_replace = 9; - * @param value The isCreateOrReplace to set. + * bool is_replace = 9; + * @param value The isReplace to set. * @return This builder for chaining. */ - public Builder setIsCreateOrReplace(boolean value) { + public Builder setIsReplace(boolean value) { - isCreateOrReplace_ = value; + isReplace_ = value; onChanged(); return this; } @@ -7676,12 +7676,12 @@ public Builder setIsCreateOrReplace(boolean value) { * Set to true if the flow should be created or replaced. *
* - * bool is_create_or_replace = 9; + * bool is_replace = 9; * @return This builder for chaining. */ - public Builder clearIsCreateOrReplace() { + public Builder clearIsReplace() { - isCreateOrReplace_ = false; + isReplace_ = false; onChanged(); return this; } @@ -9071,7 +9071,7 @@ public io.greptime.v1.flow.Server.FlushFlow getDefaultInstanceForType() { ".greptime.v1.FlowId\022B\n\nextensions\030\004 \003(\0132" + "..greptime.v1.flow.FlowResponse.Extensio" + "nsEntry\0321\n\017ExtensionsEntry\022\013\n\003key\030\001 \001(\t\022" + - "\r\n\005value\030\002 \001(\014:\0028\001\"\234\003\n\rCreateRequest\022$\n\007" + + "\r\n\005value\030\002 \001(\014:\0028\001\"\222\003\n\rCreateRequest\022$\n\007" + "flow_id\030\001 \001(\0132\023.greptime.v1.FlowId\022.\n\020so" + "urce_table_ids\030\002 \003(\0132\024.greptime.v1.Table" + "Id\022/\n\017sink_table_name\030\003 \001(\0132\026.greptime.v" + @@ -9079,19 +9079,19 @@ public io.greptime.v1.flow.Server.FlushFlow getDefaultInstanceForType() { "\010\022.\n\014expire_after\030\005 \001(\0132\030.greptime.v1.Ex" + "pireAfter\022\017\n\007comment\030\006 \001(\t\022\013\n\003sql\030\007 \001(\t\022" + "F\n\014flow_options\030\010 \003(\01320.greptime.v1.flow" + - ".CreateRequest.FlowOptionsEntry\022\034\n\024is_cr" + - "eate_or_replace\030\t \001(\010\0322\n\020FlowOptionsEntr" + - "y\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"3\n\013Dro" + - "pRequest\022$\n\007flow_id\030\001 \001(\0132\023.greptime.v1." + - "FlowId\"1\n\tFlushFlow\022$\n\007flow_id\030\001 \001(\0132\023.g" + - "reptime.v1.FlowId2\264\001\n\004Flow\022S\n\022HandleCrea" + - "teRemove\022\035.greptime.v1.flow.FlowRequest\032" + - "\036.greptime.v1.flow.FlowResponse\022W\n\023Handl" + - "eMirrorRequest\022 .greptime.v1.flow.Insert" + - "Requests\032\036.greptime.v1.flow.FlowResponse" + - "BY\n\023io.greptime.v1.flowB\006ServerZ:github." + - "com/GreptimeTeam/greptime-proto/go/grept" + - "ime/v1/flowb\006proto3" + ".CreateRequest.FlowOptionsEntry\022\022\n\nis_re" + + "place\030\t \001(\010\0322\n\020FlowOptionsEntry\022\013\n\003key\030\001" + + " \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"3\n\013DropRequest\022$" + + "\n\007flow_id\030\001 \001(\0132\023.greptime.v1.FlowId\"1\n\t" + + "FlushFlow\022$\n\007flow_id\030\001 \001(\0132\023.greptime.v1" + + ".FlowId2\264\001\n\004Flow\022S\n\022HandleCreateRemove\022\035" + + ".greptime.v1.flow.FlowRequest\032\036.greptime" + + ".v1.flow.FlowResponse\022W\n\023HandleMirrorReq" + + "uest\022 .greptime.v1.flow.InsertRequests\032\036" + + ".greptime.v1.flow.FlowResponseBY\n\023io.gre" + + "ptime.v1.flowB\006ServerZ:github.com/Grepti" + + "meTeam/greptime-proto/go/greptime/v1/flo" + + "wb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, @@ -9147,7 +9147,7 @@ public io.greptime.v1.flow.Server.FlushFlow getDefaultInstanceForType() { internal_static_greptime_v1_flow_CreateRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_greptime_v1_flow_CreateRequest_descriptor, - new java.lang.String[] { "FlowId", "SourceTableIds", "SinkTableName", "CreateIfNotExists", "ExpireAfter", "Comment", "Sql", "FlowOptions", "IsCreateOrReplace", }); + new java.lang.String[] { "FlowId", "SourceTableIds", "SinkTableName", "CreateIfNotExists", "ExpireAfter", "Comment", "Sql", "FlowOptions", "IsReplace", }); internal_static_greptime_v1_flow_CreateRequest_FlowOptionsEntry_descriptor = internal_static_greptime_v1_flow_CreateRequest_descriptor.getNestedTypes().get(0); internal_static_greptime_v1_flow_CreateRequest_FlowOptionsEntry_fieldAccessorTable = new From 77975d34e262ec2dc628f4f72604ba9aeaaa03ee Mon Sep 17 00:00:00 2001 From: discord9 Date: Thu, 14 Nov 2024 11:17:42 +0800 Subject: [PATCH 5/6] refactor: more rename --- proto/greptime/v1/flow/server.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proto/greptime/v1/flow/server.proto b/proto/greptime/v1/flow/server.proto index fa17e053..078167aa 100644 --- a/proto/greptime/v1/flow/server.proto +++ b/proto/greptime/v1/flow/server.proto @@ -80,7 +80,7 @@ message CreateRequest { string sql = 7; map flow_options = 8; // Set to true if the flow should be created or replaced. - bool is_replace = 9; + bool or_replace = 9; } message DropRequest { FlowId flow_id = 1; } From b6cd0709c8ad16a920ccd05df74bcfb23bd484a9 Mon Sep 17 00:00:00 2001 From: discord9 Date: Thu, 14 Nov 2024 11:20:26 +0800 Subject: [PATCH 6/6] chore: make all --- c++/greptime/v1/flow/server.pb.cc | 40 +++++------ c++/greptime/v1/flow/server.pb.h | 42 +++++------ .../main/java/io/greptime/v1/flow/Server.java | 72 +++++++++---------- 3 files changed, 77 insertions(+), 77 deletions(-) diff --git a/c++/greptime/v1/flow/server.pb.cc b/c++/greptime/v1/flow/server.pb.cc index 514824d9..e1d054cd 100644 --- a/c++/greptime/v1/flow/server.pb.cc +++ b/c++/greptime/v1/flow/server.pb.cc @@ -138,7 +138,7 @@ PROTOBUF_CONSTEXPR CreateRequest::CreateRequest( , /*decltype(_impl_.sink_table_name_)*/nullptr , /*decltype(_impl_.expire_after_)*/nullptr , /*decltype(_impl_.create_if_not_exists_)*/false - , /*decltype(_impl_.is_replace_)*/false + , /*decltype(_impl_.or_replace_)*/false , /*decltype(_impl_._cached_size_)*/{}} {} struct CreateRequestDefaultTypeInternal { PROTOBUF_CONSTEXPR CreateRequestDefaultTypeInternal() @@ -271,7 +271,7 @@ const uint32_t TableStruct_greptime_2fv1_2fflow_2fserver_2eproto::offsets[] PROT PROTOBUF_FIELD_OFFSET(::greptime::v1::flow::CreateRequest, _impl_.comment_), PROTOBUF_FIELD_OFFSET(::greptime::v1::flow::CreateRequest, _impl_.sql_), PROTOBUF_FIELD_OFFSET(::greptime::v1::flow::CreateRequest, _impl_.flow_options_), - PROTOBUF_FIELD_OFFSET(::greptime::v1::flow::CreateRequest, _impl_.is_replace_), + PROTOBUF_FIELD_OFFSET(::greptime::v1::flow::CreateRequest, _impl_.or_replace_), ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::greptime::v1::flow::DropRequest, _internal_metadata_), ~0u, // no _extensions_ @@ -347,7 +347,7 @@ const char descriptor_table_protodef_greptime_2fv1_2fflow_2fserver_2eproto[] PRO "\010\022.\n\014expire_after\030\005 \001(\0132\030.greptime.v1.Ex" "pireAfter\022\017\n\007comment\030\006 \001(\t\022\013\n\003sql\030\007 \001(\t\022" "F\n\014flow_options\030\010 \003(\01320.greptime.v1.flow" - ".CreateRequest.FlowOptionsEntry\022\022\n\nis_re" + ".CreateRequest.FlowOptionsEntry\022\022\n\nor_re" "place\030\t \001(\010\0322\n\020FlowOptionsEntry\022\013\n\003key\030\001" " \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"3\n\013DropRequest\022$" "\n\007flow_id\030\001 \001(\0132\023.greptime.v1.FlowId\"1\n\t" @@ -1908,7 +1908,7 @@ CreateRequest::CreateRequest(const CreateRequest& from) , decltype(_impl_.sink_table_name_){nullptr} , decltype(_impl_.expire_after_){nullptr} , decltype(_impl_.create_if_not_exists_){} - , decltype(_impl_.is_replace_){} + , decltype(_impl_.or_replace_){} , /*decltype(_impl_._cached_size_)*/{}}; _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); @@ -1939,8 +1939,8 @@ CreateRequest::CreateRequest(const CreateRequest& from) _this->_impl_.expire_after_ = new ::greptime::v1::ExpireAfter(*from._impl_.expire_after_); } ::memcpy(&_impl_.create_if_not_exists_, &from._impl_.create_if_not_exists_, - static_cast(reinterpret_cast(&_impl_.is_replace_) - - reinterpret_cast(&_impl_.create_if_not_exists_)) + sizeof(_impl_.is_replace_)); + static_cast(reinterpret_cast(&_impl_.or_replace_) - + reinterpret_cast(&_impl_.create_if_not_exists_)) + sizeof(_impl_.or_replace_)); // @@protoc_insertion_point(copy_constructor:greptime.v1.flow.CreateRequest) } @@ -1957,7 +1957,7 @@ inline void CreateRequest::SharedCtor( , decltype(_impl_.sink_table_name_){nullptr} , decltype(_impl_.expire_after_){nullptr} , decltype(_impl_.create_if_not_exists_){false} - , decltype(_impl_.is_replace_){false} + , decltype(_impl_.or_replace_){false} , /*decltype(_impl_._cached_size_)*/{} }; _impl_.comment_.InitDefault(); @@ -2023,8 +2023,8 @@ void CreateRequest::Clear() { } _impl_.expire_after_ = nullptr; ::memset(&_impl_.create_if_not_exists_, 0, static_cast( - reinterpret_cast(&_impl_.is_replace_) - - reinterpret_cast(&_impl_.create_if_not_exists_)) + sizeof(_impl_.is_replace_)); + reinterpret_cast(&_impl_.or_replace_) - + reinterpret_cast(&_impl_.create_if_not_exists_)) + sizeof(_impl_.or_replace_)); _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } @@ -2112,10 +2112,10 @@ const char* CreateRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* } else goto handle_unusual; continue; - // bool is_replace = 9; + // bool or_replace = 9; case 9: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 72)) { - _impl_.is_replace_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + _impl_.or_replace_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); } else goto handle_unusual; @@ -2234,10 +2234,10 @@ uint8_t* CreateRequest::_InternalSerialize( } } - // bool is_replace = 9; - if (this->_internal_is_replace() != 0) { + // bool or_replace = 9; + if (this->_internal_or_replace() != 0) { target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray(9, this->_internal_is_replace(), target); + target = ::_pbi::WireFormatLite::WriteBoolToArray(9, this->_internal_or_replace(), target); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { @@ -2312,8 +2312,8 @@ size_t CreateRequest::ByteSizeLong() const { total_size += 1 + 1; } - // bool is_replace = 9; - if (this->_internal_is_replace() != 0) { + // bool or_replace = 9; + if (this->_internal_or_replace() != 0) { total_size += 1 + 1; } @@ -2358,8 +2358,8 @@ void CreateRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const :: if (from._internal_create_if_not_exists() != 0) { _this->_internal_set_create_if_not_exists(from._internal_create_if_not_exists()); } - if (from._internal_is_replace() != 0) { - _this->_internal_set_is_replace(from._internal_is_replace()); + if (from._internal_or_replace() != 0) { + _this->_internal_set_or_replace(from._internal_or_replace()); } _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); } @@ -2391,8 +2391,8 @@ void CreateRequest::InternalSwap(CreateRequest* other) { &other->_impl_.sql_, rhs_arena ); ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(CreateRequest, _impl_.is_replace_) - + sizeof(CreateRequest::_impl_.is_replace_) + PROTOBUF_FIELD_OFFSET(CreateRequest, _impl_.or_replace_) + + sizeof(CreateRequest::_impl_.or_replace_) - PROTOBUF_FIELD_OFFSET(CreateRequest, _impl_.flow_id_)>( reinterpret_cast(&_impl_.flow_id_), reinterpret_cast(&other->_impl_.flow_id_)); diff --git a/c++/greptime/v1/flow/server.pb.h b/c++/greptime/v1/flow/server.pb.h index 7eb25db7..eb79aaa6 100644 --- a/c++/greptime/v1/flow/server.pb.h +++ b/c++/greptime/v1/flow/server.pb.h @@ -1282,7 +1282,7 @@ class CreateRequest final : kSinkTableNameFieldNumber = 3, kExpireAfterFieldNumber = 5, kCreateIfNotExistsFieldNumber = 4, - kIsReplaceFieldNumber = 9, + kOrReplaceFieldNumber = 9, }; // repeated .greptime.v1.TableId source_table_ids = 2; int source_table_ids_size() const; @@ -1410,13 +1410,13 @@ class CreateRequest final : void _internal_set_create_if_not_exists(bool value); public: - // bool is_replace = 9; - void clear_is_replace(); - bool is_replace() const; - void set_is_replace(bool value); + // bool or_replace = 9; + void clear_or_replace(); + bool or_replace() const; + void set_or_replace(bool value); private: - bool _internal_is_replace() const; - void _internal_set_is_replace(bool value); + bool _internal_or_replace() const; + void _internal_set_or_replace(bool value); public: // @@protoc_insertion_point(class_scope:greptime.v1.flow.CreateRequest) @@ -1439,7 +1439,7 @@ class CreateRequest final : ::greptime::v1::TableName* sink_table_name_; ::greptime::v1::ExpireAfter* expire_after_; bool create_if_not_exists_; - bool is_replace_; + bool or_replace_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; }; union { Impl_ _impl_; }; @@ -2988,24 +2988,24 @@ CreateRequest::mutable_flow_options() { return _internal_mutable_flow_options(); } -// bool is_replace = 9; -inline void CreateRequest::clear_is_replace() { - _impl_.is_replace_ = false; +// bool or_replace = 9; +inline void CreateRequest::clear_or_replace() { + _impl_.or_replace_ = false; } -inline bool CreateRequest::_internal_is_replace() const { - return _impl_.is_replace_; +inline bool CreateRequest::_internal_or_replace() const { + return _impl_.or_replace_; } -inline bool CreateRequest::is_replace() const { - // @@protoc_insertion_point(field_get:greptime.v1.flow.CreateRequest.is_replace) - return _internal_is_replace(); +inline bool CreateRequest::or_replace() const { + // @@protoc_insertion_point(field_get:greptime.v1.flow.CreateRequest.or_replace) + return _internal_or_replace(); } -inline void CreateRequest::_internal_set_is_replace(bool value) { +inline void CreateRequest::_internal_set_or_replace(bool value) { - _impl_.is_replace_ = value; + _impl_.or_replace_ = value; } -inline void CreateRequest::set_is_replace(bool value) { - _internal_set_is_replace(value); - // @@protoc_insertion_point(field_set:greptime.v1.flow.CreateRequest.is_replace) +inline void CreateRequest::set_or_replace(bool value) { + _internal_set_or_replace(value); + // @@protoc_insertion_point(field_set:greptime.v1.flow.CreateRequest.or_replace) } // ------------------------------------------------------------------- diff --git a/java/src/main/java/io/greptime/v1/flow/Server.java b/java/src/main/java/io/greptime/v1/flow/Server.java index a9a0d533..cca776f6 100644 --- a/java/src/main/java/io/greptime/v1/flow/Server.java +++ b/java/src/main/java/io/greptime/v1/flow/Server.java @@ -5634,10 +5634,10 @@ java.lang.String getFlowOptionsOrThrow( * Set to true if the flow should be created or replaced. * * - * bool is_replace = 9; - * @return The isReplace. + * bool or_replace = 9; + * @return The orReplace. */ - boolean getIsReplace(); + boolean getOrReplace(); } /** *
@@ -5774,7 +5774,7 @@ private CreateRequest(
             }
             case 72: {
 
-              isReplace_ = input.readBool();
+              orReplace_ = input.readBool();
               break;
             }
             default: {
@@ -6124,19 +6124,19 @@ public java.lang.String getFlowOptionsOrThrow(
       return map.get(key);
     }
 
-    public static final int IS_REPLACE_FIELD_NUMBER = 9;
-    private boolean isReplace_;
+    public static final int OR_REPLACE_FIELD_NUMBER = 9;
+    private boolean orReplace_;
     /**
      * 
      * Set to true if the flow should be created or replaced.
      * 
* - * bool is_replace = 9; - * @return The isReplace. + * bool or_replace = 9; + * @return The orReplace. */ @java.lang.Override - public boolean getIsReplace() { - return isReplace_; + public boolean getOrReplace() { + return orReplace_; } private byte memoizedIsInitialized = -1; @@ -6180,8 +6180,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) internalGetFlowOptions(), FlowOptionsDefaultEntryHolder.defaultEntry, 8); - if (isReplace_ != false) { - output.writeBool(9, isReplace_); + if (orReplace_ != false) { + output.writeBool(9, orReplace_); } unknownFields.writeTo(output); } @@ -6228,9 +6228,9 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(8, flowOptions__); } - if (isReplace_ != false) { + if (orReplace_ != false) { size += com.google.protobuf.CodedOutputStream - .computeBoolSize(9, isReplace_); + .computeBoolSize(9, orReplace_); } size += unknownFields.getSerializedSize(); memoizedSize = size; @@ -6272,8 +6272,8 @@ public boolean equals(final java.lang.Object obj) { .equals(other.getSql())) return false; if (!internalGetFlowOptions().equals( other.internalGetFlowOptions())) return false; - if (getIsReplace() - != other.getIsReplace()) return false; + if (getOrReplace() + != other.getOrReplace()) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -6312,9 +6312,9 @@ public int hashCode() { hash = (37 * hash) + FLOW_OPTIONS_FIELD_NUMBER; hash = (53 * hash) + internalGetFlowOptions().hashCode(); } - hash = (37 * hash) + IS_REPLACE_FIELD_NUMBER; + hash = (37 * hash) + OR_REPLACE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getIsReplace()); + getOrReplace()); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -6508,7 +6508,7 @@ public Builder clear() { sql_ = ""; internalGetMutableFlowOptions().clear(); - isReplace_ = false; + orReplace_ = false; return this; } @@ -6566,7 +6566,7 @@ public io.greptime.v1.flow.Server.CreateRequest buildPartial() { result.sql_ = sql_; result.flowOptions_ = internalGetFlowOptions(); result.flowOptions_.makeImmutable(); - result.isReplace_ = isReplace_; + result.orReplace_ = orReplace_; onBuilt(); return result; } @@ -6663,8 +6663,8 @@ public Builder mergeFrom(io.greptime.v1.flow.Server.CreateRequest other) { } internalGetMutableFlowOptions().mergeFrom( other.internalGetFlowOptions()); - if (other.getIsReplace() != false) { - setIsReplace(other.getIsReplace()); + if (other.getOrReplace() != false) { + setOrReplace(other.getOrReplace()); } this.mergeUnknownFields(other.unknownFields); onChanged(); @@ -7643,31 +7643,31 @@ public Builder putAllFlowOptions( return this; } - private boolean isReplace_ ; + private boolean orReplace_ ; /** *
        * Set to true if the flow should be created or replaced.
        * 
* - * bool is_replace = 9; - * @return The isReplace. + * bool or_replace = 9; + * @return The orReplace. */ @java.lang.Override - public boolean getIsReplace() { - return isReplace_; + public boolean getOrReplace() { + return orReplace_; } /** *
        * Set to true if the flow should be created or replaced.
        * 
* - * bool is_replace = 9; - * @param value The isReplace to set. + * bool or_replace = 9; + * @param value The orReplace to set. * @return This builder for chaining. */ - public Builder setIsReplace(boolean value) { + public Builder setOrReplace(boolean value) { - isReplace_ = value; + orReplace_ = value; onChanged(); return this; } @@ -7676,12 +7676,12 @@ public Builder setIsReplace(boolean value) { * Set to true if the flow should be created or replaced. *
* - * bool is_replace = 9; + * bool or_replace = 9; * @return This builder for chaining. */ - public Builder clearIsReplace() { + public Builder clearOrReplace() { - isReplace_ = false; + orReplace_ = false; onChanged(); return this; } @@ -9079,7 +9079,7 @@ public io.greptime.v1.flow.Server.FlushFlow getDefaultInstanceForType() { "\010\022.\n\014expire_after\030\005 \001(\0132\030.greptime.v1.Ex" + "pireAfter\022\017\n\007comment\030\006 \001(\t\022\013\n\003sql\030\007 \001(\t\022" + "F\n\014flow_options\030\010 \003(\01320.greptime.v1.flow" + - ".CreateRequest.FlowOptionsEntry\022\022\n\nis_re" + + ".CreateRequest.FlowOptionsEntry\022\022\n\nor_re" + "place\030\t \001(\010\0322\n\020FlowOptionsEntry\022\013\n\003key\030\001" + " \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"3\n\013DropRequest\022$" + "\n\007flow_id\030\001 \001(\0132\023.greptime.v1.FlowId\"1\n\t" + @@ -9147,7 +9147,7 @@ public io.greptime.v1.flow.Server.FlushFlow getDefaultInstanceForType() { internal_static_greptime_v1_flow_CreateRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_greptime_v1_flow_CreateRequest_descriptor, - new java.lang.String[] { "FlowId", "SourceTableIds", "SinkTableName", "CreateIfNotExists", "ExpireAfter", "Comment", "Sql", "FlowOptions", "IsReplace", }); + new java.lang.String[] { "FlowId", "SourceTableIds", "SinkTableName", "CreateIfNotExists", "ExpireAfter", "Comment", "Sql", "FlowOptions", "OrReplace", }); internal_static_greptime_v1_flow_CreateRequest_FlowOptionsEntry_descriptor = internal_static_greptime_v1_flow_CreateRequest_descriptor.getNestedTypes().get(0); internal_static_greptime_v1_flow_CreateRequest_FlowOptionsEntry_fieldAccessorTable = new