diff --git a/build.rs b/build.rs index 6cd5683..374c996 100644 --- a/build.rs +++ b/build.rs @@ -50,7 +50,7 @@ fn main() { "region.RegionRequest.body", "#[derive(strum_macros::AsRefStr)]", ) - .bytes([".greptime.v1.region.ArrowIpc"]) + .bytes([".greptime.v1.ArrowIpc"]) .compile_protos( &[ "proto/greptime/v1/database.proto", diff --git a/c++/greptime/v1/common.pb.cc b/c++/greptime/v1/common.pb.cc index 8feb0e2..c137640 100644 --- a/c++/greptime/v1/common.pb.cc +++ b/c++/greptime/v1/common.pb.cc @@ -360,9 +360,24 @@ struct ColumnOptionsDefaultTypeInternal { }; }; PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ColumnOptionsDefaultTypeInternal _ColumnOptions_default_instance_; +PROTOBUF_CONSTEXPR ArrowIpc::ArrowIpc( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.schema_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.data_header_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.payload_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_._cached_size_)*/{}} {} +struct ArrowIpcDefaultTypeInternal { + PROTOBUF_CONSTEXPR ArrowIpcDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~ArrowIpcDefaultTypeInternal() {} + union { + ArrowIpc _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ArrowIpcDefaultTypeInternal _ArrowIpc_default_instance_; } // namespace v1 } // namespace greptime -static ::_pb::Metadata file_level_metadata_greptime_2fv1_2fcommon_2eproto[25]; +static ::_pb::Metadata file_level_metadata_greptime_2fv1_2fcommon_2eproto[26]; 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; @@ -583,6 +598,15 @@ const uint32_t TableStruct_greptime_2fv1_2fcommon_2eproto::offsets[] PROTOBUF_SE ~0u, // no _weak_field_map_ ~0u, // no _inlined_string_donated_ PROTOBUF_FIELD_OFFSET(::greptime::v1::ColumnOptions, _impl_.options_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::greptime::v1::ArrowIpc, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::greptime::v1::ArrowIpc, _impl_.schema_), + PROTOBUF_FIELD_OFFSET(::greptime::v1::ArrowIpc, _impl_.data_header_), + PROTOBUF_FIELD_OFFSET(::greptime::v1::ArrowIpc, _impl_.payload_), }; static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { { 0, 8, -1, sizeof(::greptime::v1::QueryContext_ExtensionsEntry_DoNotUse)}, @@ -610,6 +634,7 @@ static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protode { 192, -1, -1, sizeof(::greptime::v1::VectorTypeExtension)}, { 199, 207, -1, sizeof(::greptime::v1::ColumnOptions_OptionsEntry_DoNotUse)}, { 209, -1, -1, sizeof(::greptime::v1::ColumnOptions)}, + { 216, -1, -1, sizeof(::greptime::v1::ArrowIpc)}, }; static const ::_pb::Message* const file_default_instances[] = { @@ -638,6 +663,7 @@ static const ::_pb::Message* const file_default_instances[] = { &::greptime::v1::_VectorTypeExtension_default_instance_._instance, &::greptime::v1::_ColumnOptions_OptionsEntry_DoNotUse_default_instance_._instance, &::greptime::v1::_ColumnOptions_default_instance_._instance, + &::greptime::v1::_ArrowIpc_default_instance_._instance, }; const char descriptor_table_protodef_greptime_2fv1_2fcommon_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = @@ -691,30 +717,31 @@ const char descriptor_table_protodef_greptime_2fv1_2fcommon_2eproto[] PROTOBUF_S "nsion\022\013\n\003dim\030\001 \001(\r\"y\n\rColumnOptions\0228\n\007o" "ptions\030\001 \003(\0132\'.greptime.v1.ColumnOptions" ".OptionsEntry\032.\n\014OptionsEntry\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\016Col" - "umnDataType\022\013\n\007BOOLEAN\020\000\022\010\n\004INT8\020\001\022\t\n\005IN" - "T16\020\002\022\t\n\005INT32\020\003\022\t\n\005INT64\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\007FL" - "OAT32\020\t\022\013\n\007FLOAT64\020\n\022\n\n\006BINARY\020\013\022\n\n\006STRI" - "NG\020\014\022\010\n\004DATE\020\r\022\014\n\010DATETIME\020\016\022\024\n\020TIMESTAM" - "P_SECOND\020\017\022\031\n\025TIMESTAMP_MILLISECOND\020\020\022\031\n" - "\025TIMESTAMP_MICROSECOND\020\021\022\030\n\024TIMESTAMP_NA" - "NOSECOND\020\022\022\017\n\013TIME_SECOND\020\023\022\024\n\020TIME_MILL" - "ISECOND\020\024\022\024\n\020TIME_MICROSECOND\020\025\022\023\n\017TIME_" - "NANOSECOND\020\026\022\027\n\023INTERVAL_YEAR_MONTH\020\027\022\025\n" - "\021INTERVAL_DAY_TIME\020\030\022\033\n\027INTERVAL_MONTH_D" - "AY_NANO\020\031\022\016\n\nDECIMAL128\020\036\022\010\n\004JSON\020\037\022\n\n\006V" - "ECTOR\020 *$\n\021JsonTypeExtension\022\017\n\013JSON_BIN" - "ARY\020\000BO\n\016io.greptime.v1B\006CommonZ5github." - "com/GreptimeTeam/greptime-proto/go/grept" - "ime/v1b\006proto3" + "(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"@\n\010ArrowIpc\022\016\n\006sch" + "ema\030\001 \001(\014\022\023\n\013data_header\030\002 \001(\014\022\017\n\007payloa" + "d\030\003 \001(\014*1\n\014SemanticType\022\007\n\003TAG\020\000\022\t\n\005FIEL" + "D\020\001\022\r\n\tTIMESTAMP\020\002*\354\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\005UINT8\020\005\022\n\n\006UINT16\020\006\022\n\n\006" + "UINT32\020\007\022\n\n\006UINT64\020\010\022\013\n\007FLOAT32\020\t\022\013\n\007FLO" + "AT64\020\n\022\n\n\006BINARY\020\013\022\n\n\006STRING\020\014\022\010\n\004DATE\020\r" + "\022\014\n\010DATETIME\020\016\022\024\n\020TIMESTAMP_SECOND\020\017\022\031\n\025" + "TIMESTAMP_MILLISECOND\020\020\022\031\n\025TIMESTAMP_MIC" + "ROSECOND\020\021\022\030\n\024TIMESTAMP_NANOSECOND\020\022\022\017\n\013" + "TIME_SECOND\020\023\022\024\n\020TIME_MILLISECOND\020\024\022\024\n\020T" + "IME_MICROSECOND\020\025\022\023\n\017TIME_NANOSECOND\020\026\022\027" + "\n\023INTERVAL_YEAR_MONTH\020\027\022\025\n\021INTERVAL_DAY_" + "TIME\020\030\022\033\n\027INTERVAL_MONTH_DAY_NANO\020\031\022\016\n\nD" + "ECIMAL128\020\036\022\010\n\004JSON\020\037\022\n\n\006VECTOR\020 *$\n\021Jso" + "nTypeExtension\022\017\n\013JSON_BINARY\020\000BO\n\016io.gr" + "eptime.v1B\006CommonZ5github.com/GreptimeTe" + "am/greptime-proto/go/greptime/v1b\006proto3" ; static ::_pbi::once_flag descriptor_table_greptime_2fv1_2fcommon_2eproto_once; const ::_pbi::DescriptorTable descriptor_table_greptime_2fv1_2fcommon_2eproto = { - false, false, 2694, descriptor_table_protodef_greptime_2fv1_2fcommon_2eproto, + false, false, 2760, descriptor_table_protodef_greptime_2fv1_2fcommon_2eproto, "greptime/v1/common.proto", - &descriptor_table_greptime_2fv1_2fcommon_2eproto_once, nullptr, 0, 25, + &descriptor_table_greptime_2fv1_2fcommon_2eproto_once, nullptr, 0, 26, 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, @@ -5920,6 +5947,294 @@ void ColumnOptions::InternalSwap(ColumnOptions* other) { file_level_metadata_greptime_2fv1_2fcommon_2eproto[24]); } +// =================================================================== + +class ArrowIpc::_Internal { + public: +}; + +ArrowIpc::ArrowIpc(::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.ArrowIpc) +} +ArrowIpc::ArrowIpc(const ArrowIpc& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + ArrowIpc* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.schema_){} + , decltype(_impl_.data_header_){} + , decltype(_impl_.payload_){} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _impl_.schema_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.schema_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_schema().empty()) { + _this->_impl_.schema_.Set(from._internal_schema(), + _this->GetArenaForAllocation()); + } + _impl_.data_header_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.data_header_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_data_header().empty()) { + _this->_impl_.data_header_.Set(from._internal_data_header(), + _this->GetArenaForAllocation()); + } + _impl_.payload_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.payload_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_payload().empty()) { + _this->_impl_.payload_.Set(from._internal_payload(), + _this->GetArenaForAllocation()); + } + // @@protoc_insertion_point(copy_constructor:greptime.v1.ArrowIpc) +} + +inline void ArrowIpc::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.schema_){} + , decltype(_impl_.data_header_){} + , decltype(_impl_.payload_){} + , /*decltype(_impl_._cached_size_)*/{} + }; + _impl_.schema_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.schema_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.data_header_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.data_header_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.payload_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.payload_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +ArrowIpc::~ArrowIpc() { + // @@protoc_insertion_point(destructor:greptime.v1.ArrowIpc) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void ArrowIpc::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.schema_.Destroy(); + _impl_.data_header_.Destroy(); + _impl_.payload_.Destroy(); +} + +void ArrowIpc::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void ArrowIpc::Clear() { +// @@protoc_insertion_point(message_clear_start:greptime.v1.ArrowIpc) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.schema_.ClearToEmpty(); + _impl_.data_header_.ClearToEmpty(); + _impl_.payload_.ClearToEmpty(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* ArrowIpc::_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) { + // bytes schema = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_schema(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // bytes data_header = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + auto str = _internal_mutable_data_header(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // bytes payload = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { + auto str = _internal_mutable_payload(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + 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* ArrowIpc::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:greptime.v1.ArrowIpc) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // bytes schema = 1; + if (!this->_internal_schema().empty()) { + target = stream->WriteBytesMaybeAliased( + 1, this->_internal_schema(), target); + } + + // bytes data_header = 2; + if (!this->_internal_data_header().empty()) { + target = stream->WriteBytesMaybeAliased( + 2, this->_internal_data_header(), target); + } + + // bytes payload = 3; + if (!this->_internal_payload().empty()) { + target = stream->WriteBytesMaybeAliased( + 3, this->_internal_payload(), 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.ArrowIpc) + return target; +} + +size_t ArrowIpc::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:greptime.v1.ArrowIpc) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // bytes schema = 1; + if (!this->_internal_schema().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_schema()); + } + + // bytes data_header = 2; + if (!this->_internal_data_header().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_data_header()); + } + + // bytes payload = 3; + if (!this->_internal_payload().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_payload()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ArrowIpc::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + ArrowIpc::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ArrowIpc::GetClassData() const { return &_class_data_; } + + +void ArrowIpc::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.ArrowIpc) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (!from._internal_schema().empty()) { + _this->_internal_set_schema(from._internal_schema()); + } + if (!from._internal_data_header().empty()) { + _this->_internal_set_data_header(from._internal_data_header()); + } + if (!from._internal_payload().empty()) { + _this->_internal_set_payload(from._internal_payload()); + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void ArrowIpc::CopyFrom(const ArrowIpc& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:greptime.v1.ArrowIpc) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ArrowIpc::IsInitialized() const { + return true; +} + +void ArrowIpc::InternalSwap(ArrowIpc* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.schema_, lhs_arena, + &other->_impl_.schema_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.data_header_, lhs_arena, + &other->_impl_.data_header_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.payload_, lhs_arena, + &other->_impl_.payload_, rhs_arena + ); +} + +::PROTOBUF_NAMESPACE_ID::Metadata ArrowIpc::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[25]); +} + // @@protoc_insertion_point(namespace_scope) } // namespace v1 } // namespace greptime @@ -6024,6 +6339,10 @@ template<> PROTOBUF_NOINLINE ::greptime::v1::ColumnOptions* Arena::CreateMaybeMessage< ::greptime::v1::ColumnOptions >(Arena* arena) { return Arena::CreateMessageInternal< ::greptime::v1::ColumnOptions >(arena); } +template<> PROTOBUF_NOINLINE ::greptime::v1::ArrowIpc* +Arena::CreateMaybeMessage< ::greptime::v1::ArrowIpc >(Arena* arena) { + return Arena::CreateMessageInternal< ::greptime::v1::ArrowIpc >(arena); +} PROTOBUF_NAMESPACE_CLOSE // @@protoc_insertion_point(global_scope) diff --git a/c++/greptime/v1/common.pb.h b/c++/greptime/v1/common.pb.h index 1711ac8..2982f7c 100644 --- a/c++/greptime/v1/common.pb.h +++ b/c++/greptime/v1/common.pb.h @@ -53,6 +53,9 @@ namespace v1 { class AffectedRows; struct AffectedRowsDefaultTypeInternal; extern AffectedRowsDefaultTypeInternal _AffectedRows_default_instance_; +class ArrowIpc; +struct ArrowIpcDefaultTypeInternal; +extern ArrowIpcDefaultTypeInternal _ArrowIpc_default_instance_; class AuthHeader; struct AuthHeaderDefaultTypeInternal; extern AuthHeaderDefaultTypeInternal _AuthHeader_default_instance_; @@ -129,6 +132,7 @@ extern VectorTypeExtensionDefaultTypeInternal _VectorTypeExtension_default_insta } // namespace greptime PROTOBUF_NAMESPACE_OPEN template<> ::greptime::v1::AffectedRows* Arena::CreateMaybeMessage<::greptime::v1::AffectedRows>(Arena*); +template<> ::greptime::v1::ArrowIpc* Arena::CreateMaybeMessage<::greptime::v1::ArrowIpc>(Arena*); template<> ::greptime::v1::AuthHeader* Arena::CreateMaybeMessage<::greptime::v1::AuthHeader>(Arena*); template<> ::greptime::v1::Basic* Arena::CreateMaybeMessage<::greptime::v1::Basic>(Arena*); template<> ::greptime::v1::ColumnDataTypeExtension* Arena::CreateMaybeMessage<::greptime::v1::ColumnDataTypeExtension>(Arena*); @@ -3896,6 +3900,191 @@ class ColumnOptions final : union { Impl_ _impl_; }; friend struct ::TableStruct_greptime_2fv1_2fcommon_2eproto; }; +// ------------------------------------------------------------------- + +class ArrowIpc final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:greptime.v1.ArrowIpc) */ { + public: + inline ArrowIpc() : ArrowIpc(nullptr) {} + ~ArrowIpc() override; + explicit PROTOBUF_CONSTEXPR ArrowIpc(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ArrowIpc(const ArrowIpc& from); + ArrowIpc(ArrowIpc&& from) noexcept + : ArrowIpc() { + *this = ::std::move(from); + } + + inline ArrowIpc& operator=(const ArrowIpc& from) { + CopyFrom(from); + return *this; + } + inline ArrowIpc& operator=(ArrowIpc&& 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 ArrowIpc& default_instance() { + return *internal_default_instance(); + } + static inline const ArrowIpc* internal_default_instance() { + return reinterpret_cast( + &_ArrowIpc_default_instance_); + } + static constexpr int kIndexInFileMessages = + 25; + + friend void swap(ArrowIpc& a, ArrowIpc& b) { + a.Swap(&b); + } + inline void Swap(ArrowIpc* 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(ArrowIpc* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ArrowIpc* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const ArrowIpc& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const ArrowIpc& from) { + ArrowIpc::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(ArrowIpc* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "greptime.v1.ArrowIpc"; + } + protected: + explicit ArrowIpc(::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 { + kSchemaFieldNumber = 1, + kDataHeaderFieldNumber = 2, + kPayloadFieldNumber = 3, + }; + // bytes schema = 1; + void clear_schema(); + const std::string& schema() const; + template + void set_schema(ArgT0&& arg0, ArgT... args); + std::string* mutable_schema(); + PROTOBUF_NODISCARD std::string* release_schema(); + void set_allocated_schema(std::string* schema); + private: + const std::string& _internal_schema() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_schema(const std::string& value); + std::string* _internal_mutable_schema(); + public: + + // bytes data_header = 2; + void clear_data_header(); + const std::string& data_header() const; + template + void set_data_header(ArgT0&& arg0, ArgT... args); + std::string* mutable_data_header(); + PROTOBUF_NODISCARD std::string* release_data_header(); + void set_allocated_data_header(std::string* data_header); + private: + const std::string& _internal_data_header() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_data_header(const std::string& value); + std::string* _internal_mutable_data_header(); + public: + + // bytes payload = 3; + void clear_payload(); + const std::string& payload() const; + template + void set_payload(ArgT0&& arg0, ArgT... args); + std::string* mutable_payload(); + PROTOBUF_NODISCARD std::string* release_payload(); + void set_allocated_payload(std::string* payload); + private: + const std::string& _internal_payload() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_payload(const std::string& value); + std::string* _internal_mutable_payload(); + public: + + // @@protoc_insertion_point(class_scope:greptime.v1.ArrowIpc) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr schema_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr data_header_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr payload_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_greptime_2fv1_2fcommon_2eproto; +}; // =================================================================== @@ -6040,6 +6229,160 @@ ColumnOptions::mutable_options() { return _internal_mutable_options(); } +// ------------------------------------------------------------------- + +// ArrowIpc + +// bytes schema = 1; +inline void ArrowIpc::clear_schema() { + _impl_.schema_.ClearToEmpty(); +} +inline const std::string& ArrowIpc::schema() const { + // @@protoc_insertion_point(field_get:greptime.v1.ArrowIpc.schema) + return _internal_schema(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void ArrowIpc::set_schema(ArgT0&& arg0, ArgT... args) { + + _impl_.schema_.SetBytes(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:greptime.v1.ArrowIpc.schema) +} +inline std::string* ArrowIpc::mutable_schema() { + std::string* _s = _internal_mutable_schema(); + // @@protoc_insertion_point(field_mutable:greptime.v1.ArrowIpc.schema) + return _s; +} +inline const std::string& ArrowIpc::_internal_schema() const { + return _impl_.schema_.Get(); +} +inline void ArrowIpc::_internal_set_schema(const std::string& value) { + + _impl_.schema_.Set(value, GetArenaForAllocation()); +} +inline std::string* ArrowIpc::_internal_mutable_schema() { + + return _impl_.schema_.Mutable(GetArenaForAllocation()); +} +inline std::string* ArrowIpc::release_schema() { + // @@protoc_insertion_point(field_release:greptime.v1.ArrowIpc.schema) + return _impl_.schema_.Release(); +} +inline void ArrowIpc::set_allocated_schema(std::string* schema) { + if (schema != nullptr) { + + } else { + + } + _impl_.schema_.SetAllocated(schema, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.schema_.IsDefault()) { + _impl_.schema_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:greptime.v1.ArrowIpc.schema) +} + +// bytes data_header = 2; +inline void ArrowIpc::clear_data_header() { + _impl_.data_header_.ClearToEmpty(); +} +inline const std::string& ArrowIpc::data_header() const { + // @@protoc_insertion_point(field_get:greptime.v1.ArrowIpc.data_header) + return _internal_data_header(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void ArrowIpc::set_data_header(ArgT0&& arg0, ArgT... args) { + + _impl_.data_header_.SetBytes(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:greptime.v1.ArrowIpc.data_header) +} +inline std::string* ArrowIpc::mutable_data_header() { + std::string* _s = _internal_mutable_data_header(); + // @@protoc_insertion_point(field_mutable:greptime.v1.ArrowIpc.data_header) + return _s; +} +inline const std::string& ArrowIpc::_internal_data_header() const { + return _impl_.data_header_.Get(); +} +inline void ArrowIpc::_internal_set_data_header(const std::string& value) { + + _impl_.data_header_.Set(value, GetArenaForAllocation()); +} +inline std::string* ArrowIpc::_internal_mutable_data_header() { + + return _impl_.data_header_.Mutable(GetArenaForAllocation()); +} +inline std::string* ArrowIpc::release_data_header() { + // @@protoc_insertion_point(field_release:greptime.v1.ArrowIpc.data_header) + return _impl_.data_header_.Release(); +} +inline void ArrowIpc::set_allocated_data_header(std::string* data_header) { + if (data_header != nullptr) { + + } else { + + } + _impl_.data_header_.SetAllocated(data_header, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.data_header_.IsDefault()) { + _impl_.data_header_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:greptime.v1.ArrowIpc.data_header) +} + +// bytes payload = 3; +inline void ArrowIpc::clear_payload() { + _impl_.payload_.ClearToEmpty(); +} +inline const std::string& ArrowIpc::payload() const { + // @@protoc_insertion_point(field_get:greptime.v1.ArrowIpc.payload) + return _internal_payload(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void ArrowIpc::set_payload(ArgT0&& arg0, ArgT... args) { + + _impl_.payload_.SetBytes(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:greptime.v1.ArrowIpc.payload) +} +inline std::string* ArrowIpc::mutable_payload() { + std::string* _s = _internal_mutable_payload(); + // @@protoc_insertion_point(field_mutable:greptime.v1.ArrowIpc.payload) + return _s; +} +inline const std::string& ArrowIpc::_internal_payload() const { + return _impl_.payload_.Get(); +} +inline void ArrowIpc::_internal_set_payload(const std::string& value) { + + _impl_.payload_.Set(value, GetArenaForAllocation()); +} +inline std::string* ArrowIpc::_internal_mutable_payload() { + + return _impl_.payload_.Mutable(GetArenaForAllocation()); +} +inline std::string* ArrowIpc::release_payload() { + // @@protoc_insertion_point(field_release:greptime.v1.ArrowIpc.payload) + return _impl_.payload_.Release(); +} +inline void ArrowIpc::set_allocated_payload(std::string* payload) { + if (payload != nullptr) { + + } else { + + } + _impl_.payload_.SetAllocated(payload, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.payload_.IsDefault()) { + _impl_.payload_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:greptime.v1.ArrowIpc.payload) +} + #ifdef __GNUC__ #pragma GCC diagnostic pop #endif // __GNUC__ @@ -6091,6 +6434,8 @@ ColumnOptions::mutable_options() { // ------------------------------------------------------------------- +// ------------------------------------------------------------------- + // @@protoc_insertion_point(namespace_scope) diff --git a/c++/greptime/v1/region/server.pb.cc b/c++/greptime/v1/region/server.pb.cc index b1d239b..a205ce7 100644 --- a/c++/greptime/v1/region/server.pb.cc +++ b/c++/greptime/v1/region/server.pb.cc @@ -432,7 +432,8 @@ struct RegionColumnDefDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RegionColumnDefDefaultTypeInternal _RegionColumnDef_default_instance_; PROTOBUF_CONSTEXPR BulkInsertRequest::BulkInsertRequest( ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.body_)*/{} + /*decltype(_impl_.region_id_)*/uint64_t{0u} + , /*decltype(_impl_.body_)*/{} , /*decltype(_impl_._cached_size_)*/{} , /*decltype(_impl_._oneof_case_)*/{}} {} struct BulkInsertRequestDefaultTypeInternal { @@ -444,22 +445,6 @@ struct BulkInsertRequestDefaultTypeInternal { }; }; PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 BulkInsertRequestDefaultTypeInternal _BulkInsertRequest_default_instance_; -PROTOBUF_CONSTEXPR ArrowIpc::ArrowIpc( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.schema_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.data_header_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.payload_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.region_id_)*/uint64_t{0u} - , /*decltype(_impl_._cached_size_)*/{}} {} -struct ArrowIpcDefaultTypeInternal { - PROTOBUF_CONSTEXPR ArrowIpcDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} - ~ArrowIpcDefaultTypeInternal() {} - union { - ArrowIpc _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ArrowIpcDefaultTypeInternal _ArrowIpc_default_instance_; PROTOBUF_CONSTEXPR MitoManifestInfo::MitoManifestInfo( ::_pbi::ConstantInitialized): _impl_{ /*decltype(_impl_.data_manifest_version_)*/uint64_t{0u} @@ -505,7 +490,7 @@ PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORIT } // namespace region } // namespace v1 } // namespace greptime -static ::_pb::Metadata file_level_metadata_greptime_2fv1_2fregion_2fserver_2eproto[35]; +static ::_pb::Metadata file_level_metadata_greptime_2fv1_2fregion_2fserver_2eproto[34]; static constexpr ::_pb::EnumDescriptor const** file_level_enum_descriptors_greptime_2fv1_2fregion_2fserver_2eproto = nullptr; static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_greptime_2fv1_2fregion_2fserver_2eproto = nullptr; @@ -784,19 +769,10 @@ const uint32_t TableStruct_greptime_2fv1_2fregion_2fserver_2eproto::offsets[] PR PROTOBUF_FIELD_OFFSET(::greptime::v1::region::BulkInsertRequest, _impl_._oneof_case_[0]), ~0u, // no _weak_field_map_ ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::greptime::v1::region::BulkInsertRequest, _impl_.region_id_), ::_pbi::kInvalidFieldOffsetTag, PROTOBUF_FIELD_OFFSET(::greptime::v1::region::BulkInsertRequest, _impl_.body_), ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::greptime::v1::region::ArrowIpc, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::greptime::v1::region::ArrowIpc, _impl_.region_id_), - PROTOBUF_FIELD_OFFSET(::greptime::v1::region::ArrowIpc, _impl_.schema_), - PROTOBUF_FIELD_OFFSET(::greptime::v1::region::ArrowIpc, _impl_.data_header_), - PROTOBUF_FIELD_OFFSET(::greptime::v1::region::ArrowIpc, _impl_.payload_), - ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::greptime::v1::region::MitoManifestInfo, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ @@ -854,10 +830,9 @@ static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protode { 253, -1, -1, sizeof(::greptime::v1::region::TruncateRequest)}, { 260, -1, -1, sizeof(::greptime::v1::region::RegionColumnDef)}, { 268, -1, -1, sizeof(::greptime::v1::region::BulkInsertRequest)}, - { 276, -1, -1, sizeof(::greptime::v1::region::ArrowIpc)}, - { 286, -1, -1, sizeof(::greptime::v1::region::MitoManifestInfo)}, - { 293, -1, -1, sizeof(::greptime::v1::region::MetricManifestInfo)}, - { 301, -1, -1, sizeof(::greptime::v1::region::SyncRequest)}, + { 277, -1, -1, sizeof(::greptime::v1::region::MitoManifestInfo)}, + { 284, -1, -1, sizeof(::greptime::v1::region::MetricManifestInfo)}, + { 292, -1, -1, sizeof(::greptime::v1::region::SyncRequest)}, }; static const ::_pb::Message* const file_default_instances[] = { @@ -892,7 +867,6 @@ static const ::_pb::Message* const file_default_instances[] = { &::greptime::v1::region::_TruncateRequest_default_instance_._instance, &::greptime::v1::region::_RegionColumnDef_default_instance_._instance, &::greptime::v1::region::_BulkInsertRequest_default_instance_._instance, - &::greptime::v1::region::_ArrowIpc_default_instance_._instance, &::greptime::v1::region::_MitoManifestInfo_default_instance_._instance, &::greptime::v1::region::_MetricManifestInfo_default_instance_._instance, &::greptime::v1::region::_SyncRequest_default_instance_._instance, @@ -990,24 +964,22 @@ const char descriptor_table_protodef_greptime_2fv1_2fregion_2fserver_2eproto[] P "rictWindowH\000B\t\n\007options\"$\n\017TruncateReque" "st\022\021\n\tregion_id\030\001 \001(\004\"P\n\017RegionColumnDef" "\022*\n\ncolumn_def\030\001 \001(\0132\026.greptime.v1.Colum" - "nDef\022\021\n\tcolumn_id\030\002 \001(\r\"N\n\021BulkInsertReq" - "uest\0221\n\tarrow_ipc\030\001 \001(\0132\034.greptime.v1.re" - "gion.ArrowIpcH\000B\006\n\004body\"S\n\010ArrowIpc\022\021\n\tr" - "egion_id\030\001 \001(\004\022\016\n\006schema\030\002 \001(\014\022\023\n\013data_h" - "eader\030\003 \001(\014\022\017\n\007payload\030\004 \001(\014\"1\n\020MitoMani" - "festInfo\022\035\n\025data_manifest_version\030\001 \001(\004\"" - "V\n\022MetricManifestInfo\022\035\n\025data_manifest_v" - "ersion\030\001 \001(\004\022!\n\031metadata_manifest_versio" - "n\030\002 \001(\004\"\275\001\n\013SyncRequest\022\021\n\tregion_id\030\001 \001" - "(\004\022B\n\022mito_manifest_info\030\002 \001(\0132$.greptim" - "e.v1.region.MitoManifestInfoH\000\022F\n\024metric" - "_manifest_info\030\003 \001(\0132&.greptime.v1.regio" - "n.MetricManifestInfoH\000B\017\n\rmanifest_info2" - "Y\n\006Region\022O\n\006Handle\022!.greptime.v1.region" - ".RegionRequest\032\".greptime.v1.region.Regi" - "onResponseB]\n\025io.greptime.v1.regionB\006Ser" - "verZ_impl_.body_.arrow_ipc_; } -void BulkInsertRequest::set_allocated_arrow_ipc(::greptime::v1::region::ArrowIpc* arrow_ipc) { +void BulkInsertRequest::set_allocated_arrow_ipc(::greptime::v1::ArrowIpc* arrow_ipc) { ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); clear_body(); if (arrow_ipc) { ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = - ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(arrow_ipc); + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(arrow_ipc)); if (message_arena != submessage_arena) { arrow_ipc = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( message_arena, arrow_ipc, submessage_arena); @@ -8300,6 +8273,14 @@ void BulkInsertRequest::set_allocated_arrow_ipc(::greptime::v1::region::ArrowIpc } // @@protoc_insertion_point(field_set_allocated:greptime.v1.region.BulkInsertRequest.arrow_ipc) } +void BulkInsertRequest::clear_arrow_ipc() { + if (_internal_has_arrow_ipc()) { + if (GetArenaForAllocation() == nullptr) { + delete _impl_.body_.arrow_ipc_; + } + clear_has_body(); + } +} BulkInsertRequest::BulkInsertRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned) : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { @@ -8310,15 +8291,17 @@ BulkInsertRequest::BulkInsertRequest(const BulkInsertRequest& from) : ::PROTOBUF_NAMESPACE_ID::Message() { BulkInsertRequest* const _this = this; (void)_this; new (&_impl_) Impl_{ - decltype(_impl_.body_){} + decltype(_impl_.region_id_){} + , decltype(_impl_.body_){} , /*decltype(_impl_._cached_size_)*/{} , /*decltype(_impl_._oneof_case_)*/{}}; _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _this->_impl_.region_id_ = from._impl_.region_id_; clear_has_body(); switch (from.body_case()) { case kArrowIpc: { - _this->_internal_mutable_arrow_ipc()->::greptime::v1::region::ArrowIpc::MergeFrom( + _this->_internal_mutable_arrow_ipc()->::greptime::v1::ArrowIpc::MergeFrom( from._internal_arrow_ipc()); break; } @@ -8334,7 +8317,8 @@ inline void BulkInsertRequest::SharedCtor( (void)arena; (void)is_message_owned; new (&_impl_) Impl_{ - decltype(_impl_.body_){} + decltype(_impl_.region_id_){uint64_t{0u}} + , decltype(_impl_.body_){} , /*decltype(_impl_._cached_size_)*/{} , /*decltype(_impl_._oneof_case_)*/{} }; @@ -8384,6 +8368,7 @@ void BulkInsertRequest::Clear() { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; + _impl_.region_id_ = uint64_t{0u}; clear_body(); _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } @@ -8394,9 +8379,17 @@ const char* BulkInsertRequest::_InternalParse(const char* ptr, ::_pbi::ParseCont uint32_t tag; ptr = ::_pbi::ReadTag(ptr, &tag); switch (tag >> 3) { - // .greptime.v1.region.ArrowIpc arrow_ipc = 1; + // uint64 region_id = 1; case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + _impl_.region_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // .greptime.v1.ArrowIpc arrow_ipc = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { ptr = ctx->ParseMessage(_internal_mutable_arrow_ipc(), ptr); CHK_(ptr); } else @@ -8431,10 +8424,16 @@ uint8_t* BulkInsertRequest::_InternalSerialize( uint32_t cached_has_bits = 0; (void) cached_has_bits; - // .greptime.v1.region.ArrowIpc arrow_ipc = 1; + // uint64 region_id = 1; + if (this->_internal_region_id() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray(1, this->_internal_region_id(), target); + } + + // .greptime.v1.ArrowIpc arrow_ipc = 2; if (_internal_has_arrow_ipc()) { target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(1, _Internal::arrow_ipc(this), + InternalWriteMessage(2, _Internal::arrow_ipc(this), _Internal::arrow_ipc(this).GetCachedSize(), target, stream); } @@ -8454,8 +8453,13 @@ size_t BulkInsertRequest::ByteSizeLong() const { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; + // uint64 region_id = 1; + if (this->_internal_region_id() != 0) { + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_region_id()); + } + switch (body_case()) { - // .greptime.v1.region.ArrowIpc arrow_ipc = 1; + // .greptime.v1.ArrowIpc arrow_ipc = 2; case kArrowIpc: { total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( @@ -8484,9 +8488,12 @@ void BulkInsertRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, cons uint32_t cached_has_bits = 0; (void) cached_has_bits; + if (from._internal_region_id() != 0) { + _this->_internal_set_region_id(from._internal_region_id()); + } switch (from.body_case()) { case kArrowIpc: { - _this->_internal_mutable_arrow_ipc()->::greptime::v1::region::ArrowIpc::MergeFrom( + _this->_internal_mutable_arrow_ipc()->::greptime::v1::ArrowIpc::MergeFrom( from._internal_arrow_ipc()); break; } @@ -8511,6 +8518,7 @@ bool BulkInsertRequest::IsInitialized() const { void BulkInsertRequest::InternalSwap(BulkInsertRequest* other) { using std::swap; _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_.region_id_, other->_impl_.region_id_); swap(_impl_.body_, other->_impl_.body_); swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]); } @@ -8523,321 +8531,6 @@ void BulkInsertRequest::InternalSwap(BulkInsertRequest* other) { // =================================================================== -class ArrowIpc::_Internal { - public: -}; - -ArrowIpc::ArrowIpc(::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.region.ArrowIpc) -} -ArrowIpc::ArrowIpc(const ArrowIpc& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - ArrowIpc* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_.schema_){} - , decltype(_impl_.data_header_){} - , decltype(_impl_.payload_){} - , decltype(_impl_.region_id_){} - , /*decltype(_impl_._cached_size_)*/{}}; - - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - _impl_.schema_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.schema_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_schema().empty()) { - _this->_impl_.schema_.Set(from._internal_schema(), - _this->GetArenaForAllocation()); - } - _impl_.data_header_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.data_header_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_data_header().empty()) { - _this->_impl_.data_header_.Set(from._internal_data_header(), - _this->GetArenaForAllocation()); - } - _impl_.payload_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.payload_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_payload().empty()) { - _this->_impl_.payload_.Set(from._internal_payload(), - _this->GetArenaForAllocation()); - } - _this->_impl_.region_id_ = from._impl_.region_id_; - // @@protoc_insertion_point(copy_constructor:greptime.v1.region.ArrowIpc) -} - -inline void ArrowIpc::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_.schema_){} - , decltype(_impl_.data_header_){} - , decltype(_impl_.payload_){} - , decltype(_impl_.region_id_){uint64_t{0u}} - , /*decltype(_impl_._cached_size_)*/{} - }; - _impl_.schema_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.schema_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.data_header_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.data_header_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.payload_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.payload_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING -} - -ArrowIpc::~ArrowIpc() { - // @@protoc_insertion_point(destructor:greptime.v1.region.ArrowIpc) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - return; - } - SharedDtor(); -} - -inline void ArrowIpc::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - _impl_.schema_.Destroy(); - _impl_.data_header_.Destroy(); - _impl_.payload_.Destroy(); -} - -void ArrowIpc::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); -} - -void ArrowIpc::Clear() { -// @@protoc_insertion_point(message_clear_start:greptime.v1.region.ArrowIpc) - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - _impl_.schema_.ClearToEmpty(); - _impl_.data_header_.ClearToEmpty(); - _impl_.payload_.ClearToEmpty(); - _impl_.region_id_ = uint64_t{0u}; - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* ArrowIpc::_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) { - // uint64 region_id = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { - _impl_.region_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // bytes schema = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { - auto str = _internal_mutable_schema(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // bytes data_header = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { - auto str = _internal_mutable_data_header(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // bytes payload = 4; - case 4: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 34)) { - auto str = _internal_mutable_payload(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - 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* ArrowIpc::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:greptime.v1.region.ArrowIpc) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - // uint64 region_id = 1; - if (this->_internal_region_id() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteUInt64ToArray(1, this->_internal_region_id(), target); - } - - // bytes schema = 2; - if (!this->_internal_schema().empty()) { - target = stream->WriteBytesMaybeAliased( - 2, this->_internal_schema(), target); - } - - // bytes data_header = 3; - if (!this->_internal_data_header().empty()) { - target = stream->WriteBytesMaybeAliased( - 3, this->_internal_data_header(), target); - } - - // bytes payload = 4; - if (!this->_internal_payload().empty()) { - target = stream->WriteBytesMaybeAliased( - 4, this->_internal_payload(), 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.region.ArrowIpc) - return target; -} - -size_t ArrowIpc::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:greptime.v1.region.ArrowIpc) - size_t total_size = 0; - - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - // bytes schema = 2; - if (!this->_internal_schema().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( - this->_internal_schema()); - } - - // bytes data_header = 3; - if (!this->_internal_data_header().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( - this->_internal_data_header()); - } - - // bytes payload = 4; - if (!this->_internal_payload().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( - this->_internal_payload()); - } - - // uint64 region_id = 1; - if (this->_internal_region_id() != 0) { - total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_region_id()); - } - - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} - -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ArrowIpc::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - ArrowIpc::MergeImpl -}; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ArrowIpc::GetClassData() const { return &_class_data_; } - - -void ArrowIpc::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.region.ArrowIpc) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - if (!from._internal_schema().empty()) { - _this->_internal_set_schema(from._internal_schema()); - } - if (!from._internal_data_header().empty()) { - _this->_internal_set_data_header(from._internal_data_header()); - } - if (!from._internal_payload().empty()) { - _this->_internal_set_payload(from._internal_payload()); - } - if (from._internal_region_id() != 0) { - _this->_internal_set_region_id(from._internal_region_id()); - } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); -} - -void ArrowIpc::CopyFrom(const ArrowIpc& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:greptime.v1.region.ArrowIpc) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool ArrowIpc::IsInitialized() const { - return true; -} - -void ArrowIpc::InternalSwap(ArrowIpc* other) { - using std::swap; - auto* lhs_arena = GetArenaForAllocation(); - auto* rhs_arena = other->GetArenaForAllocation(); - _internal_metadata_.InternalSwap(&other->_internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.schema_, lhs_arena, - &other->_impl_.schema_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.data_header_, lhs_arena, - &other->_impl_.data_header_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.payload_, lhs_arena, - &other->_impl_.payload_, rhs_arena - ); - swap(_impl_.region_id_, other->_impl_.region_id_); -} - -::PROTOBUF_NAMESPACE_ID::Metadata ArrowIpc::GetMetadata() const { - return ::_pbi::AssignDescriptors( - &descriptor_table_greptime_2fv1_2fregion_2fserver_2eproto_getter, &descriptor_table_greptime_2fv1_2fregion_2fserver_2eproto_once, - file_level_metadata_greptime_2fv1_2fregion_2fserver_2eproto[31]); -} - -// =================================================================== - class MitoManifestInfo::_Internal { public: }; @@ -9011,7 +8704,7 @@ void MitoManifestInfo::InternalSwap(MitoManifestInfo* other) { ::PROTOBUF_NAMESPACE_ID::Metadata MitoManifestInfo::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_greptime_2fv1_2fregion_2fserver_2eproto_getter, &descriptor_table_greptime_2fv1_2fregion_2fserver_2eproto_once, - file_level_metadata_greptime_2fv1_2fregion_2fserver_2eproto[32]); + file_level_metadata_greptime_2fv1_2fregion_2fserver_2eproto[31]); } // =================================================================== @@ -9222,7 +8915,7 @@ void MetricManifestInfo::InternalSwap(MetricManifestInfo* other) { ::PROTOBUF_NAMESPACE_ID::Metadata MetricManifestInfo::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_greptime_2fv1_2fregion_2fserver_2eproto_getter, &descriptor_table_greptime_2fv1_2fregion_2fserver_2eproto_once, - file_level_metadata_greptime_2fv1_2fregion_2fserver_2eproto[33]); + file_level_metadata_greptime_2fv1_2fregion_2fserver_2eproto[32]); } // =================================================================== @@ -9554,7 +9247,7 @@ void SyncRequest::InternalSwap(SyncRequest* other) { ::PROTOBUF_NAMESPACE_ID::Metadata SyncRequest::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_greptime_2fv1_2fregion_2fserver_2eproto_getter, &descriptor_table_greptime_2fv1_2fregion_2fserver_2eproto_once, - file_level_metadata_greptime_2fv1_2fregion_2fserver_2eproto[34]); + file_level_metadata_greptime_2fv1_2fregion_2fserver_2eproto[33]); } // @@protoc_insertion_point(namespace_scope) @@ -9686,10 +9379,6 @@ template<> PROTOBUF_NOINLINE ::greptime::v1::region::BulkInsertRequest* Arena::CreateMaybeMessage< ::greptime::v1::region::BulkInsertRequest >(Arena* arena) { return Arena::CreateMessageInternal< ::greptime::v1::region::BulkInsertRequest >(arena); } -template<> PROTOBUF_NOINLINE ::greptime::v1::region::ArrowIpc* -Arena::CreateMaybeMessage< ::greptime::v1::region::ArrowIpc >(Arena* arena) { - return Arena::CreateMessageInternal< ::greptime::v1::region::ArrowIpc >(arena); -} template<> PROTOBUF_NOINLINE ::greptime::v1::region::MitoManifestInfo* Arena::CreateMaybeMessage< ::greptime::v1::region::MitoManifestInfo >(Arena* arena) { return Arena::CreateMessageInternal< ::greptime::v1::region::MitoManifestInfo >(arena); diff --git a/c++/greptime/v1/region/server.pb.h b/c++/greptime/v1/region/server.pb.h index c2a44c0..81f7fb5 100644 --- a/c++/greptime/v1/region/server.pb.h +++ b/c++/greptime/v1/region/server.pb.h @@ -66,9 +66,6 @@ extern AlterRequestDefaultTypeInternal _AlterRequest_default_instance_; class AlterRequests; struct AlterRequestsDefaultTypeInternal; extern AlterRequestsDefaultTypeInternal _AlterRequests_default_instance_; -class ArrowIpc; -struct ArrowIpcDefaultTypeInternal; -extern ArrowIpcDefaultTypeInternal _ArrowIpc_default_instance_; class BulkInsertRequest; struct BulkInsertRequestDefaultTypeInternal; extern BulkInsertRequestDefaultTypeInternal _BulkInsertRequest_default_instance_; @@ -167,7 +164,6 @@ template<> ::greptime::v1::region::AddColumn* Arena::CreateMaybeMessage<::grepti template<> ::greptime::v1::region::AddColumns* Arena::CreateMaybeMessage<::greptime::v1::region::AddColumns>(Arena*); template<> ::greptime::v1::region::AlterRequest* Arena::CreateMaybeMessage<::greptime::v1::region::AlterRequest>(Arena*); template<> ::greptime::v1::region::AlterRequests* Arena::CreateMaybeMessage<::greptime::v1::region::AlterRequests>(Arena*); -template<> ::greptime::v1::region::ArrowIpc* Arena::CreateMaybeMessage<::greptime::v1::region::ArrowIpc>(Arena*); template<> ::greptime::v1::region::BulkInsertRequest* Arena::CreateMaybeMessage<::greptime::v1::region::BulkInsertRequest>(Arena*); template<> ::greptime::v1::region::CloseRequest* Arena::CreateMaybeMessage<::greptime::v1::region::CloseRequest>(Arena*); template<> ::greptime::v1::region::CompactRequest* Arena::CreateMaybeMessage<::greptime::v1::region::CompactRequest>(Arena*); @@ -5232,7 +5228,7 @@ class BulkInsertRequest final : return *internal_default_instance(); } enum BodyCase { - kArrowIpc = 1, + kArrowIpc = 2, BODY_NOT_SET = 0, }; @@ -5314,25 +5310,35 @@ class BulkInsertRequest final : // accessors ------------------------------------------------------- enum : int { - kArrowIpcFieldNumber = 1, + kRegionIdFieldNumber = 1, + kArrowIpcFieldNumber = 2, }; - // .greptime.v1.region.ArrowIpc arrow_ipc = 1; + // uint64 region_id = 1; + void clear_region_id(); + uint64_t region_id() const; + void set_region_id(uint64_t value); + private: + uint64_t _internal_region_id() const; + void _internal_set_region_id(uint64_t value); + public: + + // .greptime.v1.ArrowIpc arrow_ipc = 2; bool has_arrow_ipc() const; private: bool _internal_has_arrow_ipc() const; public: void clear_arrow_ipc(); - const ::greptime::v1::region::ArrowIpc& arrow_ipc() const; - PROTOBUF_NODISCARD ::greptime::v1::region::ArrowIpc* release_arrow_ipc(); - ::greptime::v1::region::ArrowIpc* mutable_arrow_ipc(); - void set_allocated_arrow_ipc(::greptime::v1::region::ArrowIpc* arrow_ipc); + const ::greptime::v1::ArrowIpc& arrow_ipc() const; + PROTOBUF_NODISCARD ::greptime::v1::ArrowIpc* release_arrow_ipc(); + ::greptime::v1::ArrowIpc* mutable_arrow_ipc(); + void set_allocated_arrow_ipc(::greptime::v1::ArrowIpc* arrow_ipc); private: - const ::greptime::v1::region::ArrowIpc& _internal_arrow_ipc() const; - ::greptime::v1::region::ArrowIpc* _internal_mutable_arrow_ipc(); + const ::greptime::v1::ArrowIpc& _internal_arrow_ipc() const; + ::greptime::v1::ArrowIpc* _internal_mutable_arrow_ipc(); public: void unsafe_arena_set_allocated_arrow_ipc( - ::greptime::v1::region::ArrowIpc* arrow_ipc); - ::greptime::v1::region::ArrowIpc* unsafe_arena_release_arrow_ipc(); + ::greptime::v1::ArrowIpc* arrow_ipc); + ::greptime::v1::ArrowIpc* unsafe_arena_release_arrow_ipc(); void clear_body(); BodyCase body_case() const; @@ -5348,10 +5354,11 @@ class BulkInsertRequest final : typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; struct Impl_ { + uint64_t region_id_; union BodyUnion { constexpr BodyUnion() : _constinit_{} {} ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; - ::greptime::v1::region::ArrowIpc* arrow_ipc_; + ::greptime::v1::ArrowIpc* arrow_ipc_; } body_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; uint32_t _oneof_case_[1]; @@ -5362,202 +5369,6 @@ class BulkInsertRequest final : }; // ------------------------------------------------------------------- -class ArrowIpc final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:greptime.v1.region.ArrowIpc) */ { - public: - inline ArrowIpc() : ArrowIpc(nullptr) {} - ~ArrowIpc() override; - explicit PROTOBUF_CONSTEXPR ArrowIpc(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - ArrowIpc(const ArrowIpc& from); - ArrowIpc(ArrowIpc&& from) noexcept - : ArrowIpc() { - *this = ::std::move(from); - } - - inline ArrowIpc& operator=(const ArrowIpc& from) { - CopyFrom(from); - return *this; - } - inline ArrowIpc& operator=(ArrowIpc&& 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 ArrowIpc& default_instance() { - return *internal_default_instance(); - } - static inline const ArrowIpc* internal_default_instance() { - return reinterpret_cast( - &_ArrowIpc_default_instance_); - } - static constexpr int kIndexInFileMessages = - 31; - - friend void swap(ArrowIpc& a, ArrowIpc& b) { - a.Swap(&b); - } - inline void Swap(ArrowIpc* 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(ArrowIpc* other) { - if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - ArrowIpc* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); - } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const ArrowIpc& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const ArrowIpc& from) { - ArrowIpc::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(ArrowIpc* other); - - private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "greptime.v1.region.ArrowIpc"; - } - protected: - explicit ArrowIpc(::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 { - kSchemaFieldNumber = 2, - kDataHeaderFieldNumber = 3, - kPayloadFieldNumber = 4, - kRegionIdFieldNumber = 1, - }; - // bytes schema = 2; - void clear_schema(); - const std::string& schema() const; - template - void set_schema(ArgT0&& arg0, ArgT... args); - std::string* mutable_schema(); - PROTOBUF_NODISCARD std::string* release_schema(); - void set_allocated_schema(std::string* schema); - private: - const std::string& _internal_schema() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_schema(const std::string& value); - std::string* _internal_mutable_schema(); - public: - - // bytes data_header = 3; - void clear_data_header(); - const std::string& data_header() const; - template - void set_data_header(ArgT0&& arg0, ArgT... args); - std::string* mutable_data_header(); - PROTOBUF_NODISCARD std::string* release_data_header(); - void set_allocated_data_header(std::string* data_header); - private: - const std::string& _internal_data_header() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_data_header(const std::string& value); - std::string* _internal_mutable_data_header(); - public: - - // bytes payload = 4; - void clear_payload(); - const std::string& payload() const; - template - void set_payload(ArgT0&& arg0, ArgT... args); - std::string* mutable_payload(); - PROTOBUF_NODISCARD std::string* release_payload(); - void set_allocated_payload(std::string* payload); - private: - const std::string& _internal_payload() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_payload(const std::string& value); - std::string* _internal_mutable_payload(); - public: - - // uint64 region_id = 1; - void clear_region_id(); - uint64_t region_id() const; - void set_region_id(uint64_t value); - private: - uint64_t _internal_region_id() const; - void _internal_set_region_id(uint64_t value); - public: - - // @@protoc_insertion_point(class_scope:greptime.v1.region.ArrowIpc) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr schema_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr data_header_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr payload_; - uint64_t region_id_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_greptime_2fv1_2fregion_2fserver_2eproto; -}; -// ------------------------------------------------------------------- - class MitoManifestInfo final : public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:greptime.v1.region.MitoManifestInfo) */ { public: @@ -5606,7 +5417,7 @@ class MitoManifestInfo final : &_MitoManifestInfo_default_instance_); } static constexpr int kIndexInFileMessages = - 32; + 31; friend void swap(MitoManifestInfo& a, MitoManifestInfo& b) { a.Swap(&b); @@ -5754,7 +5565,7 @@ class MetricManifestInfo final : &_MetricManifestInfo_default_instance_); } static constexpr int kIndexInFileMessages = - 33; + 32; friend void swap(MetricManifestInfo& a, MetricManifestInfo& b) { a.Swap(&b); @@ -5919,7 +5730,7 @@ class SyncRequest final : &_SyncRequest_default_instance_); } static constexpr int kIndexInFileMessages = - 34; + 33; friend void swap(SyncRequest& a, SyncRequest& b) { a.Swap(&b); @@ -9889,7 +9700,27 @@ inline void RegionColumnDef::set_column_id(uint32_t value) { // BulkInsertRequest -// .greptime.v1.region.ArrowIpc arrow_ipc = 1; +// uint64 region_id = 1; +inline void BulkInsertRequest::clear_region_id() { + _impl_.region_id_ = uint64_t{0u}; +} +inline uint64_t BulkInsertRequest::_internal_region_id() const { + return _impl_.region_id_; +} +inline uint64_t BulkInsertRequest::region_id() const { + // @@protoc_insertion_point(field_get:greptime.v1.region.BulkInsertRequest.region_id) + return _internal_region_id(); +} +inline void BulkInsertRequest::_internal_set_region_id(uint64_t value) { + + _impl_.region_id_ = value; +} +inline void BulkInsertRequest::set_region_id(uint64_t value) { + _internal_set_region_id(value); + // @@protoc_insertion_point(field_set:greptime.v1.region.BulkInsertRequest.region_id) +} + +// .greptime.v1.ArrowIpc arrow_ipc = 2; inline bool BulkInsertRequest::_internal_has_arrow_ipc() const { return body_case() == kArrowIpc; } @@ -9899,19 +9730,11 @@ inline bool BulkInsertRequest::has_arrow_ipc() const { inline void BulkInsertRequest::set_has_arrow_ipc() { _impl_._oneof_case_[0] = kArrowIpc; } -inline void BulkInsertRequest::clear_arrow_ipc() { - if (_internal_has_arrow_ipc()) { - if (GetArenaForAllocation() == nullptr) { - delete _impl_.body_.arrow_ipc_; - } - clear_has_body(); - } -} -inline ::greptime::v1::region::ArrowIpc* BulkInsertRequest::release_arrow_ipc() { +inline ::greptime::v1::ArrowIpc* BulkInsertRequest::release_arrow_ipc() { // @@protoc_insertion_point(field_release:greptime.v1.region.BulkInsertRequest.arrow_ipc) if (_internal_has_arrow_ipc()) { clear_has_body(); - ::greptime::v1::region::ArrowIpc* temp = _impl_.body_.arrow_ipc_; + ::greptime::v1::ArrowIpc* temp = _impl_.body_.arrow_ipc_; if (GetArenaForAllocation() != nullptr) { temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); } @@ -9921,27 +9744,27 @@ inline ::greptime::v1::region::ArrowIpc* BulkInsertRequest::release_arrow_ipc() return nullptr; } } -inline const ::greptime::v1::region::ArrowIpc& BulkInsertRequest::_internal_arrow_ipc() const { +inline const ::greptime::v1::ArrowIpc& BulkInsertRequest::_internal_arrow_ipc() const { return _internal_has_arrow_ipc() ? *_impl_.body_.arrow_ipc_ - : reinterpret_cast< ::greptime::v1::region::ArrowIpc&>(::greptime::v1::region::_ArrowIpc_default_instance_); + : reinterpret_cast< ::greptime::v1::ArrowIpc&>(::greptime::v1::_ArrowIpc_default_instance_); } -inline const ::greptime::v1::region::ArrowIpc& BulkInsertRequest::arrow_ipc() const { +inline const ::greptime::v1::ArrowIpc& BulkInsertRequest::arrow_ipc() const { // @@protoc_insertion_point(field_get:greptime.v1.region.BulkInsertRequest.arrow_ipc) return _internal_arrow_ipc(); } -inline ::greptime::v1::region::ArrowIpc* BulkInsertRequest::unsafe_arena_release_arrow_ipc() { +inline ::greptime::v1::ArrowIpc* BulkInsertRequest::unsafe_arena_release_arrow_ipc() { // @@protoc_insertion_point(field_unsafe_arena_release:greptime.v1.region.BulkInsertRequest.arrow_ipc) if (_internal_has_arrow_ipc()) { clear_has_body(); - ::greptime::v1::region::ArrowIpc* temp = _impl_.body_.arrow_ipc_; + ::greptime::v1::ArrowIpc* temp = _impl_.body_.arrow_ipc_; _impl_.body_.arrow_ipc_ = nullptr; return temp; } else { return nullptr; } } -inline void BulkInsertRequest::unsafe_arena_set_allocated_arrow_ipc(::greptime::v1::region::ArrowIpc* arrow_ipc) { +inline void BulkInsertRequest::unsafe_arena_set_allocated_arrow_ipc(::greptime::v1::ArrowIpc* arrow_ipc) { clear_body(); if (arrow_ipc) { set_has_arrow_ipc(); @@ -9949,16 +9772,16 @@ inline void BulkInsertRequest::unsafe_arena_set_allocated_arrow_ipc(::greptime:: } // @@protoc_insertion_point(field_unsafe_arena_set_allocated:greptime.v1.region.BulkInsertRequest.arrow_ipc) } -inline ::greptime::v1::region::ArrowIpc* BulkInsertRequest::_internal_mutable_arrow_ipc() { +inline ::greptime::v1::ArrowIpc* BulkInsertRequest::_internal_mutable_arrow_ipc() { if (!_internal_has_arrow_ipc()) { clear_body(); set_has_arrow_ipc(); - _impl_.body_.arrow_ipc_ = CreateMaybeMessage< ::greptime::v1::region::ArrowIpc >(GetArenaForAllocation()); + _impl_.body_.arrow_ipc_ = CreateMaybeMessage< ::greptime::v1::ArrowIpc >(GetArenaForAllocation()); } return _impl_.body_.arrow_ipc_; } -inline ::greptime::v1::region::ArrowIpc* BulkInsertRequest::mutable_arrow_ipc() { - ::greptime::v1::region::ArrowIpc* _msg = _internal_mutable_arrow_ipc(); +inline ::greptime::v1::ArrowIpc* BulkInsertRequest::mutable_arrow_ipc() { + ::greptime::v1::ArrowIpc* _msg = _internal_mutable_arrow_ipc(); // @@protoc_insertion_point(field_mutable:greptime.v1.region.BulkInsertRequest.arrow_ipc) return _msg; } @@ -9974,180 +9797,6 @@ inline BulkInsertRequest::BodyCase BulkInsertRequest::body_case() const { } // ------------------------------------------------------------------- -// ArrowIpc - -// uint64 region_id = 1; -inline void ArrowIpc::clear_region_id() { - _impl_.region_id_ = uint64_t{0u}; -} -inline uint64_t ArrowIpc::_internal_region_id() const { - return _impl_.region_id_; -} -inline uint64_t ArrowIpc::region_id() const { - // @@protoc_insertion_point(field_get:greptime.v1.region.ArrowIpc.region_id) - return _internal_region_id(); -} -inline void ArrowIpc::_internal_set_region_id(uint64_t value) { - - _impl_.region_id_ = value; -} -inline void ArrowIpc::set_region_id(uint64_t value) { - _internal_set_region_id(value); - // @@protoc_insertion_point(field_set:greptime.v1.region.ArrowIpc.region_id) -} - -// bytes schema = 2; -inline void ArrowIpc::clear_schema() { - _impl_.schema_.ClearToEmpty(); -} -inline const std::string& ArrowIpc::schema() const { - // @@protoc_insertion_point(field_get:greptime.v1.region.ArrowIpc.schema) - return _internal_schema(); -} -template -inline PROTOBUF_ALWAYS_INLINE -void ArrowIpc::set_schema(ArgT0&& arg0, ArgT... args) { - - _impl_.schema_.SetBytes(static_cast(arg0), args..., GetArenaForAllocation()); - // @@protoc_insertion_point(field_set:greptime.v1.region.ArrowIpc.schema) -} -inline std::string* ArrowIpc::mutable_schema() { - std::string* _s = _internal_mutable_schema(); - // @@protoc_insertion_point(field_mutable:greptime.v1.region.ArrowIpc.schema) - return _s; -} -inline const std::string& ArrowIpc::_internal_schema() const { - return _impl_.schema_.Get(); -} -inline void ArrowIpc::_internal_set_schema(const std::string& value) { - - _impl_.schema_.Set(value, GetArenaForAllocation()); -} -inline std::string* ArrowIpc::_internal_mutable_schema() { - - return _impl_.schema_.Mutable(GetArenaForAllocation()); -} -inline std::string* ArrowIpc::release_schema() { - // @@protoc_insertion_point(field_release:greptime.v1.region.ArrowIpc.schema) - return _impl_.schema_.Release(); -} -inline void ArrowIpc::set_allocated_schema(std::string* schema) { - if (schema != nullptr) { - - } else { - - } - _impl_.schema_.SetAllocated(schema, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.schema_.IsDefault()) { - _impl_.schema_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - // @@protoc_insertion_point(field_set_allocated:greptime.v1.region.ArrowIpc.schema) -} - -// bytes data_header = 3; -inline void ArrowIpc::clear_data_header() { - _impl_.data_header_.ClearToEmpty(); -} -inline const std::string& ArrowIpc::data_header() const { - // @@protoc_insertion_point(field_get:greptime.v1.region.ArrowIpc.data_header) - return _internal_data_header(); -} -template -inline PROTOBUF_ALWAYS_INLINE -void ArrowIpc::set_data_header(ArgT0&& arg0, ArgT... args) { - - _impl_.data_header_.SetBytes(static_cast(arg0), args..., GetArenaForAllocation()); - // @@protoc_insertion_point(field_set:greptime.v1.region.ArrowIpc.data_header) -} -inline std::string* ArrowIpc::mutable_data_header() { - std::string* _s = _internal_mutable_data_header(); - // @@protoc_insertion_point(field_mutable:greptime.v1.region.ArrowIpc.data_header) - return _s; -} -inline const std::string& ArrowIpc::_internal_data_header() const { - return _impl_.data_header_.Get(); -} -inline void ArrowIpc::_internal_set_data_header(const std::string& value) { - - _impl_.data_header_.Set(value, GetArenaForAllocation()); -} -inline std::string* ArrowIpc::_internal_mutable_data_header() { - - return _impl_.data_header_.Mutable(GetArenaForAllocation()); -} -inline std::string* ArrowIpc::release_data_header() { - // @@protoc_insertion_point(field_release:greptime.v1.region.ArrowIpc.data_header) - return _impl_.data_header_.Release(); -} -inline void ArrowIpc::set_allocated_data_header(std::string* data_header) { - if (data_header != nullptr) { - - } else { - - } - _impl_.data_header_.SetAllocated(data_header, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.data_header_.IsDefault()) { - _impl_.data_header_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - // @@protoc_insertion_point(field_set_allocated:greptime.v1.region.ArrowIpc.data_header) -} - -// bytes payload = 4; -inline void ArrowIpc::clear_payload() { - _impl_.payload_.ClearToEmpty(); -} -inline const std::string& ArrowIpc::payload() const { - // @@protoc_insertion_point(field_get:greptime.v1.region.ArrowIpc.payload) - return _internal_payload(); -} -template -inline PROTOBUF_ALWAYS_INLINE -void ArrowIpc::set_payload(ArgT0&& arg0, ArgT... args) { - - _impl_.payload_.SetBytes(static_cast(arg0), args..., GetArenaForAllocation()); - // @@protoc_insertion_point(field_set:greptime.v1.region.ArrowIpc.payload) -} -inline std::string* ArrowIpc::mutable_payload() { - std::string* _s = _internal_mutable_payload(); - // @@protoc_insertion_point(field_mutable:greptime.v1.region.ArrowIpc.payload) - return _s; -} -inline const std::string& ArrowIpc::_internal_payload() const { - return _impl_.payload_.Get(); -} -inline void ArrowIpc::_internal_set_payload(const std::string& value) { - - _impl_.payload_.Set(value, GetArenaForAllocation()); -} -inline std::string* ArrowIpc::_internal_mutable_payload() { - - return _impl_.payload_.Mutable(GetArenaForAllocation()); -} -inline std::string* ArrowIpc::release_payload() { - // @@protoc_insertion_point(field_release:greptime.v1.region.ArrowIpc.payload) - return _impl_.payload_.Release(); -} -inline void ArrowIpc::set_allocated_payload(std::string* payload) { - if (payload != nullptr) { - - } else { - - } - _impl_.payload_.SetAllocated(payload, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.payload_.IsDefault()) { - _impl_.payload_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - // @@protoc_insertion_point(field_set_allocated:greptime.v1.region.ArrowIpc.payload) -} - -// ------------------------------------------------------------------- - // MitoManifestInfo // uint64 data_manifest_version = 1; @@ -10464,8 +10113,6 @@ inline SyncRequest::ManifestInfoCase SyncRequest::manifest_info_case() const { // ------------------------------------------------------------------- -// ------------------------------------------------------------------- - // @@protoc_insertion_point(namespace_scope) diff --git a/c++/greptime/v1/wal.pb.cc b/c++/greptime/v1/wal.pb.cc index 2576a86..ad2c251 100644 --- a/c++/greptime/v1/wal.pb.cc +++ b/c++/greptime/v1/wal.pb.cc @@ -54,6 +54,7 @@ PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORIT PROTOBUF_CONSTEXPR WalEntry::WalEntry( ::_pbi::ConstantInitialized): _impl_{ /*decltype(_impl_.mutations_)*/{} + , /*decltype(_impl_.bulk_entries_)*/{} , /*decltype(_impl_._cached_size_)*/{}} {} struct WalEntryDefaultTypeInternal { PROTOBUF_CONSTEXPR WalEntryDefaultTypeInternal() @@ -64,9 +65,27 @@ struct WalEntryDefaultTypeInternal { }; }; PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 WalEntryDefaultTypeInternal _WalEntry_default_instance_; +PROTOBUF_CONSTEXPR BulkWalEntry::BulkWalEntry( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.sequence_)*/uint64_t{0u} + , /*decltype(_impl_.max_ts_)*/int64_t{0} + , /*decltype(_impl_.min_ts_)*/int64_t{0} + , /*decltype(_impl_.timestamp_index_)*/0u + , /*decltype(_impl_.body_)*/{} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_._oneof_case_)*/{}} {} +struct BulkWalEntryDefaultTypeInternal { + PROTOBUF_CONSTEXPR BulkWalEntryDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~BulkWalEntryDefaultTypeInternal() {} + union { + BulkWalEntry _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 BulkWalEntryDefaultTypeInternal _BulkWalEntry_default_instance_; } // namespace v1 } // namespace greptime -static ::_pb::Metadata file_level_metadata_greptime_2fv1_2fwal_2eproto[3]; +static ::_pb::Metadata file_level_metadata_greptime_2fv1_2fwal_2eproto[4]; static const ::_pb::EnumDescriptor* file_level_enum_descriptors_greptime_2fv1_2fwal_2eproto[2]; static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_greptime_2fv1_2fwal_2eproto = nullptr; @@ -95,41 +114,63 @@ const uint32_t TableStruct_greptime_2fv1_2fwal_2eproto::offsets[] PROTOBUF_SECTI ~0u, // no _weak_field_map_ ~0u, // no _inlined_string_donated_ PROTOBUF_FIELD_OFFSET(::greptime::v1::WalEntry, _impl_.mutations_), + PROTOBUF_FIELD_OFFSET(::greptime::v1::WalEntry, _impl_.bulk_entries_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::greptime::v1::BulkWalEntry, _internal_metadata_), + ~0u, // no _extensions_ + PROTOBUF_FIELD_OFFSET(::greptime::v1::BulkWalEntry, _impl_._oneof_case_[0]), + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::greptime::v1::BulkWalEntry, _impl_.sequence_), + PROTOBUF_FIELD_OFFSET(::greptime::v1::BulkWalEntry, _impl_.max_ts_), + PROTOBUF_FIELD_OFFSET(::greptime::v1::BulkWalEntry, _impl_.min_ts_), + PROTOBUF_FIELD_OFFSET(::greptime::v1::BulkWalEntry, _impl_.timestamp_index_), + ::_pbi::kInvalidFieldOffsetTag, + PROTOBUF_FIELD_OFFSET(::greptime::v1::BulkWalEntry, _impl_.body_), }; static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { { 0, -1, -1, sizeof(::greptime::v1::WriteHint)}, { 7, -1, -1, sizeof(::greptime::v1::Mutation)}, { 17, -1, -1, sizeof(::greptime::v1::WalEntry)}, + { 25, -1, -1, sizeof(::greptime::v1::BulkWalEntry)}, }; static const ::_pb::Message* const file_default_instances[] = { &::greptime::v1::_WriteHint_default_instance_._instance, &::greptime::v1::_Mutation_default_instance_._instance, &::greptime::v1::_WalEntry_default_instance_._instance, + &::greptime::v1::_BulkWalEntry_default_instance_._instance, }; const char descriptor_table_protodef_greptime_2fv1_2fwal_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = "\n\025greptime/v1/wal.proto\022\013greptime.v1\032\025gr" - "eptime/v1/row.proto\"J\n\tWriteHint\022=\n\024prim" - "ary_key_encoding\030\001 \001(\0162\037.greptime.v1.Pri" - "maryKeyEncoding\"\217\001\n\010Mutation\022$\n\007op_type\030" - "\001 \001(\0162\023.greptime.v1.OpType\022\020\n\010sequence\030\002" - " \001(\004\022\037\n\004rows\030\003 \001(\0132\021.greptime.v1.Rows\022*\n" - "\nwrite_hint\030\004 \001(\0132\026.greptime.v1.WriteHin" - "t\"4\n\010WalEntry\022(\n\tmutations\030\001 \003(\0132\025.grept" - "ime.v1.Mutation*\035\n\006OpType\022\n\n\006DELETE\020\000\022\007\n" - "\003PUT\020\001*+\n\022PrimaryKeyEncoding\022\t\n\005DENSE\020\000\022" - "\n\n\006SPARSE\020\001B7Z5github.com/GreptimeTeam/g" - "reptime-proto/go/greptime/v1b\006proto3" + "eptime/v1/row.proto\032\030greptime/v1/common." + "proto\"J\n\tWriteHint\022=\n\024primary_key_encodi" + "ng\030\001 \001(\0162\037.greptime.v1.PrimaryKeyEncodin" + "g\"\217\001\n\010Mutation\022$\n\007op_type\030\001 \001(\0162\023.grepti" + "me.v1.OpType\022\020\n\010sequence\030\002 \001(\004\022\037\n\004rows\030\003" + " \001(\0132\021.greptime.v1.Rows\022*\n\nwrite_hint\030\004 " + "\001(\0132\026.greptime.v1.WriteHint\"e\n\010WalEntry\022" + "(\n\tmutations\030\001 \003(\0132\025.greptime.v1.Mutatio" + "n\022/\n\014bulk_entries\030\002 \003(\0132\031.greptime.v1.Bu" + "lkWalEntry\"\215\001\n\014BulkWalEntry\022\020\n\010sequence\030" + "\001 \001(\004\022\016\n\006max_ts\030\002 \001(\003\022\016\n\006min_ts\030\003 \001(\003\022\027\n" + "\017timestamp_index\030\004 \001(\r\022*\n\tarrow_ipc\030\005 \001(" + "\0132\025.greptime.v1.ArrowIpcH\000B\006\n\004body*\035\n\006Op" + "Type\022\n\n\006DELETE\020\000\022\007\n\003PUT\020\001*+\n\022PrimaryKeyE" + "ncoding\022\t\n\005DENSE\020\000\022\n\n\006SPARSE\020\001B7Z5github" + ".com/GreptimeTeam/greptime-proto/go/grep" + "time/v1b\006proto3" ; -static const ::_pbi::DescriptorTable* const descriptor_table_greptime_2fv1_2fwal_2eproto_deps[1] = { +static const ::_pbi::DescriptorTable* const descriptor_table_greptime_2fv1_2fwal_2eproto_deps[2] = { + &::descriptor_table_greptime_2fv1_2fcommon_2eproto, &::descriptor_table_greptime_2fv1_2frow_2eproto, }; static ::_pbi::once_flag descriptor_table_greptime_2fv1_2fwal_2eproto_once; const ::_pbi::DescriptorTable descriptor_table_greptime_2fv1_2fwal_2eproto = { - false, false, 476, descriptor_table_protodef_greptime_2fv1_2fwal_2eproto, + false, false, 695, descriptor_table_protodef_greptime_2fv1_2fwal_2eproto, "greptime/v1/wal.proto", - &descriptor_table_greptime_2fv1_2fwal_2eproto_once, descriptor_table_greptime_2fv1_2fwal_2eproto_deps, 1, 3, + &descriptor_table_greptime_2fv1_2fwal_2eproto_once, descriptor_table_greptime_2fv1_2fwal_2eproto_deps, 2, 4, schemas, file_default_instances, TableStruct_greptime_2fv1_2fwal_2eproto::offsets, file_level_metadata_greptime_2fv1_2fwal_2eproto, file_level_enum_descriptors_greptime_2fv1_2fwal_2eproto, file_level_service_descriptors_greptime_2fv1_2fwal_2eproto, @@ -671,6 +712,7 @@ WalEntry::WalEntry(const WalEntry& from) WalEntry* const _this = this; (void)_this; new (&_impl_) Impl_{ decltype(_impl_.mutations_){from._impl_.mutations_} + , decltype(_impl_.bulk_entries_){from._impl_.bulk_entries_} , /*decltype(_impl_._cached_size_)*/{}}; _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); @@ -683,6 +725,7 @@ inline void WalEntry::SharedCtor( (void)is_message_owned; new (&_impl_) Impl_{ decltype(_impl_.mutations_){arena} + , decltype(_impl_.bulk_entries_){arena} , /*decltype(_impl_._cached_size_)*/{} }; } @@ -699,6 +742,7 @@ WalEntry::~WalEntry() { inline void WalEntry::SharedDtor() { GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); _impl_.mutations_.~RepeatedPtrField(); + _impl_.bulk_entries_.~RepeatedPtrField(); } void WalEntry::SetCachedSize(int size) const { @@ -712,6 +756,7 @@ void WalEntry::Clear() { (void) cached_has_bits; _impl_.mutations_.Clear(); + _impl_.bulk_entries_.Clear(); _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); } @@ -734,6 +779,19 @@ const char* WalEntry::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) } else goto handle_unusual; continue; + // repeated .greptime.v1.BulkWalEntry bulk_entries = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_bulk_entries(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr)); + } else + goto handle_unusual; + continue; default: goto handle_unusual; } // switch @@ -771,6 +829,14 @@ uint8_t* WalEntry::_InternalSerialize( InternalWriteMessage(1, repfield, repfield.GetCachedSize(), target, stream); } + // repeated .greptime.v1.BulkWalEntry bulk_entries = 2; + for (unsigned i = 0, + n = static_cast(this->_internal_bulk_entries_size()); i < n; i++) { + const auto& repfield = this->_internal_bulk_entries(i); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(2, repfield, repfield.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); @@ -794,6 +860,13 @@ size_t WalEntry::ByteSizeLong() const { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); } + // repeated .greptime.v1.BulkWalEntry bulk_entries = 2; + total_size += 1UL * this->_internal_bulk_entries_size(); + for (const auto& msg : this->_impl_.bulk_entries_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); } @@ -813,6 +886,7 @@ void WalEntry::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTO (void) cached_has_bits; _this->_impl_.mutations_.MergeFrom(from._impl_.mutations_); + _this->_impl_.bulk_entries_.MergeFrom(from._impl_.bulk_entries_); _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); } @@ -831,6 +905,7 @@ void WalEntry::InternalSwap(WalEntry* other) { using std::swap; _internal_metadata_.InternalSwap(&other->_internal_metadata_); _impl_.mutations_.InternalSwap(&other->_impl_.mutations_); + _impl_.bulk_entries_.InternalSwap(&other->_impl_.bulk_entries_); } ::PROTOBUF_NAMESPACE_ID::Metadata WalEntry::GetMetadata() const { @@ -839,6 +914,370 @@ void WalEntry::InternalSwap(WalEntry* other) { file_level_metadata_greptime_2fv1_2fwal_2eproto[2]); } +// =================================================================== + +class BulkWalEntry::_Internal { + public: + static const ::greptime::v1::ArrowIpc& arrow_ipc(const BulkWalEntry* msg); +}; + +const ::greptime::v1::ArrowIpc& +BulkWalEntry::_Internal::arrow_ipc(const BulkWalEntry* msg) { + return *msg->_impl_.body_.arrow_ipc_; +} +void BulkWalEntry::set_allocated_arrow_ipc(::greptime::v1::ArrowIpc* arrow_ipc) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + clear_body(); + if (arrow_ipc) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(arrow_ipc)); + if (message_arena != submessage_arena) { + arrow_ipc = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, arrow_ipc, submessage_arena); + } + set_has_arrow_ipc(); + _impl_.body_.arrow_ipc_ = arrow_ipc; + } + // @@protoc_insertion_point(field_set_allocated:greptime.v1.BulkWalEntry.arrow_ipc) +} +void BulkWalEntry::clear_arrow_ipc() { + if (_internal_has_arrow_ipc()) { + if (GetArenaForAllocation() == nullptr) { + delete _impl_.body_.arrow_ipc_; + } + clear_has_body(); + } +} +BulkWalEntry::BulkWalEntry(::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.BulkWalEntry) +} +BulkWalEntry::BulkWalEntry(const BulkWalEntry& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + BulkWalEntry* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.sequence_){} + , decltype(_impl_.max_ts_){} + , decltype(_impl_.min_ts_){} + , decltype(_impl_.timestamp_index_){} + , decltype(_impl_.body_){} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_._oneof_case_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + ::memcpy(&_impl_.sequence_, &from._impl_.sequence_, + static_cast(reinterpret_cast(&_impl_.timestamp_index_) - + reinterpret_cast(&_impl_.sequence_)) + sizeof(_impl_.timestamp_index_)); + clear_has_body(); + switch (from.body_case()) { + case kArrowIpc: { + _this->_internal_mutable_arrow_ipc()->::greptime::v1::ArrowIpc::MergeFrom( + from._internal_arrow_ipc()); + break; + } + case BODY_NOT_SET: { + break; + } + } + // @@protoc_insertion_point(copy_constructor:greptime.v1.BulkWalEntry) +} + +inline void BulkWalEntry::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.sequence_){uint64_t{0u}} + , decltype(_impl_.max_ts_){int64_t{0}} + , decltype(_impl_.min_ts_){int64_t{0}} + , decltype(_impl_.timestamp_index_){0u} + , decltype(_impl_.body_){} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_._oneof_case_)*/{} + }; + clear_has_body(); +} + +BulkWalEntry::~BulkWalEntry() { + // @@protoc_insertion_point(destructor:greptime.v1.BulkWalEntry) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void BulkWalEntry::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + if (has_body()) { + clear_body(); + } +} + +void BulkWalEntry::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void BulkWalEntry::clear_body() { +// @@protoc_insertion_point(one_of_clear_start:greptime.v1.BulkWalEntry) + switch (body_case()) { + case kArrowIpc: { + if (GetArenaForAllocation() == nullptr) { + delete _impl_.body_.arrow_ipc_; + } + break; + } + case BODY_NOT_SET: { + break; + } + } + _impl_._oneof_case_[0] = BODY_NOT_SET; +} + + +void BulkWalEntry::Clear() { +// @@protoc_insertion_point(message_clear_start:greptime.v1.BulkWalEntry) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + ::memset(&_impl_.sequence_, 0, static_cast( + reinterpret_cast(&_impl_.timestamp_index_) - + reinterpret_cast(&_impl_.sequence_)) + sizeof(_impl_.timestamp_index_)); + clear_body(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* BulkWalEntry::_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) { + // uint64 sequence = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + _impl_.sequence_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // int64 max_ts = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { + _impl_.max_ts_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // int64 min_ts = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 24)) { + _impl_.min_ts_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // uint32 timestamp_index = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 32)) { + _impl_.timestamp_index_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // .greptime.v1.ArrowIpc arrow_ipc = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 42)) { + ptr = ctx->ParseMessage(_internal_mutable_arrow_ipc(), 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* BulkWalEntry::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:greptime.v1.BulkWalEntry) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // uint64 sequence = 1; + if (this->_internal_sequence() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray(1, this->_internal_sequence(), target); + } + + // int64 max_ts = 2; + if (this->_internal_max_ts() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteInt64ToArray(2, this->_internal_max_ts(), target); + } + + // int64 min_ts = 3; + if (this->_internal_min_ts() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteInt64ToArray(3, this->_internal_min_ts(), target); + } + + // uint32 timestamp_index = 4; + if (this->_internal_timestamp_index() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray(4, this->_internal_timestamp_index(), target); + } + + // .greptime.v1.ArrowIpc arrow_ipc = 5; + if (_internal_has_arrow_ipc()) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(5, _Internal::arrow_ipc(this), + _Internal::arrow_ipc(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); + } + // @@protoc_insertion_point(serialize_to_array_end:greptime.v1.BulkWalEntry) + return target; +} + +size_t BulkWalEntry::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:greptime.v1.BulkWalEntry) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // uint64 sequence = 1; + if (this->_internal_sequence() != 0) { + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_sequence()); + } + + // int64 max_ts = 2; + if (this->_internal_max_ts() != 0) { + total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_max_ts()); + } + + // int64 min_ts = 3; + if (this->_internal_min_ts() != 0) { + total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_min_ts()); + } + + // uint32 timestamp_index = 4; + if (this->_internal_timestamp_index() != 0) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_timestamp_index()); + } + + switch (body_case()) { + // .greptime.v1.ArrowIpc arrow_ipc = 5; + case kArrowIpc: { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *_impl_.body_.arrow_ipc_); + break; + } + case BODY_NOT_SET: { + break; + } + } + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData BulkWalEntry::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + BulkWalEntry::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*BulkWalEntry::GetClassData() const { return &_class_data_; } + + +void BulkWalEntry::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.BulkWalEntry) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (from._internal_sequence() != 0) { + _this->_internal_set_sequence(from._internal_sequence()); + } + if (from._internal_max_ts() != 0) { + _this->_internal_set_max_ts(from._internal_max_ts()); + } + if (from._internal_min_ts() != 0) { + _this->_internal_set_min_ts(from._internal_min_ts()); + } + if (from._internal_timestamp_index() != 0) { + _this->_internal_set_timestamp_index(from._internal_timestamp_index()); + } + switch (from.body_case()) { + case kArrowIpc: { + _this->_internal_mutable_arrow_ipc()->::greptime::v1::ArrowIpc::MergeFrom( + from._internal_arrow_ipc()); + break; + } + case BODY_NOT_SET: { + break; + } + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void BulkWalEntry::CopyFrom(const BulkWalEntry& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:greptime.v1.BulkWalEntry) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool BulkWalEntry::IsInitialized() const { + return true; +} + +void BulkWalEntry::InternalSwap(BulkWalEntry* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(BulkWalEntry, _impl_.timestamp_index_) + + sizeof(BulkWalEntry::_impl_.timestamp_index_) + - PROTOBUF_FIELD_OFFSET(BulkWalEntry, _impl_.sequence_)>( + reinterpret_cast(&_impl_.sequence_), + reinterpret_cast(&other->_impl_.sequence_)); + swap(_impl_.body_, other->_impl_.body_); + swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]); +} + +::PROTOBUF_NAMESPACE_ID::Metadata BulkWalEntry::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_greptime_2fv1_2fwal_2eproto_getter, &descriptor_table_greptime_2fv1_2fwal_2eproto_once, + file_level_metadata_greptime_2fv1_2fwal_2eproto[3]); +} + // @@protoc_insertion_point(namespace_scope) } // namespace v1 } // namespace greptime @@ -855,6 +1294,10 @@ template<> PROTOBUF_NOINLINE ::greptime::v1::WalEntry* Arena::CreateMaybeMessage< ::greptime::v1::WalEntry >(Arena* arena) { return Arena::CreateMessageInternal< ::greptime::v1::WalEntry >(arena); } +template<> PROTOBUF_NOINLINE ::greptime::v1::BulkWalEntry* +Arena::CreateMaybeMessage< ::greptime::v1::BulkWalEntry >(Arena* arena) { + return Arena::CreateMessageInternal< ::greptime::v1::BulkWalEntry >(arena); +} PROTOBUF_NAMESPACE_CLOSE // @@protoc_insertion_point(global_scope) diff --git a/c++/greptime/v1/wal.pb.h b/c++/greptime/v1/wal.pb.h index efd9323..03a7653 100644 --- a/c++/greptime/v1/wal.pb.h +++ b/c++/greptime/v1/wal.pb.h @@ -32,6 +32,7 @@ #include #include #include "greptime/v1/row.pb.h" +#include "greptime/v1/common.pb.h" // @@protoc_insertion_point(includes) #include #define PROTOBUF_INTERNAL_EXPORT_greptime_2fv1_2fwal_2eproto @@ -48,6 +49,9 @@ struct TableStruct_greptime_2fv1_2fwal_2eproto { extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_greptime_2fv1_2fwal_2eproto; namespace greptime { namespace v1 { +class BulkWalEntry; +struct BulkWalEntryDefaultTypeInternal; +extern BulkWalEntryDefaultTypeInternal _BulkWalEntry_default_instance_; class Mutation; struct MutationDefaultTypeInternal; extern MutationDefaultTypeInternal _Mutation_default_instance_; @@ -60,6 +64,7 @@ extern WriteHintDefaultTypeInternal _WriteHint_default_instance_; } // namespace v1 } // namespace greptime PROTOBUF_NAMESPACE_OPEN +template<> ::greptime::v1::BulkWalEntry* Arena::CreateMaybeMessage<::greptime::v1::BulkWalEntry>(Arena*); template<> ::greptime::v1::Mutation* Arena::CreateMaybeMessage<::greptime::v1::Mutation>(Arena*); template<> ::greptime::v1::WalEntry* Arena::CreateMaybeMessage<::greptime::v1::WalEntry>(Arena*); template<> ::greptime::v1::WriteHint* Arena::CreateMaybeMessage<::greptime::v1::WriteHint>(Arena*); @@ -588,6 +593,7 @@ class WalEntry final : enum : int { kMutationsFieldNumber = 1, + kBulkEntriesFieldNumber = 2, }; // repeated .greptime.v1.Mutation mutations = 1; int mutations_size() const; @@ -607,6 +613,24 @@ class WalEntry final : const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::greptime::v1::Mutation >& mutations() const; + // repeated .greptime.v1.BulkWalEntry bulk_entries = 2; + int bulk_entries_size() const; + private: + int _internal_bulk_entries_size() const; + public: + void clear_bulk_entries(); + ::greptime::v1::BulkWalEntry* mutable_bulk_entries(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::greptime::v1::BulkWalEntry >* + mutable_bulk_entries(); + private: + const ::greptime::v1::BulkWalEntry& _internal_bulk_entries(int index) const; + ::greptime::v1::BulkWalEntry* _internal_add_bulk_entries(); + public: + const ::greptime::v1::BulkWalEntry& bulk_entries(int index) const; + ::greptime::v1::BulkWalEntry* add_bulk_entries(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::greptime::v1::BulkWalEntry >& + bulk_entries() const; + // @@protoc_insertion_point(class_scope:greptime.v1.WalEntry) private: class _Internal; @@ -616,11 +640,230 @@ class WalEntry final : typedef void DestructorSkippable_; struct Impl_ { ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::greptime::v1::Mutation > mutations_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::greptime::v1::BulkWalEntry > bulk_entries_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; }; union { Impl_ _impl_; }; friend struct ::TableStruct_greptime_2fv1_2fwal_2eproto; }; +// ------------------------------------------------------------------- + +class BulkWalEntry final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:greptime.v1.BulkWalEntry) */ { + public: + inline BulkWalEntry() : BulkWalEntry(nullptr) {} + ~BulkWalEntry() override; + explicit PROTOBUF_CONSTEXPR BulkWalEntry(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + BulkWalEntry(const BulkWalEntry& from); + BulkWalEntry(BulkWalEntry&& from) noexcept + : BulkWalEntry() { + *this = ::std::move(from); + } + + inline BulkWalEntry& operator=(const BulkWalEntry& from) { + CopyFrom(from); + return *this; + } + inline BulkWalEntry& operator=(BulkWalEntry&& 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 BulkWalEntry& default_instance() { + return *internal_default_instance(); + } + enum BodyCase { + kArrowIpc = 5, + BODY_NOT_SET = 0, + }; + + static inline const BulkWalEntry* internal_default_instance() { + return reinterpret_cast( + &_BulkWalEntry_default_instance_); + } + static constexpr int kIndexInFileMessages = + 3; + + friend void swap(BulkWalEntry& a, BulkWalEntry& b) { + a.Swap(&b); + } + inline void Swap(BulkWalEntry* 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(BulkWalEntry* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + BulkWalEntry* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const BulkWalEntry& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const BulkWalEntry& from) { + BulkWalEntry::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(BulkWalEntry* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "greptime.v1.BulkWalEntry"; + } + protected: + explicit BulkWalEntry(::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 { + kSequenceFieldNumber = 1, + kMaxTsFieldNumber = 2, + kMinTsFieldNumber = 3, + kTimestampIndexFieldNumber = 4, + kArrowIpcFieldNumber = 5, + }; + // uint64 sequence = 1; + void clear_sequence(); + uint64_t sequence() const; + void set_sequence(uint64_t value); + private: + uint64_t _internal_sequence() const; + void _internal_set_sequence(uint64_t value); + public: + + // int64 max_ts = 2; + void clear_max_ts(); + int64_t max_ts() const; + void set_max_ts(int64_t value); + private: + int64_t _internal_max_ts() const; + void _internal_set_max_ts(int64_t value); + public: + + // int64 min_ts = 3; + void clear_min_ts(); + int64_t min_ts() const; + void set_min_ts(int64_t value); + private: + int64_t _internal_min_ts() const; + void _internal_set_min_ts(int64_t value); + public: + + // uint32 timestamp_index = 4; + void clear_timestamp_index(); + uint32_t timestamp_index() const; + void set_timestamp_index(uint32_t value); + private: + uint32_t _internal_timestamp_index() const; + void _internal_set_timestamp_index(uint32_t value); + public: + + // .greptime.v1.ArrowIpc arrow_ipc = 5; + bool has_arrow_ipc() const; + private: + bool _internal_has_arrow_ipc() const; + public: + void clear_arrow_ipc(); + const ::greptime::v1::ArrowIpc& arrow_ipc() const; + PROTOBUF_NODISCARD ::greptime::v1::ArrowIpc* release_arrow_ipc(); + ::greptime::v1::ArrowIpc* mutable_arrow_ipc(); + void set_allocated_arrow_ipc(::greptime::v1::ArrowIpc* arrow_ipc); + private: + const ::greptime::v1::ArrowIpc& _internal_arrow_ipc() const; + ::greptime::v1::ArrowIpc* _internal_mutable_arrow_ipc(); + public: + void unsafe_arena_set_allocated_arrow_ipc( + ::greptime::v1::ArrowIpc* arrow_ipc); + ::greptime::v1::ArrowIpc* unsafe_arena_release_arrow_ipc(); + + void clear_body(); + BodyCase body_case() const; + // @@protoc_insertion_point(class_scope:greptime.v1.BulkWalEntry) + private: + class _Internal; + void set_has_arrow_ipc(); + + inline bool has_body() const; + inline void clear_has_body(); + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + uint64_t sequence_; + int64_t max_ts_; + int64_t min_ts_; + uint32_t timestamp_index_; + union BodyUnion { + constexpr BodyUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + ::greptime::v1::ArrowIpc* arrow_ipc_; + } body_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + uint32_t _oneof_case_[1]; + + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_greptime_2fv1_2fwal_2eproto; +}; // =================================================================== @@ -915,6 +1158,205 @@ WalEntry::mutations() const { return _impl_.mutations_; } +// repeated .greptime.v1.BulkWalEntry bulk_entries = 2; +inline int WalEntry::_internal_bulk_entries_size() const { + return _impl_.bulk_entries_.size(); +} +inline int WalEntry::bulk_entries_size() const { + return _internal_bulk_entries_size(); +} +inline void WalEntry::clear_bulk_entries() { + _impl_.bulk_entries_.Clear(); +} +inline ::greptime::v1::BulkWalEntry* WalEntry::mutable_bulk_entries(int index) { + // @@protoc_insertion_point(field_mutable:greptime.v1.WalEntry.bulk_entries) + return _impl_.bulk_entries_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::greptime::v1::BulkWalEntry >* +WalEntry::mutable_bulk_entries() { + // @@protoc_insertion_point(field_mutable_list:greptime.v1.WalEntry.bulk_entries) + return &_impl_.bulk_entries_; +} +inline const ::greptime::v1::BulkWalEntry& WalEntry::_internal_bulk_entries(int index) const { + return _impl_.bulk_entries_.Get(index); +} +inline const ::greptime::v1::BulkWalEntry& WalEntry::bulk_entries(int index) const { + // @@protoc_insertion_point(field_get:greptime.v1.WalEntry.bulk_entries) + return _internal_bulk_entries(index); +} +inline ::greptime::v1::BulkWalEntry* WalEntry::_internal_add_bulk_entries() { + return _impl_.bulk_entries_.Add(); +} +inline ::greptime::v1::BulkWalEntry* WalEntry::add_bulk_entries() { + ::greptime::v1::BulkWalEntry* _add = _internal_add_bulk_entries(); + // @@protoc_insertion_point(field_add:greptime.v1.WalEntry.bulk_entries) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::greptime::v1::BulkWalEntry >& +WalEntry::bulk_entries() const { + // @@protoc_insertion_point(field_list:greptime.v1.WalEntry.bulk_entries) + return _impl_.bulk_entries_; +} + +// ------------------------------------------------------------------- + +// BulkWalEntry + +// uint64 sequence = 1; +inline void BulkWalEntry::clear_sequence() { + _impl_.sequence_ = uint64_t{0u}; +} +inline uint64_t BulkWalEntry::_internal_sequence() const { + return _impl_.sequence_; +} +inline uint64_t BulkWalEntry::sequence() const { + // @@protoc_insertion_point(field_get:greptime.v1.BulkWalEntry.sequence) + return _internal_sequence(); +} +inline void BulkWalEntry::_internal_set_sequence(uint64_t value) { + + _impl_.sequence_ = value; +} +inline void BulkWalEntry::set_sequence(uint64_t value) { + _internal_set_sequence(value); + // @@protoc_insertion_point(field_set:greptime.v1.BulkWalEntry.sequence) +} + +// int64 max_ts = 2; +inline void BulkWalEntry::clear_max_ts() { + _impl_.max_ts_ = int64_t{0}; +} +inline int64_t BulkWalEntry::_internal_max_ts() const { + return _impl_.max_ts_; +} +inline int64_t BulkWalEntry::max_ts() const { + // @@protoc_insertion_point(field_get:greptime.v1.BulkWalEntry.max_ts) + return _internal_max_ts(); +} +inline void BulkWalEntry::_internal_set_max_ts(int64_t value) { + + _impl_.max_ts_ = value; +} +inline void BulkWalEntry::set_max_ts(int64_t value) { + _internal_set_max_ts(value); + // @@protoc_insertion_point(field_set:greptime.v1.BulkWalEntry.max_ts) +} + +// int64 min_ts = 3; +inline void BulkWalEntry::clear_min_ts() { + _impl_.min_ts_ = int64_t{0}; +} +inline int64_t BulkWalEntry::_internal_min_ts() const { + return _impl_.min_ts_; +} +inline int64_t BulkWalEntry::min_ts() const { + // @@protoc_insertion_point(field_get:greptime.v1.BulkWalEntry.min_ts) + return _internal_min_ts(); +} +inline void BulkWalEntry::_internal_set_min_ts(int64_t value) { + + _impl_.min_ts_ = value; +} +inline void BulkWalEntry::set_min_ts(int64_t value) { + _internal_set_min_ts(value); + // @@protoc_insertion_point(field_set:greptime.v1.BulkWalEntry.min_ts) +} + +// uint32 timestamp_index = 4; +inline void BulkWalEntry::clear_timestamp_index() { + _impl_.timestamp_index_ = 0u; +} +inline uint32_t BulkWalEntry::_internal_timestamp_index() const { + return _impl_.timestamp_index_; +} +inline uint32_t BulkWalEntry::timestamp_index() const { + // @@protoc_insertion_point(field_get:greptime.v1.BulkWalEntry.timestamp_index) + return _internal_timestamp_index(); +} +inline void BulkWalEntry::_internal_set_timestamp_index(uint32_t value) { + + _impl_.timestamp_index_ = value; +} +inline void BulkWalEntry::set_timestamp_index(uint32_t value) { + _internal_set_timestamp_index(value); + // @@protoc_insertion_point(field_set:greptime.v1.BulkWalEntry.timestamp_index) +} + +// .greptime.v1.ArrowIpc arrow_ipc = 5; +inline bool BulkWalEntry::_internal_has_arrow_ipc() const { + return body_case() == kArrowIpc; +} +inline bool BulkWalEntry::has_arrow_ipc() const { + return _internal_has_arrow_ipc(); +} +inline void BulkWalEntry::set_has_arrow_ipc() { + _impl_._oneof_case_[0] = kArrowIpc; +} +inline ::greptime::v1::ArrowIpc* BulkWalEntry::release_arrow_ipc() { + // @@protoc_insertion_point(field_release:greptime.v1.BulkWalEntry.arrow_ipc) + if (_internal_has_arrow_ipc()) { + clear_has_body(); + ::greptime::v1::ArrowIpc* temp = _impl_.body_.arrow_ipc_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + _impl_.body_.arrow_ipc_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::greptime::v1::ArrowIpc& BulkWalEntry::_internal_arrow_ipc() const { + return _internal_has_arrow_ipc() + ? *_impl_.body_.arrow_ipc_ + : reinterpret_cast< ::greptime::v1::ArrowIpc&>(::greptime::v1::_ArrowIpc_default_instance_); +} +inline const ::greptime::v1::ArrowIpc& BulkWalEntry::arrow_ipc() const { + // @@protoc_insertion_point(field_get:greptime.v1.BulkWalEntry.arrow_ipc) + return _internal_arrow_ipc(); +} +inline ::greptime::v1::ArrowIpc* BulkWalEntry::unsafe_arena_release_arrow_ipc() { + // @@protoc_insertion_point(field_unsafe_arena_release:greptime.v1.BulkWalEntry.arrow_ipc) + if (_internal_has_arrow_ipc()) { + clear_has_body(); + ::greptime::v1::ArrowIpc* temp = _impl_.body_.arrow_ipc_; + _impl_.body_.arrow_ipc_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void BulkWalEntry::unsafe_arena_set_allocated_arrow_ipc(::greptime::v1::ArrowIpc* arrow_ipc) { + clear_body(); + if (arrow_ipc) { + set_has_arrow_ipc(); + _impl_.body_.arrow_ipc_ = arrow_ipc; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:greptime.v1.BulkWalEntry.arrow_ipc) +} +inline ::greptime::v1::ArrowIpc* BulkWalEntry::_internal_mutable_arrow_ipc() { + if (!_internal_has_arrow_ipc()) { + clear_body(); + set_has_arrow_ipc(); + _impl_.body_.arrow_ipc_ = CreateMaybeMessage< ::greptime::v1::ArrowIpc >(GetArenaForAllocation()); + } + return _impl_.body_.arrow_ipc_; +} +inline ::greptime::v1::ArrowIpc* BulkWalEntry::mutable_arrow_ipc() { + ::greptime::v1::ArrowIpc* _msg = _internal_mutable_arrow_ipc(); + // @@protoc_insertion_point(field_mutable:greptime.v1.BulkWalEntry.arrow_ipc) + return _msg; +} + +inline bool BulkWalEntry::has_body() const { + return body_case() != BODY_NOT_SET; +} +inline void BulkWalEntry::clear_has_body() { + _impl_._oneof_case_[0] = BODY_NOT_SET; +} +inline BulkWalEntry::BodyCase BulkWalEntry::body_case() const { + return BulkWalEntry::BodyCase(_impl_._oneof_case_[0]); +} #ifdef __GNUC__ #pragma GCC diagnostic pop #endif // __GNUC__ @@ -922,6 +1364,8 @@ WalEntry::mutations() const { // ------------------------------------------------------------------- +// ------------------------------------------------------------------- + // @@protoc_insertion_point(namespace_scope) diff --git a/go/greptime/v1/common.pb.go b/go/greptime/v1/common.pb.go index 595a485..bff8258 100644 --- a/go/greptime/v1/common.pb.go +++ b/go/greptime/v1/common.pb.go @@ -1481,6 +1481,69 @@ func (x *ColumnOptions) GetOptions() map[string]string { return nil } +type ArrowIpc struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Schema []byte `protobuf:"bytes,1,opt,name=schema,proto3" json:"schema,omitempty"` + DataHeader []byte `protobuf:"bytes,2,opt,name=data_header,json=dataHeader,proto3" json:"data_header,omitempty"` + Payload []byte `protobuf:"bytes,3,opt,name=payload,proto3" json:"payload,omitempty"` +} + +func (x *ArrowIpc) Reset() { + *x = ArrowIpc{} + if protoimpl.UnsafeEnabled { + mi := &file_greptime_v1_common_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ArrowIpc) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ArrowIpc) ProtoMessage() {} + +func (x *ArrowIpc) ProtoReflect() protoreflect.Message { + mi := &file_greptime_v1_common_proto_msgTypes[20] + 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 ArrowIpc.ProtoReflect.Descriptor instead. +func (*ArrowIpc) Descriptor() ([]byte, []int) { + return file_greptime_v1_common_proto_rawDescGZIP(), []int{20} +} + +func (x *ArrowIpc) GetSchema() []byte { + if x != nil { + return x.Schema + } + return nil +} + +func (x *ArrowIpc) GetDataHeader() []byte { + if x != nil { + return x.DataHeader + } + return nil +} + +func (x *ArrowIpc) GetPayload() []byte { + if x != nil { + return x.Payload + } + return nil +} + var File_greptime_v1_common_proto protoreflect.FileDescriptor var file_greptime_v1_common_proto_rawDesc = []byte{ @@ -1641,49 +1704,55 @@ var file_greptime_v1_common_proto_rawDesc = []byte{ 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, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, + 0x5d, 0x0a, 0x08, 0x41, 0x72, 0x72, 0x6f, 0x77, 0x49, 0x70, 0x63, 0x12, 0x16, 0x0a, 0x06, 0x73, + 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x73, 0x63, 0x68, + 0x65, 0x6d, 0x61, 0x12, 0x1f, 0x0a, 0x0b, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x68, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x64, 0x61, 0x74, 0x61, 0x48, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 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 ( @@ -1699,7 +1768,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, 25) +var file_greptime_v1_common_proto_msgTypes = make([]protoimpl.MessageInfo, 26) var file_greptime_v1_common_proto_goTypes = []interface{}{ (SemanticType)(0), // 0: greptime.v1.SemanticType (ColumnDataType)(0), // 1: greptime.v1.ColumnDataType @@ -1724,20 +1793,21 @@ var file_greptime_v1_common_proto_goTypes = []interface{}{ (*DecimalTypeExtension)(nil), // 20: greptime.v1.DecimalTypeExtension (*VectorTypeExtension)(nil), // 21: greptime.v1.VectorTypeExtension (*ColumnOptions)(nil), // 22: greptime.v1.ColumnOptions - nil, // 23: greptime.v1.QueryContext.ExtensionsEntry - nil, // 24: greptime.v1.SnapshotSequences.SstMinSequencesEntry - nil, // 25: greptime.v1.SnapshotSequences.SnapshotSeqsEntry - nil, // 26: greptime.v1.RequestHeader.TracingContextEntry - nil, // 27: greptime.v1.ColumnOptions.OptionsEntry + (*ArrowIpc)(nil), // 23: greptime.v1.ArrowIpc + nil, // 24: greptime.v1.QueryContext.ExtensionsEntry + nil, // 25: greptime.v1.SnapshotSequences.SstMinSequencesEntry + nil, // 26: greptime.v1.SnapshotSequences.SnapshotSeqsEntry + nil, // 27: greptime.v1.RequestHeader.TracingContextEntry + nil, // 28: greptime.v1.ColumnOptions.OptionsEntry } var file_greptime_v1_common_proto_depIdxs = []int32{ - 23, // 0: greptime.v1.QueryContext.extensions:type_name -> greptime.v1.QueryContext.ExtensionsEntry + 24, // 0: greptime.v1.QueryContext.extensions:type_name -> greptime.v1.QueryContext.ExtensionsEntry 4, // 1: greptime.v1.QueryContext.snapshot_seqs:type_name -> greptime.v1.SnapshotSequences 5, // 2: greptime.v1.QueryContext.explain:type_name -> greptime.v1.ExplainOptions - 24, // 3: greptime.v1.SnapshotSequences.sst_min_sequences:type_name -> greptime.v1.SnapshotSequences.SstMinSequencesEntry - 25, // 4: greptime.v1.SnapshotSequences.snapshot_seqs:type_name -> greptime.v1.SnapshotSequences.SnapshotSeqsEntry + 25, // 3: greptime.v1.SnapshotSequences.sst_min_sequences:type_name -> greptime.v1.SnapshotSequences.SstMinSequencesEntry + 26, // 4: greptime.v1.SnapshotSequences.snapshot_seqs:type_name -> greptime.v1.SnapshotSequences.SnapshotSeqsEntry 9, // 5: greptime.v1.RequestHeader.authorization:type_name -> greptime.v1.AuthHeader - 26, // 6: greptime.v1.RequestHeader.tracing_context:type_name -> greptime.v1.RequestHeader.TracingContextEntry + 27, // 6: greptime.v1.RequestHeader.tracing_context:type_name -> greptime.v1.RequestHeader.TracingContextEntry 8, // 7: greptime.v1.ResponseHeader.status:type_name -> greptime.v1.Status 10, // 8: greptime.v1.AuthHeader.basic:type_name -> greptime.v1.Basic 11, // 9: greptime.v1.AuthHeader.token:type_name -> greptime.v1.Token @@ -1746,7 +1816,7 @@ var file_greptime_v1_common_proto_depIdxs = []int32{ 20, // 12: greptime.v1.ColumnDataTypeExtension.decimal_type:type_name -> greptime.v1.DecimalTypeExtension 2, // 13: greptime.v1.ColumnDataTypeExtension.json_type:type_name -> greptime.v1.JsonTypeExtension 21, // 14: greptime.v1.ColumnDataTypeExtension.vector_type:type_name -> greptime.v1.VectorTypeExtension - 27, // 15: greptime.v1.ColumnOptions.options:type_name -> greptime.v1.ColumnOptions.OptionsEntry + 28, // 15: greptime.v1.ColumnOptions.options:type_name -> greptime.v1.ColumnOptions.OptionsEntry 16, // [16:16] is the sub-list for method output_type 16, // [16:16] is the sub-list for method input_type 16, // [16:16] is the sub-list for extension type_name @@ -2000,6 +2070,18 @@ func file_greptime_v1_common_proto_init() { return nil } } + file_greptime_v1_common_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ArrowIpc); 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[6].OneofWrappers = []interface{}{ (*AuthHeader_Basic)(nil), @@ -2016,7 +2098,7 @@ func file_greptime_v1_common_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_greptime_v1_common_proto_rawDesc, NumEnums: 3, - NumMessages: 25, + NumMessages: 26, NumExtensions: 0, NumServices: 0, }, diff --git a/go/greptime/v1/wal.pb.go b/go/greptime/v1/wal.pb.go index 1961d97..a44093e 100644 --- a/go/greptime/v1/wal.pb.go +++ b/go/greptime/v1/wal.pb.go @@ -262,6 +262,8 @@ type WalEntry struct { // List of mutations for a region. Mutations []*Mutation `protobuf:"bytes,1,rep,name=mutations,proto3" json:"mutations,omitempty"` + // List of bulk insert requests. + BulkEntries []*BulkWalEntry `protobuf:"bytes,2,rep,name=bulk_entries,json=bulkEntries,proto3" json:"bulk_entries,omitempty"` } func (x *WalEntry) Reset() { @@ -303,43 +305,171 @@ func (x *WalEntry) GetMutations() []*Mutation { return nil } +func (x *WalEntry) GetBulkEntries() []*BulkWalEntry { + if x != nil { + return x.BulkEntries + } + return nil +} + +type BulkWalEntry struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Start WAL sequence of this entry. + Sequence uint64 `protobuf:"varint,1,opt,name=sequence,proto3" json:"sequence,omitempty"` + // Max timestamp value. + MaxTs int64 `protobuf:"varint,2,opt,name=max_ts,json=maxTs,proto3" json:"max_ts,omitempty"` + // Min timestamp value. + MinTs int64 `protobuf:"varint,3,opt,name=min_ts,json=minTs,proto3" json:"min_ts,omitempty"` + // Timestamp column index. + TimestampIndex uint32 `protobuf:"varint,4,opt,name=timestamp_index,json=timestampIndex,proto3" json:"timestamp_index,omitempty"` + // Types that are assignable to Body: + // + // *BulkWalEntry_ArrowIpc + Body isBulkWalEntry_Body `protobuf_oneof:"body"` +} + +func (x *BulkWalEntry) Reset() { + *x = BulkWalEntry{} + if protoimpl.UnsafeEnabled { + mi := &file_greptime_v1_wal_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BulkWalEntry) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BulkWalEntry) ProtoMessage() {} + +func (x *BulkWalEntry) ProtoReflect() protoreflect.Message { + mi := &file_greptime_v1_wal_proto_msgTypes[3] + 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 BulkWalEntry.ProtoReflect.Descriptor instead. +func (*BulkWalEntry) Descriptor() ([]byte, []int) { + return file_greptime_v1_wal_proto_rawDescGZIP(), []int{3} +} + +func (x *BulkWalEntry) GetSequence() uint64 { + if x != nil { + return x.Sequence + } + return 0 +} + +func (x *BulkWalEntry) GetMaxTs() int64 { + if x != nil { + return x.MaxTs + } + return 0 +} + +func (x *BulkWalEntry) GetMinTs() int64 { + if x != nil { + return x.MinTs + } + return 0 +} + +func (x *BulkWalEntry) GetTimestampIndex() uint32 { + if x != nil { + return x.TimestampIndex + } + return 0 +} + +func (m *BulkWalEntry) GetBody() isBulkWalEntry_Body { + if m != nil { + return m.Body + } + return nil +} + +func (x *BulkWalEntry) GetArrowIpc() *ArrowIpc { + if x, ok := x.GetBody().(*BulkWalEntry_ArrowIpc); ok { + return x.ArrowIpc + } + return nil +} + +type isBulkWalEntry_Body interface { + isBulkWalEntry_Body() +} + +type BulkWalEntry_ArrowIpc struct { + ArrowIpc *ArrowIpc `protobuf:"bytes,5,opt,name=arrow_ipc,json=arrowIpc,proto3,oneof"` +} + +func (*BulkWalEntry_ArrowIpc) isBulkWalEntry_Body() {} + var File_greptime_v1_wal_proto protoreflect.FileDescriptor var file_greptime_v1_wal_proto_rawDesc = []byte{ 0x0a, 0x15, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x77, 0x61, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x15, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, - 0x31, 0x2f, 0x72, 0x6f, 0x77, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5e, 0x0a, 0x09, 0x57, - 0x72, 0x69, 0x74, 0x65, 0x48, 0x69, 0x6e, 0x74, 0x12, 0x51, 0x0a, 0x14, 0x70, 0x72, 0x69, 0x6d, - 0x61, 0x72, 0x79, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, - 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x4b, 0x65, 0x79, 0x45, - 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x12, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, - 0x4b, 0x65, 0x79, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x22, 0xb2, 0x01, 0x0a, 0x08, - 0x4d, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2c, 0x0a, 0x07, 0x6f, 0x70, 0x5f, 0x74, - 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x67, 0x72, 0x65, 0x70, - 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x54, 0x79, 0x70, 0x65, 0x52, 0x06, - 0x6f, 0x70, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, - 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, - 0x63, 0x65, 0x12, 0x25, 0x0a, 0x04, 0x72, 0x6f, 0x77, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x11, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, - 0x6f, 0x77, 0x73, 0x52, 0x04, 0x72, 0x6f, 0x77, 0x73, 0x12, 0x35, 0x0a, 0x0a, 0x77, 0x72, 0x69, - 0x74, 0x65, 0x5f, 0x68, 0x69, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, - 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x72, 0x69, 0x74, - 0x65, 0x48, 0x69, 0x6e, 0x74, 0x52, 0x09, 0x77, 0x72, 0x69, 0x74, 0x65, 0x48, 0x69, 0x6e, 0x74, - 0x22, 0x3f, 0x0a, 0x08, 0x57, 0x61, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x33, 0x0a, 0x09, - 0x6d, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x15, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x75, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x6d, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2a, 0x1d, 0x0a, 0x06, 0x4f, 0x70, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x44, - 0x45, 0x4c, 0x45, 0x54, 0x45, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x50, 0x55, 0x54, 0x10, 0x01, - 0x2a, 0x2b, 0x0a, 0x12, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x4b, 0x65, 0x79, 0x45, 0x6e, - 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x09, 0x0a, 0x05, 0x44, 0x45, 0x4e, 0x53, 0x45, 0x10, - 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x50, 0x41, 0x52, 0x53, 0x45, 0x10, 0x01, 0x42, 0x37, 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, + 0x31, 0x2f, 0x72, 0x6f, 0x77, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x67, 0x72, 0x65, + 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5e, 0x0a, 0x09, 0x57, 0x72, 0x69, 0x74, 0x65, 0x48, 0x69, + 0x6e, 0x74, 0x12, 0x51, 0x0a, 0x14, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x5f, 0x6b, 0x65, + 0x79, 0x5f, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x1f, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, + 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x4b, 0x65, 0x79, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, + 0x67, 0x52, 0x12, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x4b, 0x65, 0x79, 0x45, 0x6e, 0x63, + 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x22, 0xb2, 0x01, 0x0a, 0x08, 0x4d, 0x75, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x2c, 0x0a, 0x07, 0x6f, 0x70, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, + 0x31, 0x2e, 0x4f, 0x70, 0x54, 0x79, 0x70, 0x65, 0x52, 0x06, 0x6f, 0x70, 0x54, 0x79, 0x70, 0x65, + 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x25, 0x0a, 0x04, + 0x72, 0x6f, 0x77, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x67, 0x72, 0x65, + 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x6f, 0x77, 0x73, 0x52, 0x04, 0x72, + 0x6f, 0x77, 0x73, 0x12, 0x35, 0x0a, 0x0a, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x68, 0x69, 0x6e, + 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, + 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x48, 0x69, 0x6e, 0x74, 0x52, + 0x09, 0x77, 0x72, 0x69, 0x74, 0x65, 0x48, 0x69, 0x6e, 0x74, 0x22, 0x7d, 0x0a, 0x08, 0x57, 0x61, + 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x33, 0x0a, 0x09, 0x6d, 0x75, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x67, 0x72, 0x65, 0x70, + 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x09, 0x6d, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3c, 0x0a, 0x0c, 0x62, + 0x75, 0x6c, 0x6b, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, + 0x42, 0x75, 0x6c, 0x6b, 0x57, 0x61, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0b, 0x62, 0x75, + 0x6c, 0x6b, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x22, 0xbf, 0x01, 0x0a, 0x0c, 0x42, 0x75, + 0x6c, 0x6b, 0x57, 0x61, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, + 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x73, 0x65, + 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x15, 0x0a, 0x06, 0x6d, 0x61, 0x78, 0x5f, 0x74, 0x73, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x6d, 0x61, 0x78, 0x54, 0x73, 0x12, 0x15, 0x0a, + 0x06, 0x6d, 0x69, 0x6e, 0x5f, 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x6d, + 0x69, 0x6e, 0x54, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0e, 0x74, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x34, 0x0a, + 0x09, 0x61, 0x72, 0x72, 0x6f, 0x77, 0x5f, 0x69, 0x70, 0x63, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x15, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, + 0x72, 0x72, 0x6f, 0x77, 0x49, 0x70, 0x63, 0x48, 0x00, 0x52, 0x08, 0x61, 0x72, 0x72, 0x6f, 0x77, + 0x49, 0x70, 0x63, 0x42, 0x06, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x2a, 0x1d, 0x0a, 0x06, 0x4f, + 0x70, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x10, + 0x00, 0x12, 0x07, 0x0a, 0x03, 0x50, 0x55, 0x54, 0x10, 0x01, 0x2a, 0x2b, 0x0a, 0x12, 0x50, 0x72, + 0x69, 0x6d, 0x61, 0x72, 0x79, 0x4b, 0x65, 0x79, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, + 0x12, 0x09, 0x0a, 0x05, 0x44, 0x45, 0x4e, 0x53, 0x45, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x53, + 0x50, 0x41, 0x52, 0x53, 0x45, 0x10, 0x01, 0x42, 0x37, 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 ( @@ -355,26 +485,30 @@ func file_greptime_v1_wal_proto_rawDescGZIP() []byte { } var file_greptime_v1_wal_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_greptime_v1_wal_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_greptime_v1_wal_proto_msgTypes = make([]protoimpl.MessageInfo, 4) var file_greptime_v1_wal_proto_goTypes = []interface{}{ (OpType)(0), // 0: greptime.v1.OpType (PrimaryKeyEncoding)(0), // 1: greptime.v1.PrimaryKeyEncoding (*WriteHint)(nil), // 2: greptime.v1.WriteHint (*Mutation)(nil), // 3: greptime.v1.Mutation (*WalEntry)(nil), // 4: greptime.v1.WalEntry - (*Rows)(nil), // 5: greptime.v1.Rows + (*BulkWalEntry)(nil), // 5: greptime.v1.BulkWalEntry + (*Rows)(nil), // 6: greptime.v1.Rows + (*ArrowIpc)(nil), // 7: greptime.v1.ArrowIpc } var file_greptime_v1_wal_proto_depIdxs = []int32{ 1, // 0: greptime.v1.WriteHint.primary_key_encoding:type_name -> greptime.v1.PrimaryKeyEncoding 0, // 1: greptime.v1.Mutation.op_type:type_name -> greptime.v1.OpType - 5, // 2: greptime.v1.Mutation.rows:type_name -> greptime.v1.Rows + 6, // 2: greptime.v1.Mutation.rows:type_name -> greptime.v1.Rows 2, // 3: greptime.v1.Mutation.write_hint:type_name -> greptime.v1.WriteHint 3, // 4: greptime.v1.WalEntry.mutations:type_name -> greptime.v1.Mutation - 5, // [5:5] is the sub-list for method output_type - 5, // [5:5] is the sub-list for method input_type - 5, // [5:5] is the sub-list for extension type_name - 5, // [5:5] is the sub-list for extension extendee - 0, // [0:5] is the sub-list for field type_name + 5, // 5: greptime.v1.WalEntry.bulk_entries:type_name -> greptime.v1.BulkWalEntry + 7, // 6: greptime.v1.BulkWalEntry.arrow_ipc:type_name -> greptime.v1.ArrowIpc + 7, // [7:7] is the sub-list for method output_type + 7, // [7:7] is the sub-list for method input_type + 7, // [7:7] is the sub-list for extension type_name + 7, // [7:7] is the sub-list for extension extendee + 0, // [0:7] is the sub-list for field type_name } func init() { file_greptime_v1_wal_proto_init() } @@ -383,6 +517,7 @@ func file_greptime_v1_wal_proto_init() { return } file_greptime_v1_row_proto_init() + file_greptime_v1_common_proto_init() if !protoimpl.UnsafeEnabled { file_greptime_v1_wal_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*WriteHint); i { @@ -420,6 +555,21 @@ func file_greptime_v1_wal_proto_init() { return nil } } + file_greptime_v1_wal_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BulkWalEntry); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_greptime_v1_wal_proto_msgTypes[3].OneofWrappers = []interface{}{ + (*BulkWalEntry_ArrowIpc)(nil), } type x struct{} out := protoimpl.TypeBuilder{ @@ -427,7 +577,7 @@ func file_greptime_v1_wal_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_greptime_v1_wal_proto_rawDesc, NumEnums: 2, - NumMessages: 3, + NumMessages: 4, NumExtensions: 0, NumServices: 0, }, diff --git a/java/src/main/java/greptime/v1/Wal.java b/java/src/main/java/greptime/v1/Wal.java index dd9e255..28c9a9a 100644 --- a/java/src/main/java/greptime/v1/Wal.java +++ b/java/src/main/java/greptime/v1/Wal.java @@ -2024,6 +2024,50 @@ public final class Wal { */ greptime.v1.Wal.MutationOrBuilder getMutationsOrBuilder( int index); + + /** + *
+     * List of bulk insert requests.
+     * 
+ * + * repeated .greptime.v1.BulkWalEntry bulk_entries = 2; + */ + java.util.List + getBulkEntriesList(); + /** + *
+     * List of bulk insert requests.
+     * 
+ * + * repeated .greptime.v1.BulkWalEntry bulk_entries = 2; + */ + greptime.v1.Wal.BulkWalEntry getBulkEntries(int index); + /** + *
+     * List of bulk insert requests.
+     * 
+ * + * repeated .greptime.v1.BulkWalEntry bulk_entries = 2; + */ + int getBulkEntriesCount(); + /** + *
+     * List of bulk insert requests.
+     * 
+ * + * repeated .greptime.v1.BulkWalEntry bulk_entries = 2; + */ + java.util.List + getBulkEntriesOrBuilderList(); + /** + *
+     * List of bulk insert requests.
+     * 
+ * + * repeated .greptime.v1.BulkWalEntry bulk_entries = 2; + */ + greptime.v1.Wal.BulkWalEntryOrBuilder getBulkEntriesOrBuilder( + int index); } /** *
@@ -2043,6 +2087,7 @@ public final class Wal {
     }
     private WalEntry() {
       mutations_ = java.util.Collections.emptyList();
+      bulkEntries_ = java.util.Collections.emptyList();
     }
 
     @java.lang.Override
@@ -2085,6 +2130,15 @@ public final class Wal {
                   input.readMessage(greptime.v1.Wal.Mutation.parser(), extensionRegistry));
               break;
             }
+            case 18: {
+              if (!((mutable_bitField0_ & 0x00000002) != 0)) {
+                bulkEntries_ = new java.util.ArrayList();
+                mutable_bitField0_ |= 0x00000002;
+              }
+              bulkEntries_.add(
+                  input.readMessage(greptime.v1.Wal.BulkWalEntry.parser(), extensionRegistry));
+              break;
+            }
             default: {
               if (!parseUnknownField(
                   input, unknownFields, extensionRegistry, tag)) {
@@ -2105,6 +2159,9 @@ public final class Wal {
         if (((mutable_bitField0_ & 0x00000001) != 0)) {
           mutations_ = java.util.Collections.unmodifiableList(mutations_);
         }
+        if (((mutable_bitField0_ & 0x00000002) != 0)) {
+          bulkEntries_ = java.util.Collections.unmodifiableList(bulkEntries_);
+        }
         this.unknownFields = unknownFields.build();
         makeExtensionsImmutable();
       }
@@ -2182,6 +2239,66 @@ public final class Wal {
       return mutations_.get(index);
     }
 
+    public static final int BULK_ENTRIES_FIELD_NUMBER = 2;
+    private java.util.List bulkEntries_;
+    /**
+     * 
+     * List of bulk insert requests.
+     * 
+ * + * repeated .greptime.v1.BulkWalEntry bulk_entries = 2; + */ + @java.lang.Override + public java.util.List getBulkEntriesList() { + return bulkEntries_; + } + /** + *
+     * List of bulk insert requests.
+     * 
+ * + * repeated .greptime.v1.BulkWalEntry bulk_entries = 2; + */ + @java.lang.Override + public java.util.List + getBulkEntriesOrBuilderList() { + return bulkEntries_; + } + /** + *
+     * List of bulk insert requests.
+     * 
+ * + * repeated .greptime.v1.BulkWalEntry bulk_entries = 2; + */ + @java.lang.Override + public int getBulkEntriesCount() { + return bulkEntries_.size(); + } + /** + *
+     * List of bulk insert requests.
+     * 
+ * + * repeated .greptime.v1.BulkWalEntry bulk_entries = 2; + */ + @java.lang.Override + public greptime.v1.Wal.BulkWalEntry getBulkEntries(int index) { + return bulkEntries_.get(index); + } + /** + *
+     * List of bulk insert requests.
+     * 
+ * + * repeated .greptime.v1.BulkWalEntry bulk_entries = 2; + */ + @java.lang.Override + public greptime.v1.Wal.BulkWalEntryOrBuilder getBulkEntriesOrBuilder( + int index) { + return bulkEntries_.get(index); + } + private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { @@ -2199,6 +2316,9 @@ public final class Wal { for (int i = 0; i < mutations_.size(); i++) { output.writeMessage(1, mutations_.get(i)); } + for (int i = 0; i < bulkEntries_.size(); i++) { + output.writeMessage(2, bulkEntries_.get(i)); + } unknownFields.writeTo(output); } @@ -2212,6 +2332,10 @@ public final class Wal { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, mutations_.get(i)); } + for (int i = 0; i < bulkEntries_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, bulkEntries_.get(i)); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -2229,6 +2353,8 @@ public final class Wal { if (!getMutationsList() .equals(other.getMutationsList())) return false; + if (!getBulkEntriesList() + .equals(other.getBulkEntriesList())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -2244,6 +2370,10 @@ public final class Wal { hash = (37 * hash) + MUTATIONS_FIELD_NUMBER; hash = (53 * hash) + getMutationsList().hashCode(); } + if (getBulkEntriesCount() > 0) { + hash = (37 * hash) + BULK_ENTRIES_FIELD_NUMBER; + hash = (53 * hash) + getBulkEntriesList().hashCode(); + } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -2377,6 +2507,7 @@ public final class Wal { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { getMutationsFieldBuilder(); + getBulkEntriesFieldBuilder(); } } @java.lang.Override @@ -2388,6 +2519,12 @@ public final class Wal { } else { mutationsBuilder_.clear(); } + if (bulkEntriesBuilder_ == null) { + bulkEntries_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + bulkEntriesBuilder_.clear(); + } return this; } @@ -2424,6 +2561,15 @@ public final class Wal { } else { result.mutations_ = mutationsBuilder_.build(); } + if (bulkEntriesBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + bulkEntries_ = java.util.Collections.unmodifiableList(bulkEntries_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.bulkEntries_ = bulkEntries_; + } else { + result.bulkEntries_ = bulkEntriesBuilder_.build(); + } onBuilt(); return result; } @@ -2498,6 +2644,32 @@ public final class Wal { } } } + if (bulkEntriesBuilder_ == null) { + if (!other.bulkEntries_.isEmpty()) { + if (bulkEntries_.isEmpty()) { + bulkEntries_ = other.bulkEntries_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureBulkEntriesIsMutable(); + bulkEntries_.addAll(other.bulkEntries_); + } + onChanged(); + } + } else { + if (!other.bulkEntries_.isEmpty()) { + if (bulkEntriesBuilder_.isEmpty()) { + bulkEntriesBuilder_.dispose(); + bulkEntriesBuilder_ = null; + bulkEntries_ = other.bulkEntries_; + bitField0_ = (bitField0_ & ~0x00000002); + bulkEntriesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getBulkEntriesFieldBuilder() : null; + } else { + bulkEntriesBuilder_.addAllMessages(other.bulkEntries_); + } + } + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -2839,6 +3011,318 @@ public final class Wal { } return mutationsBuilder_; } + + private java.util.List bulkEntries_ = + java.util.Collections.emptyList(); + private void ensureBulkEntriesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + bulkEntries_ = new java.util.ArrayList(bulkEntries_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + greptime.v1.Wal.BulkWalEntry, greptime.v1.Wal.BulkWalEntry.Builder, greptime.v1.Wal.BulkWalEntryOrBuilder> bulkEntriesBuilder_; + + /** + *
+       * List of bulk insert requests.
+       * 
+ * + * repeated .greptime.v1.BulkWalEntry bulk_entries = 2; + */ + public java.util.List getBulkEntriesList() { + if (bulkEntriesBuilder_ == null) { + return java.util.Collections.unmodifiableList(bulkEntries_); + } else { + return bulkEntriesBuilder_.getMessageList(); + } + } + /** + *
+       * List of bulk insert requests.
+       * 
+ * + * repeated .greptime.v1.BulkWalEntry bulk_entries = 2; + */ + public int getBulkEntriesCount() { + if (bulkEntriesBuilder_ == null) { + return bulkEntries_.size(); + } else { + return bulkEntriesBuilder_.getCount(); + } + } + /** + *
+       * List of bulk insert requests.
+       * 
+ * + * repeated .greptime.v1.BulkWalEntry bulk_entries = 2; + */ + public greptime.v1.Wal.BulkWalEntry getBulkEntries(int index) { + if (bulkEntriesBuilder_ == null) { + return bulkEntries_.get(index); + } else { + return bulkEntriesBuilder_.getMessage(index); + } + } + /** + *
+       * List of bulk insert requests.
+       * 
+ * + * repeated .greptime.v1.BulkWalEntry bulk_entries = 2; + */ + public Builder setBulkEntries( + int index, greptime.v1.Wal.BulkWalEntry value) { + if (bulkEntriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBulkEntriesIsMutable(); + bulkEntries_.set(index, value); + onChanged(); + } else { + bulkEntriesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       * List of bulk insert requests.
+       * 
+ * + * repeated .greptime.v1.BulkWalEntry bulk_entries = 2; + */ + public Builder setBulkEntries( + int index, greptime.v1.Wal.BulkWalEntry.Builder builderForValue) { + if (bulkEntriesBuilder_ == null) { + ensureBulkEntriesIsMutable(); + bulkEntries_.set(index, builderForValue.build()); + onChanged(); + } else { + bulkEntriesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * List of bulk insert requests.
+       * 
+ * + * repeated .greptime.v1.BulkWalEntry bulk_entries = 2; + */ + public Builder addBulkEntries(greptime.v1.Wal.BulkWalEntry value) { + if (bulkEntriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBulkEntriesIsMutable(); + bulkEntries_.add(value); + onChanged(); + } else { + bulkEntriesBuilder_.addMessage(value); + } + return this; + } + /** + *
+       * List of bulk insert requests.
+       * 
+ * + * repeated .greptime.v1.BulkWalEntry bulk_entries = 2; + */ + public Builder addBulkEntries( + int index, greptime.v1.Wal.BulkWalEntry value) { + if (bulkEntriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBulkEntriesIsMutable(); + bulkEntries_.add(index, value); + onChanged(); + } else { + bulkEntriesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       * List of bulk insert requests.
+       * 
+ * + * repeated .greptime.v1.BulkWalEntry bulk_entries = 2; + */ + public Builder addBulkEntries( + greptime.v1.Wal.BulkWalEntry.Builder builderForValue) { + if (bulkEntriesBuilder_ == null) { + ensureBulkEntriesIsMutable(); + bulkEntries_.add(builderForValue.build()); + onChanged(); + } else { + bulkEntriesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       * List of bulk insert requests.
+       * 
+ * + * repeated .greptime.v1.BulkWalEntry bulk_entries = 2; + */ + public Builder addBulkEntries( + int index, greptime.v1.Wal.BulkWalEntry.Builder builderForValue) { + if (bulkEntriesBuilder_ == null) { + ensureBulkEntriesIsMutable(); + bulkEntries_.add(index, builderForValue.build()); + onChanged(); + } else { + bulkEntriesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * List of bulk insert requests.
+       * 
+ * + * repeated .greptime.v1.BulkWalEntry bulk_entries = 2; + */ + public Builder addAllBulkEntries( + java.lang.Iterable values) { + if (bulkEntriesBuilder_ == null) { + ensureBulkEntriesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, bulkEntries_); + onChanged(); + } else { + bulkEntriesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       * List of bulk insert requests.
+       * 
+ * + * repeated .greptime.v1.BulkWalEntry bulk_entries = 2; + */ + public Builder clearBulkEntries() { + if (bulkEntriesBuilder_ == null) { + bulkEntries_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + bulkEntriesBuilder_.clear(); + } + return this; + } + /** + *
+       * List of bulk insert requests.
+       * 
+ * + * repeated .greptime.v1.BulkWalEntry bulk_entries = 2; + */ + public Builder removeBulkEntries(int index) { + if (bulkEntriesBuilder_ == null) { + ensureBulkEntriesIsMutable(); + bulkEntries_.remove(index); + onChanged(); + } else { + bulkEntriesBuilder_.remove(index); + } + return this; + } + /** + *
+       * List of bulk insert requests.
+       * 
+ * + * repeated .greptime.v1.BulkWalEntry bulk_entries = 2; + */ + public greptime.v1.Wal.BulkWalEntry.Builder getBulkEntriesBuilder( + int index) { + return getBulkEntriesFieldBuilder().getBuilder(index); + } + /** + *
+       * List of bulk insert requests.
+       * 
+ * + * repeated .greptime.v1.BulkWalEntry bulk_entries = 2; + */ + public greptime.v1.Wal.BulkWalEntryOrBuilder getBulkEntriesOrBuilder( + int index) { + if (bulkEntriesBuilder_ == null) { + return bulkEntries_.get(index); } else { + return bulkEntriesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       * List of bulk insert requests.
+       * 
+ * + * repeated .greptime.v1.BulkWalEntry bulk_entries = 2; + */ + public java.util.List + getBulkEntriesOrBuilderList() { + if (bulkEntriesBuilder_ != null) { + return bulkEntriesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(bulkEntries_); + } + } + /** + *
+       * List of bulk insert requests.
+       * 
+ * + * repeated .greptime.v1.BulkWalEntry bulk_entries = 2; + */ + public greptime.v1.Wal.BulkWalEntry.Builder addBulkEntriesBuilder() { + return getBulkEntriesFieldBuilder().addBuilder( + greptime.v1.Wal.BulkWalEntry.getDefaultInstance()); + } + /** + *
+       * List of bulk insert requests.
+       * 
+ * + * repeated .greptime.v1.BulkWalEntry bulk_entries = 2; + */ + public greptime.v1.Wal.BulkWalEntry.Builder addBulkEntriesBuilder( + int index) { + return getBulkEntriesFieldBuilder().addBuilder( + index, greptime.v1.Wal.BulkWalEntry.getDefaultInstance()); + } + /** + *
+       * List of bulk insert requests.
+       * 
+ * + * repeated .greptime.v1.BulkWalEntry bulk_entries = 2; + */ + public java.util.List + getBulkEntriesBuilderList() { + return getBulkEntriesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + greptime.v1.Wal.BulkWalEntry, greptime.v1.Wal.BulkWalEntry.Builder, greptime.v1.Wal.BulkWalEntryOrBuilder> + getBulkEntriesFieldBuilder() { + if (bulkEntriesBuilder_ == null) { + bulkEntriesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + greptime.v1.Wal.BulkWalEntry, greptime.v1.Wal.BulkWalEntry.Builder, greptime.v1.Wal.BulkWalEntryOrBuilder>( + bulkEntries_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + bulkEntries_ = null; + } + return bulkEntriesBuilder_; + } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -2892,6 +3376,1090 @@ public final class Wal { } + public interface BulkWalEntryOrBuilder extends + // @@protoc_insertion_point(interface_extends:greptime.v1.BulkWalEntry) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Start WAL sequence of this entry.
+     * 
+ * + * uint64 sequence = 1; + * @return The sequence. + */ + long getSequence(); + + /** + *
+     * Max timestamp value.
+     * 
+ * + * int64 max_ts = 2; + * @return The maxTs. + */ + long getMaxTs(); + + /** + *
+     * Min timestamp value.
+     * 
+ * + * int64 min_ts = 3; + * @return The minTs. + */ + long getMinTs(); + + /** + *
+     * Timestamp column index.
+     * 
+ * + * uint32 timestamp_index = 4; + * @return The timestampIndex. + */ + int getTimestampIndex(); + + /** + * .greptime.v1.ArrowIpc arrow_ipc = 5; + * @return Whether the arrowIpc field is set. + */ + boolean hasArrowIpc(); + /** + * .greptime.v1.ArrowIpc arrow_ipc = 5; + * @return The arrowIpc. + */ + io.greptime.v1.Common.ArrowIpc getArrowIpc(); + /** + * .greptime.v1.ArrowIpc arrow_ipc = 5; + */ + io.greptime.v1.Common.ArrowIpcOrBuilder getArrowIpcOrBuilder(); + + public greptime.v1.Wal.BulkWalEntry.BodyCase getBodyCase(); + } + /** + * Protobuf type {@code greptime.v1.BulkWalEntry} + */ + public static final class BulkWalEntry extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:greptime.v1.BulkWalEntry) + BulkWalEntryOrBuilder { + private static final long serialVersionUID = 0L; + // Use BulkWalEntry.newBuilder() to construct. + private BulkWalEntry(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private BulkWalEntry() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new BulkWalEntry(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private BulkWalEntry( + 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: { + + sequence_ = input.readUInt64(); + break; + } + case 16: { + + maxTs_ = input.readInt64(); + break; + } + case 24: { + + minTs_ = input.readInt64(); + break; + } + case 32: { + + timestampIndex_ = input.readUInt32(); + break; + } + case 42: { + io.greptime.v1.Common.ArrowIpc.Builder subBuilder = null; + if (bodyCase_ == 5) { + subBuilder = ((io.greptime.v1.Common.ArrowIpc) body_).toBuilder(); + } + body_ = + input.readMessage(io.greptime.v1.Common.ArrowIpc.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((io.greptime.v1.Common.ArrowIpc) body_); + body_ = subBuilder.buildPartial(); + } + bodyCase_ = 5; + 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 greptime.v1.Wal.internal_static_greptime_v1_BulkWalEntry_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return greptime.v1.Wal.internal_static_greptime_v1_BulkWalEntry_fieldAccessorTable + .ensureFieldAccessorsInitialized( + greptime.v1.Wal.BulkWalEntry.class, greptime.v1.Wal.BulkWalEntry.Builder.class); + } + + private int bodyCase_ = 0; + private java.lang.Object body_; + public enum BodyCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + ARROW_IPC(5), + BODY_NOT_SET(0); + private final int value; + private BodyCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static BodyCase valueOf(int value) { + return forNumber(value); + } + + public static BodyCase forNumber(int value) { + switch (value) { + case 5: return ARROW_IPC; + case 0: return BODY_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public BodyCase + getBodyCase() { + return BodyCase.forNumber( + bodyCase_); + } + + public static final int SEQUENCE_FIELD_NUMBER = 1; + private long sequence_; + /** + *
+     * Start WAL sequence of this entry.
+     * 
+ * + * uint64 sequence = 1; + * @return The sequence. + */ + @java.lang.Override + public long getSequence() { + return sequence_; + } + + public static final int MAX_TS_FIELD_NUMBER = 2; + private long maxTs_; + /** + *
+     * Max timestamp value.
+     * 
+ * + * int64 max_ts = 2; + * @return The maxTs. + */ + @java.lang.Override + public long getMaxTs() { + return maxTs_; + } + + public static final int MIN_TS_FIELD_NUMBER = 3; + private long minTs_; + /** + *
+     * Min timestamp value.
+     * 
+ * + * int64 min_ts = 3; + * @return The minTs. + */ + @java.lang.Override + public long getMinTs() { + return minTs_; + } + + public static final int TIMESTAMP_INDEX_FIELD_NUMBER = 4; + private int timestampIndex_; + /** + *
+     * Timestamp column index.
+     * 
+ * + * uint32 timestamp_index = 4; + * @return The timestampIndex. + */ + @java.lang.Override + public int getTimestampIndex() { + return timestampIndex_; + } + + public static final int ARROW_IPC_FIELD_NUMBER = 5; + /** + * .greptime.v1.ArrowIpc arrow_ipc = 5; + * @return Whether the arrowIpc field is set. + */ + @java.lang.Override + public boolean hasArrowIpc() { + return bodyCase_ == 5; + } + /** + * .greptime.v1.ArrowIpc arrow_ipc = 5; + * @return The arrowIpc. + */ + @java.lang.Override + public io.greptime.v1.Common.ArrowIpc getArrowIpc() { + if (bodyCase_ == 5) { + return (io.greptime.v1.Common.ArrowIpc) body_; + } + return io.greptime.v1.Common.ArrowIpc.getDefaultInstance(); + } + /** + * .greptime.v1.ArrowIpc arrow_ipc = 5; + */ + @java.lang.Override + public io.greptime.v1.Common.ArrowIpcOrBuilder getArrowIpcOrBuilder() { + if (bodyCase_ == 5) { + return (io.greptime.v1.Common.ArrowIpc) body_; + } + return io.greptime.v1.Common.ArrowIpc.getDefaultInstance(); + } + + 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 (sequence_ != 0L) { + output.writeUInt64(1, sequence_); + } + if (maxTs_ != 0L) { + output.writeInt64(2, maxTs_); + } + if (minTs_ != 0L) { + output.writeInt64(3, minTs_); + } + if (timestampIndex_ != 0) { + output.writeUInt32(4, timestampIndex_); + } + if (bodyCase_ == 5) { + output.writeMessage(5, (io.greptime.v1.Common.ArrowIpc) body_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (sequence_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeUInt64Size(1, sequence_); + } + if (maxTs_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(2, maxTs_); + } + if (minTs_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(3, minTs_); + } + if (timestampIndex_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(4, timestampIndex_); + } + if (bodyCase_ == 5) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, (io.greptime.v1.Common.ArrowIpc) body_); + } + 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 greptime.v1.Wal.BulkWalEntry)) { + return super.equals(obj); + } + greptime.v1.Wal.BulkWalEntry other = (greptime.v1.Wal.BulkWalEntry) obj; + + if (getSequence() + != other.getSequence()) return false; + if (getMaxTs() + != other.getMaxTs()) return false; + if (getMinTs() + != other.getMinTs()) return false; + if (getTimestampIndex() + != other.getTimestampIndex()) return false; + if (!getBodyCase().equals(other.getBodyCase())) return false; + switch (bodyCase_) { + case 5: + if (!getArrowIpc() + .equals(other.getArrowIpc())) return false; + break; + case 0: + default: + } + 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) + SEQUENCE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getSequence()); + hash = (37 * hash) + MAX_TS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getMaxTs()); + hash = (37 * hash) + MIN_TS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getMinTs()); + hash = (37 * hash) + TIMESTAMP_INDEX_FIELD_NUMBER; + hash = (53 * hash) + getTimestampIndex(); + switch (bodyCase_) { + case 5: + hash = (37 * hash) + ARROW_IPC_FIELD_NUMBER; + hash = (53 * hash) + getArrowIpc().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static greptime.v1.Wal.BulkWalEntry parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static greptime.v1.Wal.BulkWalEntry parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static greptime.v1.Wal.BulkWalEntry parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static greptime.v1.Wal.BulkWalEntry parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static greptime.v1.Wal.BulkWalEntry parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static greptime.v1.Wal.BulkWalEntry parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static greptime.v1.Wal.BulkWalEntry parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static greptime.v1.Wal.BulkWalEntry 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 greptime.v1.Wal.BulkWalEntry parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static greptime.v1.Wal.BulkWalEntry 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 greptime.v1.Wal.BulkWalEntry parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static greptime.v1.Wal.BulkWalEntry 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(greptime.v1.Wal.BulkWalEntry 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.BulkWalEntry} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:greptime.v1.BulkWalEntry) + greptime.v1.Wal.BulkWalEntryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return greptime.v1.Wal.internal_static_greptime_v1_BulkWalEntry_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return greptime.v1.Wal.internal_static_greptime_v1_BulkWalEntry_fieldAccessorTable + .ensureFieldAccessorsInitialized( + greptime.v1.Wal.BulkWalEntry.class, greptime.v1.Wal.BulkWalEntry.Builder.class); + } + + // Construct using greptime.v1.Wal.BulkWalEntry.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(); + sequence_ = 0L; + + maxTs_ = 0L; + + minTs_ = 0L; + + timestampIndex_ = 0; + + bodyCase_ = 0; + body_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return greptime.v1.Wal.internal_static_greptime_v1_BulkWalEntry_descriptor; + } + + @java.lang.Override + public greptime.v1.Wal.BulkWalEntry getDefaultInstanceForType() { + return greptime.v1.Wal.BulkWalEntry.getDefaultInstance(); + } + + @java.lang.Override + public greptime.v1.Wal.BulkWalEntry build() { + greptime.v1.Wal.BulkWalEntry result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public greptime.v1.Wal.BulkWalEntry buildPartial() { + greptime.v1.Wal.BulkWalEntry result = new greptime.v1.Wal.BulkWalEntry(this); + result.sequence_ = sequence_; + result.maxTs_ = maxTs_; + result.minTs_ = minTs_; + result.timestampIndex_ = timestampIndex_; + if (bodyCase_ == 5) { + if (arrowIpcBuilder_ == null) { + result.body_ = body_; + } else { + result.body_ = arrowIpcBuilder_.build(); + } + } + result.bodyCase_ = bodyCase_; + 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 greptime.v1.Wal.BulkWalEntry) { + return mergeFrom((greptime.v1.Wal.BulkWalEntry)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(greptime.v1.Wal.BulkWalEntry other) { + if (other == greptime.v1.Wal.BulkWalEntry.getDefaultInstance()) return this; + if (other.getSequence() != 0L) { + setSequence(other.getSequence()); + } + if (other.getMaxTs() != 0L) { + setMaxTs(other.getMaxTs()); + } + if (other.getMinTs() != 0L) { + setMinTs(other.getMinTs()); + } + if (other.getTimestampIndex() != 0) { + setTimestampIndex(other.getTimestampIndex()); + } + switch (other.getBodyCase()) { + case ARROW_IPC: { + mergeArrowIpc(other.getArrowIpc()); + break; + } + case BODY_NOT_SET: { + break; + } + } + 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 { + greptime.v1.Wal.BulkWalEntry parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (greptime.v1.Wal.BulkWalEntry) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bodyCase_ = 0; + private java.lang.Object body_; + public BodyCase + getBodyCase() { + return BodyCase.forNumber( + bodyCase_); + } + + public Builder clearBody() { + bodyCase_ = 0; + body_ = null; + onChanged(); + return this; + } + + + private long sequence_ ; + /** + *
+       * Start WAL sequence of this entry.
+       * 
+ * + * uint64 sequence = 1; + * @return The sequence. + */ + @java.lang.Override + public long getSequence() { + return sequence_; + } + /** + *
+       * Start WAL sequence of this entry.
+       * 
+ * + * uint64 sequence = 1; + * @param value The sequence to set. + * @return This builder for chaining. + */ + public Builder setSequence(long value) { + + sequence_ = value; + onChanged(); + return this; + } + /** + *
+       * Start WAL sequence of this entry.
+       * 
+ * + * uint64 sequence = 1; + * @return This builder for chaining. + */ + public Builder clearSequence() { + + sequence_ = 0L; + onChanged(); + return this; + } + + private long maxTs_ ; + /** + *
+       * Max timestamp value.
+       * 
+ * + * int64 max_ts = 2; + * @return The maxTs. + */ + @java.lang.Override + public long getMaxTs() { + return maxTs_; + } + /** + *
+       * Max timestamp value.
+       * 
+ * + * int64 max_ts = 2; + * @param value The maxTs to set. + * @return This builder for chaining. + */ + public Builder setMaxTs(long value) { + + maxTs_ = value; + onChanged(); + return this; + } + /** + *
+       * Max timestamp value.
+       * 
+ * + * int64 max_ts = 2; + * @return This builder for chaining. + */ + public Builder clearMaxTs() { + + maxTs_ = 0L; + onChanged(); + return this; + } + + private long minTs_ ; + /** + *
+       * Min timestamp value.
+       * 
+ * + * int64 min_ts = 3; + * @return The minTs. + */ + @java.lang.Override + public long getMinTs() { + return minTs_; + } + /** + *
+       * Min timestamp value.
+       * 
+ * + * int64 min_ts = 3; + * @param value The minTs to set. + * @return This builder for chaining. + */ + public Builder setMinTs(long value) { + + minTs_ = value; + onChanged(); + return this; + } + /** + *
+       * Min timestamp value.
+       * 
+ * + * int64 min_ts = 3; + * @return This builder for chaining. + */ + public Builder clearMinTs() { + + minTs_ = 0L; + onChanged(); + return this; + } + + private int timestampIndex_ ; + /** + *
+       * Timestamp column index.
+       * 
+ * + * uint32 timestamp_index = 4; + * @return The timestampIndex. + */ + @java.lang.Override + public int getTimestampIndex() { + return timestampIndex_; + } + /** + *
+       * Timestamp column index.
+       * 
+ * + * uint32 timestamp_index = 4; + * @param value The timestampIndex to set. + * @return This builder for chaining. + */ + public Builder setTimestampIndex(int value) { + + timestampIndex_ = value; + onChanged(); + return this; + } + /** + *
+       * Timestamp column index.
+       * 
+ * + * uint32 timestamp_index = 4; + * @return This builder for chaining. + */ + public Builder clearTimestampIndex() { + + timestampIndex_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + io.greptime.v1.Common.ArrowIpc, io.greptime.v1.Common.ArrowIpc.Builder, io.greptime.v1.Common.ArrowIpcOrBuilder> arrowIpcBuilder_; + /** + * .greptime.v1.ArrowIpc arrow_ipc = 5; + * @return Whether the arrowIpc field is set. + */ + @java.lang.Override + public boolean hasArrowIpc() { + return bodyCase_ == 5; + } + /** + * .greptime.v1.ArrowIpc arrow_ipc = 5; + * @return The arrowIpc. + */ + @java.lang.Override + public io.greptime.v1.Common.ArrowIpc getArrowIpc() { + if (arrowIpcBuilder_ == null) { + if (bodyCase_ == 5) { + return (io.greptime.v1.Common.ArrowIpc) body_; + } + return io.greptime.v1.Common.ArrowIpc.getDefaultInstance(); + } else { + if (bodyCase_ == 5) { + return arrowIpcBuilder_.getMessage(); + } + return io.greptime.v1.Common.ArrowIpc.getDefaultInstance(); + } + } + /** + * .greptime.v1.ArrowIpc arrow_ipc = 5; + */ + public Builder setArrowIpc(io.greptime.v1.Common.ArrowIpc value) { + if (arrowIpcBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + body_ = value; + onChanged(); + } else { + arrowIpcBuilder_.setMessage(value); + } + bodyCase_ = 5; + return this; + } + /** + * .greptime.v1.ArrowIpc arrow_ipc = 5; + */ + public Builder setArrowIpc( + io.greptime.v1.Common.ArrowIpc.Builder builderForValue) { + if (arrowIpcBuilder_ == null) { + body_ = builderForValue.build(); + onChanged(); + } else { + arrowIpcBuilder_.setMessage(builderForValue.build()); + } + bodyCase_ = 5; + return this; + } + /** + * .greptime.v1.ArrowIpc arrow_ipc = 5; + */ + public Builder mergeArrowIpc(io.greptime.v1.Common.ArrowIpc value) { + if (arrowIpcBuilder_ == null) { + if (bodyCase_ == 5 && + body_ != io.greptime.v1.Common.ArrowIpc.getDefaultInstance()) { + body_ = io.greptime.v1.Common.ArrowIpc.newBuilder((io.greptime.v1.Common.ArrowIpc) body_) + .mergeFrom(value).buildPartial(); + } else { + body_ = value; + } + onChanged(); + } else { + if (bodyCase_ == 5) { + arrowIpcBuilder_.mergeFrom(value); + } else { + arrowIpcBuilder_.setMessage(value); + } + } + bodyCase_ = 5; + return this; + } + /** + * .greptime.v1.ArrowIpc arrow_ipc = 5; + */ + public Builder clearArrowIpc() { + if (arrowIpcBuilder_ == null) { + if (bodyCase_ == 5) { + bodyCase_ = 0; + body_ = null; + onChanged(); + } + } else { + if (bodyCase_ == 5) { + bodyCase_ = 0; + body_ = null; + } + arrowIpcBuilder_.clear(); + } + return this; + } + /** + * .greptime.v1.ArrowIpc arrow_ipc = 5; + */ + public io.greptime.v1.Common.ArrowIpc.Builder getArrowIpcBuilder() { + return getArrowIpcFieldBuilder().getBuilder(); + } + /** + * .greptime.v1.ArrowIpc arrow_ipc = 5; + */ + @java.lang.Override + public io.greptime.v1.Common.ArrowIpcOrBuilder getArrowIpcOrBuilder() { + if ((bodyCase_ == 5) && (arrowIpcBuilder_ != null)) { + return arrowIpcBuilder_.getMessageOrBuilder(); + } else { + if (bodyCase_ == 5) { + return (io.greptime.v1.Common.ArrowIpc) body_; + } + return io.greptime.v1.Common.ArrowIpc.getDefaultInstance(); + } + } + /** + * .greptime.v1.ArrowIpc arrow_ipc = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.greptime.v1.Common.ArrowIpc, io.greptime.v1.Common.ArrowIpc.Builder, io.greptime.v1.Common.ArrowIpcOrBuilder> + getArrowIpcFieldBuilder() { + if (arrowIpcBuilder_ == null) { + if (!(bodyCase_ == 5)) { + body_ = io.greptime.v1.Common.ArrowIpc.getDefaultInstance(); + } + arrowIpcBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.greptime.v1.Common.ArrowIpc, io.greptime.v1.Common.ArrowIpc.Builder, io.greptime.v1.Common.ArrowIpcOrBuilder>( + (io.greptime.v1.Common.ArrowIpc) body_, + getParentForChildren(), + isClean()); + body_ = null; + } + bodyCase_ = 5; + onChanged();; + return arrowIpcBuilder_; + } + @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.BulkWalEntry) + } + + // @@protoc_insertion_point(class_scope:greptime.v1.BulkWalEntry) + private static final greptime.v1.Wal.BulkWalEntry DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new greptime.v1.Wal.BulkWalEntry(); + } + + public static greptime.v1.Wal.BulkWalEntry getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BulkWalEntry parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BulkWalEntry(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 greptime.v1.Wal.BulkWalEntry getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_greptime_v1_WriteHint_descriptor; private static final @@ -2907,6 +4475,11 @@ public final class Wal { private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_greptime_v1_WalEntry_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_greptime_v1_BulkWalEntry_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_greptime_v1_BulkWalEntry_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { @@ -2917,22 +4490,29 @@ public final class Wal { static { java.lang.String[] descriptorData = { "\n\025greptime/v1/wal.proto\022\013greptime.v1\032\025gr" + - "eptime/v1/row.proto\"J\n\tWriteHint\022=\n\024prim" + - "ary_key_encoding\030\001 \001(\0162\037.greptime.v1.Pri" + - "maryKeyEncoding\"\217\001\n\010Mutation\022$\n\007op_type\030" + - "\001 \001(\0162\023.greptime.v1.OpType\022\020\n\010sequence\030\002" + - " \001(\004\022\037\n\004rows\030\003 \001(\0132\021.greptime.v1.Rows\022*\n" + - "\nwrite_hint\030\004 \001(\0132\026.greptime.v1.WriteHin" + - "t\"4\n\010WalEntry\022(\n\tmutations\030\001 \003(\0132\025.grept" + - "ime.v1.Mutation*\035\n\006OpType\022\n\n\006DELETE\020\000\022\007\n" + - "\003PUT\020\001*+\n\022PrimaryKeyEncoding\022\t\n\005DENSE\020\000\022" + - "\n\n\006SPARSE\020\001B7Z5github.com/GreptimeTeam/g" + - "reptime-proto/go/greptime/v1b\006proto3" + "eptime/v1/row.proto\032\030greptime/v1/common." + + "proto\"J\n\tWriteHint\022=\n\024primary_key_encodi" + + "ng\030\001 \001(\0162\037.greptime.v1.PrimaryKeyEncodin" + + "g\"\217\001\n\010Mutation\022$\n\007op_type\030\001 \001(\0162\023.grepti" + + "me.v1.OpType\022\020\n\010sequence\030\002 \001(\004\022\037\n\004rows\030\003" + + " \001(\0132\021.greptime.v1.Rows\022*\n\nwrite_hint\030\004 " + + "\001(\0132\026.greptime.v1.WriteHint\"e\n\010WalEntry\022" + + "(\n\tmutations\030\001 \003(\0132\025.greptime.v1.Mutatio" + + "n\022/\n\014bulk_entries\030\002 \003(\0132\031.greptime.v1.Bu" + + "lkWalEntry\"\215\001\n\014BulkWalEntry\022\020\n\010sequence\030" + + "\001 \001(\004\022\016\n\006max_ts\030\002 \001(\003\022\016\n\006min_ts\030\003 \001(\003\022\027\n" + + "\017timestamp_index\030\004 \001(\r\022*\n\tarrow_ipc\030\005 \001(" + + "\0132\025.greptime.v1.ArrowIpcH\000B\006\n\004body*\035\n\006Op" + + "Type\022\n\n\006DELETE\020\000\022\007\n\003PUT\020\001*+\n\022PrimaryKeyE" + + "ncoding\022\t\n\005DENSE\020\000\022\n\n\006SPARSE\020\001B7Z5github" + + ".com/GreptimeTeam/greptime-proto/go/grep" + + "time/v1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { io.greptime.v1.RowData.getDescriptor(), + io.greptime.v1.Common.getDescriptor(), }); internal_static_greptime_v1_WriteHint_descriptor = getDescriptor().getMessageTypes().get(0); @@ -2951,8 +4531,15 @@ public final class Wal { internal_static_greptime_v1_WalEntry_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_greptime_v1_WalEntry_descriptor, - new java.lang.String[] { "Mutations", }); + new java.lang.String[] { "Mutations", "BulkEntries", }); + internal_static_greptime_v1_BulkWalEntry_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_greptime_v1_BulkWalEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_greptime_v1_BulkWalEntry_descriptor, + new java.lang.String[] { "Sequence", "MaxTs", "MinTs", "TimestampIndex", "ArrowIpc", "Body", }); io.greptime.v1.RowData.getDescriptor(); + io.greptime.v1.Common.getDescriptor(); } // @@protoc_insertion_point(outer_class_scope) diff --git a/java/src/main/java/io/greptime/v1/Common.java b/java/src/main/java/io/greptime/v1/Common.java index 1fd3c95..d859137 100644 --- a/java/src/main/java/io/greptime/v1/Common.java +++ b/java/src/main/java/io/greptime/v1/Common.java @@ -16987,6 +16987,648 @@ java.lang.String defaultValue); } + public interface ArrowIpcOrBuilder extends + // @@protoc_insertion_point(interface_extends:greptime.v1.ArrowIpc) + com.google.protobuf.MessageOrBuilder { + + /** + * bytes schema = 1; + * @return The schema. + */ + com.google.protobuf.ByteString getSchema(); + + /** + * bytes data_header = 2; + * @return The dataHeader. + */ + com.google.protobuf.ByteString getDataHeader(); + + /** + * bytes payload = 3; + * @return The payload. + */ + com.google.protobuf.ByteString getPayload(); + } + /** + * Protobuf type {@code greptime.v1.ArrowIpc} + */ + public static final class ArrowIpc extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:greptime.v1.ArrowIpc) + ArrowIpcOrBuilder { + private static final long serialVersionUID = 0L; + // Use ArrowIpc.newBuilder() to construct. + private ArrowIpc(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ArrowIpc() { + schema_ = com.google.protobuf.ByteString.EMPTY; + dataHeader_ = com.google.protobuf.ByteString.EMPTY; + payload_ = com.google.protobuf.ByteString.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ArrowIpc(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ArrowIpc( + 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 10: { + + schema_ = input.readBytes(); + break; + } + case 18: { + + dataHeader_ = input.readBytes(); + break; + } + case 26: { + + payload_ = input.readBytes(); + 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_ArrowIpc_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.greptime.v1.Common.internal_static_greptime_v1_ArrowIpc_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.greptime.v1.Common.ArrowIpc.class, io.greptime.v1.Common.ArrowIpc.Builder.class); + } + + public static final int SCHEMA_FIELD_NUMBER = 1; + private com.google.protobuf.ByteString schema_; + /** + * bytes schema = 1; + * @return The schema. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSchema() { + return schema_; + } + + public static final int DATA_HEADER_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString dataHeader_; + /** + * bytes data_header = 2; + * @return The dataHeader. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDataHeader() { + return dataHeader_; + } + + public static final int PAYLOAD_FIELD_NUMBER = 3; + private com.google.protobuf.ByteString payload_; + /** + * bytes payload = 3; + * @return The payload. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPayload() { + return payload_; + } + + 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 (!schema_.isEmpty()) { + output.writeBytes(1, schema_); + } + if (!dataHeader_.isEmpty()) { + output.writeBytes(2, dataHeader_); + } + if (!payload_.isEmpty()) { + output.writeBytes(3, payload_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!schema_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, schema_); + } + if (!dataHeader_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, dataHeader_); + } + if (!payload_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(3, payload_); + } + 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.ArrowIpc)) { + return super.equals(obj); + } + io.greptime.v1.Common.ArrowIpc other = (io.greptime.v1.Common.ArrowIpc) obj; + + if (!getSchema() + .equals(other.getSchema())) return false; + if (!getDataHeader() + .equals(other.getDataHeader())) return false; + if (!getPayload() + .equals(other.getPayload())) 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) + SCHEMA_FIELD_NUMBER; + hash = (53 * hash) + getSchema().hashCode(); + hash = (37 * hash) + DATA_HEADER_FIELD_NUMBER; + hash = (53 * hash) + getDataHeader().hashCode(); + hash = (37 * hash) + PAYLOAD_FIELD_NUMBER; + hash = (53 * hash) + getPayload().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.greptime.v1.Common.ArrowIpc parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.greptime.v1.Common.ArrowIpc 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.ArrowIpc parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.greptime.v1.Common.ArrowIpc 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.ArrowIpc parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.greptime.v1.Common.ArrowIpc parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.greptime.v1.Common.ArrowIpc parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.greptime.v1.Common.ArrowIpc 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.ArrowIpc parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.greptime.v1.Common.ArrowIpc 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.ArrowIpc parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.greptime.v1.Common.ArrowIpc 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.ArrowIpc 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.ArrowIpc} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:greptime.v1.ArrowIpc) + io.greptime.v1.Common.ArrowIpcOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.greptime.v1.Common.internal_static_greptime_v1_ArrowIpc_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.greptime.v1.Common.internal_static_greptime_v1_ArrowIpc_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.greptime.v1.Common.ArrowIpc.class, io.greptime.v1.Common.ArrowIpc.Builder.class); + } + + // Construct using io.greptime.v1.Common.ArrowIpc.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(); + schema_ = com.google.protobuf.ByteString.EMPTY; + + dataHeader_ = com.google.protobuf.ByteString.EMPTY; + + payload_ = com.google.protobuf.ByteString.EMPTY; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.greptime.v1.Common.internal_static_greptime_v1_ArrowIpc_descriptor; + } + + @java.lang.Override + public io.greptime.v1.Common.ArrowIpc getDefaultInstanceForType() { + return io.greptime.v1.Common.ArrowIpc.getDefaultInstance(); + } + + @java.lang.Override + public io.greptime.v1.Common.ArrowIpc build() { + io.greptime.v1.Common.ArrowIpc result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.greptime.v1.Common.ArrowIpc buildPartial() { + io.greptime.v1.Common.ArrowIpc result = new io.greptime.v1.Common.ArrowIpc(this); + result.schema_ = schema_; + result.dataHeader_ = dataHeader_; + result.payload_ = payload_; + 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.ArrowIpc) { + return mergeFrom((io.greptime.v1.Common.ArrowIpc)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.greptime.v1.Common.ArrowIpc other) { + if (other == io.greptime.v1.Common.ArrowIpc.getDefaultInstance()) return this; + if (other.getSchema() != com.google.protobuf.ByteString.EMPTY) { + setSchema(other.getSchema()); + } + if (other.getDataHeader() != com.google.protobuf.ByteString.EMPTY) { + setDataHeader(other.getDataHeader()); + } + if (other.getPayload() != com.google.protobuf.ByteString.EMPTY) { + setPayload(other.getPayload()); + } + 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.ArrowIpc parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (io.greptime.v1.Common.ArrowIpc) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.protobuf.ByteString schema_ = com.google.protobuf.ByteString.EMPTY; + /** + * bytes schema = 1; + * @return The schema. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSchema() { + return schema_; + } + /** + * bytes schema = 1; + * @param value The schema to set. + * @return This builder for chaining. + */ + public Builder setSchema(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + schema_ = value; + onChanged(); + return this; + } + /** + * bytes schema = 1; + * @return This builder for chaining. + */ + public Builder clearSchema() { + + schema_ = getDefaultInstance().getSchema(); + onChanged(); + return this; + } + + private com.google.protobuf.ByteString dataHeader_ = com.google.protobuf.ByteString.EMPTY; + /** + * bytes data_header = 2; + * @return The dataHeader. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDataHeader() { + return dataHeader_; + } + /** + * bytes data_header = 2; + * @param value The dataHeader to set. + * @return This builder for chaining. + */ + public Builder setDataHeader(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + dataHeader_ = value; + onChanged(); + return this; + } + /** + * bytes data_header = 2; + * @return This builder for chaining. + */ + public Builder clearDataHeader() { + + dataHeader_ = getDefaultInstance().getDataHeader(); + onChanged(); + return this; + } + + private com.google.protobuf.ByteString payload_ = com.google.protobuf.ByteString.EMPTY; + /** + * bytes payload = 3; + * @return The payload. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPayload() { + return payload_; + } + /** + * bytes payload = 3; + * @param value The payload to set. + * @return This builder for chaining. + */ + public Builder setPayload(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + payload_ = value; + onChanged(); + return this; + } + /** + * bytes payload = 3; + * @return This builder for chaining. + */ + public Builder clearPayload() { + + payload_ = getDefaultInstance().getPayload(); + 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.ArrowIpc) + } + + // @@protoc_insertion_point(class_scope:greptime.v1.ArrowIpc) + private static final io.greptime.v1.Common.ArrowIpc DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.greptime.v1.Common.ArrowIpc(); + } + + public static io.greptime.v1.Common.ArrowIpc getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ArrowIpc parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ArrowIpc(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.ArrowIpc getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + private static final com.google.protobuf.Descriptors.Descriptor internal_static_greptime_v1_QueryContext_descriptor; private static final @@ -17112,6 +17754,11 @@ java.lang.String defaultValue); private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_greptime_v1_ColumnOptions_OptionsEntry_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_greptime_v1_ArrowIpc_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_greptime_v1_ArrowIpc_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { @@ -17171,24 +17818,25 @@ java.lang.String defaultValue); "nsion\022\013\n\003dim\030\001 \001(\r\"y\n\rColumnOptions\0228\n\007o" + "ptions\030\001 \003(\0132\'.greptime.v1.ColumnOptions" + ".OptionsEntry\032.\n\014OptionsEntry\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\016Col" + - "umnDataType\022\013\n\007BOOLEAN\020\000\022\010\n\004INT8\020\001\022\t\n\005IN" + - "T16\020\002\022\t\n\005INT32\020\003\022\t\n\005INT64\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\007FL" + - "OAT32\020\t\022\013\n\007FLOAT64\020\n\022\n\n\006BINARY\020\013\022\n\n\006STRI" + - "NG\020\014\022\010\n\004DATE\020\r\022\014\n\010DATETIME\020\016\022\024\n\020TIMESTAM" + - "P_SECOND\020\017\022\031\n\025TIMESTAMP_MILLISECOND\020\020\022\031\n" + - "\025TIMESTAMP_MICROSECOND\020\021\022\030\n\024TIMESTAMP_NA" + - "NOSECOND\020\022\022\017\n\013TIME_SECOND\020\023\022\024\n\020TIME_MILL" + - "ISECOND\020\024\022\024\n\020TIME_MICROSECOND\020\025\022\023\n\017TIME_" + - "NANOSECOND\020\026\022\027\n\023INTERVAL_YEAR_MONTH\020\027\022\025\n" + - "\021INTERVAL_DAY_TIME\020\030\022\033\n\027INTERVAL_MONTH_D" + - "AY_NANO\020\031\022\016\n\nDECIMAL128\020\036\022\010\n\004JSON\020\037\022\n\n\006V" + - "ECTOR\020 *$\n\021JsonTypeExtension\022\017\n\013JSON_BIN" + - "ARY\020\000BO\n\016io.greptime.v1B\006CommonZ5github." + - "com/GreptimeTeam/greptime-proto/go/grept" + - "ime/v1b\006proto3" + "(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"@\n\010ArrowIpc\022\016\n\006sch" + + "ema\030\001 \001(\014\022\023\n\013data_header\030\002 \001(\014\022\017\n\007payloa" + + "d\030\003 \001(\014*1\n\014SemanticType\022\007\n\003TAG\020\000\022\t\n\005FIEL" + + "D\020\001\022\r\n\tTIMESTAMP\020\002*\354\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\005UINT8\020\005\022\n\n\006UINT16\020\006\022\n\n\006" + + "UINT32\020\007\022\n\n\006UINT64\020\010\022\013\n\007FLOAT32\020\t\022\013\n\007FLO" + + "AT64\020\n\022\n\n\006BINARY\020\013\022\n\n\006STRING\020\014\022\010\n\004DATE\020\r" + + "\022\014\n\010DATETIME\020\016\022\024\n\020TIMESTAMP_SECOND\020\017\022\031\n\025" + + "TIMESTAMP_MILLISECOND\020\020\022\031\n\025TIMESTAMP_MIC" + + "ROSECOND\020\021\022\030\n\024TIMESTAMP_NANOSECOND\020\022\022\017\n\013" + + "TIME_SECOND\020\023\022\024\n\020TIME_MILLISECOND\020\024\022\024\n\020T" + + "IME_MICROSECOND\020\025\022\023\n\017TIME_NANOSECOND\020\026\022\027" + + "\n\023INTERVAL_YEAR_MONTH\020\027\022\025\n\021INTERVAL_DAY_" + + "TIME\020\030\022\033\n\027INTERVAL_MONTH_DAY_NANO\020\031\022\016\n\nD" + + "ECIMAL128\020\036\022\010\n\004JSON\020\037\022\n\n\006VECTOR\020 *$\n\021Jso" + + "nTypeExtension\022\017\n\013JSON_BINARY\020\000BO\n\016io.gr" + + "eptime.v1B\006CommonZ5github.com/GreptimeTe" + + "am/greptime-proto/go/greptime/v1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, @@ -17344,6 +17992,12 @@ java.lang.String defaultValue); com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_greptime_v1_ColumnOptions_OptionsEntry_descriptor, new java.lang.String[] { "Key", "Value", }); + internal_static_greptime_v1_ArrowIpc_descriptor = + getDescriptor().getMessageTypes().get(20); + internal_static_greptime_v1_ArrowIpc_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_greptime_v1_ArrowIpc_descriptor, + new java.lang.String[] { "Schema", "DataHeader", "Payload", }); } // @@protoc_insertion_point(outer_class_scope) diff --git a/java/src/main/java/io/greptime/v1/region/Server.java b/java/src/main/java/io/greptime/v1/region/Server.java index 20d9caf..1d01641 100644 --- a/java/src/main/java/io/greptime/v1/region/Server.java +++ b/java/src/main/java/io/greptime/v1/region/Server.java @@ -25831,19 +25831,25 @@ java.lang.String defaultValue); com.google.protobuf.MessageOrBuilder { /** - * .greptime.v1.region.ArrowIpc arrow_ipc = 1; + * uint64 region_id = 1; + * @return The regionId. + */ + long getRegionId(); + + /** + * .greptime.v1.ArrowIpc arrow_ipc = 2; * @return Whether the arrowIpc field is set. */ boolean hasArrowIpc(); /** - * .greptime.v1.region.ArrowIpc arrow_ipc = 1; + * .greptime.v1.ArrowIpc arrow_ipc = 2; * @return The arrowIpc. */ - io.greptime.v1.region.Server.ArrowIpc getArrowIpc(); + io.greptime.v1.Common.ArrowIpc getArrowIpc(); /** - * .greptime.v1.region.ArrowIpc arrow_ipc = 1; + * .greptime.v1.ArrowIpc arrow_ipc = 2; */ - io.greptime.v1.region.Server.ArrowIpcOrBuilder getArrowIpcOrBuilder(); + io.greptime.v1.Common.ArrowIpcOrBuilder getArrowIpcOrBuilder(); public io.greptime.v1.region.Server.BulkInsertRequest.BodyCase getBodyCase(); } @@ -25896,18 +25902,23 @@ java.lang.String defaultValue); case 0: done = true; break; - case 10: { - io.greptime.v1.region.Server.ArrowIpc.Builder subBuilder = null; - if (bodyCase_ == 1) { - subBuilder = ((io.greptime.v1.region.Server.ArrowIpc) body_).toBuilder(); + case 8: { + + regionId_ = input.readUInt64(); + break; + } + case 18: { + io.greptime.v1.Common.ArrowIpc.Builder subBuilder = null; + if (bodyCase_ == 2) { + subBuilder = ((io.greptime.v1.Common.ArrowIpc) body_).toBuilder(); } body_ = - input.readMessage(io.greptime.v1.region.Server.ArrowIpc.parser(), extensionRegistry); + input.readMessage(io.greptime.v1.Common.ArrowIpc.parser(), extensionRegistry); if (subBuilder != null) { - subBuilder.mergeFrom((io.greptime.v1.region.Server.ArrowIpc) body_); + subBuilder.mergeFrom((io.greptime.v1.Common.ArrowIpc) body_); body_ = subBuilder.buildPartial(); } - bodyCase_ = 1; + bodyCase_ = 2; break; } default: { @@ -25949,7 +25960,7 @@ java.lang.String defaultValue); public enum BodyCase implements com.google.protobuf.Internal.EnumLite, com.google.protobuf.AbstractMessage.InternalOneOfEnum { - ARROW_IPC(1), + ARROW_IPC(2), BODY_NOT_SET(0); private final int value; private BodyCase(int value) { @@ -25967,7 +25978,7 @@ java.lang.String defaultValue); public static BodyCase forNumber(int value) { switch (value) { - case 1: return ARROW_IPC; + case 2: return ARROW_IPC; case 0: return BODY_NOT_SET; default: return null; } @@ -25983,35 +25994,46 @@ java.lang.String defaultValue); bodyCase_); } - public static final int ARROW_IPC_FIELD_NUMBER = 1; + public static final int REGION_ID_FIELD_NUMBER = 1; + private long regionId_; /** - * .greptime.v1.region.ArrowIpc arrow_ipc = 1; + * uint64 region_id = 1; + * @return The regionId. + */ + @java.lang.Override + public long getRegionId() { + return regionId_; + } + + public static final int ARROW_IPC_FIELD_NUMBER = 2; + /** + * .greptime.v1.ArrowIpc arrow_ipc = 2; * @return Whether the arrowIpc field is set. */ @java.lang.Override public boolean hasArrowIpc() { - return bodyCase_ == 1; + return bodyCase_ == 2; } /** - * .greptime.v1.region.ArrowIpc arrow_ipc = 1; + * .greptime.v1.ArrowIpc arrow_ipc = 2; * @return The arrowIpc. */ @java.lang.Override - public io.greptime.v1.region.Server.ArrowIpc getArrowIpc() { - if (bodyCase_ == 1) { - return (io.greptime.v1.region.Server.ArrowIpc) body_; + public io.greptime.v1.Common.ArrowIpc getArrowIpc() { + if (bodyCase_ == 2) { + return (io.greptime.v1.Common.ArrowIpc) body_; } - return io.greptime.v1.region.Server.ArrowIpc.getDefaultInstance(); + return io.greptime.v1.Common.ArrowIpc.getDefaultInstance(); } /** - * .greptime.v1.region.ArrowIpc arrow_ipc = 1; + * .greptime.v1.ArrowIpc arrow_ipc = 2; */ @java.lang.Override - public io.greptime.v1.region.Server.ArrowIpcOrBuilder getArrowIpcOrBuilder() { - if (bodyCase_ == 1) { - return (io.greptime.v1.region.Server.ArrowIpc) body_; + public io.greptime.v1.Common.ArrowIpcOrBuilder getArrowIpcOrBuilder() { + if (bodyCase_ == 2) { + return (io.greptime.v1.Common.ArrowIpc) body_; } - return io.greptime.v1.region.Server.ArrowIpc.getDefaultInstance(); + return io.greptime.v1.Common.ArrowIpc.getDefaultInstance(); } private byte memoizedIsInitialized = -1; @@ -26028,8 +26050,11 @@ java.lang.String defaultValue); @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (bodyCase_ == 1) { - output.writeMessage(1, (io.greptime.v1.region.Server.ArrowIpc) body_); + if (regionId_ != 0L) { + output.writeUInt64(1, regionId_); + } + if (bodyCase_ == 2) { + output.writeMessage(2, (io.greptime.v1.Common.ArrowIpc) body_); } unknownFields.writeTo(output); } @@ -26040,9 +26065,13 @@ java.lang.String defaultValue); if (size != -1) return size; size = 0; - if (bodyCase_ == 1) { + if (regionId_ != 0L) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, (io.greptime.v1.region.Server.ArrowIpc) body_); + .computeUInt64Size(1, regionId_); + } + if (bodyCase_ == 2) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, (io.greptime.v1.Common.ArrowIpc) body_); } size += unknownFields.getSerializedSize(); memoizedSize = size; @@ -26059,9 +26088,11 @@ java.lang.String defaultValue); } io.greptime.v1.region.Server.BulkInsertRequest other = (io.greptime.v1.region.Server.BulkInsertRequest) obj; + if (getRegionId() + != other.getRegionId()) return false; if (!getBodyCase().equals(other.getBodyCase())) return false; switch (bodyCase_) { - case 1: + case 2: if (!getArrowIpc() .equals(other.getArrowIpc())) return false; break; @@ -26079,8 +26110,11 @@ java.lang.String defaultValue); } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + REGION_ID_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getRegionId()); switch (bodyCase_) { - case 1: + case 2: hash = (37 * hash) + ARROW_IPC_FIELD_NUMBER; hash = (53 * hash) + getArrowIpc().hashCode(); break; @@ -26224,6 +26258,8 @@ java.lang.String defaultValue); @java.lang.Override public Builder clear() { super.clear(); + regionId_ = 0L; + bodyCase_ = 0; body_ = null; return this; @@ -26252,7 +26288,8 @@ java.lang.String defaultValue); @java.lang.Override public io.greptime.v1.region.Server.BulkInsertRequest buildPartial() { io.greptime.v1.region.Server.BulkInsertRequest result = new io.greptime.v1.region.Server.BulkInsertRequest(this); - if (bodyCase_ == 1) { + result.regionId_ = regionId_; + if (bodyCase_ == 2) { if (arrowIpcBuilder_ == null) { result.body_ = body_; } else { @@ -26308,6 +26345,9 @@ java.lang.String defaultValue); public Builder mergeFrom(io.greptime.v1.region.Server.BulkInsertRequest other) { if (other == io.greptime.v1.region.Server.BulkInsertRequest.getDefaultInstance()) return this; + if (other.getRegionId() != 0L) { + setRegionId(other.getRegionId()); + } switch (other.getBodyCase()) { case ARROW_IPC: { mergeArrowIpc(other.getArrowIpc()); @@ -26361,38 +26401,69 @@ java.lang.String defaultValue); } - private com.google.protobuf.SingleFieldBuilderV3< - io.greptime.v1.region.Server.ArrowIpc, io.greptime.v1.region.Server.ArrowIpc.Builder, io.greptime.v1.region.Server.ArrowIpcOrBuilder> arrowIpcBuilder_; + private long regionId_ ; /** - * .greptime.v1.region.ArrowIpc arrow_ipc = 1; + * uint64 region_id = 1; + * @return The regionId. + */ + @java.lang.Override + public long getRegionId() { + return regionId_; + } + /** + * uint64 region_id = 1; + * @param value The regionId to set. + * @return This builder for chaining. + */ + public Builder setRegionId(long value) { + + regionId_ = value; + onChanged(); + return this; + } + /** + * uint64 region_id = 1; + * @return This builder for chaining. + */ + public Builder clearRegionId() { + + regionId_ = 0L; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + io.greptime.v1.Common.ArrowIpc, io.greptime.v1.Common.ArrowIpc.Builder, io.greptime.v1.Common.ArrowIpcOrBuilder> arrowIpcBuilder_; + /** + * .greptime.v1.ArrowIpc arrow_ipc = 2; * @return Whether the arrowIpc field is set. */ @java.lang.Override public boolean hasArrowIpc() { - return bodyCase_ == 1; + return bodyCase_ == 2; } /** - * .greptime.v1.region.ArrowIpc arrow_ipc = 1; + * .greptime.v1.ArrowIpc arrow_ipc = 2; * @return The arrowIpc. */ @java.lang.Override - public io.greptime.v1.region.Server.ArrowIpc getArrowIpc() { + public io.greptime.v1.Common.ArrowIpc getArrowIpc() { if (arrowIpcBuilder_ == null) { - if (bodyCase_ == 1) { - return (io.greptime.v1.region.Server.ArrowIpc) body_; + if (bodyCase_ == 2) { + return (io.greptime.v1.Common.ArrowIpc) body_; } - return io.greptime.v1.region.Server.ArrowIpc.getDefaultInstance(); + return io.greptime.v1.Common.ArrowIpc.getDefaultInstance(); } else { - if (bodyCase_ == 1) { + if (bodyCase_ == 2) { return arrowIpcBuilder_.getMessage(); } - return io.greptime.v1.region.Server.ArrowIpc.getDefaultInstance(); + return io.greptime.v1.Common.ArrowIpc.getDefaultInstance(); } } /** - * .greptime.v1.region.ArrowIpc arrow_ipc = 1; + * .greptime.v1.ArrowIpc arrow_ipc = 2; */ - public Builder setArrowIpc(io.greptime.v1.region.Server.ArrowIpc value) { + public Builder setArrowIpc(io.greptime.v1.Common.ArrowIpc value) { if (arrowIpcBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -26402,58 +26473,58 @@ java.lang.String defaultValue); } else { arrowIpcBuilder_.setMessage(value); } - bodyCase_ = 1; + bodyCase_ = 2; return this; } /** - * .greptime.v1.region.ArrowIpc arrow_ipc = 1; + * .greptime.v1.ArrowIpc arrow_ipc = 2; */ public Builder setArrowIpc( - io.greptime.v1.region.Server.ArrowIpc.Builder builderForValue) { + io.greptime.v1.Common.ArrowIpc.Builder builderForValue) { if (arrowIpcBuilder_ == null) { body_ = builderForValue.build(); onChanged(); } else { arrowIpcBuilder_.setMessage(builderForValue.build()); } - bodyCase_ = 1; + bodyCase_ = 2; return this; } /** - * .greptime.v1.region.ArrowIpc arrow_ipc = 1; + * .greptime.v1.ArrowIpc arrow_ipc = 2; */ - public Builder mergeArrowIpc(io.greptime.v1.region.Server.ArrowIpc value) { + public Builder mergeArrowIpc(io.greptime.v1.Common.ArrowIpc value) { if (arrowIpcBuilder_ == null) { - if (bodyCase_ == 1 && - body_ != io.greptime.v1.region.Server.ArrowIpc.getDefaultInstance()) { - body_ = io.greptime.v1.region.Server.ArrowIpc.newBuilder((io.greptime.v1.region.Server.ArrowIpc) body_) + if (bodyCase_ == 2 && + body_ != io.greptime.v1.Common.ArrowIpc.getDefaultInstance()) { + body_ = io.greptime.v1.Common.ArrowIpc.newBuilder((io.greptime.v1.Common.ArrowIpc) body_) .mergeFrom(value).buildPartial(); } else { body_ = value; } onChanged(); } else { - if (bodyCase_ == 1) { + if (bodyCase_ == 2) { arrowIpcBuilder_.mergeFrom(value); } else { arrowIpcBuilder_.setMessage(value); } } - bodyCase_ = 1; + bodyCase_ = 2; return this; } /** - * .greptime.v1.region.ArrowIpc arrow_ipc = 1; + * .greptime.v1.ArrowIpc arrow_ipc = 2; */ public Builder clearArrowIpc() { if (arrowIpcBuilder_ == null) { - if (bodyCase_ == 1) { + if (bodyCase_ == 2) { bodyCase_ = 0; body_ = null; onChanged(); } } else { - if (bodyCase_ == 1) { + if (bodyCase_ == 2) { bodyCase_ = 0; body_ = null; } @@ -26462,43 +26533,43 @@ java.lang.String defaultValue); return this; } /** - * .greptime.v1.region.ArrowIpc arrow_ipc = 1; + * .greptime.v1.ArrowIpc arrow_ipc = 2; */ - public io.greptime.v1.region.Server.ArrowIpc.Builder getArrowIpcBuilder() { + public io.greptime.v1.Common.ArrowIpc.Builder getArrowIpcBuilder() { return getArrowIpcFieldBuilder().getBuilder(); } /** - * .greptime.v1.region.ArrowIpc arrow_ipc = 1; + * .greptime.v1.ArrowIpc arrow_ipc = 2; */ @java.lang.Override - public io.greptime.v1.region.Server.ArrowIpcOrBuilder getArrowIpcOrBuilder() { - if ((bodyCase_ == 1) && (arrowIpcBuilder_ != null)) { + public io.greptime.v1.Common.ArrowIpcOrBuilder getArrowIpcOrBuilder() { + if ((bodyCase_ == 2) && (arrowIpcBuilder_ != null)) { return arrowIpcBuilder_.getMessageOrBuilder(); } else { - if (bodyCase_ == 1) { - return (io.greptime.v1.region.Server.ArrowIpc) body_; + if (bodyCase_ == 2) { + return (io.greptime.v1.Common.ArrowIpc) body_; } - return io.greptime.v1.region.Server.ArrowIpc.getDefaultInstance(); + return io.greptime.v1.Common.ArrowIpc.getDefaultInstance(); } } /** - * .greptime.v1.region.ArrowIpc arrow_ipc = 1; + * .greptime.v1.ArrowIpc arrow_ipc = 2; */ private com.google.protobuf.SingleFieldBuilderV3< - io.greptime.v1.region.Server.ArrowIpc, io.greptime.v1.region.Server.ArrowIpc.Builder, io.greptime.v1.region.Server.ArrowIpcOrBuilder> + io.greptime.v1.Common.ArrowIpc, io.greptime.v1.Common.ArrowIpc.Builder, io.greptime.v1.Common.ArrowIpcOrBuilder> getArrowIpcFieldBuilder() { if (arrowIpcBuilder_ == null) { - if (!(bodyCase_ == 1)) { - body_ = io.greptime.v1.region.Server.ArrowIpc.getDefaultInstance(); + if (!(bodyCase_ == 2)) { + body_ = io.greptime.v1.Common.ArrowIpc.getDefaultInstance(); } arrowIpcBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.greptime.v1.region.Server.ArrowIpc, io.greptime.v1.region.Server.ArrowIpc.Builder, io.greptime.v1.region.Server.ArrowIpcOrBuilder>( - (io.greptime.v1.region.Server.ArrowIpc) body_, + io.greptime.v1.Common.ArrowIpc, io.greptime.v1.Common.ArrowIpc.Builder, io.greptime.v1.Common.ArrowIpcOrBuilder>( + (io.greptime.v1.Common.ArrowIpc) body_, getParentForChildren(), isClean()); body_ = null; } - bodyCase_ = 1; + bodyCase_ = 2; onChanged();; return arrowIpcBuilder_; } @@ -26555,719 +26626,6 @@ java.lang.String defaultValue); } - public interface ArrowIpcOrBuilder extends - // @@protoc_insertion_point(interface_extends:greptime.v1.region.ArrowIpc) - com.google.protobuf.MessageOrBuilder { - - /** - * uint64 region_id = 1; - * @return The regionId. - */ - long getRegionId(); - - /** - * bytes schema = 2; - * @return The schema. - */ - com.google.protobuf.ByteString getSchema(); - - /** - * bytes data_header = 3; - * @return The dataHeader. - */ - com.google.protobuf.ByteString getDataHeader(); - - /** - * bytes payload = 4; - * @return The payload. - */ - com.google.protobuf.ByteString getPayload(); - } - /** - * Protobuf type {@code greptime.v1.region.ArrowIpc} - */ - public static final class ArrowIpc extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:greptime.v1.region.ArrowIpc) - ArrowIpcOrBuilder { - private static final long serialVersionUID = 0L; - // Use ArrowIpc.newBuilder() to construct. - private ArrowIpc(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ArrowIpc() { - schema_ = com.google.protobuf.ByteString.EMPTY; - dataHeader_ = com.google.protobuf.ByteString.EMPTY; - payload_ = com.google.protobuf.ByteString.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ArrowIpc(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ArrowIpc( - 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: { - - regionId_ = input.readUInt64(); - break; - } - case 18: { - - schema_ = input.readBytes(); - break; - } - case 26: { - - dataHeader_ = input.readBytes(); - break; - } - case 34: { - - payload_ = input.readBytes(); - 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.region.Server.internal_static_greptime_v1_region_ArrowIpc_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.greptime.v1.region.Server.internal_static_greptime_v1_region_ArrowIpc_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.greptime.v1.region.Server.ArrowIpc.class, io.greptime.v1.region.Server.ArrowIpc.Builder.class); - } - - public static final int REGION_ID_FIELD_NUMBER = 1; - private long regionId_; - /** - * uint64 region_id = 1; - * @return The regionId. - */ - @java.lang.Override - public long getRegionId() { - return regionId_; - } - - public static final int SCHEMA_FIELD_NUMBER = 2; - private com.google.protobuf.ByteString schema_; - /** - * bytes schema = 2; - * @return The schema. - */ - @java.lang.Override - public com.google.protobuf.ByteString getSchema() { - return schema_; - } - - public static final int DATA_HEADER_FIELD_NUMBER = 3; - private com.google.protobuf.ByteString dataHeader_; - /** - * bytes data_header = 3; - * @return The dataHeader. - */ - @java.lang.Override - public com.google.protobuf.ByteString getDataHeader() { - return dataHeader_; - } - - public static final int PAYLOAD_FIELD_NUMBER = 4; - private com.google.protobuf.ByteString payload_; - /** - * bytes payload = 4; - * @return The payload. - */ - @java.lang.Override - public com.google.protobuf.ByteString getPayload() { - return payload_; - } - - 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 (regionId_ != 0L) { - output.writeUInt64(1, regionId_); - } - if (!schema_.isEmpty()) { - output.writeBytes(2, schema_); - } - if (!dataHeader_.isEmpty()) { - output.writeBytes(3, dataHeader_); - } - if (!payload_.isEmpty()) { - output.writeBytes(4, payload_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (regionId_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeUInt64Size(1, regionId_); - } - if (!schema_.isEmpty()) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(2, schema_); - } - if (!dataHeader_.isEmpty()) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(3, dataHeader_); - } - if (!payload_.isEmpty()) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(4, payload_); - } - 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.region.Server.ArrowIpc)) { - return super.equals(obj); - } - io.greptime.v1.region.Server.ArrowIpc other = (io.greptime.v1.region.Server.ArrowIpc) obj; - - if (getRegionId() - != other.getRegionId()) return false; - if (!getSchema() - .equals(other.getSchema())) return false; - if (!getDataHeader() - .equals(other.getDataHeader())) return false; - if (!getPayload() - .equals(other.getPayload())) 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) + REGION_ID_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getRegionId()); - hash = (37 * hash) + SCHEMA_FIELD_NUMBER; - hash = (53 * hash) + getSchema().hashCode(); - hash = (37 * hash) + DATA_HEADER_FIELD_NUMBER; - hash = (53 * hash) + getDataHeader().hashCode(); - hash = (37 * hash) + PAYLOAD_FIELD_NUMBER; - hash = (53 * hash) + getPayload().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.greptime.v1.region.Server.ArrowIpc parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.greptime.v1.region.Server.ArrowIpc 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.region.Server.ArrowIpc parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.greptime.v1.region.Server.ArrowIpc 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.region.Server.ArrowIpc parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.greptime.v1.region.Server.ArrowIpc parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.greptime.v1.region.Server.ArrowIpc parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.greptime.v1.region.Server.ArrowIpc 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.region.Server.ArrowIpc parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static io.greptime.v1.region.Server.ArrowIpc 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.region.Server.ArrowIpc parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.greptime.v1.region.Server.ArrowIpc 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.region.Server.ArrowIpc 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.region.ArrowIpc} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:greptime.v1.region.ArrowIpc) - io.greptime.v1.region.Server.ArrowIpcOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.greptime.v1.region.Server.internal_static_greptime_v1_region_ArrowIpc_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.greptime.v1.region.Server.internal_static_greptime_v1_region_ArrowIpc_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.greptime.v1.region.Server.ArrowIpc.class, io.greptime.v1.region.Server.ArrowIpc.Builder.class); - } - - // Construct using io.greptime.v1.region.Server.ArrowIpc.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(); - regionId_ = 0L; - - schema_ = com.google.protobuf.ByteString.EMPTY; - - dataHeader_ = com.google.protobuf.ByteString.EMPTY; - - payload_ = com.google.protobuf.ByteString.EMPTY; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.greptime.v1.region.Server.internal_static_greptime_v1_region_ArrowIpc_descriptor; - } - - @java.lang.Override - public io.greptime.v1.region.Server.ArrowIpc getDefaultInstanceForType() { - return io.greptime.v1.region.Server.ArrowIpc.getDefaultInstance(); - } - - @java.lang.Override - public io.greptime.v1.region.Server.ArrowIpc build() { - io.greptime.v1.region.Server.ArrowIpc result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.greptime.v1.region.Server.ArrowIpc buildPartial() { - io.greptime.v1.region.Server.ArrowIpc result = new io.greptime.v1.region.Server.ArrowIpc(this); - result.regionId_ = regionId_; - result.schema_ = schema_; - result.dataHeader_ = dataHeader_; - result.payload_ = payload_; - 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.region.Server.ArrowIpc) { - return mergeFrom((io.greptime.v1.region.Server.ArrowIpc)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.greptime.v1.region.Server.ArrowIpc other) { - if (other == io.greptime.v1.region.Server.ArrowIpc.getDefaultInstance()) return this; - if (other.getRegionId() != 0L) { - setRegionId(other.getRegionId()); - } - if (other.getSchema() != com.google.protobuf.ByteString.EMPTY) { - setSchema(other.getSchema()); - } - if (other.getDataHeader() != com.google.protobuf.ByteString.EMPTY) { - setDataHeader(other.getDataHeader()); - } - if (other.getPayload() != com.google.protobuf.ByteString.EMPTY) { - setPayload(other.getPayload()); - } - 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.region.Server.ArrowIpc parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (io.greptime.v1.region.Server.ArrowIpc) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private long regionId_ ; - /** - * uint64 region_id = 1; - * @return The regionId. - */ - @java.lang.Override - public long getRegionId() { - return regionId_; - } - /** - * uint64 region_id = 1; - * @param value The regionId to set. - * @return This builder for chaining. - */ - public Builder setRegionId(long value) { - - regionId_ = value; - onChanged(); - return this; - } - /** - * uint64 region_id = 1; - * @return This builder for chaining. - */ - public Builder clearRegionId() { - - regionId_ = 0L; - onChanged(); - return this; - } - - private com.google.protobuf.ByteString schema_ = com.google.protobuf.ByteString.EMPTY; - /** - * bytes schema = 2; - * @return The schema. - */ - @java.lang.Override - public com.google.protobuf.ByteString getSchema() { - return schema_; - } - /** - * bytes schema = 2; - * @param value The schema to set. - * @return This builder for chaining. - */ - public Builder setSchema(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - - schema_ = value; - onChanged(); - return this; - } - /** - * bytes schema = 2; - * @return This builder for chaining. - */ - public Builder clearSchema() { - - schema_ = getDefaultInstance().getSchema(); - onChanged(); - return this; - } - - private com.google.protobuf.ByteString dataHeader_ = com.google.protobuf.ByteString.EMPTY; - /** - * bytes data_header = 3; - * @return The dataHeader. - */ - @java.lang.Override - public com.google.protobuf.ByteString getDataHeader() { - return dataHeader_; - } - /** - * bytes data_header = 3; - * @param value The dataHeader to set. - * @return This builder for chaining. - */ - public Builder setDataHeader(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - - dataHeader_ = value; - onChanged(); - return this; - } - /** - * bytes data_header = 3; - * @return This builder for chaining. - */ - public Builder clearDataHeader() { - - dataHeader_ = getDefaultInstance().getDataHeader(); - onChanged(); - return this; - } - - private com.google.protobuf.ByteString payload_ = com.google.protobuf.ByteString.EMPTY; - /** - * bytes payload = 4; - * @return The payload. - */ - @java.lang.Override - public com.google.protobuf.ByteString getPayload() { - return payload_; - } - /** - * bytes payload = 4; - * @param value The payload to set. - * @return This builder for chaining. - */ - public Builder setPayload(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - - payload_ = value; - onChanged(); - return this; - } - /** - * bytes payload = 4; - * @return This builder for chaining. - */ - public Builder clearPayload() { - - payload_ = getDefaultInstance().getPayload(); - 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.region.ArrowIpc) - } - - // @@protoc_insertion_point(class_scope:greptime.v1.region.ArrowIpc) - private static final io.greptime.v1.region.Server.ArrowIpc DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.greptime.v1.region.Server.ArrowIpc(); - } - - public static io.greptime.v1.region.Server.ArrowIpc getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ArrowIpc parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ArrowIpc(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.region.Server.ArrowIpc getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - public interface MitoManifestInfoOrBuilder extends // @@protoc_insertion_point(interface_extends:greptime.v1.region.MitoManifestInfo) com.google.protobuf.MessageOrBuilder { @@ -29522,11 +28880,6 @@ java.lang.String defaultValue); private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_greptime_v1_region_BulkInsertRequest_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_greptime_v1_region_ArrowIpc_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_greptime_v1_region_ArrowIpc_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_greptime_v1_region_MitoManifestInfo_descriptor; private static final @@ -29642,24 +28995,22 @@ java.lang.String defaultValue); "rictWindowH\000B\t\n\007options\"$\n\017TruncateReque" + "st\022\021\n\tregion_id\030\001 \001(\004\"P\n\017RegionColumnDef" + "\022*\n\ncolumn_def\030\001 \001(\0132\026.greptime.v1.Colum" + - "nDef\022\021\n\tcolumn_id\030\002 \001(\r\"N\n\021BulkInsertReq" + - "uest\0221\n\tarrow_ipc\030\001 \001(\0132\034.greptime.v1.re" + - "gion.ArrowIpcH\000B\006\n\004body\"S\n\010ArrowIpc\022\021\n\tr" + - "egion_id\030\001 \001(\004\022\016\n\006schema\030\002 \001(\014\022\023\n\013data_h" + - "eader\030\003 \001(\014\022\017\n\007payload\030\004 \001(\014\"1\n\020MitoMani" + - "festInfo\022\035\n\025data_manifest_version\030\001 \001(\004\"" + - "V\n\022MetricManifestInfo\022\035\n\025data_manifest_v" + - "ersion\030\001 \001(\004\022!\n\031metadata_manifest_versio" + - "n\030\002 \001(\004\"\275\001\n\013SyncRequest\022\021\n\tregion_id\030\001 \001" + - "(\004\022B\n\022mito_manifest_info\030\002 \001(\0132$.greptim" + - "e.v1.region.MitoManifestInfoH\000\022F\n\024metric" + - "_manifest_info\030\003 \001(\0132&.greptime.v1.regio" + - "n.MetricManifestInfoH\000B\017\n\rmanifest_info2" + - "Y\n\006Region\022O\n\006Handle\022!.greptime.v1.region" + - ".RegionRequest\032\".greptime.v1.region.Regi" + - "onResponseB]\n\025io.greptime.v1.regionB\006Ser" + - "verZ options = 1; } + +message ArrowIpc { + bytes schema = 1; + bytes data_header = 2; + bytes payload = 3; +} diff --git a/proto/greptime/v1/region/server.proto b/proto/greptime/v1/region/server.proto index 3826114..5f01ac8 100644 --- a/proto/greptime/v1/region/server.proto +++ b/proto/greptime/v1/region/server.proto @@ -187,16 +187,10 @@ message RegionColumnDef { // Request of bulk ingestion API. message BulkInsertRequest { - oneof body { - ArrowIpc arrow_ipc = 1; - } -} - -message ArrowIpc { uint64 region_id = 1; - bytes schema = 2; - bytes data_header = 3; - bytes payload = 4; + oneof body { + ArrowIpc arrow_ipc = 2; + } } // Manifest info for mito engine. diff --git a/proto/greptime/v1/wal.proto b/proto/greptime/v1/wal.proto index 6c4ebb8..a9e6eb9 100644 --- a/proto/greptime/v1/wal.proto +++ b/proto/greptime/v1/wal.proto @@ -19,6 +19,7 @@ package greptime.v1; option go_package = "github.com/GreptimeTeam/greptime-proto/go/greptime/v1"; import "greptime/v1/row.proto"; +import "greptime/v1/common.proto"; // Type of operation to rows. enum OpType { @@ -55,4 +56,20 @@ message Mutation { message WalEntry { // List of mutations for a region. repeated Mutation mutations = 1; + // List of bulk insert requests. + repeated BulkWalEntry bulk_entries = 2; +} + +message BulkWalEntry { + // Start WAL sequence of this entry. + uint64 sequence = 1; + // Max timestamp value. + int64 max_ts = 2; + // Min timestamp value. + int64 min_ts = 3; + // Timestamp column index. + uint32 timestamp_index = 4; + oneof body { + ArrowIpc arrow_ipc = 5; + } }