feat: add flow_id and drop_if_exists to DropFlowExpr (#164)

* feat: add `flow_id` and `drop_if_exists` to `DropFlowExpr`

* chore: apply suggestions from CR

* chore: generate code
This commit is contained in:
Weny Xu
2024-05-10 12:32:37 +09:00
committed by GitHub
parent e152fcbf17
commit 219b2409bb
18 changed files with 2914 additions and 3279 deletions
+89 -279
View File
@@ -103,8 +103,8 @@ struct FlowResponse_ExtensionEntry_DoNotUseDefaultTypeInternal {
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 FlowResponse_ExtensionEntry_DoNotUseDefaultTypeInternal _FlowResponse_ExtensionEntry_DoNotUse_default_instance_;
PROTOBUF_CONSTEXPR FlowResponse::FlowResponse(
::_pbi::ConstantInitialized): _impl_{
/*decltype(_impl_.extension_)*/{::_pbi::ConstantInitialized()}
, /*decltype(_impl_.affected_tasks_)*/{}
/*decltype(_impl_.affected_flows_)*/{}
, /*decltype(_impl_.extension_)*/{::_pbi::ConstantInitialized()}
, /*decltype(_impl_.header_)*/nullptr
, /*decltype(_impl_.affected_rows_)*/uint64_t{0u}
, /*decltype(_impl_._cached_size_)*/{}} {}
@@ -161,23 +161,10 @@ struct DropRequestDefaultTypeInternal {
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 DropRequestDefaultTypeInternal _DropRequest_default_instance_;
PROTOBUF_CONSTEXPR TaskId::TaskId(
::_pbi::ConstantInitialized): _impl_{
/*decltype(_impl_.id_)*/0u
, /*decltype(_impl_._cached_size_)*/{}} {}
struct TaskIdDefaultTypeInternal {
PROTOBUF_CONSTEXPR TaskIdDefaultTypeInternal()
: _instance(::_pbi::ConstantInitialized{}) {}
~TaskIdDefaultTypeInternal() {}
union {
TaskId _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TaskIdDefaultTypeInternal _TaskId_default_instance_;
} // namespace flow
} // namespace v1
} // namespace greptime
static ::_pb::Metadata file_level_metadata_greptime_2fv1_2fflow_2fserver_2eproto[11];
static ::_pb::Metadata file_level_metadata_greptime_2fv1_2fflow_2fserver_2eproto[10];
static constexpr ::_pb::EnumDescriptor const** file_level_enum_descriptors_greptime_2fv1_2fflow_2fserver_2eproto = nullptr;
static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_greptime_2fv1_2fflow_2fserver_2eproto = nullptr;
@@ -243,8 +230,8 @@ const uint32_t TableStruct_greptime_2fv1_2fflow_2fserver_2eproto::offsets[] PROT
~0u, // no _inlined_string_donated_
PROTOBUF_FIELD_OFFSET(::greptime::v1::flow::FlowResponse, _impl_.header_),
PROTOBUF_FIELD_OFFSET(::greptime::v1::flow::FlowResponse, _impl_.affected_rows_),
PROTOBUF_FIELD_OFFSET(::greptime::v1::flow::FlowResponse, _impl_.affected_flows_),
PROTOBUF_FIELD_OFFSET(::greptime::v1::flow::FlowResponse, _impl_.extension_),
PROTOBUF_FIELD_OFFSET(::greptime::v1::flow::FlowResponse, _impl_.affected_tasks_),
PROTOBUF_FIELD_OFFSET(::greptime::v1::flow::CreateRequest_FlowOptionsEntry_DoNotUse, _has_bits_),
PROTOBUF_FIELD_OFFSET(::greptime::v1::flow::CreateRequest_FlowOptionsEntry_DoNotUse, _internal_metadata_),
~0u, // no _extensions_
@@ -276,13 +263,6 @@ const uint32_t TableStruct_greptime_2fv1_2fflow_2fserver_2eproto::offsets[] PROT
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
PROTOBUF_FIELD_OFFSET(::greptime::v1::flow::DropRequest, _impl_.flow_id_),
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::greptime::v1::flow::TaskId, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
PROTOBUF_FIELD_OFFSET(::greptime::v1::flow::TaskId, _impl_.id_),
};
static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
{ 0, 8, -1, sizeof(::greptime::v1::flow::FlowRequestHeader_TracingContextEntry_DoNotUse)},
@@ -295,7 +275,6 @@ static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protode
{ 63, 71, -1, sizeof(::greptime::v1::flow::CreateRequest_FlowOptionsEntry_DoNotUse)},
{ 73, -1, -1, sizeof(::greptime::v1::flow::CreateRequest)},
{ 87, -1, -1, sizeof(::greptime::v1::flow::DropRequest)},
{ 94, -1, -1, sizeof(::greptime::v1::flow::TaskId)},
};
static const ::_pb::Message* const file_default_instances[] = {
@@ -309,7 +288,6 @@ static const ::_pb::Message* const file_default_instances[] = {
&::greptime::v1::flow::_CreateRequest_FlowOptionsEntry_DoNotUse_default_instance_._instance,
&::greptime::v1::flow::_CreateRequest_default_instance_._instance,
&::greptime::v1::flow::_DropRequest_default_instance_._instance,
&::greptime::v1::flow::_TaskId_default_instance_._instance,
};
const char descriptor_table_protodef_greptime_2fv1_2fflow_2fserver_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
@@ -329,31 +307,30 @@ const char descriptor_table_protodef_greptime_2fv1_2fflow_2fserver_2eproto[] PRO
"FlowRequestHeader\0221\n\006create\030\001 \001(\0132\037.grep"
"time.v1.flow.CreateRequestH\000\022-\n\004drop\030\002 \001"
"(\0132\035.greptime.v1.flow.DropRequestH\000B\006\n\004b"
"ody\"\370\001\n\014FlowResponse\022+\n\006header\030\001 \001(\0132\033.g"
"ody\"\363\001\n\014FlowResponse\022+\n\006header\030\001 \001(\0132\033.g"
"reptime.v1.ResponseHeader\022\025\n\raffected_ro"
"ws\030\002 \001(\004\022@\n\textension\030\003 \003(\0132-.greptime.v"
"1.flow.FlowResponse.ExtensionEntry\0220\n\016af"
"fected_tasks\030\004 \003(\0132\030.greptime.v1.flow.Ta"
"skId\0320\n\016ExtensionEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005v"
"alue\030\002 \001(\014:\0028\001\"\350\002\n\rCreateRequest\022)\n\007flow"
"_id\030\001 \001(\0132\030.greptime.v1.flow.TaskId\022.\n\020s"
"ource_table_ids\030\002 \003(\0132\024.greptime.v1.Tabl"
"eId\022/\n\017sink_table_name\030\003 \001(\0132\026.greptime."
"v1.TableName\022\034\n\024create_if_not_exists\030\004 \001"
"(\010\022\023\n\013expire_when\030\005 \001(\t\022\017\n\007comment\030\006 \001(\t"
"\022\013\n\003sql\030\007 \001(\t\022F\n\014flow_options\030\010 \003(\01320.gr"
"eptime.v1.flow.CreateRequest.FlowOptions"
"Entry\0322\n\020FlowOptionsEntry\022\013\n\003key\030\001 \001(\t\022\r"
"\n\005value\030\002 \001(\t:\0028\001\"8\n\013DropRequest\022)\n\007flow"
"_id\030\001 \001(\0132\030.greptime.v1.flow.TaskId\"\024\n\006T"
"askId\022\n\n\002id\030\001 \001(\r2\264\001\n\004Flow\022S\n\022HandleCrea"
"teRemove\022\035.greptime.v1.flow.FlowRequest\032"
"\036.greptime.v1.flow.FlowResponse\022W\n\023Handl"
"eMirrorRequest\022 .greptime.v1.flow.Insert"
"Requests\032\036.greptime.v1.flow.FlowResponse"
"BY\n\023io.greptime.v1.flowB\006ServerZ:github."
"com/GreptimeTeam/greptime-proto/go/grept"
"ime/v1/flowb\006proto3"
"ws\030\002 \001(\004\022+\n\016affected_flows\030\003 \003(\0132\023.grept"
"ime.v1.FlowId\022@\n\textension\030\004 \003(\0132-.grept"
"ime.v1.flow.FlowResponse.ExtensionEntry\032"
"0\n\016ExtensionEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030"
"\002 \001(\014:\0028\001\"\343\002\n\rCreateRequest\022$\n\007flow_id\030\001"
" \001(\0132\023.greptime.v1.FlowId\022.\n\020source_tabl"
"e_ids\030\002 \003(\0132\024.greptime.v1.TableId\022/\n\017sin"
"k_table_name\030\003 \001(\0132\026.greptime.v1.TableNa"
"me\022\034\n\024create_if_not_exists\030\004 \001(\010\022\023\n\013expi"
"re_when\030\005 \001(\t\022\017\n\007comment\030\006 \001(\t\022\013\n\003sql\030\007 "
"\001(\t\022F\n\014flow_options\030\010 \003(\01320.greptime.v1."
"flow.CreateRequest.FlowOptionsEntry\0322\n\020F"
"lowOptionsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 "
"\001(\t:\0028\001\"3\n\013DropRequest\022$\n\007flow_id\030\001 \001(\0132"
"\023.greptime.v1.FlowId2\264\001\n\004Flow\022S\n\022HandleC"
"reateRemove\022\035.greptime.v1.flow.FlowReque"
"st\032\036.greptime.v1.flow.FlowResponse\022W\n\023Ha"
"ndleMirrorRequest\022 .greptime.v1.flow.Ins"
"ertRequests\032\036.greptime.v1.flow.FlowRespo"
"nseBY\n\023io.greptime.v1.flowB\006ServerZ:gith"
"ub.com/GreptimeTeam/greptime-proto/go/gr"
"eptime/v1/flowb\006proto3"
;
static const ::_pbi::DescriptorTable* const descriptor_table_greptime_2fv1_2fflow_2fserver_2eproto_deps[3] = {
&::descriptor_table_greptime_2fv1_2fcommon_2eproto,
@@ -362,9 +339,9 @@ static const ::_pbi::DescriptorTable* const descriptor_table_greptime_2fv1_2fflo
};
static ::_pbi::once_flag descriptor_table_greptime_2fv1_2fflow_2fserver_2eproto_once;
const ::_pbi::DescriptorTable descriptor_table_greptime_2fv1_2fflow_2fserver_2eproto = {
false, false, 1619, descriptor_table_protodef_greptime_2fv1_2fflow_2fserver_2eproto,
false, false, 1582, descriptor_table_protodef_greptime_2fv1_2fflow_2fserver_2eproto,
"greptime/v1/flow/server.proto",
&descriptor_table_greptime_2fv1_2fflow_2fserver_2eproto_once, descriptor_table_greptime_2fv1_2fflow_2fserver_2eproto_deps, 3, 11,
&descriptor_table_greptime_2fv1_2fflow_2fserver_2eproto_once, descriptor_table_greptime_2fv1_2fflow_2fserver_2eproto_deps, 3, 10,
schemas, file_default_instances, TableStruct_greptime_2fv1_2fflow_2fserver_2eproto::offsets,
file_level_metadata_greptime_2fv1_2fflow_2fserver_2eproto, file_level_enum_descriptors_greptime_2fv1_2fflow_2fserver_2eproto,
file_level_service_descriptors_greptime_2fv1_2fflow_2fserver_2eproto,
@@ -1453,6 +1430,9 @@ void FlowResponse::clear_header() {
}
_impl_.header_ = nullptr;
}
void FlowResponse::clear_affected_flows() {
_impl_.affected_flows_.Clear();
}
FlowResponse::FlowResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
@@ -1466,8 +1446,8 @@ FlowResponse::FlowResponse(const FlowResponse& from)
: ::PROTOBUF_NAMESPACE_ID::Message() {
FlowResponse* const _this = this; (void)_this;
new (&_impl_) Impl_{
/*decltype(_impl_.extension_)*/{}
, decltype(_impl_.affected_tasks_){from._impl_.affected_tasks_}
decltype(_impl_.affected_flows_){from._impl_.affected_flows_}
, /*decltype(_impl_.extension_)*/{}
, decltype(_impl_.header_){nullptr}
, decltype(_impl_.affected_rows_){}
, /*decltype(_impl_._cached_size_)*/{}};
@@ -1486,8 +1466,8 @@ inline void FlowResponse::SharedCtor(
(void)arena;
(void)is_message_owned;
new (&_impl_) Impl_{
/*decltype(_impl_.extension_)*/{::_pbi::ArenaInitialized(), arena}
, decltype(_impl_.affected_tasks_){arena}
decltype(_impl_.affected_flows_){arena}
, /*decltype(_impl_.extension_)*/{::_pbi::ArenaInitialized(), arena}
, decltype(_impl_.header_){nullptr}
, decltype(_impl_.affected_rows_){uint64_t{0u}}
, /*decltype(_impl_._cached_size_)*/{}
@@ -1506,9 +1486,9 @@ FlowResponse::~FlowResponse() {
inline void FlowResponse::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
_impl_.affected_flows_.~RepeatedPtrField();
_impl_.extension_.Destruct();
_impl_.extension_.~MapField();
_impl_.affected_tasks_.~RepeatedPtrField();
if (this != internal_default_instance()) delete _impl_.header_;
}
@@ -1526,8 +1506,8 @@ void FlowResponse::Clear() {
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
_impl_.affected_flows_.Clear();
_impl_.extension_.Clear();
_impl_.affected_tasks_.Clear();
if (GetArenaForAllocation() == nullptr && _impl_.header_ != nullptr) {
delete _impl_.header_;
}
@@ -1558,26 +1538,26 @@ const char* FlowResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext*
} else
goto handle_unusual;
continue;
// map<string, bytes> extension = 3;
// repeated .greptime.v1.FlowId affected_flows = 3;
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
ptr -= 1;
do {
ptr += 1;
ptr = ctx->ParseMessage(&_impl_.extension_, ptr);
ptr = ctx->ParseMessage(_internal_add_affected_flows(), ptr);
CHK_(ptr);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr));
} else
goto handle_unusual;
continue;
// repeated .greptime.v1.flow.TaskId affected_tasks = 4;
// map<string, bytes> extension = 4;
case 4:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
ptr -= 1;
do {
ptr += 1;
ptr = ctx->ParseMessage(_internal_add_affected_tasks(), ptr);
ptr = ctx->ParseMessage(&_impl_.extension_, ptr);
CHK_(ptr);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<34>(ptr));
@@ -1626,7 +1606,15 @@ uint8_t* FlowResponse::_InternalSerialize(
target = ::_pbi::WireFormatLite::WriteUInt64ToArray(2, this->_internal_affected_rows(), target);
}
// map<string, bytes> extension = 3;
// repeated .greptime.v1.FlowId affected_flows = 3;
for (unsigned i = 0,
n = static_cast<unsigned>(this->_internal_affected_flows_size()); i < n; i++) {
const auto& repfield = this->_internal_affected_flows(i);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(3, repfield, repfield.GetCachedSize(), target, stream);
}
// map<string, bytes> extension = 4;
if (!this->_internal_extension().empty()) {
using MapType = ::_pb::Map<std::string, std::string>;
using WireHelper = FlowResponse_ExtensionEntry_DoNotUse::Funcs;
@@ -1641,25 +1629,17 @@ uint8_t* FlowResponse::_InternalSerialize(
if (stream->IsSerializationDeterministic() && map_field.size() > 1) {
for (const auto& entry : ::_pbi::MapSorterPtr<MapType>(map_field)) {
target = WireHelper::InternalSerialize(3, entry.first, entry.second, target, stream);
target = WireHelper::InternalSerialize(4, entry.first, entry.second, target, stream);
check_utf8(entry);
}
} else {
for (const auto& entry : map_field) {
target = WireHelper::InternalSerialize(3, entry.first, entry.second, target, stream);
target = WireHelper::InternalSerialize(4, entry.first, entry.second, target, stream);
check_utf8(entry);
}
}
}
// repeated .greptime.v1.flow.TaskId affected_tasks = 4;
for (unsigned i = 0,
n = static_cast<unsigned>(this->_internal_affected_tasks_size()); i < n; i++) {
const auto& repfield = this->_internal_affected_tasks(i);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(4, 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);
@@ -1676,7 +1656,14 @@ size_t FlowResponse::ByteSizeLong() const {
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
// map<string, bytes> extension = 3;
// repeated .greptime.v1.FlowId affected_flows = 3;
total_size += 1UL * this->_internal_affected_flows_size();
for (const auto& msg : this->_impl_.affected_flows_) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
}
// map<string, bytes> extension = 4;
total_size += 1 *
::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_extension_size());
for (::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_iterator
@@ -1685,13 +1672,6 @@ size_t FlowResponse::ByteSizeLong() const {
total_size += FlowResponse_ExtensionEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second);
}
// repeated .greptime.v1.flow.TaskId affected_tasks = 4;
total_size += 1UL * this->_internal_affected_tasks_size();
for (const auto& msg : this->_impl_.affected_tasks_) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
}
// .greptime.v1.ResponseHeader header = 1;
if (this->_internal_has_header()) {
total_size += 1 +
@@ -1722,8 +1702,8 @@ void FlowResponse::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::P
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
_this->_impl_.affected_flows_.MergeFrom(from._impl_.affected_flows_);
_this->_impl_.extension_.MergeFrom(from._impl_.extension_);
_this->_impl_.affected_tasks_.MergeFrom(from._impl_.affected_tasks_);
if (from._internal_has_header()) {
_this->_internal_mutable_header()->::greptime::v1::ResponseHeader::MergeFrom(
from._internal_header());
@@ -1748,8 +1728,8 @@ bool FlowResponse::IsInitialized() const {
void FlowResponse::InternalSwap(FlowResponse* other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
_impl_.affected_flows_.InternalSwap(&other->_impl_.affected_flows_);
_impl_.extension_.InternalSwap(&other->_impl_.extension_);
_impl_.affected_tasks_.InternalSwap(&other->_impl_.affected_tasks_);
::PROTOBUF_NAMESPACE_ID::internal::memswap<
PROTOBUF_FIELD_OFFSET(FlowResponse, _impl_.affected_rows_)
+ sizeof(FlowResponse::_impl_.affected_rows_)
@@ -1782,11 +1762,11 @@ void CreateRequest_FlowOptionsEntry_DoNotUse::MergeFrom(const CreateRequest_Flow
class CreateRequest::_Internal {
public:
static const ::greptime::v1::flow::TaskId& flow_id(const CreateRequest* msg);
static const ::greptime::v1::FlowId& flow_id(const CreateRequest* msg);
static const ::greptime::v1::TableName& sink_table_name(const CreateRequest* msg);
};
const ::greptime::v1::flow::TaskId&
const ::greptime::v1::FlowId&
CreateRequest::_Internal::flow_id(const CreateRequest* msg) {
return *msg->_impl_.flow_id_;
}
@@ -1794,6 +1774,12 @@ const ::greptime::v1::TableName&
CreateRequest::_Internal::sink_table_name(const CreateRequest* msg) {
return *msg->_impl_.sink_table_name_;
}
void CreateRequest::clear_flow_id() {
if (GetArenaForAllocation() == nullptr && _impl_.flow_id_ != nullptr) {
delete _impl_.flow_id_;
}
_impl_.flow_id_ = nullptr;
}
void CreateRequest::clear_source_table_ids() {
_impl_.source_table_ids_.Clear();
}
@@ -1853,7 +1839,7 @@ CreateRequest::CreateRequest(const CreateRequest& from)
_this->GetArenaForAllocation());
}
if (from._internal_has_flow_id()) {
_this->_impl_.flow_id_ = new ::greptime::v1::flow::TaskId(*from._impl_.flow_id_);
_this->_impl_.flow_id_ = new ::greptime::v1::FlowId(*from._impl_.flow_id_);
}
if (from._internal_has_sink_table_name()) {
_this->_impl_.sink_table_name_ = new ::greptime::v1::TableName(*from._impl_.sink_table_name_);
@@ -1950,7 +1936,7 @@ const char* CreateRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext*
uint32_t tag;
ptr = ::_pbi::ReadTag(ptr, &tag);
switch (tag >> 3) {
// .greptime.v1.flow.TaskId flow_id = 1;
// .greptime.v1.FlowId flow_id = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
ptr = ctx->ParseMessage(_internal_mutable_flow_id(), ptr);
@@ -2059,7 +2045,7 @@ uint8_t* CreateRequest::_InternalSerialize(
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
// .greptime.v1.flow.TaskId flow_id = 1;
// .greptime.v1.FlowId flow_id = 1;
if (this->_internal_has_flow_id()) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(1, _Internal::flow_id(this),
@@ -2200,7 +2186,7 @@ size_t CreateRequest::ByteSizeLong() const {
this->_internal_sql());
}
// .greptime.v1.flow.TaskId flow_id = 1;
// .greptime.v1.FlowId flow_id = 1;
if (this->_internal_has_flow_id()) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
@@ -2249,7 +2235,7 @@ void CreateRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::
_this->_internal_set_sql(from._internal_sql());
}
if (from._internal_has_flow_id()) {
_this->_internal_mutable_flow_id()->::greptime::v1::flow::TaskId::MergeFrom(
_this->_internal_mutable_flow_id()->::greptime::v1::FlowId::MergeFrom(
from._internal_flow_id());
}
if (from._internal_has_sink_table_name()) {
@@ -2310,13 +2296,19 @@ void CreateRequest::InternalSwap(CreateRequest* other) {
class DropRequest::_Internal {
public:
static const ::greptime::v1::flow::TaskId& flow_id(const DropRequest* msg);
static const ::greptime::v1::FlowId& flow_id(const DropRequest* msg);
};
const ::greptime::v1::flow::TaskId&
const ::greptime::v1::FlowId&
DropRequest::_Internal::flow_id(const DropRequest* msg) {
return *msg->_impl_.flow_id_;
}
void DropRequest::clear_flow_id() {
if (GetArenaForAllocation() == nullptr && _impl_.flow_id_ != nullptr) {
delete _impl_.flow_id_;
}
_impl_.flow_id_ = nullptr;
}
DropRequest::DropRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
@@ -2332,7 +2324,7 @@ DropRequest::DropRequest(const DropRequest& from)
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
if (from._internal_has_flow_id()) {
_this->_impl_.flow_id_ = new ::greptime::v1::flow::TaskId(*from._impl_.flow_id_);
_this->_impl_.flow_id_ = new ::greptime::v1::FlowId(*from._impl_.flow_id_);
}
// @@protoc_insertion_point(copy_constructor:greptime.v1.flow.DropRequest)
}
@@ -2384,7 +2376,7 @@ const char* DropRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* c
uint32_t tag;
ptr = ::_pbi::ReadTag(ptr, &tag);
switch (tag >> 3) {
// .greptime.v1.flow.TaskId flow_id = 1;
// .greptime.v1.FlowId flow_id = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
ptr = ctx->ParseMessage(_internal_mutable_flow_id(), ptr);
@@ -2421,7 +2413,7 @@ uint8_t* DropRequest::_InternalSerialize(
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
// .greptime.v1.flow.TaskId flow_id = 1;
// .greptime.v1.FlowId flow_id = 1;
if (this->_internal_has_flow_id()) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(1, _Internal::flow_id(this),
@@ -2444,7 +2436,7 @@ size_t DropRequest::ByteSizeLong() const {
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
// .greptime.v1.flow.TaskId flow_id = 1;
// .greptime.v1.FlowId flow_id = 1;
if (this->_internal_has_flow_id()) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
@@ -2470,7 +2462,7 @@ void DropRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PR
(void) cached_has_bits;
if (from._internal_has_flow_id()) {
_this->_internal_mutable_flow_id()->::greptime::v1::flow::TaskId::MergeFrom(
_this->_internal_mutable_flow_id()->::greptime::v1::FlowId::MergeFrom(
from._internal_flow_id());
}
_this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
@@ -2499,184 +2491,6 @@ void DropRequest::InternalSwap(DropRequest* other) {
file_level_metadata_greptime_2fv1_2fflow_2fserver_2eproto[9]);
}
// ===================================================================
class TaskId::_Internal {
public:
};
TaskId::TaskId(::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.flow.TaskId)
}
TaskId::TaskId(const TaskId& from)
: ::PROTOBUF_NAMESPACE_ID::Message() {
TaskId* const _this = this; (void)_this;
new (&_impl_) Impl_{
decltype(_impl_.id_){}
, /*decltype(_impl_._cached_size_)*/{}};
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
_this->_impl_.id_ = from._impl_.id_;
// @@protoc_insertion_point(copy_constructor:greptime.v1.flow.TaskId)
}
inline void TaskId::SharedCtor(
::_pb::Arena* arena, bool is_message_owned) {
(void)arena;
(void)is_message_owned;
new (&_impl_) Impl_{
decltype(_impl_.id_){0u}
, /*decltype(_impl_._cached_size_)*/{}
};
}
TaskId::~TaskId() {
// @@protoc_insertion_point(destructor:greptime.v1.flow.TaskId)
if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
(void)arena;
return;
}
SharedDtor();
}
inline void TaskId::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
}
void TaskId::SetCachedSize(int size) const {
_impl_._cached_size_.Set(size);
}
void TaskId::Clear() {
// @@protoc_insertion_point(message_clear_start:greptime.v1.flow.TaskId)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
_impl_.id_ = 0u;
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
const char* TaskId::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::_pbi::ReadTag(ptr, &tag);
switch (tag >> 3) {
// uint32 id = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
_impl_.id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* TaskId::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:greptime.v1.flow.TaskId)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
// uint32 id = 1;
if (this->_internal_id() != 0) {
target = stream->EnsureSpace(target);
target = ::_pbi::WireFormatLite::WriteUInt32ToArray(1, this->_internal_id(), 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.flow.TaskId)
return target;
}
size_t TaskId::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:greptime.v1.flow.TaskId)
size_t total_size = 0;
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
// uint32 id = 1;
if (this->_internal_id() != 0) {
total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_id());
}
return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData TaskId::_class_data_ = {
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
TaskId::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*TaskId::GetClassData() const { return &_class_data_; }
void TaskId::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
auto* const _this = static_cast<TaskId*>(&to_msg);
auto& from = static_cast<const TaskId&>(from_msg);
// @@protoc_insertion_point(class_specific_merge_from_start:greptime.v1.flow.TaskId)
GOOGLE_DCHECK_NE(&from, _this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
if (from._internal_id() != 0) {
_this->_internal_set_id(from._internal_id());
}
_this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void TaskId::CopyFrom(const TaskId& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:greptime.v1.flow.TaskId)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool TaskId::IsInitialized() const {
return true;
}
void TaskId::InternalSwap(TaskId* other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_impl_.id_, other->_impl_.id_);
}
::PROTOBUF_NAMESPACE_ID::Metadata TaskId::GetMetadata() const {
return ::_pbi::AssignDescriptors(
&descriptor_table_greptime_2fv1_2fflow_2fserver_2eproto_getter, &descriptor_table_greptime_2fv1_2fflow_2fserver_2eproto_once,
file_level_metadata_greptime_2fv1_2fflow_2fserver_2eproto[10]);
}
// @@protoc_insertion_point(namespace_scope)
} // namespace flow
} // namespace v1
@@ -2722,10 +2536,6 @@ template<> PROTOBUF_NOINLINE ::greptime::v1::flow::DropRequest*
Arena::CreateMaybeMessage< ::greptime::v1::flow::DropRequest >(Arena* arena) {
return Arena::CreateMessageInternal< ::greptime::v1::flow::DropRequest >(arena);
}
template<> PROTOBUF_NOINLINE ::greptime::v1::flow::TaskId*
Arena::CreateMaybeMessage< ::greptime::v1::flow::TaskId >(Arena* arena) {
return Arena::CreateMessageInternal< ::greptime::v1::flow::TaskId >(arena);
}
PROTOBUF_NAMESPACE_CLOSE
// @@protoc_insertion_point(global_scope)
+118 -309
View File
@@ -83,9 +83,6 @@ extern InsertRequestDefaultTypeInternal _InsertRequest_default_instance_;
class InsertRequests;
struct InsertRequestsDefaultTypeInternal;
extern InsertRequestsDefaultTypeInternal _InsertRequests_default_instance_;
class TaskId;
struct TaskIdDefaultTypeInternal;
extern TaskIdDefaultTypeInternal _TaskId_default_instance_;
} // namespace flow
} // namespace v1
} // namespace greptime
@@ -100,7 +97,6 @@ template<> ::greptime::v1::flow::FlowResponse* Arena::CreateMaybeMessage<::grept
template<> ::greptime::v1::flow::FlowResponse_ExtensionEntry_DoNotUse* Arena::CreateMaybeMessage<::greptime::v1::flow::FlowResponse_ExtensionEntry_DoNotUse>(Arena*);
template<> ::greptime::v1::flow::InsertRequest* Arena::CreateMaybeMessage<::greptime::v1::flow::InsertRequest>(Arena*);
template<> ::greptime::v1::flow::InsertRequests* Arena::CreateMaybeMessage<::greptime::v1::flow::InsertRequests>(Arena*);
template<> ::greptime::v1::flow::TaskId* Arena::CreateMaybeMessage<::greptime::v1::flow::TaskId>(Arena*);
PROTOBUF_NAMESPACE_CLOSE
namespace greptime {
namespace v1 {
@@ -1010,12 +1006,30 @@ class FlowResponse final :
// accessors -------------------------------------------------------
enum : int {
kExtensionFieldNumber = 3,
kAffectedTasksFieldNumber = 4,
kAffectedFlowsFieldNumber = 3,
kExtensionFieldNumber = 4,
kHeaderFieldNumber = 1,
kAffectedRowsFieldNumber = 2,
};
// map<string, bytes> extension = 3;
// repeated .greptime.v1.FlowId affected_flows = 3;
int affected_flows_size() const;
private:
int _internal_affected_flows_size() const;
public:
void clear_affected_flows();
::greptime::v1::FlowId* mutable_affected_flows(int index);
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::greptime::v1::FlowId >*
mutable_affected_flows();
private:
const ::greptime::v1::FlowId& _internal_affected_flows(int index) const;
::greptime::v1::FlowId* _internal_add_affected_flows();
public:
const ::greptime::v1::FlowId& affected_flows(int index) const;
::greptime::v1::FlowId* add_affected_flows();
const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::greptime::v1::FlowId >&
affected_flows() const;
// map<string, bytes> extension = 4;
int extension_size() const;
private:
int _internal_extension_size() const;
@@ -1032,24 +1046,6 @@ class FlowResponse final :
::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >*
mutable_extension();
// repeated .greptime.v1.flow.TaskId affected_tasks = 4;
int affected_tasks_size() const;
private:
int _internal_affected_tasks_size() const;
public:
void clear_affected_tasks();
::greptime::v1::flow::TaskId* mutable_affected_tasks(int index);
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::greptime::v1::flow::TaskId >*
mutable_affected_tasks();
private:
const ::greptime::v1::flow::TaskId& _internal_affected_tasks(int index) const;
::greptime::v1::flow::TaskId* _internal_add_affected_tasks();
public:
const ::greptime::v1::flow::TaskId& affected_tasks(int index) const;
::greptime::v1::flow::TaskId* add_affected_tasks();
const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::greptime::v1::flow::TaskId >&
affected_tasks() const;
// .greptime.v1.ResponseHeader header = 1;
bool has_header() const;
private:
@@ -1085,12 +1081,12 @@ class FlowResponse final :
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
struct Impl_ {
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::greptime::v1::FlowId > affected_flows_;
::PROTOBUF_NAMESPACE_ID::internal::MapField<
FlowResponse_ExtensionEntry_DoNotUse,
std::string, std::string,
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING,
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BYTES> extension_;
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::greptime::v1::flow::TaskId > affected_tasks_;
::greptime::v1::ResponseHeader* header_;
uint64_t affected_rows_;
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
@@ -1338,23 +1334,23 @@ class CreateRequest final :
std::string* _internal_mutable_sql();
public:
// .greptime.v1.flow.TaskId flow_id = 1;
// .greptime.v1.FlowId flow_id = 1;
bool has_flow_id() const;
private:
bool _internal_has_flow_id() const;
public:
void clear_flow_id();
const ::greptime::v1::flow::TaskId& flow_id() const;
PROTOBUF_NODISCARD ::greptime::v1::flow::TaskId* release_flow_id();
::greptime::v1::flow::TaskId* mutable_flow_id();
void set_allocated_flow_id(::greptime::v1::flow::TaskId* flow_id);
const ::greptime::v1::FlowId& flow_id() const;
PROTOBUF_NODISCARD ::greptime::v1::FlowId* release_flow_id();
::greptime::v1::FlowId* mutable_flow_id();
void set_allocated_flow_id(::greptime::v1::FlowId* flow_id);
private:
const ::greptime::v1::flow::TaskId& _internal_flow_id() const;
::greptime::v1::flow::TaskId* _internal_mutable_flow_id();
const ::greptime::v1::FlowId& _internal_flow_id() const;
::greptime::v1::FlowId* _internal_mutable_flow_id();
public:
void unsafe_arena_set_allocated_flow_id(
::greptime::v1::flow::TaskId* flow_id);
::greptime::v1::flow::TaskId* unsafe_arena_release_flow_id();
::greptime::v1::FlowId* flow_id);
::greptime::v1::FlowId* unsafe_arena_release_flow_id();
// .greptime.v1.TableName sink_table_name = 3;
bool has_sink_table_name() const;
@@ -1400,7 +1396,7 @@ class CreateRequest final :
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr expire_when_;
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr comment_;
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr sql_;
::greptime::v1::flow::TaskId* flow_id_;
::greptime::v1::FlowId* flow_id_;
::greptime::v1::TableName* sink_table_name_;
bool create_if_not_exists_;
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
@@ -1533,23 +1529,23 @@ class DropRequest final :
enum : int {
kFlowIdFieldNumber = 1,
};
// .greptime.v1.flow.TaskId flow_id = 1;
// .greptime.v1.FlowId flow_id = 1;
bool has_flow_id() const;
private:
bool _internal_has_flow_id() const;
public:
void clear_flow_id();
const ::greptime::v1::flow::TaskId& flow_id() const;
PROTOBUF_NODISCARD ::greptime::v1::flow::TaskId* release_flow_id();
::greptime::v1::flow::TaskId* mutable_flow_id();
void set_allocated_flow_id(::greptime::v1::flow::TaskId* flow_id);
const ::greptime::v1::FlowId& flow_id() const;
PROTOBUF_NODISCARD ::greptime::v1::FlowId* release_flow_id();
::greptime::v1::FlowId* mutable_flow_id();
void set_allocated_flow_id(::greptime::v1::FlowId* flow_id);
private:
const ::greptime::v1::flow::TaskId& _internal_flow_id() const;
::greptime::v1::flow::TaskId* _internal_mutable_flow_id();
const ::greptime::v1::FlowId& _internal_flow_id() const;
::greptime::v1::FlowId* _internal_mutable_flow_id();
public:
void unsafe_arena_set_allocated_flow_id(
::greptime::v1::flow::TaskId* flow_id);
::greptime::v1::flow::TaskId* unsafe_arena_release_flow_id();
::greptime::v1::FlowId* flow_id);
::greptime::v1::FlowId* unsafe_arena_release_flow_id();
// @@protoc_insertion_point(class_scope:greptime.v1.flow.DropRequest)
private:
@@ -1559,155 +1555,7 @@ class DropRequest final :
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
struct Impl_ {
::greptime::v1::flow::TaskId* flow_id_;
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
};
union { Impl_ _impl_; };
friend struct ::TableStruct_greptime_2fv1_2fflow_2fserver_2eproto;
};
// -------------------------------------------------------------------
class TaskId final :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:greptime.v1.flow.TaskId) */ {
public:
inline TaskId() : TaskId(nullptr) {}
~TaskId() override;
explicit PROTOBUF_CONSTEXPR TaskId(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized);
TaskId(const TaskId& from);
TaskId(TaskId&& from) noexcept
: TaskId() {
*this = ::std::move(from);
}
inline TaskId& operator=(const TaskId& from) {
CopyFrom(from);
return *this;
}
inline TaskId& operator=(TaskId&& 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 TaskId& default_instance() {
return *internal_default_instance();
}
static inline const TaskId* internal_default_instance() {
return reinterpret_cast<const TaskId*>(
&_TaskId_default_instance_);
}
static constexpr int kIndexInFileMessages =
10;
friend void swap(TaskId& a, TaskId& b) {
a.Swap(&b);
}
inline void Swap(TaskId* 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(TaskId* other) {
if (other == this) return;
GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena());
InternalSwap(other);
}
// implements Message ----------------------------------------------
TaskId* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final {
return CreateMaybeMessage<TaskId>(arena);
}
using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom;
void CopyFrom(const TaskId& from);
using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom;
void MergeFrom( const TaskId& from) {
TaskId::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(TaskId* other);
private:
friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
return "greptime.v1.flow.TaskId";
}
protected:
explicit TaskId(::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 {
kIdFieldNumber = 1,
};
// uint32 id = 1;
void clear_id();
uint32_t id() const;
void set_id(uint32_t value);
private:
uint32_t _internal_id() const;
void _internal_set_id(uint32_t value);
public:
// @@protoc_insertion_point(class_scope:greptime.v1.flow.TaskId)
private:
class _Internal;
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
struct Impl_ {
uint32_t id_;
::greptime::v1::FlowId* flow_id_;
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
};
union { Impl_ _impl_; };
@@ -2355,7 +2203,44 @@ inline void FlowResponse::set_affected_rows(uint64_t value) {
// @@protoc_insertion_point(field_set:greptime.v1.flow.FlowResponse.affected_rows)
}
// map<string, bytes> extension = 3;
// repeated .greptime.v1.FlowId affected_flows = 3;
inline int FlowResponse::_internal_affected_flows_size() const {
return _impl_.affected_flows_.size();
}
inline int FlowResponse::affected_flows_size() const {
return _internal_affected_flows_size();
}
inline ::greptime::v1::FlowId* FlowResponse::mutable_affected_flows(int index) {
// @@protoc_insertion_point(field_mutable:greptime.v1.flow.FlowResponse.affected_flows)
return _impl_.affected_flows_.Mutable(index);
}
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::greptime::v1::FlowId >*
FlowResponse::mutable_affected_flows() {
// @@protoc_insertion_point(field_mutable_list:greptime.v1.flow.FlowResponse.affected_flows)
return &_impl_.affected_flows_;
}
inline const ::greptime::v1::FlowId& FlowResponse::_internal_affected_flows(int index) const {
return _impl_.affected_flows_.Get(index);
}
inline const ::greptime::v1::FlowId& FlowResponse::affected_flows(int index) const {
// @@protoc_insertion_point(field_get:greptime.v1.flow.FlowResponse.affected_flows)
return _internal_affected_flows(index);
}
inline ::greptime::v1::FlowId* FlowResponse::_internal_add_affected_flows() {
return _impl_.affected_flows_.Add();
}
inline ::greptime::v1::FlowId* FlowResponse::add_affected_flows() {
::greptime::v1::FlowId* _add = _internal_add_affected_flows();
// @@protoc_insertion_point(field_add:greptime.v1.flow.FlowResponse.affected_flows)
return _add;
}
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::greptime::v1::FlowId >&
FlowResponse::affected_flows() const {
// @@protoc_insertion_point(field_list:greptime.v1.flow.FlowResponse.affected_flows)
return _impl_.affected_flows_;
}
// map<string, bytes> extension = 4;
inline int FlowResponse::_internal_extension_size() const {
return _impl_.extension_.size();
}
@@ -2384,76 +2269,30 @@ FlowResponse::mutable_extension() {
return _internal_mutable_extension();
}
// repeated .greptime.v1.flow.TaskId affected_tasks = 4;
inline int FlowResponse::_internal_affected_tasks_size() const {
return _impl_.affected_tasks_.size();
}
inline int FlowResponse::affected_tasks_size() const {
return _internal_affected_tasks_size();
}
inline void FlowResponse::clear_affected_tasks() {
_impl_.affected_tasks_.Clear();
}
inline ::greptime::v1::flow::TaskId* FlowResponse::mutable_affected_tasks(int index) {
// @@protoc_insertion_point(field_mutable:greptime.v1.flow.FlowResponse.affected_tasks)
return _impl_.affected_tasks_.Mutable(index);
}
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::greptime::v1::flow::TaskId >*
FlowResponse::mutable_affected_tasks() {
// @@protoc_insertion_point(field_mutable_list:greptime.v1.flow.FlowResponse.affected_tasks)
return &_impl_.affected_tasks_;
}
inline const ::greptime::v1::flow::TaskId& FlowResponse::_internal_affected_tasks(int index) const {
return _impl_.affected_tasks_.Get(index);
}
inline const ::greptime::v1::flow::TaskId& FlowResponse::affected_tasks(int index) const {
// @@protoc_insertion_point(field_get:greptime.v1.flow.FlowResponse.affected_tasks)
return _internal_affected_tasks(index);
}
inline ::greptime::v1::flow::TaskId* FlowResponse::_internal_add_affected_tasks() {
return _impl_.affected_tasks_.Add();
}
inline ::greptime::v1::flow::TaskId* FlowResponse::add_affected_tasks() {
::greptime::v1::flow::TaskId* _add = _internal_add_affected_tasks();
// @@protoc_insertion_point(field_add:greptime.v1.flow.FlowResponse.affected_tasks)
return _add;
}
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::greptime::v1::flow::TaskId >&
FlowResponse::affected_tasks() const {
// @@protoc_insertion_point(field_list:greptime.v1.flow.FlowResponse.affected_tasks)
return _impl_.affected_tasks_;
}
// -------------------------------------------------------------------
// -------------------------------------------------------------------
// CreateRequest
// .greptime.v1.flow.TaskId flow_id = 1;
// .greptime.v1.FlowId flow_id = 1;
inline bool CreateRequest::_internal_has_flow_id() const {
return this != internal_default_instance() && _impl_.flow_id_ != nullptr;
}
inline bool CreateRequest::has_flow_id() const {
return _internal_has_flow_id();
}
inline void CreateRequest::clear_flow_id() {
if (GetArenaForAllocation() == nullptr && _impl_.flow_id_ != nullptr) {
delete _impl_.flow_id_;
}
_impl_.flow_id_ = nullptr;
inline const ::greptime::v1::FlowId& CreateRequest::_internal_flow_id() const {
const ::greptime::v1::FlowId* p = _impl_.flow_id_;
return p != nullptr ? *p : reinterpret_cast<const ::greptime::v1::FlowId&>(
::greptime::v1::_FlowId_default_instance_);
}
inline const ::greptime::v1::flow::TaskId& CreateRequest::_internal_flow_id() const {
const ::greptime::v1::flow::TaskId* p = _impl_.flow_id_;
return p != nullptr ? *p : reinterpret_cast<const ::greptime::v1::flow::TaskId&>(
::greptime::v1::flow::_TaskId_default_instance_);
}
inline const ::greptime::v1::flow::TaskId& CreateRequest::flow_id() const {
inline const ::greptime::v1::FlowId& CreateRequest::flow_id() const {
// @@protoc_insertion_point(field_get:greptime.v1.flow.CreateRequest.flow_id)
return _internal_flow_id();
}
inline void CreateRequest::unsafe_arena_set_allocated_flow_id(
::greptime::v1::flow::TaskId* flow_id) {
::greptime::v1::FlowId* flow_id) {
if (GetArenaForAllocation() == nullptr) {
delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.flow_id_);
}
@@ -2465,9 +2304,9 @@ inline void CreateRequest::unsafe_arena_set_allocated_flow_id(
}
// @@protoc_insertion_point(field_unsafe_arena_set_allocated:greptime.v1.flow.CreateRequest.flow_id)
}
inline ::greptime::v1::flow::TaskId* CreateRequest::release_flow_id() {
inline ::greptime::v1::FlowId* CreateRequest::release_flow_id() {
::greptime::v1::flow::TaskId* temp = _impl_.flow_id_;
::greptime::v1::FlowId* temp = _impl_.flow_id_;
_impl_.flow_id_ = nullptr;
#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE
auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp);
@@ -2480,34 +2319,35 @@ inline ::greptime::v1::flow::TaskId* CreateRequest::release_flow_id() {
#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE
return temp;
}
inline ::greptime::v1::flow::TaskId* CreateRequest::unsafe_arena_release_flow_id() {
inline ::greptime::v1::FlowId* CreateRequest::unsafe_arena_release_flow_id() {
// @@protoc_insertion_point(field_release:greptime.v1.flow.CreateRequest.flow_id)
::greptime::v1::flow::TaskId* temp = _impl_.flow_id_;
::greptime::v1::FlowId* temp = _impl_.flow_id_;
_impl_.flow_id_ = nullptr;
return temp;
}
inline ::greptime::v1::flow::TaskId* CreateRequest::_internal_mutable_flow_id() {
inline ::greptime::v1::FlowId* CreateRequest::_internal_mutable_flow_id() {
if (_impl_.flow_id_ == nullptr) {
auto* p = CreateMaybeMessage<::greptime::v1::flow::TaskId>(GetArenaForAllocation());
auto* p = CreateMaybeMessage<::greptime::v1::FlowId>(GetArenaForAllocation());
_impl_.flow_id_ = p;
}
return _impl_.flow_id_;
}
inline ::greptime::v1::flow::TaskId* CreateRequest::mutable_flow_id() {
::greptime::v1::flow::TaskId* _msg = _internal_mutable_flow_id();
inline ::greptime::v1::FlowId* CreateRequest::mutable_flow_id() {
::greptime::v1::FlowId* _msg = _internal_mutable_flow_id();
// @@protoc_insertion_point(field_mutable:greptime.v1.flow.CreateRequest.flow_id)
return _msg;
}
inline void CreateRequest::set_allocated_flow_id(::greptime::v1::flow::TaskId* flow_id) {
inline void CreateRequest::set_allocated_flow_id(::greptime::v1::FlowId* flow_id) {
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
if (message_arena == nullptr) {
delete _impl_.flow_id_;
delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.flow_id_);
}
if (flow_id) {
::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(flow_id);
::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(
reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(flow_id));
if (message_arena != submessage_arena) {
flow_id = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
message_arena, flow_id, submessage_arena);
@@ -2845,30 +2685,24 @@ CreateRequest::mutable_flow_options() {
// DropRequest
// .greptime.v1.flow.TaskId flow_id = 1;
// .greptime.v1.FlowId flow_id = 1;
inline bool DropRequest::_internal_has_flow_id() const {
return this != internal_default_instance() && _impl_.flow_id_ != nullptr;
}
inline bool DropRequest::has_flow_id() const {
return _internal_has_flow_id();
}
inline void DropRequest::clear_flow_id() {
if (GetArenaForAllocation() == nullptr && _impl_.flow_id_ != nullptr) {
delete _impl_.flow_id_;
}
_impl_.flow_id_ = nullptr;
inline const ::greptime::v1::FlowId& DropRequest::_internal_flow_id() const {
const ::greptime::v1::FlowId* p = _impl_.flow_id_;
return p != nullptr ? *p : reinterpret_cast<const ::greptime::v1::FlowId&>(
::greptime::v1::_FlowId_default_instance_);
}
inline const ::greptime::v1::flow::TaskId& DropRequest::_internal_flow_id() const {
const ::greptime::v1::flow::TaskId* p = _impl_.flow_id_;
return p != nullptr ? *p : reinterpret_cast<const ::greptime::v1::flow::TaskId&>(
::greptime::v1::flow::_TaskId_default_instance_);
}
inline const ::greptime::v1::flow::TaskId& DropRequest::flow_id() const {
inline const ::greptime::v1::FlowId& DropRequest::flow_id() const {
// @@protoc_insertion_point(field_get:greptime.v1.flow.DropRequest.flow_id)
return _internal_flow_id();
}
inline void DropRequest::unsafe_arena_set_allocated_flow_id(
::greptime::v1::flow::TaskId* flow_id) {
::greptime::v1::FlowId* flow_id) {
if (GetArenaForAllocation() == nullptr) {
delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.flow_id_);
}
@@ -2880,9 +2714,9 @@ inline void DropRequest::unsafe_arena_set_allocated_flow_id(
}
// @@protoc_insertion_point(field_unsafe_arena_set_allocated:greptime.v1.flow.DropRequest.flow_id)
}
inline ::greptime::v1::flow::TaskId* DropRequest::release_flow_id() {
inline ::greptime::v1::FlowId* DropRequest::release_flow_id() {
::greptime::v1::flow::TaskId* temp = _impl_.flow_id_;
::greptime::v1::FlowId* temp = _impl_.flow_id_;
_impl_.flow_id_ = nullptr;
#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE
auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp);
@@ -2895,34 +2729,35 @@ inline ::greptime::v1::flow::TaskId* DropRequest::release_flow_id() {
#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE
return temp;
}
inline ::greptime::v1::flow::TaskId* DropRequest::unsafe_arena_release_flow_id() {
inline ::greptime::v1::FlowId* DropRequest::unsafe_arena_release_flow_id() {
// @@protoc_insertion_point(field_release:greptime.v1.flow.DropRequest.flow_id)
::greptime::v1::flow::TaskId* temp = _impl_.flow_id_;
::greptime::v1::FlowId* temp = _impl_.flow_id_;
_impl_.flow_id_ = nullptr;
return temp;
}
inline ::greptime::v1::flow::TaskId* DropRequest::_internal_mutable_flow_id() {
inline ::greptime::v1::FlowId* DropRequest::_internal_mutable_flow_id() {
if (_impl_.flow_id_ == nullptr) {
auto* p = CreateMaybeMessage<::greptime::v1::flow::TaskId>(GetArenaForAllocation());
auto* p = CreateMaybeMessage<::greptime::v1::FlowId>(GetArenaForAllocation());
_impl_.flow_id_ = p;
}
return _impl_.flow_id_;
}
inline ::greptime::v1::flow::TaskId* DropRequest::mutable_flow_id() {
::greptime::v1::flow::TaskId* _msg = _internal_mutable_flow_id();
inline ::greptime::v1::FlowId* DropRequest::mutable_flow_id() {
::greptime::v1::FlowId* _msg = _internal_mutable_flow_id();
// @@protoc_insertion_point(field_mutable:greptime.v1.flow.DropRequest.flow_id)
return _msg;
}
inline void DropRequest::set_allocated_flow_id(::greptime::v1::flow::TaskId* flow_id) {
inline void DropRequest::set_allocated_flow_id(::greptime::v1::FlowId* flow_id) {
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
if (message_arena == nullptr) {
delete _impl_.flow_id_;
delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.flow_id_);
}
if (flow_id) {
::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(flow_id);
::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(
reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(flow_id));
if (message_arena != submessage_arena) {
flow_id = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
message_arena, flow_id, submessage_arena);
@@ -2935,30 +2770,6 @@ inline void DropRequest::set_allocated_flow_id(::greptime::v1::flow::TaskId* flo
// @@protoc_insertion_point(field_set_allocated:greptime.v1.flow.DropRequest.flow_id)
}
// -------------------------------------------------------------------
// TaskId
// uint32 id = 1;
inline void TaskId::clear_id() {
_impl_.id_ = 0u;
}
inline uint32_t TaskId::_internal_id() const {
return _impl_.id_;
}
inline uint32_t TaskId::id() const {
// @@protoc_insertion_point(field_get:greptime.v1.flow.TaskId.id)
return _internal_id();
}
inline void TaskId::_internal_set_id(uint32_t value) {
_impl_.id_ = value;
}
inline void TaskId::set_id(uint32_t value) {
_internal_set_id(value);
// @@protoc_insertion_point(field_set:greptime.v1.flow.TaskId.id)
}
#ifdef __GNUC__
#pragma GCC diagnostic pop
#endif // __GNUC__
@@ -2980,8 +2791,6 @@ inline void TaskId::set_id(uint32_t value) {
// -------------------------------------------------------------------
// -------------------------------------------------------------------
// @@protoc_insertion_point(namespace_scope)