feat: interal type for row protocol, and multi row deletes (#80)
This commit is contained in:
@@ -97,24 +97,9 @@ struct ColumnDefaultTypeInternal {
|
||||
};
|
||||
};
|
||||
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ColumnDefaultTypeInternal _Column_default_instance_;
|
||||
PROTOBUF_CONSTEXPR IntervalMonthDayNano::IntervalMonthDayNano(
|
||||
::_pbi::ConstantInitialized): _impl_{
|
||||
/*decltype(_impl_.months_)*/0
|
||||
, /*decltype(_impl_.days_)*/0
|
||||
, /*decltype(_impl_.nanoseconds_)*/int64_t{0}
|
||||
, /*decltype(_impl_._cached_size_)*/{}} {}
|
||||
struct IntervalMonthDayNanoDefaultTypeInternal {
|
||||
PROTOBUF_CONSTEXPR IntervalMonthDayNanoDefaultTypeInternal()
|
||||
: _instance(::_pbi::ConstantInitialized{}) {}
|
||||
~IntervalMonthDayNanoDefaultTypeInternal() {}
|
||||
union {
|
||||
IntervalMonthDayNano _instance;
|
||||
};
|
||||
};
|
||||
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 IntervalMonthDayNanoDefaultTypeInternal _IntervalMonthDayNano_default_instance_;
|
||||
} // namespace v1
|
||||
} // namespace greptime
|
||||
static ::_pb::Metadata file_level_metadata_greptime_2fv1_2fcolumn_2eproto[3];
|
||||
static ::_pb::Metadata file_level_metadata_greptime_2fv1_2fcolumn_2eproto[2];
|
||||
static constexpr ::_pb::EnumDescriptor const** file_level_enum_descriptors_greptime_2fv1_2fcolumn_2eproto = nullptr;
|
||||
static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_greptime_2fv1_2fcolumn_2eproto = nullptr;
|
||||
|
||||
@@ -162,26 +147,15 @@ const uint32_t TableStruct_greptime_2fv1_2fcolumn_2eproto::offsets[] PROTOBUF_SE
|
||||
PROTOBUF_FIELD_OFFSET(::greptime::v1::Column, _impl_.values_),
|
||||
PROTOBUF_FIELD_OFFSET(::greptime::v1::Column, _impl_.null_mask_),
|
||||
PROTOBUF_FIELD_OFFSET(::greptime::v1::Column, _impl_.datatype_),
|
||||
~0u, // no _has_bits_
|
||||
PROTOBUF_FIELD_OFFSET(::greptime::v1::IntervalMonthDayNano, _internal_metadata_),
|
||||
~0u, // no _extensions_
|
||||
~0u, // no _oneof_case_
|
||||
~0u, // no _weak_field_map_
|
||||
~0u, // no _inlined_string_donated_
|
||||
PROTOBUF_FIELD_OFFSET(::greptime::v1::IntervalMonthDayNano, _impl_.months_),
|
||||
PROTOBUF_FIELD_OFFSET(::greptime::v1::IntervalMonthDayNano, _impl_.days_),
|
||||
PROTOBUF_FIELD_OFFSET(::greptime::v1::IntervalMonthDayNano, _impl_.nanoseconds_),
|
||||
};
|
||||
static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
|
||||
{ 0, -1, -1, sizeof(::greptime::v1::Column_Values)},
|
||||
{ 32, -1, -1, sizeof(::greptime::v1::Column)},
|
||||
{ 43, -1, -1, sizeof(::greptime::v1::IntervalMonthDayNano)},
|
||||
};
|
||||
|
||||
static const ::_pb::Message* const file_default_instances[] = {
|
||||
&::greptime::v1::_Column_Values_default_instance_._instance,
|
||||
&::greptime::v1::_Column_default_instance_._instance,
|
||||
&::greptime::v1::_IntervalMonthDayNano_default_instance_._instance,
|
||||
};
|
||||
|
||||
const char descriptor_table_protodef_greptime_2fv1_2fcolumn_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
|
||||
@@ -209,20 +183,18 @@ const char descriptor_table_protodef_greptime_2fv1_2fcolumn_2eproto[] PROTOBUF_S
|
||||
"_month_values\030\030 \003(\005\022 \n\030interval_day_time"
|
||||
"_values\030\031 \003(\003\022I\n\036interval_month_day_nano"
|
||||
"_values\030\032 \003(\0132!.greptime.v1.IntervalMont"
|
||||
"hDayNano\"I\n\024IntervalMonthDayNano\022\016\n\006mont"
|
||||
"hs\030\001 \001(\005\022\014\n\004days\030\002 \001(\005\022\023\n\013nanoseconds\030\003 "
|
||||
"\001(\003BP\n\016io.greptime.v1B\007ColumnsZ5github.c"
|
||||
"om/GreptimeTeam/greptime-proto/go/grepti"
|
||||
"me/v1b\006proto3"
|
||||
"hDayNanoBP\n\016io.greptime.v1B\007ColumnsZ5git"
|
||||
"hub.com/GreptimeTeam/greptime-proto/go/g"
|
||||
"reptime/v1b\006proto3"
|
||||
;
|
||||
static const ::_pbi::DescriptorTable* const descriptor_table_greptime_2fv1_2fcolumn_2eproto_deps[1] = {
|
||||
&::descriptor_table_greptime_2fv1_2fcommon_2eproto,
|
||||
};
|
||||
static ::_pbi::once_flag descriptor_table_greptime_2fv1_2fcolumn_2eproto_once;
|
||||
const ::_pbi::DescriptorTable descriptor_table_greptime_2fv1_2fcolumn_2eproto = {
|
||||
false, false, 1133, descriptor_table_protodef_greptime_2fv1_2fcolumn_2eproto,
|
||||
false, false, 1058, descriptor_table_protodef_greptime_2fv1_2fcolumn_2eproto,
|
||||
"greptime/v1/column.proto",
|
||||
&descriptor_table_greptime_2fv1_2fcolumn_2eproto_once, descriptor_table_greptime_2fv1_2fcolumn_2eproto_deps, 1, 3,
|
||||
&descriptor_table_greptime_2fv1_2fcolumn_2eproto_once, descriptor_table_greptime_2fv1_2fcolumn_2eproto_deps, 1, 2,
|
||||
schemas, file_default_instances, TableStruct_greptime_2fv1_2fcolumn_2eproto::offsets,
|
||||
file_level_metadata_greptime_2fv1_2fcolumn_2eproto, file_level_enum_descriptors_greptime_2fv1_2fcolumn_2eproto,
|
||||
file_level_service_descriptors_greptime_2fv1_2fcolumn_2eproto,
|
||||
@@ -242,6 +214,9 @@ class Column_Values::_Internal {
|
||||
public:
|
||||
};
|
||||
|
||||
void Column_Values::clear_interval_month_day_nano_values() {
|
||||
_impl_.interval_month_day_nano_values_.Clear();
|
||||
}
|
||||
Column_Values::Column_Values(::PROTOBUF_NAMESPACE_ID::Arena* arena,
|
||||
bool is_message_owned)
|
||||
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
|
||||
@@ -1788,241 +1763,6 @@ void Column::InternalSwap(Column* other) {
|
||||
file_level_metadata_greptime_2fv1_2fcolumn_2eproto[1]);
|
||||
}
|
||||
|
||||
// ===================================================================
|
||||
|
||||
class IntervalMonthDayNano::_Internal {
|
||||
public:
|
||||
};
|
||||
|
||||
IntervalMonthDayNano::IntervalMonthDayNano(::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.IntervalMonthDayNano)
|
||||
}
|
||||
IntervalMonthDayNano::IntervalMonthDayNano(const IntervalMonthDayNano& from)
|
||||
: ::PROTOBUF_NAMESPACE_ID::Message() {
|
||||
IntervalMonthDayNano* const _this = this; (void)_this;
|
||||
new (&_impl_) Impl_{
|
||||
decltype(_impl_.months_){}
|
||||
, decltype(_impl_.days_){}
|
||||
, decltype(_impl_.nanoseconds_){}
|
||||
, /*decltype(_impl_._cached_size_)*/{}};
|
||||
|
||||
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
|
||||
::memcpy(&_impl_.months_, &from._impl_.months_,
|
||||
static_cast<size_t>(reinterpret_cast<char*>(&_impl_.nanoseconds_) -
|
||||
reinterpret_cast<char*>(&_impl_.months_)) + sizeof(_impl_.nanoseconds_));
|
||||
// @@protoc_insertion_point(copy_constructor:greptime.v1.IntervalMonthDayNano)
|
||||
}
|
||||
|
||||
inline void IntervalMonthDayNano::SharedCtor(
|
||||
::_pb::Arena* arena, bool is_message_owned) {
|
||||
(void)arena;
|
||||
(void)is_message_owned;
|
||||
new (&_impl_) Impl_{
|
||||
decltype(_impl_.months_){0}
|
||||
, decltype(_impl_.days_){0}
|
||||
, decltype(_impl_.nanoseconds_){int64_t{0}}
|
||||
, /*decltype(_impl_._cached_size_)*/{}
|
||||
};
|
||||
}
|
||||
|
||||
IntervalMonthDayNano::~IntervalMonthDayNano() {
|
||||
// @@protoc_insertion_point(destructor:greptime.v1.IntervalMonthDayNano)
|
||||
if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
|
||||
(void)arena;
|
||||
return;
|
||||
}
|
||||
SharedDtor();
|
||||
}
|
||||
|
||||
inline void IntervalMonthDayNano::SharedDtor() {
|
||||
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
|
||||
}
|
||||
|
||||
void IntervalMonthDayNano::SetCachedSize(int size) const {
|
||||
_impl_._cached_size_.Set(size);
|
||||
}
|
||||
|
||||
void IntervalMonthDayNano::Clear() {
|
||||
// @@protoc_insertion_point(message_clear_start:greptime.v1.IntervalMonthDayNano)
|
||||
uint32_t cached_has_bits = 0;
|
||||
// Prevent compiler warnings about cached_has_bits being unused
|
||||
(void) cached_has_bits;
|
||||
|
||||
::memset(&_impl_.months_, 0, static_cast<size_t>(
|
||||
reinterpret_cast<char*>(&_impl_.nanoseconds_) -
|
||||
reinterpret_cast<char*>(&_impl_.months_)) + sizeof(_impl_.nanoseconds_));
|
||||
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
|
||||
}
|
||||
|
||||
const char* IntervalMonthDayNano::_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) {
|
||||
// int32 months = 1;
|
||||
case 1:
|
||||
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
|
||||
_impl_.months_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
|
||||
CHK_(ptr);
|
||||
} else
|
||||
goto handle_unusual;
|
||||
continue;
|
||||
// int32 days = 2;
|
||||
case 2:
|
||||
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
|
||||
_impl_.days_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
|
||||
CHK_(ptr);
|
||||
} else
|
||||
goto handle_unusual;
|
||||
continue;
|
||||
// int64 nanoseconds = 3;
|
||||
case 3:
|
||||
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
|
||||
_impl_.nanoseconds_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&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* IntervalMonthDayNano::_InternalSerialize(
|
||||
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
|
||||
// @@protoc_insertion_point(serialize_to_array_start:greptime.v1.IntervalMonthDayNano)
|
||||
uint32_t cached_has_bits = 0;
|
||||
(void) cached_has_bits;
|
||||
|
||||
// int32 months = 1;
|
||||
if (this->_internal_months() != 0) {
|
||||
target = stream->EnsureSpace(target);
|
||||
target = ::_pbi::WireFormatLite::WriteInt32ToArray(1, this->_internal_months(), target);
|
||||
}
|
||||
|
||||
// int32 days = 2;
|
||||
if (this->_internal_days() != 0) {
|
||||
target = stream->EnsureSpace(target);
|
||||
target = ::_pbi::WireFormatLite::WriteInt32ToArray(2, this->_internal_days(), target);
|
||||
}
|
||||
|
||||
// int64 nanoseconds = 3;
|
||||
if (this->_internal_nanoseconds() != 0) {
|
||||
target = stream->EnsureSpace(target);
|
||||
target = ::_pbi::WireFormatLite::WriteInt64ToArray(3, this->_internal_nanoseconds(), 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.IntervalMonthDayNano)
|
||||
return target;
|
||||
}
|
||||
|
||||
size_t IntervalMonthDayNano::ByteSizeLong() const {
|
||||
// @@protoc_insertion_point(message_byte_size_start:greptime.v1.IntervalMonthDayNano)
|
||||
size_t total_size = 0;
|
||||
|
||||
uint32_t cached_has_bits = 0;
|
||||
// Prevent compiler warnings about cached_has_bits being unused
|
||||
(void) cached_has_bits;
|
||||
|
||||
// int32 months = 1;
|
||||
if (this->_internal_months() != 0) {
|
||||
total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_months());
|
||||
}
|
||||
|
||||
// int32 days = 2;
|
||||
if (this->_internal_days() != 0) {
|
||||
total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_days());
|
||||
}
|
||||
|
||||
// int64 nanoseconds = 3;
|
||||
if (this->_internal_nanoseconds() != 0) {
|
||||
total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_nanoseconds());
|
||||
}
|
||||
|
||||
return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
|
||||
}
|
||||
|
||||
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData IntervalMonthDayNano::_class_data_ = {
|
||||
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
|
||||
IntervalMonthDayNano::MergeImpl
|
||||
};
|
||||
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*IntervalMonthDayNano::GetClassData() const { return &_class_data_; }
|
||||
|
||||
|
||||
void IntervalMonthDayNano::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
|
||||
auto* const _this = static_cast<IntervalMonthDayNano*>(&to_msg);
|
||||
auto& from = static_cast<const IntervalMonthDayNano&>(from_msg);
|
||||
// @@protoc_insertion_point(class_specific_merge_from_start:greptime.v1.IntervalMonthDayNano)
|
||||
GOOGLE_DCHECK_NE(&from, _this);
|
||||
uint32_t cached_has_bits = 0;
|
||||
(void) cached_has_bits;
|
||||
|
||||
if (from._internal_months() != 0) {
|
||||
_this->_internal_set_months(from._internal_months());
|
||||
}
|
||||
if (from._internal_days() != 0) {
|
||||
_this->_internal_set_days(from._internal_days());
|
||||
}
|
||||
if (from._internal_nanoseconds() != 0) {
|
||||
_this->_internal_set_nanoseconds(from._internal_nanoseconds());
|
||||
}
|
||||
_this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
|
||||
}
|
||||
|
||||
void IntervalMonthDayNano::CopyFrom(const IntervalMonthDayNano& from) {
|
||||
// @@protoc_insertion_point(class_specific_copy_from_start:greptime.v1.IntervalMonthDayNano)
|
||||
if (&from == this) return;
|
||||
Clear();
|
||||
MergeFrom(from);
|
||||
}
|
||||
|
||||
bool IntervalMonthDayNano::IsInitialized() const {
|
||||
return true;
|
||||
}
|
||||
|
||||
void IntervalMonthDayNano::InternalSwap(IntervalMonthDayNano* other) {
|
||||
using std::swap;
|
||||
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
|
||||
::PROTOBUF_NAMESPACE_ID::internal::memswap<
|
||||
PROTOBUF_FIELD_OFFSET(IntervalMonthDayNano, _impl_.nanoseconds_)
|
||||
+ sizeof(IntervalMonthDayNano::_impl_.nanoseconds_)
|
||||
- PROTOBUF_FIELD_OFFSET(IntervalMonthDayNano, _impl_.months_)>(
|
||||
reinterpret_cast<char*>(&_impl_.months_),
|
||||
reinterpret_cast<char*>(&other->_impl_.months_));
|
||||
}
|
||||
|
||||
::PROTOBUF_NAMESPACE_ID::Metadata IntervalMonthDayNano::GetMetadata() const {
|
||||
return ::_pbi::AssignDescriptors(
|
||||
&descriptor_table_greptime_2fv1_2fcolumn_2eproto_getter, &descriptor_table_greptime_2fv1_2fcolumn_2eproto_once,
|
||||
file_level_metadata_greptime_2fv1_2fcolumn_2eproto[2]);
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(namespace_scope)
|
||||
} // namespace v1
|
||||
} // namespace greptime
|
||||
@@ -2035,10 +1775,6 @@ template<> PROTOBUF_NOINLINE ::greptime::v1::Column*
|
||||
Arena::CreateMaybeMessage< ::greptime::v1::Column >(Arena* arena) {
|
||||
return Arena::CreateMessageInternal< ::greptime::v1::Column >(arena);
|
||||
}
|
||||
template<> PROTOBUF_NOINLINE ::greptime::v1::IntervalMonthDayNano*
|
||||
Arena::CreateMaybeMessage< ::greptime::v1::IntervalMonthDayNano >(Arena* arena) {
|
||||
return Arena::CreateMessageInternal< ::greptime::v1::IntervalMonthDayNano >(arena);
|
||||
}
|
||||
PROTOBUF_NAMESPACE_CLOSE
|
||||
|
||||
// @@protoc_insertion_point(global_scope)
|
||||
|
||||
Reference in New Issue
Block a user