feat: flow replace option (#198)

* feat: flow replace

* chore: make

* refactor: rename

* chore: make all

* refactor: more rename

* chore: make all
This commit is contained in:
discord9
2024-11-14 14:45:09 +08:00
committed by GitHub
parent 75c5fb5691
commit e1070ad3e7
8 changed files with 1695 additions and 169 deletions
+298 -32
View File
@@ -272,6 +272,19 @@ struct DecimalTypeExtensionDefaultTypeInternal {
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 DecimalTypeExtensionDefaultTypeInternal _DecimalTypeExtension_default_instance_;
PROTOBUF_CONSTEXPR VectorTypeExtension::VectorTypeExtension(
::_pbi::ConstantInitialized): _impl_{
/*decltype(_impl_.dim_)*/0u
, /*decltype(_impl_._cached_size_)*/{}} {}
struct VectorTypeExtensionDefaultTypeInternal {
PROTOBUF_CONSTEXPR VectorTypeExtensionDefaultTypeInternal()
: _instance(::_pbi::ConstantInitialized{}) {}
~VectorTypeExtensionDefaultTypeInternal() {}
union {
VectorTypeExtension _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 VectorTypeExtensionDefaultTypeInternal _VectorTypeExtension_default_instance_;
PROTOBUF_CONSTEXPR ColumnOptions_OptionsEntry_DoNotUse::ColumnOptions_OptionsEntry_DoNotUse(
::_pbi::ConstantInitialized) {}
struct ColumnOptions_OptionsEntry_DoNotUseDefaultTypeInternal {
@@ -298,7 +311,7 @@ struct ColumnOptionsDefaultTypeInternal {
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ColumnOptionsDefaultTypeInternal _ColumnOptions_default_instance_;
} // namespace v1
} // namespace greptime
static ::_pb::Metadata file_level_metadata_greptime_2fv1_2fcommon_2eproto[20];
static ::_pb::Metadata file_level_metadata_greptime_2fv1_2fcommon_2eproto[21];
static const ::_pb::EnumDescriptor* file_level_enum_descriptors_greptime_2fv1_2fcommon_2eproto[3];
static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_greptime_2fv1_2fcommon_2eproto = nullptr;
@@ -448,6 +461,7 @@ const uint32_t TableStruct_greptime_2fv1_2fcommon_2eproto::offsets[] PROTOBUF_SE
~0u, // no _inlined_string_donated_
::_pbi::kInvalidFieldOffsetTag,
::_pbi::kInvalidFieldOffsetTag,
::_pbi::kInvalidFieldOffsetTag,
PROTOBUF_FIELD_OFFSET(::greptime::v1::ColumnDataTypeExtension, _impl_.type_ext_),
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::greptime::v1::DecimalTypeExtension, _internal_metadata_),
@@ -457,6 +471,13 @@ const uint32_t TableStruct_greptime_2fv1_2fcommon_2eproto::offsets[] PROTOBUF_SE
~0u, // no _inlined_string_donated_
PROTOBUF_FIELD_OFFSET(::greptime::v1::DecimalTypeExtension, _impl_.precision_),
PROTOBUF_FIELD_OFFSET(::greptime::v1::DecimalTypeExtension, _impl_.scale_),
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::greptime::v1::VectorTypeExtension, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
PROTOBUF_FIELD_OFFSET(::greptime::v1::VectorTypeExtension, _impl_.dim_),
PROTOBUF_FIELD_OFFSET(::greptime::v1::ColumnOptions_OptionsEntry_DoNotUse, _has_bits_),
PROTOBUF_FIELD_OFFSET(::greptime::v1::ColumnOptions_OptionsEntry_DoNotUse, _internal_metadata_),
~0u, // no _extensions_
@@ -493,9 +514,10 @@ static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protode
{ 120, -1, -1, sizeof(::greptime::v1::IntervalMonthDayNano)},
{ 129, -1, -1, sizeof(::greptime::v1::Decimal128)},
{ 137, -1, -1, sizeof(::greptime::v1::ColumnDataTypeExtension)},
{ 146, -1, -1, sizeof(::greptime::v1::DecimalTypeExtension)},
{ 154, 162, -1, sizeof(::greptime::v1::ColumnOptions_OptionsEntry_DoNotUse)},
{ 164, -1, -1, sizeof(::greptime::v1::ColumnOptions)},
{ 147, -1, -1, sizeof(::greptime::v1::DecimalTypeExtension)},
{ 155, -1, -1, sizeof(::greptime::v1::VectorTypeExtension)},
{ 162, 170, -1, sizeof(::greptime::v1::ColumnOptions_OptionsEntry_DoNotUse)},
{ 172, -1, -1, sizeof(::greptime::v1::ColumnOptions)},
};
static const ::_pb::Message* const file_default_instances[] = {
@@ -517,6 +539,7 @@ static const ::_pb::Message* const file_default_instances[] = {
&::greptime::v1::_Decimal128_default_instance_._instance,
&::greptime::v1::_ColumnDataTypeExtension_default_instance_._instance,
&::greptime::v1::_DecimalTypeExtension_default_instance_._instance,
&::greptime::v1::_VectorTypeExtension_default_instance_._instance,
&::greptime::v1::_ColumnOptions_OptionsEntry_DoNotUse_default_instance_._instance,
&::greptime::v1::_ColumnOptions_default_instance_._instance,
};
@@ -551,38 +574,40 @@ const char descriptor_table_protodef_greptime_2fv1_2fcommon_2eproto[] PROTOBUF_S
"2\024.greptime.v1.Metrics\"I\n\024IntervalMonthD"
"ayNano\022\016\n\006months\030\001 \001(\005\022\014\n\004days\030\002 \001(\005\022\023\n\013"
"nanoseconds\030\003 \001(\003\"$\n\nDecimal128\022\n\n\002hi\030\001 "
"\001(\003\022\n\n\002lo\030\002 \001(\003\"\225\001\n\027ColumnDataTypeExtens"
"\001(\003\022\n\n\002lo\030\002 \001(\003\"\316\001\n\027ColumnDataTypeExtens"
"ion\0229\n\014decimal_type\030\001 \001(\0132!.greptime.v1."
"DecimalTypeExtensionH\000\0223\n\tjson_type\030\002 \001("
"\0162\036.greptime.v1.JsonTypeExtensionH\000B\n\n\010t"
"ype_ext\"8\n\024DecimalTypeExtension\022\021\n\tpreci"
"sion\030\001 \001(\005\022\r\n\005scale\030\002 \001(\005\"y\n\rColumnOptio"
"ns\0228\n\007options\030\001 \003(\0132\'.greptime.v1.Column"
"Options.OptionsEntry\032.\n\014OptionsEntry\022\013\n\003"
"key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001*1\n\014Semantic"
"Type\022\007\n\003TAG\020\000\022\t\n\005FIELD\020\001\022\r\n\tTIMESTAMP\020\002*"
"\340\003\n\016ColumnDataType\022\013\n\007BOOLEAN\020\000\022\010\n\004INT8\020"
"\001\022\t\n\005INT16\020\002\022\t\n\005INT32\020\003\022\t\n\005INT64\020\004\022\t\n\005UI"
"NT8\020\005\022\n\n\006UINT16\020\006\022\n\n\006UINT32\020\007\022\n\n\006UINT64\020"
"\010\022\013\n\007FLOAT32\020\t\022\013\n\007FLOAT64\020\n\022\n\n\006BINARY\020\013\022"
"\n\n\006STRING\020\014\022\010\n\004DATE\020\r\022\014\n\010DATETIME\020\016\022\024\n\020T"
"IMESTAMP_SECOND\020\017\022\031\n\025TIMESTAMP_MILLISECO"
"ND\020\020\022\031\n\025TIMESTAMP_MICROSECOND\020\021\022\030\n\024TIMES"
"TAMP_NANOSECOND\020\022\022\017\n\013TIME_SECOND\020\023\022\024\n\020TI"
"ME_MILLISECOND\020\024\022\024\n\020TIME_MICROSECOND\020\025\022\023"
"\n\017TIME_NANOSECOND\020\026\022\027\n\023INTERVAL_YEAR_MON"
"TH\020\027\022\025\n\021INTERVAL_DAY_TIME\020\030\022\033\n\027INTERVAL_"
"MONTH_DAY_NANO\020\031\022\016\n\nDECIMAL128\020\036\022\010\n\004JSON"
"\020\037*$\n\021JsonTypeExtension\022\017\n\013JSON_BINARY\020\000"
"BO\n\016io.greptime.v1B\006CommonZ5github.com/G"
"reptimeTeam/greptime-proto/go/greptime/v"
"1b\006proto3"
"\0162\036.greptime.v1.JsonTypeExtensionH\000\0227\n\013v"
"ector_type\030\003 \001(\0132 .greptime.v1.VectorTyp"
"eExtensionH\000B\n\n\010type_ext\"8\n\024DecimalTypeE"
"xtension\022\021\n\tprecision\030\001 \001(\005\022\r\n\005scale\030\002 \001"
"(\005\"\"\n\023VectorTypeExtension\022\013\n\003dim\030\001 \001(\r\"y"
"\n\rColumnOptions\0228\n\007options\030\001 \003(\0132\'.grept"
"ime.v1.ColumnOptions.OptionsEntry\032.\n\014Opt"
"ionsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028"
"\001*1\n\014SemanticType\022\007\n\003TAG\020\000\022\t\n\005FIELD\020\001\022\r\n"
"\tTIMESTAMP\020\002*\354\003\n\016ColumnDataType\022\013\n\007BOOLE"
"AN\020\000\022\010\n\004INT8\020\001\022\t\n\005INT16\020\002\022\t\n\005INT32\020\003\022\t\n\005"
"INT64\020\004\022\t\n\005UINT8\020\005\022\n\n\006UINT16\020\006\022\n\n\006UINT32"
"\020\007\022\n\n\006UINT64\020\010\022\013\n\007FLOAT32\020\t\022\013\n\007FLOAT64\020\n"
"\022\n\n\006BINARY\020\013\022\n\n\006STRING\020\014\022\010\n\004DATE\020\r\022\014\n\010DA"
"TETIME\020\016\022\024\n\020TIMESTAMP_SECOND\020\017\022\031\n\025TIMEST"
"AMP_MILLISECOND\020\020\022\031\n\025TIMESTAMP_MICROSECO"
"ND\020\021\022\030\n\024TIMESTAMP_NANOSECOND\020\022\022\017\n\013TIME_S"
"ECOND\020\023\022\024\n\020TIME_MILLISECOND\020\024\022\024\n\020TIME_MI"
"CROSECOND\020\025\022\023\n\017TIME_NANOSECOND\020\026\022\027\n\023INTE"
"RVAL_YEAR_MONTH\020\027\022\025\n\021INTERVAL_DAY_TIME\020\030"
"\022\033\n\027INTERVAL_MONTH_DAY_NANO\020\031\022\016\n\nDECIMAL"
"128\020\036\022\010\n\004JSON\020\037\022\n\n\006VECTOR\020 *$\n\021JsonTypeE"
"xtension\022\017\n\013JSON_BINARY\020\000BO\n\016io.greptime"
".v1B\006CommonZ5github.com/GreptimeTeam/gre"
"ptime-proto/go/greptime/v1b\006proto3"
;
static ::_pbi::once_flag descriptor_table_greptime_2fv1_2fcommon_2eproto_once;
const ::_pbi::DescriptorTable descriptor_table_greptime_2fv1_2fcommon_2eproto = {
false, false, 2169, descriptor_table_protodef_greptime_2fv1_2fcommon_2eproto,
false, false, 2274, descriptor_table_protodef_greptime_2fv1_2fcommon_2eproto,
"greptime/v1/common.proto",
&descriptor_table_greptime_2fv1_2fcommon_2eproto_once, nullptr, 0, 20,
&descriptor_table_greptime_2fv1_2fcommon_2eproto_once, nullptr, 0, 21,
schemas, file_default_instances, TableStruct_greptime_2fv1_2fcommon_2eproto::offsets,
file_level_metadata_greptime_2fv1_2fcommon_2eproto, file_level_enum_descriptors_greptime_2fv1_2fcommon_2eproto,
file_level_service_descriptors_greptime_2fv1_2fcommon_2eproto,
@@ -644,6 +669,7 @@ bool ColumnDataType_IsValid(int value) {
case 25:
case 30:
case 31:
case 32:
return true;
default:
return false;
@@ -4284,12 +4310,17 @@ void Decimal128::InternalSwap(Decimal128* other) {
class ColumnDataTypeExtension::_Internal {
public:
static const ::greptime::v1::DecimalTypeExtension& decimal_type(const ColumnDataTypeExtension* msg);
static const ::greptime::v1::VectorTypeExtension& vector_type(const ColumnDataTypeExtension* msg);
};
const ::greptime::v1::DecimalTypeExtension&
ColumnDataTypeExtension::_Internal::decimal_type(const ColumnDataTypeExtension* msg) {
return *msg->_impl_.type_ext_.decimal_type_;
}
const ::greptime::v1::VectorTypeExtension&
ColumnDataTypeExtension::_Internal::vector_type(const ColumnDataTypeExtension* msg) {
return *msg->_impl_.type_ext_.vector_type_;
}
void ColumnDataTypeExtension::set_allocated_decimal_type(::greptime::v1::DecimalTypeExtension* decimal_type) {
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
clear_type_ext();
@@ -4305,6 +4336,21 @@ void ColumnDataTypeExtension::set_allocated_decimal_type(::greptime::v1::Decimal
}
// @@protoc_insertion_point(field_set_allocated:greptime.v1.ColumnDataTypeExtension.decimal_type)
}
void ColumnDataTypeExtension::set_allocated_vector_type(::greptime::v1::VectorTypeExtension* vector_type) {
::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
clear_type_ext();
if (vector_type) {
::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(vector_type);
if (message_arena != submessage_arena) {
vector_type = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
message_arena, vector_type, submessage_arena);
}
set_has_vector_type();
_impl_.type_ext_.vector_type_ = vector_type;
}
// @@protoc_insertion_point(field_set_allocated:greptime.v1.ColumnDataTypeExtension.vector_type)
}
ColumnDataTypeExtension::ColumnDataTypeExtension(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
@@ -4331,6 +4377,11 @@ ColumnDataTypeExtension::ColumnDataTypeExtension(const ColumnDataTypeExtension&
_this->_internal_set_json_type(from._internal_json_type());
break;
}
case kVectorType: {
_this->_internal_mutable_vector_type()->::greptime::v1::VectorTypeExtension::MergeFrom(
from._internal_vector_type());
break;
}
case TYPE_EXT_NOT_SET: {
break;
}
@@ -4383,6 +4434,12 @@ void ColumnDataTypeExtension::clear_type_ext() {
// No need to clear
break;
}
case kVectorType: {
if (GetArenaForAllocation() == nullptr) {
delete _impl_.type_ext_.vector_type_;
}
break;
}
case TYPE_EXT_NOT_SET: {
break;
}
@@ -4424,6 +4481,14 @@ const char* ColumnDataTypeExtension::_InternalParse(const char* ptr, ::_pbi::Par
} else
goto handle_unusual;
continue;
// .greptime.v1.VectorTypeExtension vector_type = 3;
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
ptr = ctx->ParseMessage(_internal_mutable_vector_type(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
@@ -4467,6 +4532,13 @@ uint8_t* ColumnDataTypeExtension::_InternalSerialize(
2, this->_internal_json_type(), target);
}
// .greptime.v1.VectorTypeExtension vector_type = 3;
if (_internal_has_vector_type()) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(3, _Internal::vector_type(this),
_Internal::vector_type(this).GetCachedSize(), target, stream);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
@@ -4497,6 +4569,13 @@ size_t ColumnDataTypeExtension::ByteSizeLong() const {
::_pbi::WireFormatLite::EnumSize(this->_internal_json_type());
break;
}
// .greptime.v1.VectorTypeExtension vector_type = 3;
case kVectorType: {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*_impl_.type_ext_.vector_type_);
break;
}
case TYPE_EXT_NOT_SET: {
break;
}
@@ -4529,6 +4608,11 @@ void ColumnDataTypeExtension::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg
_this->_internal_set_json_type(from._internal_json_type());
break;
}
case kVectorType: {
_this->_internal_mutable_vector_type()->::greptime::v1::VectorTypeExtension::MergeFrom(
from._internal_vector_type());
break;
}
case TYPE_EXT_NOT_SET: {
break;
}
@@ -4773,6 +4857,184 @@ void DecimalTypeExtension::InternalSwap(DecimalTypeExtension* other) {
// ===================================================================
class VectorTypeExtension::_Internal {
public:
};
VectorTypeExtension::VectorTypeExtension(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
SharedCtor(arena, is_message_owned);
// @@protoc_insertion_point(arena_constructor:greptime.v1.VectorTypeExtension)
}
VectorTypeExtension::VectorTypeExtension(const VectorTypeExtension& from)
: ::PROTOBUF_NAMESPACE_ID::Message() {
VectorTypeExtension* const _this = this; (void)_this;
new (&_impl_) Impl_{
decltype(_impl_.dim_){}
, /*decltype(_impl_._cached_size_)*/{}};
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
_this->_impl_.dim_ = from._impl_.dim_;
// @@protoc_insertion_point(copy_constructor:greptime.v1.VectorTypeExtension)
}
inline void VectorTypeExtension::SharedCtor(
::_pb::Arena* arena, bool is_message_owned) {
(void)arena;
(void)is_message_owned;
new (&_impl_) Impl_{
decltype(_impl_.dim_){0u}
, /*decltype(_impl_._cached_size_)*/{}
};
}
VectorTypeExtension::~VectorTypeExtension() {
// @@protoc_insertion_point(destructor:greptime.v1.VectorTypeExtension)
if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
(void)arena;
return;
}
SharedDtor();
}
inline void VectorTypeExtension::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
}
void VectorTypeExtension::SetCachedSize(int size) const {
_impl_._cached_size_.Set(size);
}
void VectorTypeExtension::Clear() {
// @@protoc_insertion_point(message_clear_start:greptime.v1.VectorTypeExtension)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
_impl_.dim_ = 0u;
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
const char* VectorTypeExtension::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::_pbi::ReadTag(ptr, &tag);
switch (tag >> 3) {
// uint32 dim = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
_impl_.dim_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* VectorTypeExtension::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:greptime.v1.VectorTypeExtension)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
// uint32 dim = 1;
if (this->_internal_dim() != 0) {
target = stream->EnsureSpace(target);
target = ::_pbi::WireFormatLite::WriteUInt32ToArray(1, this->_internal_dim(), target);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:greptime.v1.VectorTypeExtension)
return target;
}
size_t VectorTypeExtension::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:greptime.v1.VectorTypeExtension)
size_t total_size = 0;
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
// uint32 dim = 1;
if (this->_internal_dim() != 0) {
total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_dim());
}
return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData VectorTypeExtension::_class_data_ = {
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
VectorTypeExtension::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*VectorTypeExtension::GetClassData() const { return &_class_data_; }
void VectorTypeExtension::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
auto* const _this = static_cast<VectorTypeExtension*>(&to_msg);
auto& from = static_cast<const VectorTypeExtension&>(from_msg);
// @@protoc_insertion_point(class_specific_merge_from_start:greptime.v1.VectorTypeExtension)
GOOGLE_DCHECK_NE(&from, _this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
if (from._internal_dim() != 0) {
_this->_internal_set_dim(from._internal_dim());
}
_this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void VectorTypeExtension::CopyFrom(const VectorTypeExtension& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:greptime.v1.VectorTypeExtension)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool VectorTypeExtension::IsInitialized() const {
return true;
}
void VectorTypeExtension::InternalSwap(VectorTypeExtension* other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_impl_.dim_, other->_impl_.dim_);
}
::PROTOBUF_NAMESPACE_ID::Metadata VectorTypeExtension::GetMetadata() const {
return ::_pbi::AssignDescriptors(
&descriptor_table_greptime_2fv1_2fcommon_2eproto_getter, &descriptor_table_greptime_2fv1_2fcommon_2eproto_once,
file_level_metadata_greptime_2fv1_2fcommon_2eproto[18]);
}
// ===================================================================
ColumnOptions_OptionsEntry_DoNotUse::ColumnOptions_OptionsEntry_DoNotUse() {}
ColumnOptions_OptionsEntry_DoNotUse::ColumnOptions_OptionsEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena)
: SuperType(arena) {}
@@ -4782,7 +5044,7 @@ void ColumnOptions_OptionsEntry_DoNotUse::MergeFrom(const ColumnOptions_OptionsE
::PROTOBUF_NAMESPACE_ID::Metadata ColumnOptions_OptionsEntry_DoNotUse::GetMetadata() const {
return ::_pbi::AssignDescriptors(
&descriptor_table_greptime_2fv1_2fcommon_2eproto_getter, &descriptor_table_greptime_2fv1_2fcommon_2eproto_once,
file_level_metadata_greptime_2fv1_2fcommon_2eproto[18]);
file_level_metadata_greptime_2fv1_2fcommon_2eproto[19]);
}
// ===================================================================
@@ -5001,7 +5263,7 @@ void ColumnOptions::InternalSwap(ColumnOptions* other) {
::PROTOBUF_NAMESPACE_ID::Metadata ColumnOptions::GetMetadata() const {
return ::_pbi::AssignDescriptors(
&descriptor_table_greptime_2fv1_2fcommon_2eproto_getter, &descriptor_table_greptime_2fv1_2fcommon_2eproto_once,
file_level_metadata_greptime_2fv1_2fcommon_2eproto[19]);
file_level_metadata_greptime_2fv1_2fcommon_2eproto[20]);
}
// @@protoc_insertion_point(namespace_scope)
@@ -5080,6 +5342,10 @@ template<> PROTOBUF_NOINLINE ::greptime::v1::DecimalTypeExtension*
Arena::CreateMaybeMessage< ::greptime::v1::DecimalTypeExtension >(Arena* arena) {
return Arena::CreateMessageInternal< ::greptime::v1::DecimalTypeExtension >(arena);
}
template<> PROTOBUF_NOINLINE ::greptime::v1::VectorTypeExtension*
Arena::CreateMaybeMessage< ::greptime::v1::VectorTypeExtension >(Arena* arena) {
return Arena::CreateMessageInternal< ::greptime::v1::VectorTypeExtension >(arena);
}
template<> PROTOBUF_NOINLINE ::greptime::v1::ColumnOptions_OptionsEntry_DoNotUse*
Arena::CreateMaybeMessage< ::greptime::v1::ColumnOptions_OptionsEntry_DoNotUse >(Arena* arena) {
return Arena::CreateMessageInternal< ::greptime::v1::ColumnOptions_OptionsEntry_DoNotUse >(arena);
+277 -2
View File
@@ -110,6 +110,9 @@ extern TableNameDefaultTypeInternal _TableName_default_instance_;
class Token;
struct TokenDefaultTypeInternal;
extern TokenDefaultTypeInternal _Token_default_instance_;
class VectorTypeExtension;
struct VectorTypeExtensionDefaultTypeInternal;
extern VectorTypeExtensionDefaultTypeInternal _VectorTypeExtension_default_instance_;
} // namespace v1
} // namespace greptime
PROTOBUF_NAMESPACE_OPEN
@@ -133,6 +136,7 @@ template<> ::greptime::v1::ResponseHeader* Arena::CreateMaybeMessage<::greptime:
template<> ::greptime::v1::Status* Arena::CreateMaybeMessage<::greptime::v1::Status>(Arena*);
template<> ::greptime::v1::TableName* Arena::CreateMaybeMessage<::greptime::v1::TableName>(Arena*);
template<> ::greptime::v1::Token* Arena::CreateMaybeMessage<::greptime::v1::Token>(Arena*);
template<> ::greptime::v1::VectorTypeExtension* Arena::CreateMaybeMessage<::greptime::v1::VectorTypeExtension>(Arena*);
PROTOBUF_NAMESPACE_CLOSE
namespace greptime {
namespace v1 {
@@ -192,12 +196,13 @@ enum ColumnDataType : int {
INTERVAL_MONTH_DAY_NANO = 25,
DECIMAL128 = 30,
JSON = 31,
VECTOR = 32,
ColumnDataType_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<int32_t>::min(),
ColumnDataType_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<int32_t>::max()
};
bool ColumnDataType_IsValid(int value);
constexpr ColumnDataType ColumnDataType_MIN = BOOLEAN;
constexpr ColumnDataType ColumnDataType_MAX = JSON;
constexpr ColumnDataType ColumnDataType_MAX = VECTOR;
constexpr int ColumnDataType_ARRAYSIZE = ColumnDataType_MAX + 1;
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* ColumnDataType_descriptor();
@@ -2790,6 +2795,7 @@ class ColumnDataTypeExtension final :
enum TypeExtCase {
kDecimalType = 1,
kJsonType = 2,
kVectorType = 3,
TYPE_EXT_NOT_SET = 0,
};
@@ -2873,6 +2879,7 @@ class ColumnDataTypeExtension final :
enum : int {
kDecimalTypeFieldNumber = 1,
kJsonTypeFieldNumber = 2,
kVectorTypeFieldNumber = 3,
};
// .greptime.v1.DecimalTypeExtension decimal_type = 1;
bool has_decimal_type() const;
@@ -2905,6 +2912,24 @@ class ColumnDataTypeExtension final :
void _internal_set_json_type(::greptime::v1::JsonTypeExtension value);
public:
// .greptime.v1.VectorTypeExtension vector_type = 3;
bool has_vector_type() const;
private:
bool _internal_has_vector_type() const;
public:
void clear_vector_type();
const ::greptime::v1::VectorTypeExtension& vector_type() const;
PROTOBUF_NODISCARD ::greptime::v1::VectorTypeExtension* release_vector_type();
::greptime::v1::VectorTypeExtension* mutable_vector_type();
void set_allocated_vector_type(::greptime::v1::VectorTypeExtension* vector_type);
private:
const ::greptime::v1::VectorTypeExtension& _internal_vector_type() const;
::greptime::v1::VectorTypeExtension* _internal_mutable_vector_type();
public:
void unsafe_arena_set_allocated_vector_type(
::greptime::v1::VectorTypeExtension* vector_type);
::greptime::v1::VectorTypeExtension* unsafe_arena_release_vector_type();
void clear_type_ext();
TypeExtCase type_ext_case() const;
// @@protoc_insertion_point(class_scope:greptime.v1.ColumnDataTypeExtension)
@@ -2912,6 +2937,7 @@ class ColumnDataTypeExtension final :
class _Internal;
void set_has_decimal_type();
void set_has_json_type();
void set_has_vector_type();
inline bool has_type_ext() const;
inline void clear_has_type_ext();
@@ -2925,6 +2951,7 @@ class ColumnDataTypeExtension final :
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_;
::greptime::v1::DecimalTypeExtension* decimal_type_;
int json_type_;
::greptime::v1::VectorTypeExtension* vector_type_;
} type_ext_;
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
uint32_t _oneof_case_[1];
@@ -3094,6 +3121,154 @@ class DecimalTypeExtension final :
};
// -------------------------------------------------------------------
class VectorTypeExtension final :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:greptime.v1.VectorTypeExtension) */ {
public:
inline VectorTypeExtension() : VectorTypeExtension(nullptr) {}
~VectorTypeExtension() override;
explicit PROTOBUF_CONSTEXPR VectorTypeExtension(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized);
VectorTypeExtension(const VectorTypeExtension& from);
VectorTypeExtension(VectorTypeExtension&& from) noexcept
: VectorTypeExtension() {
*this = ::std::move(from);
}
inline VectorTypeExtension& operator=(const VectorTypeExtension& from) {
CopyFrom(from);
return *this;
}
inline VectorTypeExtension& operator=(VectorTypeExtension&& from) noexcept {
if (this == &from) return *this;
if (GetOwningArena() == from.GetOwningArena()
#ifdef PROTOBUF_FORCE_COPY_IN_MOVE
&& GetOwningArena() != nullptr
#endif // !PROTOBUF_FORCE_COPY_IN_MOVE
) {
InternalSwap(&from);
} else {
CopyFrom(from);
}
return *this;
}
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
return GetDescriptor();
}
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
return default_instance().GetMetadata().descriptor;
}
static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() {
return default_instance().GetMetadata().reflection;
}
static const VectorTypeExtension& default_instance() {
return *internal_default_instance();
}
static inline const VectorTypeExtension* internal_default_instance() {
return reinterpret_cast<const VectorTypeExtension*>(
&_VectorTypeExtension_default_instance_);
}
static constexpr int kIndexInFileMessages =
18;
friend void swap(VectorTypeExtension& a, VectorTypeExtension& b) {
a.Swap(&b);
}
inline void Swap(VectorTypeExtension* other) {
if (other == this) return;
#ifdef PROTOBUF_FORCE_COPY_IN_SWAP
if (GetOwningArena() != nullptr &&
GetOwningArena() == other->GetOwningArena()) {
#else // PROTOBUF_FORCE_COPY_IN_SWAP
if (GetOwningArena() == other->GetOwningArena()) {
#endif // !PROTOBUF_FORCE_COPY_IN_SWAP
InternalSwap(other);
} else {
::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other);
}
}
void UnsafeArenaSwap(VectorTypeExtension* other) {
if (other == this) return;
GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena());
InternalSwap(other);
}
// implements Message ----------------------------------------------
VectorTypeExtension* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final {
return CreateMaybeMessage<VectorTypeExtension>(arena);
}
using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom;
void CopyFrom(const VectorTypeExtension& from);
using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom;
void MergeFrom( const VectorTypeExtension& from) {
VectorTypeExtension::MergeImpl(*this, from);
}
private:
static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg);
public:
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
bool IsInitialized() const final;
size_t ByteSizeLong() const final;
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
uint8_t* _InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
int GetCachedSize() const final { return _impl_._cached_size_.Get(); }
private:
void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned);
void SharedDtor();
void SetCachedSize(int size) const final;
void InternalSwap(VectorTypeExtension* other);
private:
friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
return "greptime.v1.VectorTypeExtension";
}
protected:
explicit VectorTypeExtension(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned = false);
public:
static const ClassData _class_data_;
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final;
::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final;
// nested types ----------------------------------------------------
// accessors -------------------------------------------------------
enum : int {
kDimFieldNumber = 1,
};
// uint32 dim = 1;
void clear_dim();
uint32_t dim() const;
void set_dim(uint32_t value);
private:
uint32_t _internal_dim() const;
void _internal_set_dim(uint32_t value);
public:
// @@protoc_insertion_point(class_scope:greptime.v1.VectorTypeExtension)
private:
class _Internal;
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
struct Impl_ {
uint32_t dim_;
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
};
union { Impl_ _impl_; };
friend struct ::TableStruct_greptime_2fv1_2fcommon_2eproto;
};
// -------------------------------------------------------------------
class ColumnOptions_OptionsEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal::MapEntry<ColumnOptions_OptionsEntry_DoNotUse,
std::string, std::string,
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING,
@@ -3170,7 +3345,7 @@ class ColumnOptions final :
&_ColumnOptions_default_instance_);
}
static constexpr int kIndexInFileMessages =
19;
20;
friend void swap(ColumnOptions& a, ColumnOptions& b) {
a.Swap(&b);
@@ -4971,6 +5146,80 @@ inline void ColumnDataTypeExtension::set_json_type(::greptime::v1::JsonTypeExten
// @@protoc_insertion_point(field_set:greptime.v1.ColumnDataTypeExtension.json_type)
}
// .greptime.v1.VectorTypeExtension vector_type = 3;
inline bool ColumnDataTypeExtension::_internal_has_vector_type() const {
return type_ext_case() == kVectorType;
}
inline bool ColumnDataTypeExtension::has_vector_type() const {
return _internal_has_vector_type();
}
inline void ColumnDataTypeExtension::set_has_vector_type() {
_impl_._oneof_case_[0] = kVectorType;
}
inline void ColumnDataTypeExtension::clear_vector_type() {
if (_internal_has_vector_type()) {
if (GetArenaForAllocation() == nullptr) {
delete _impl_.type_ext_.vector_type_;
}
clear_has_type_ext();
}
}
inline ::greptime::v1::VectorTypeExtension* ColumnDataTypeExtension::release_vector_type() {
// @@protoc_insertion_point(field_release:greptime.v1.ColumnDataTypeExtension.vector_type)
if (_internal_has_vector_type()) {
clear_has_type_ext();
::greptime::v1::VectorTypeExtension* temp = _impl_.type_ext_.vector_type_;
if (GetArenaForAllocation() != nullptr) {
temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp);
}
_impl_.type_ext_.vector_type_ = nullptr;
return temp;
} else {
return nullptr;
}
}
inline const ::greptime::v1::VectorTypeExtension& ColumnDataTypeExtension::_internal_vector_type() const {
return _internal_has_vector_type()
? *_impl_.type_ext_.vector_type_
: reinterpret_cast< ::greptime::v1::VectorTypeExtension&>(::greptime::v1::_VectorTypeExtension_default_instance_);
}
inline const ::greptime::v1::VectorTypeExtension& ColumnDataTypeExtension::vector_type() const {
// @@protoc_insertion_point(field_get:greptime.v1.ColumnDataTypeExtension.vector_type)
return _internal_vector_type();
}
inline ::greptime::v1::VectorTypeExtension* ColumnDataTypeExtension::unsafe_arena_release_vector_type() {
// @@protoc_insertion_point(field_unsafe_arena_release:greptime.v1.ColumnDataTypeExtension.vector_type)
if (_internal_has_vector_type()) {
clear_has_type_ext();
::greptime::v1::VectorTypeExtension* temp = _impl_.type_ext_.vector_type_;
_impl_.type_ext_.vector_type_ = nullptr;
return temp;
} else {
return nullptr;
}
}
inline void ColumnDataTypeExtension::unsafe_arena_set_allocated_vector_type(::greptime::v1::VectorTypeExtension* vector_type) {
clear_type_ext();
if (vector_type) {
set_has_vector_type();
_impl_.type_ext_.vector_type_ = vector_type;
}
// @@protoc_insertion_point(field_unsafe_arena_set_allocated:greptime.v1.ColumnDataTypeExtension.vector_type)
}
inline ::greptime::v1::VectorTypeExtension* ColumnDataTypeExtension::_internal_mutable_vector_type() {
if (!_internal_has_vector_type()) {
clear_type_ext();
set_has_vector_type();
_impl_.type_ext_.vector_type_ = CreateMaybeMessage< ::greptime::v1::VectorTypeExtension >(GetArenaForAllocation());
}
return _impl_.type_ext_.vector_type_;
}
inline ::greptime::v1::VectorTypeExtension* ColumnDataTypeExtension::mutable_vector_type() {
::greptime::v1::VectorTypeExtension* _msg = _internal_mutable_vector_type();
// @@protoc_insertion_point(field_mutable:greptime.v1.ColumnDataTypeExtension.vector_type)
return _msg;
}
inline bool ColumnDataTypeExtension::has_type_ext() const {
return type_ext_case() != TYPE_EXT_NOT_SET;
}
@@ -5026,6 +5275,30 @@ inline void DecimalTypeExtension::set_scale(int32_t value) {
// -------------------------------------------------------------------
// VectorTypeExtension
// uint32 dim = 1;
inline void VectorTypeExtension::clear_dim() {
_impl_.dim_ = 0u;
}
inline uint32_t VectorTypeExtension::_internal_dim() const {
return _impl_.dim_;
}
inline uint32_t VectorTypeExtension::dim() const {
// @@protoc_insertion_point(field_get:greptime.v1.VectorTypeExtension.dim)
return _internal_dim();
}
inline void VectorTypeExtension::_internal_set_dim(uint32_t value) {
_impl_.dim_ = value;
}
inline void VectorTypeExtension::set_dim(uint32_t value) {
_internal_set_dim(value);
// @@protoc_insertion_point(field_set:greptime.v1.VectorTypeExtension.dim)
}
// -------------------------------------------------------------------
// -------------------------------------------------------------------
// ColumnOptions
@@ -5100,6 +5373,8 @@ ColumnOptions::mutable_options() {
// -------------------------------------------------------------------
// -------------------------------------------------------------------
// @@protoc_insertion_point(namespace_scope)
+51 -20
View File
@@ -138,6 +138,7 @@ PROTOBUF_CONSTEXPR CreateRequest::CreateRequest(
, /*decltype(_impl_.sink_table_name_)*/nullptr
, /*decltype(_impl_.expire_after_)*/nullptr
, /*decltype(_impl_.create_if_not_exists_)*/false
, /*decltype(_impl_.or_replace_)*/false
, /*decltype(_impl_._cached_size_)*/{}} {}
struct CreateRequestDefaultTypeInternal {
PROTOBUF_CONSTEXPR CreateRequestDefaultTypeInternal()
@@ -270,6 +271,7 @@ const uint32_t TableStruct_greptime_2fv1_2fflow_2fserver_2eproto::offsets[] PROT
PROTOBUF_FIELD_OFFSET(::greptime::v1::flow::CreateRequest, _impl_.comment_),
PROTOBUF_FIELD_OFFSET(::greptime::v1::flow::CreateRequest, _impl_.sql_),
PROTOBUF_FIELD_OFFSET(::greptime::v1::flow::CreateRequest, _impl_.flow_options_),
PROTOBUF_FIELD_OFFSET(::greptime::v1::flow::CreateRequest, _impl_.or_replace_),
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::greptime::v1::flow::DropRequest, _internal_metadata_),
~0u, // no _extensions_
@@ -295,8 +297,8 @@ static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protode
{ 54, -1, -1, sizeof(::greptime::v1::flow::FlowResponse)},
{ 64, 72, -1, sizeof(::greptime::v1::flow::CreateRequest_FlowOptionsEntry_DoNotUse)},
{ 74, -1, -1, sizeof(::greptime::v1::flow::CreateRequest)},
{ 88, -1, -1, sizeof(::greptime::v1::flow::DropRequest)},
{ 95, -1, -1, sizeof(::greptime::v1::flow::FlushFlow)},
{ 89, -1, -1, sizeof(::greptime::v1::flow::DropRequest)},
{ 96, -1, -1, sizeof(::greptime::v1::flow::FlushFlow)},
};
static const ::_pb::Message* const file_default_instances[] = {
@@ -337,7 +339,7 @@ const char descriptor_table_protodef_greptime_2fv1_2fflow_2fserver_2eproto[] PRO
".greptime.v1.FlowId\022B\n\nextensions\030\004 \003(\0132"
"..greptime.v1.flow.FlowResponse.Extensio"
"nsEntry\0321\n\017ExtensionsEntry\022\013\n\003key\030\001 \001(\t\022"
"\r\n\005value\030\002 \001(\014:\0028\001\"\376\002\n\rCreateRequest\022$\n\007"
"\r\n\005value\030\002 \001(\014:\0028\001\"\222\003\n\rCreateRequest\022$\n\007"
"flow_id\030\001 \001(\0132\023.greptime.v1.FlowId\022.\n\020so"
"urce_table_ids\030\002 \003(\0132\024.greptime.v1.Table"
"Id\022/\n\017sink_table_name\030\003 \001(\0132\026.greptime.v"
@@ -345,18 +347,19 @@ const char descriptor_table_protodef_greptime_2fv1_2fflow_2fserver_2eproto[] PRO
"\010\022.\n\014expire_after\030\005 \001(\0132\030.greptime.v1.Ex"
"pireAfter\022\017\n\007comment\030\006 \001(\t\022\013\n\003sql\030\007 \001(\t\022"
"F\n\014flow_options\030\010 \003(\01320.greptime.v1.flow"
".CreateRequest.FlowOptionsEntry\0322\n\020FlowO"
"ptionsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:"
"\0028\001\"3\n\013DropRequest\022$\n\007flow_id\030\001 \001(\0132\023.gr"
"eptime.v1.FlowId\"1\n\tFlushFlow\022$\n\007flow_id"
"\030\001 \001(\0132\023.greptime.v1.FlowId2\264\001\n\004Flow\022S\n\022"
"HandleCreateRemove\022\035.greptime.v1.flow.Fl"
"owRequest\032\036.greptime.v1.flow.FlowRespons"
"e\022W\n\023HandleMirrorRequest\022 .greptime.v1.f"
"low.InsertRequests\032\036.greptime.v1.flow.Fl"
"owResponseBY\n\023io.greptime.v1.flowB\006Serve"
"rZ:github.com/GreptimeTeam/greptime-prot"
"o/go/greptime/v1/flowb\006proto3"
".CreateRequest.FlowOptionsEntry\022\022\n\nor_re"
"place\030\t \001(\010\0322\n\020FlowOptionsEntry\022\013\n\003key\030\001"
" \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"3\n\013DropRequest\022$"
"\n\007flow_id\030\001 \001(\0132\023.greptime.v1.FlowId\"1\n\t"
"FlushFlow\022$\n\007flow_id\030\001 \001(\0132\023.greptime.v1"
".FlowId2\264\001\n\004Flow\022S\n\022HandleCreateRemove\022\035"
".greptime.v1.flow.FlowRequest\032\036.greptime"
".v1.flow.FlowResponse\022W\n\023HandleMirrorReq"
"uest\022 .greptime.v1.flow.InsertRequests\032\036"
".greptime.v1.flow.FlowResponseBY\n\023io.gre"
"ptime.v1.flowB\006ServerZ:github.com/Grepti"
"meTeam/greptime-proto/go/greptime/v1/flo"
"wb\006proto3"
;
static const ::_pbi::DescriptorTable* const descriptor_table_greptime_2fv1_2fflow_2fserver_2eproto_deps[3] = {
&::descriptor_table_greptime_2fv1_2fcommon_2eproto,
@@ -365,7 +368,7 @@ static const ::_pbi::DescriptorTable* const descriptor_table_greptime_2fv1_2fflo
};
static ::_pbi::once_flag descriptor_table_greptime_2fv1_2fflow_2fserver_2eproto_once;
const ::_pbi::DescriptorTable descriptor_table_greptime_2fv1_2fflow_2fserver_2eproto = {
false, false, 1709, descriptor_table_protodef_greptime_2fv1_2fflow_2fserver_2eproto,
false, false, 1729, descriptor_table_protodef_greptime_2fv1_2fflow_2fserver_2eproto,
"greptime/v1/flow/server.proto",
&descriptor_table_greptime_2fv1_2fflow_2fserver_2eproto_once, descriptor_table_greptime_2fv1_2fflow_2fserver_2eproto_deps, 3, 11,
schemas, file_default_instances, TableStruct_greptime_2fv1_2fflow_2fserver_2eproto::offsets,
@@ -1905,6 +1908,7 @@ CreateRequest::CreateRequest(const CreateRequest& from)
, decltype(_impl_.sink_table_name_){nullptr}
, decltype(_impl_.expire_after_){nullptr}
, decltype(_impl_.create_if_not_exists_){}
, decltype(_impl_.or_replace_){}
, /*decltype(_impl_._cached_size_)*/{}};
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
@@ -1934,7 +1938,9 @@ CreateRequest::CreateRequest(const CreateRequest& from)
if (from._internal_has_expire_after()) {
_this->_impl_.expire_after_ = new ::greptime::v1::ExpireAfter(*from._impl_.expire_after_);
}
_this->_impl_.create_if_not_exists_ = from._impl_.create_if_not_exists_;
::memcpy(&_impl_.create_if_not_exists_, &from._impl_.create_if_not_exists_,
static_cast<size_t>(reinterpret_cast<char*>(&_impl_.or_replace_) -
reinterpret_cast<char*>(&_impl_.create_if_not_exists_)) + sizeof(_impl_.or_replace_));
// @@protoc_insertion_point(copy_constructor:greptime.v1.flow.CreateRequest)
}
@@ -1951,6 +1957,7 @@ inline void CreateRequest::SharedCtor(
, decltype(_impl_.sink_table_name_){nullptr}
, decltype(_impl_.expire_after_){nullptr}
, decltype(_impl_.create_if_not_exists_){false}
, decltype(_impl_.or_replace_){false}
, /*decltype(_impl_._cached_size_)*/{}
};
_impl_.comment_.InitDefault();
@@ -2015,7 +2022,9 @@ void CreateRequest::Clear() {
delete _impl_.expire_after_;
}
_impl_.expire_after_ = nullptr;
_impl_.create_if_not_exists_ = false;
::memset(&_impl_.create_if_not_exists_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&_impl_.or_replace_) -
reinterpret_cast<char*>(&_impl_.create_if_not_exists_)) + sizeof(_impl_.or_replace_));
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
@@ -2103,6 +2112,14 @@ const char* CreateRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext*
} else
goto handle_unusual;
continue;
// bool or_replace = 9;
case 9:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 72)) {
_impl_.or_replace_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
@@ -2217,6 +2234,12 @@ uint8_t* CreateRequest::_InternalSerialize(
}
}
// bool or_replace = 9;
if (this->_internal_or_replace() != 0) {
target = stream->EnsureSpace(target);
target = ::_pbi::WireFormatLite::WriteBoolToArray(9, this->_internal_or_replace(), target);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
@@ -2289,6 +2312,11 @@ size_t CreateRequest::ByteSizeLong() const {
total_size += 1 + 1;
}
// bool or_replace = 9;
if (this->_internal_or_replace() != 0) {
total_size += 1 + 1;
}
return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}
@@ -2330,6 +2358,9 @@ void CreateRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::
if (from._internal_create_if_not_exists() != 0) {
_this->_internal_set_create_if_not_exists(from._internal_create_if_not_exists());
}
if (from._internal_or_replace() != 0) {
_this->_internal_set_or_replace(from._internal_or_replace());
}
_this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
@@ -2360,8 +2391,8 @@ void CreateRequest::InternalSwap(CreateRequest* other) {
&other->_impl_.sql_, rhs_arena
);
::PROTOBUF_NAMESPACE_ID::internal::memswap<
PROTOBUF_FIELD_OFFSET(CreateRequest, _impl_.create_if_not_exists_)
+ sizeof(CreateRequest::_impl_.create_if_not_exists_)
PROTOBUF_FIELD_OFFSET(CreateRequest, _impl_.or_replace_)
+ sizeof(CreateRequest::_impl_.or_replace_)
- PROTOBUF_FIELD_OFFSET(CreateRequest, _impl_.flow_id_)>(
reinterpret_cast<char*>(&_impl_.flow_id_),
reinterpret_cast<char*>(&other->_impl_.flow_id_));
+31
View File
@@ -1282,6 +1282,7 @@ class CreateRequest final :
kSinkTableNameFieldNumber = 3,
kExpireAfterFieldNumber = 5,
kCreateIfNotExistsFieldNumber = 4,
kOrReplaceFieldNumber = 9,
};
// repeated .greptime.v1.TableId source_table_ids = 2;
int source_table_ids_size() const;
@@ -1409,6 +1410,15 @@ class CreateRequest final :
void _internal_set_create_if_not_exists(bool value);
public:
// bool or_replace = 9;
void clear_or_replace();
bool or_replace() const;
void set_or_replace(bool value);
private:
bool _internal_or_replace() const;
void _internal_set_or_replace(bool value);
public:
// @@protoc_insertion_point(class_scope:greptime.v1.flow.CreateRequest)
private:
class _Internal;
@@ -1429,6 +1439,7 @@ class CreateRequest final :
::greptime::v1::TableName* sink_table_name_;
::greptime::v1::ExpireAfter* expire_after_;
bool create_if_not_exists_;
bool or_replace_;
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
};
union { Impl_ _impl_; };
@@ -2977,6 +2988,26 @@ CreateRequest::mutable_flow_options() {
return _internal_mutable_flow_options();
}
// bool or_replace = 9;
inline void CreateRequest::clear_or_replace() {
_impl_.or_replace_ = false;
}
inline bool CreateRequest::_internal_or_replace() const {
return _impl_.or_replace_;
}
inline bool CreateRequest::or_replace() const {
// @@protoc_insertion_point(field_get:greptime.v1.flow.CreateRequest.or_replace)
return _internal_or_replace();
}
inline void CreateRequest::_internal_set_or_replace(bool value) {
_impl_.or_replace_ = value;
}
inline void CreateRequest::set_or_replace(bool value) {
_internal_set_or_replace(value);
// @@protoc_insertion_point(field_set:greptime.v1.flow.CreateRequest.or_replace)
}
// -------------------------------------------------------------------
// DropRequest