d9167cab47
* feat: row-based insert * feat: null value * roback: null value * feat: delete by row * feat: rename Value to Field
1832 lines
61 KiB
C++
1832 lines
61 KiB
C++
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
// source: greptime/v1/row.proto
|
|
|
|
#include "greptime/v1/row.pb.h"
|
|
|
|
#include <algorithm>
|
|
|
|
#include <google/protobuf/io/coded_stream.h>
|
|
#include <google/protobuf/extension_set.h>
|
|
#include <google/protobuf/wire_format_lite.h>
|
|
#include <google/protobuf/descriptor.h>
|
|
#include <google/protobuf/generated_message_reflection.h>
|
|
#include <google/protobuf/reflection_ops.h>
|
|
#include <google/protobuf/wire_format.h>
|
|
// @@protoc_insertion_point(includes)
|
|
#include <google/protobuf/port_def.inc>
|
|
|
|
PROTOBUF_PRAGMA_INIT_SEG
|
|
|
|
namespace _pb = ::PROTOBUF_NAMESPACE_ID;
|
|
namespace _pbi = _pb::internal;
|
|
|
|
namespace greptime {
|
|
namespace v1 {
|
|
PROTOBUF_CONSTEXPR Rows::Rows(
|
|
::_pbi::ConstantInitialized): _impl_{
|
|
/*decltype(_impl_.schema_)*/{}
|
|
, /*decltype(_impl_.rows_)*/{}
|
|
, /*decltype(_impl_._cached_size_)*/{}} {}
|
|
struct RowsDefaultTypeInternal {
|
|
PROTOBUF_CONSTEXPR RowsDefaultTypeInternal()
|
|
: _instance(::_pbi::ConstantInitialized{}) {}
|
|
~RowsDefaultTypeInternal() {}
|
|
union {
|
|
Rows _instance;
|
|
};
|
|
};
|
|
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RowsDefaultTypeInternal _Rows_default_instance_;
|
|
PROTOBUF_CONSTEXPR ColumnSchema::ColumnSchema(
|
|
::_pbi::ConstantInitialized): _impl_{
|
|
/*decltype(_impl_.column_name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
|
|
, /*decltype(_impl_.datatype_)*/0
|
|
, /*decltype(_impl_.semantic_type_)*/0
|
|
, /*decltype(_impl_._cached_size_)*/{}} {}
|
|
struct ColumnSchemaDefaultTypeInternal {
|
|
PROTOBUF_CONSTEXPR ColumnSchemaDefaultTypeInternal()
|
|
: _instance(::_pbi::ConstantInitialized{}) {}
|
|
~ColumnSchemaDefaultTypeInternal() {}
|
|
union {
|
|
ColumnSchema _instance;
|
|
};
|
|
};
|
|
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ColumnSchemaDefaultTypeInternal _ColumnSchema_default_instance_;
|
|
PROTOBUF_CONSTEXPR Row::Row(
|
|
::_pbi::ConstantInitialized): _impl_{
|
|
/*decltype(_impl_.values_)*/{}
|
|
, /*decltype(_impl_._cached_size_)*/{}} {}
|
|
struct RowDefaultTypeInternal {
|
|
PROTOBUF_CONSTEXPR RowDefaultTypeInternal()
|
|
: _instance(::_pbi::ConstantInitialized{}) {}
|
|
~RowDefaultTypeInternal() {}
|
|
union {
|
|
Row _instance;
|
|
};
|
|
};
|
|
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RowDefaultTypeInternal _Row_default_instance_;
|
|
PROTOBUF_CONSTEXPR Value::Value(
|
|
::_pbi::ConstantInitialized): _impl_{
|
|
/*decltype(_impl_.value_data_)*/{}
|
|
, /*decltype(_impl_._cached_size_)*/{}
|
|
, /*decltype(_impl_._oneof_case_)*/{}} {}
|
|
struct ValueDefaultTypeInternal {
|
|
PROTOBUF_CONSTEXPR ValueDefaultTypeInternal()
|
|
: _instance(::_pbi::ConstantInitialized{}) {}
|
|
~ValueDefaultTypeInternal() {}
|
|
union {
|
|
Value _instance;
|
|
};
|
|
};
|
|
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ValueDefaultTypeInternal _Value_default_instance_;
|
|
} // namespace v1
|
|
} // namespace greptime
|
|
static ::_pb::Metadata file_level_metadata_greptime_2fv1_2frow_2eproto[4];
|
|
static constexpr ::_pb::EnumDescriptor const** file_level_enum_descriptors_greptime_2fv1_2frow_2eproto = nullptr;
|
|
static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_greptime_2fv1_2frow_2eproto = nullptr;
|
|
|
|
const uint32_t TableStruct_greptime_2fv1_2frow_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
|
|
~0u, // no _has_bits_
|
|
PROTOBUF_FIELD_OFFSET(::greptime::v1::Rows, _internal_metadata_),
|
|
~0u, // no _extensions_
|
|
~0u, // no _oneof_case_
|
|
~0u, // no _weak_field_map_
|
|
~0u, // no _inlined_string_donated_
|
|
PROTOBUF_FIELD_OFFSET(::greptime::v1::Rows, _impl_.schema_),
|
|
PROTOBUF_FIELD_OFFSET(::greptime::v1::Rows, _impl_.rows_),
|
|
~0u, // no _has_bits_
|
|
PROTOBUF_FIELD_OFFSET(::greptime::v1::ColumnSchema, _internal_metadata_),
|
|
~0u, // no _extensions_
|
|
~0u, // no _oneof_case_
|
|
~0u, // no _weak_field_map_
|
|
~0u, // no _inlined_string_donated_
|
|
PROTOBUF_FIELD_OFFSET(::greptime::v1::ColumnSchema, _impl_.column_name_),
|
|
PROTOBUF_FIELD_OFFSET(::greptime::v1::ColumnSchema, _impl_.datatype_),
|
|
PROTOBUF_FIELD_OFFSET(::greptime::v1::ColumnSchema, _impl_.semantic_type_),
|
|
~0u, // no _has_bits_
|
|
PROTOBUF_FIELD_OFFSET(::greptime::v1::Row, _internal_metadata_),
|
|
~0u, // no _extensions_
|
|
~0u, // no _oneof_case_
|
|
~0u, // no _weak_field_map_
|
|
~0u, // no _inlined_string_donated_
|
|
PROTOBUF_FIELD_OFFSET(::greptime::v1::Row, _impl_.values_),
|
|
~0u, // no _has_bits_
|
|
PROTOBUF_FIELD_OFFSET(::greptime::v1::Value, _internal_metadata_),
|
|
~0u, // no _extensions_
|
|
PROTOBUF_FIELD_OFFSET(::greptime::v1::Value, _impl_._oneof_case_[0]),
|
|
~0u, // no _weak_field_map_
|
|
~0u, // no _inlined_string_donated_
|
|
::_pbi::kInvalidFieldOffsetTag,
|
|
::_pbi::kInvalidFieldOffsetTag,
|
|
::_pbi::kInvalidFieldOffsetTag,
|
|
::_pbi::kInvalidFieldOffsetTag,
|
|
::_pbi::kInvalidFieldOffsetTag,
|
|
::_pbi::kInvalidFieldOffsetTag,
|
|
::_pbi::kInvalidFieldOffsetTag,
|
|
::_pbi::kInvalidFieldOffsetTag,
|
|
::_pbi::kInvalidFieldOffsetTag,
|
|
::_pbi::kInvalidFieldOffsetTag,
|
|
::_pbi::kInvalidFieldOffsetTag,
|
|
::_pbi::kInvalidFieldOffsetTag,
|
|
::_pbi::kInvalidFieldOffsetTag,
|
|
::_pbi::kInvalidFieldOffsetTag,
|
|
::_pbi::kInvalidFieldOffsetTag,
|
|
::_pbi::kInvalidFieldOffsetTag,
|
|
::_pbi::kInvalidFieldOffsetTag,
|
|
::_pbi::kInvalidFieldOffsetTag,
|
|
::_pbi::kInvalidFieldOffsetTag,
|
|
::_pbi::kInvalidFieldOffsetTag,
|
|
::_pbi::kInvalidFieldOffsetTag,
|
|
::_pbi::kInvalidFieldOffsetTag,
|
|
::_pbi::kInvalidFieldOffsetTag,
|
|
PROTOBUF_FIELD_OFFSET(::greptime::v1::Value, _impl_.value_data_),
|
|
};
|
|
static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
|
|
{ 0, -1, -1, sizeof(::greptime::v1::Rows)},
|
|
{ 8, -1, -1, sizeof(::greptime::v1::ColumnSchema)},
|
|
{ 17, -1, -1, sizeof(::greptime::v1::Row)},
|
|
{ 24, -1, -1, sizeof(::greptime::v1::Value)},
|
|
};
|
|
|
|
static const ::_pb::Message* const file_default_instances[] = {
|
|
&::greptime::v1::_Rows_default_instance_._instance,
|
|
&::greptime::v1::_ColumnSchema_default_instance_._instance,
|
|
&::greptime::v1::_Row_default_instance_._instance,
|
|
&::greptime::v1::_Value_default_instance_._instance,
|
|
};
|
|
|
|
const char descriptor_table_protodef_greptime_2fv1_2frow_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
|
|
"\n\025greptime/v1/row.proto\022\013greptime.v1\032\030gr"
|
|
"eptime/v1/common.proto\"Q\n\004Rows\022)\n\006schema"
|
|
"\030\001 \003(\0132\031.greptime.v1.ColumnSchema\022\036\n\004row"
|
|
"s\030\002 \003(\0132\020.greptime.v1.Row\"\204\001\n\014ColumnSche"
|
|
"ma\022\023\n\013column_name\030\001 \001(\t\022-\n\010datatype\030\002 \001("
|
|
"\0162\033.greptime.v1.ColumnDataType\0220\n\rsemant"
|
|
"ic_type\030\003 \001(\0162\031.greptime.v1.SemanticType"
|
|
"\")\n\003Row\022\"\n\006values\030\001 \003(\0132\022.greptime.v1.Va"
|
|
"lue\"\327\004\n\005Value\022\022\n\010i8_value\030\001 \001(\005H\000\022\023\n\ti16"
|
|
"_value\030\002 \001(\005H\000\022\023\n\ti32_value\030\003 \001(\005H\000\022\023\n\ti"
|
|
"64_value\030\004 \001(\003H\000\022\022\n\010u8_value\030\005 \001(\rH\000\022\023\n\t"
|
|
"u16_value\030\006 \001(\rH\000\022\023\n\tu32_value\030\007 \001(\rH\000\022\023"
|
|
"\n\tu64_value\030\010 \001(\004H\000\022\023\n\tf32_value\030\t \001(\002H\000"
|
|
"\022\023\n\tf64_value\030\n \001(\001H\000\022\024\n\nbool_value\030\013 \001("
|
|
"\010H\000\022\026\n\014binary_value\030\014 \001(\014H\000\022\026\n\014string_va"
|
|
"lue\030\r \001(\tH\000\022\024\n\ndate_value\030\016 \001(\005H\000\022\030\n\016dat"
|
|
"etime_value\030\017 \001(\003H\000\022\031\n\017ts_second_value\030\020"
|
|
" \001(\003H\000\022\036\n\024ts_millisecond_value\030\021 \001(\003H\000\022\036"
|
|
"\n\024ts_microsecond_value\030\022 \001(\003H\000\022\035\n\023ts_nan"
|
|
"osecond_value\030\023 \001(\003H\000\022\033\n\021time_second_val"
|
|
"ue\030\024 \001(\003H\000\022 \n\026time_millisecond_value\030\025 \001"
|
|
"(\003H\000\022 \n\026time_microsecond_value\030\026 \001(\003H\000\022\037"
|
|
"\n\025time_nanosecond_value\030\027 \001(\003H\000B\014\n\nvalue"
|
|
"_dataBP\n\016io.greptime.v1B\007RowDataZ5github"
|
|
".com/GreptimeTeam/greptime-proto/go/grep"
|
|
"time/v1b\006proto3"
|
|
;
|
|
static const ::_pbi::DescriptorTable* const descriptor_table_greptime_2fv1_2frow_2eproto_deps[1] = {
|
|
&::descriptor_table_greptime_2fv1_2fcommon_2eproto,
|
|
};
|
|
static ::_pbi::once_flag descriptor_table_greptime_2fv1_2frow_2eproto_once;
|
|
const ::_pbi::DescriptorTable descriptor_table_greptime_2fv1_2frow_2eproto = {
|
|
false, false, 1015, descriptor_table_protodef_greptime_2fv1_2frow_2eproto,
|
|
"greptime/v1/row.proto",
|
|
&descriptor_table_greptime_2fv1_2frow_2eproto_once, descriptor_table_greptime_2fv1_2frow_2eproto_deps, 1, 4,
|
|
schemas, file_default_instances, TableStruct_greptime_2fv1_2frow_2eproto::offsets,
|
|
file_level_metadata_greptime_2fv1_2frow_2eproto, file_level_enum_descriptors_greptime_2fv1_2frow_2eproto,
|
|
file_level_service_descriptors_greptime_2fv1_2frow_2eproto,
|
|
};
|
|
PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_greptime_2fv1_2frow_2eproto_getter() {
|
|
return &descriptor_table_greptime_2fv1_2frow_2eproto;
|
|
}
|
|
|
|
// Force running AddDescriptors() at dynamic initialization time.
|
|
PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_greptime_2fv1_2frow_2eproto(&descriptor_table_greptime_2fv1_2frow_2eproto);
|
|
namespace greptime {
|
|
namespace v1 {
|
|
|
|
// ===================================================================
|
|
|
|
class Rows::_Internal {
|
|
public:
|
|
};
|
|
|
|
Rows::Rows(::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.Rows)
|
|
}
|
|
Rows::Rows(const Rows& from)
|
|
: ::PROTOBUF_NAMESPACE_ID::Message() {
|
|
Rows* const _this = this; (void)_this;
|
|
new (&_impl_) Impl_{
|
|
decltype(_impl_.schema_){from._impl_.schema_}
|
|
, decltype(_impl_.rows_){from._impl_.rows_}
|
|
, /*decltype(_impl_._cached_size_)*/{}};
|
|
|
|
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
|
|
// @@protoc_insertion_point(copy_constructor:greptime.v1.Rows)
|
|
}
|
|
|
|
inline void Rows::SharedCtor(
|
|
::_pb::Arena* arena, bool is_message_owned) {
|
|
(void)arena;
|
|
(void)is_message_owned;
|
|
new (&_impl_) Impl_{
|
|
decltype(_impl_.schema_){arena}
|
|
, decltype(_impl_.rows_){arena}
|
|
, /*decltype(_impl_._cached_size_)*/{}
|
|
};
|
|
}
|
|
|
|
Rows::~Rows() {
|
|
// @@protoc_insertion_point(destructor:greptime.v1.Rows)
|
|
if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
|
|
(void)arena;
|
|
return;
|
|
}
|
|
SharedDtor();
|
|
}
|
|
|
|
inline void Rows::SharedDtor() {
|
|
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
|
|
_impl_.schema_.~RepeatedPtrField();
|
|
_impl_.rows_.~RepeatedPtrField();
|
|
}
|
|
|
|
void Rows::SetCachedSize(int size) const {
|
|
_impl_._cached_size_.Set(size);
|
|
}
|
|
|
|
void Rows::Clear() {
|
|
// @@protoc_insertion_point(message_clear_start:greptime.v1.Rows)
|
|
uint32_t cached_has_bits = 0;
|
|
// Prevent compiler warnings about cached_has_bits being unused
|
|
(void) cached_has_bits;
|
|
|
|
_impl_.schema_.Clear();
|
|
_impl_.rows_.Clear();
|
|
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
|
|
}
|
|
|
|
const char* Rows::_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) {
|
|
// repeated .greptime.v1.ColumnSchema schema = 1;
|
|
case 1:
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
|
|
ptr -= 1;
|
|
do {
|
|
ptr += 1;
|
|
ptr = ctx->ParseMessage(_internal_add_schema(), ptr);
|
|
CHK_(ptr);
|
|
if (!ctx->DataAvailable(ptr)) break;
|
|
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
|
|
} else
|
|
goto handle_unusual;
|
|
continue;
|
|
// repeated .greptime.v1.Row rows = 2;
|
|
case 2:
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
|
|
ptr -= 1;
|
|
do {
|
|
ptr += 1;
|
|
ptr = ctx->ParseMessage(_internal_add_rows(), ptr);
|
|
CHK_(ptr);
|
|
if (!ctx->DataAvailable(ptr)) break;
|
|
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr));
|
|
} else
|
|
goto handle_unusual;
|
|
continue;
|
|
default:
|
|
goto handle_unusual;
|
|
} // switch
|
|
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* Rows::_InternalSerialize(
|
|
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
|
|
// @@protoc_insertion_point(serialize_to_array_start:greptime.v1.Rows)
|
|
uint32_t cached_has_bits = 0;
|
|
(void) cached_has_bits;
|
|
|
|
// repeated .greptime.v1.ColumnSchema schema = 1;
|
|
for (unsigned i = 0,
|
|
n = static_cast<unsigned>(this->_internal_schema_size()); i < n; i++) {
|
|
const auto& repfield = this->_internal_schema(i);
|
|
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
|
|
InternalWriteMessage(1, repfield, repfield.GetCachedSize(), target, stream);
|
|
}
|
|
|
|
// repeated .greptime.v1.Row rows = 2;
|
|
for (unsigned i = 0,
|
|
n = static_cast<unsigned>(this->_internal_rows_size()); i < n; i++) {
|
|
const auto& repfield = this->_internal_rows(i);
|
|
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
|
|
InternalWriteMessage(2, repfield, repfield.GetCachedSize(), target, stream);
|
|
}
|
|
|
|
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
|
|
target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
|
|
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
|
|
}
|
|
// @@protoc_insertion_point(serialize_to_array_end:greptime.v1.Rows)
|
|
return target;
|
|
}
|
|
|
|
size_t Rows::ByteSizeLong() const {
|
|
// @@protoc_insertion_point(message_byte_size_start:greptime.v1.Rows)
|
|
size_t total_size = 0;
|
|
|
|
uint32_t cached_has_bits = 0;
|
|
// Prevent compiler warnings about cached_has_bits being unused
|
|
(void) cached_has_bits;
|
|
|
|
// repeated .greptime.v1.ColumnSchema schema = 1;
|
|
total_size += 1UL * this->_internal_schema_size();
|
|
for (const auto& msg : this->_impl_.schema_) {
|
|
total_size +=
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
|
|
}
|
|
|
|
// repeated .greptime.v1.Row rows = 2;
|
|
total_size += 1UL * this->_internal_rows_size();
|
|
for (const auto& msg : this->_impl_.rows_) {
|
|
total_size +=
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
|
|
}
|
|
|
|
return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
|
|
}
|
|
|
|
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData Rows::_class_data_ = {
|
|
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
|
|
Rows::MergeImpl
|
|
};
|
|
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*Rows::GetClassData() const { return &_class_data_; }
|
|
|
|
|
|
void Rows::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
|
|
auto* const _this = static_cast<Rows*>(&to_msg);
|
|
auto& from = static_cast<const Rows&>(from_msg);
|
|
// @@protoc_insertion_point(class_specific_merge_from_start:greptime.v1.Rows)
|
|
GOOGLE_DCHECK_NE(&from, _this);
|
|
uint32_t cached_has_bits = 0;
|
|
(void) cached_has_bits;
|
|
|
|
_this->_impl_.schema_.MergeFrom(from._impl_.schema_);
|
|
_this->_impl_.rows_.MergeFrom(from._impl_.rows_);
|
|
_this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
|
|
}
|
|
|
|
void Rows::CopyFrom(const Rows& from) {
|
|
// @@protoc_insertion_point(class_specific_copy_from_start:greptime.v1.Rows)
|
|
if (&from == this) return;
|
|
Clear();
|
|
MergeFrom(from);
|
|
}
|
|
|
|
bool Rows::IsInitialized() const {
|
|
return true;
|
|
}
|
|
|
|
void Rows::InternalSwap(Rows* other) {
|
|
using std::swap;
|
|
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
|
|
_impl_.schema_.InternalSwap(&other->_impl_.schema_);
|
|
_impl_.rows_.InternalSwap(&other->_impl_.rows_);
|
|
}
|
|
|
|
::PROTOBUF_NAMESPACE_ID::Metadata Rows::GetMetadata() const {
|
|
return ::_pbi::AssignDescriptors(
|
|
&descriptor_table_greptime_2fv1_2frow_2eproto_getter, &descriptor_table_greptime_2fv1_2frow_2eproto_once,
|
|
file_level_metadata_greptime_2fv1_2frow_2eproto[0]);
|
|
}
|
|
|
|
// ===================================================================
|
|
|
|
class ColumnSchema::_Internal {
|
|
public:
|
|
};
|
|
|
|
ColumnSchema::ColumnSchema(::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.ColumnSchema)
|
|
}
|
|
ColumnSchema::ColumnSchema(const ColumnSchema& from)
|
|
: ::PROTOBUF_NAMESPACE_ID::Message() {
|
|
ColumnSchema* const _this = this; (void)_this;
|
|
new (&_impl_) Impl_{
|
|
decltype(_impl_.column_name_){}
|
|
, decltype(_impl_.datatype_){}
|
|
, decltype(_impl_.semantic_type_){}
|
|
, /*decltype(_impl_._cached_size_)*/{}};
|
|
|
|
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
|
|
_impl_.column_name_.InitDefault();
|
|
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
|
_impl_.column_name_.Set("", GetArenaForAllocation());
|
|
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
|
if (!from._internal_column_name().empty()) {
|
|
_this->_impl_.column_name_.Set(from._internal_column_name(),
|
|
_this->GetArenaForAllocation());
|
|
}
|
|
::memcpy(&_impl_.datatype_, &from._impl_.datatype_,
|
|
static_cast<size_t>(reinterpret_cast<char*>(&_impl_.semantic_type_) -
|
|
reinterpret_cast<char*>(&_impl_.datatype_)) + sizeof(_impl_.semantic_type_));
|
|
// @@protoc_insertion_point(copy_constructor:greptime.v1.ColumnSchema)
|
|
}
|
|
|
|
inline void ColumnSchema::SharedCtor(
|
|
::_pb::Arena* arena, bool is_message_owned) {
|
|
(void)arena;
|
|
(void)is_message_owned;
|
|
new (&_impl_) Impl_{
|
|
decltype(_impl_.column_name_){}
|
|
, decltype(_impl_.datatype_){0}
|
|
, decltype(_impl_.semantic_type_){0}
|
|
, /*decltype(_impl_._cached_size_)*/{}
|
|
};
|
|
_impl_.column_name_.InitDefault();
|
|
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
|
_impl_.column_name_.Set("", GetArenaForAllocation());
|
|
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
|
}
|
|
|
|
ColumnSchema::~ColumnSchema() {
|
|
// @@protoc_insertion_point(destructor:greptime.v1.ColumnSchema)
|
|
if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
|
|
(void)arena;
|
|
return;
|
|
}
|
|
SharedDtor();
|
|
}
|
|
|
|
inline void ColumnSchema::SharedDtor() {
|
|
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
|
|
_impl_.column_name_.Destroy();
|
|
}
|
|
|
|
void ColumnSchema::SetCachedSize(int size) const {
|
|
_impl_._cached_size_.Set(size);
|
|
}
|
|
|
|
void ColumnSchema::Clear() {
|
|
// @@protoc_insertion_point(message_clear_start:greptime.v1.ColumnSchema)
|
|
uint32_t cached_has_bits = 0;
|
|
// Prevent compiler warnings about cached_has_bits being unused
|
|
(void) cached_has_bits;
|
|
|
|
_impl_.column_name_.ClearToEmpty();
|
|
::memset(&_impl_.datatype_, 0, static_cast<size_t>(
|
|
reinterpret_cast<char*>(&_impl_.semantic_type_) -
|
|
reinterpret_cast<char*>(&_impl_.datatype_)) + sizeof(_impl_.semantic_type_));
|
|
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
|
|
}
|
|
|
|
const char* ColumnSchema::_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) {
|
|
// string column_name = 1;
|
|
case 1:
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
|
|
auto str = _internal_mutable_column_name();
|
|
ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
|
|
CHK_(ptr);
|
|
CHK_(::_pbi::VerifyUTF8(str, "greptime.v1.ColumnSchema.column_name"));
|
|
} else
|
|
goto handle_unusual;
|
|
continue;
|
|
// .greptime.v1.ColumnDataType datatype = 2;
|
|
case 2:
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
|
|
uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
|
|
CHK_(ptr);
|
|
_internal_set_datatype(static_cast<::greptime::v1::ColumnDataType>(val));
|
|
} else
|
|
goto handle_unusual;
|
|
continue;
|
|
// .greptime.v1.SemanticType semantic_type = 3;
|
|
case 3:
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
|
|
uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
|
|
CHK_(ptr);
|
|
_internal_set_semantic_type(static_cast<::greptime::v1::SemanticType>(val));
|
|
} 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* ColumnSchema::_InternalSerialize(
|
|
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
|
|
// @@protoc_insertion_point(serialize_to_array_start:greptime.v1.ColumnSchema)
|
|
uint32_t cached_has_bits = 0;
|
|
(void) cached_has_bits;
|
|
|
|
// string column_name = 1;
|
|
if (!this->_internal_column_name().empty()) {
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
|
|
this->_internal_column_name().data(), static_cast<int>(this->_internal_column_name().length()),
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
|
|
"greptime.v1.ColumnSchema.column_name");
|
|
target = stream->WriteStringMaybeAliased(
|
|
1, this->_internal_column_name(), target);
|
|
}
|
|
|
|
// .greptime.v1.ColumnDataType datatype = 2;
|
|
if (this->_internal_datatype() != 0) {
|
|
target = stream->EnsureSpace(target);
|
|
target = ::_pbi::WireFormatLite::WriteEnumToArray(
|
|
2, this->_internal_datatype(), target);
|
|
}
|
|
|
|
// .greptime.v1.SemanticType semantic_type = 3;
|
|
if (this->_internal_semantic_type() != 0) {
|
|
target = stream->EnsureSpace(target);
|
|
target = ::_pbi::WireFormatLite::WriteEnumToArray(
|
|
3, this->_internal_semantic_type(), 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.ColumnSchema)
|
|
return target;
|
|
}
|
|
|
|
size_t ColumnSchema::ByteSizeLong() const {
|
|
// @@protoc_insertion_point(message_byte_size_start:greptime.v1.ColumnSchema)
|
|
size_t total_size = 0;
|
|
|
|
uint32_t cached_has_bits = 0;
|
|
// Prevent compiler warnings about cached_has_bits being unused
|
|
(void) cached_has_bits;
|
|
|
|
// string column_name = 1;
|
|
if (!this->_internal_column_name().empty()) {
|
|
total_size += 1 +
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
|
|
this->_internal_column_name());
|
|
}
|
|
|
|
// .greptime.v1.ColumnDataType datatype = 2;
|
|
if (this->_internal_datatype() != 0) {
|
|
total_size += 1 +
|
|
::_pbi::WireFormatLite::EnumSize(this->_internal_datatype());
|
|
}
|
|
|
|
// .greptime.v1.SemanticType semantic_type = 3;
|
|
if (this->_internal_semantic_type() != 0) {
|
|
total_size += 1 +
|
|
::_pbi::WireFormatLite::EnumSize(this->_internal_semantic_type());
|
|
}
|
|
|
|
return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
|
|
}
|
|
|
|
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ColumnSchema::_class_data_ = {
|
|
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
|
|
ColumnSchema::MergeImpl
|
|
};
|
|
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ColumnSchema::GetClassData() const { return &_class_data_; }
|
|
|
|
|
|
void ColumnSchema::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
|
|
auto* const _this = static_cast<ColumnSchema*>(&to_msg);
|
|
auto& from = static_cast<const ColumnSchema&>(from_msg);
|
|
// @@protoc_insertion_point(class_specific_merge_from_start:greptime.v1.ColumnSchema)
|
|
GOOGLE_DCHECK_NE(&from, _this);
|
|
uint32_t cached_has_bits = 0;
|
|
(void) cached_has_bits;
|
|
|
|
if (!from._internal_column_name().empty()) {
|
|
_this->_internal_set_column_name(from._internal_column_name());
|
|
}
|
|
if (from._internal_datatype() != 0) {
|
|
_this->_internal_set_datatype(from._internal_datatype());
|
|
}
|
|
if (from._internal_semantic_type() != 0) {
|
|
_this->_internal_set_semantic_type(from._internal_semantic_type());
|
|
}
|
|
_this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
|
|
}
|
|
|
|
void ColumnSchema::CopyFrom(const ColumnSchema& from) {
|
|
// @@protoc_insertion_point(class_specific_copy_from_start:greptime.v1.ColumnSchema)
|
|
if (&from == this) return;
|
|
Clear();
|
|
MergeFrom(from);
|
|
}
|
|
|
|
bool ColumnSchema::IsInitialized() const {
|
|
return true;
|
|
}
|
|
|
|
void ColumnSchema::InternalSwap(ColumnSchema* other) {
|
|
using std::swap;
|
|
auto* lhs_arena = GetArenaForAllocation();
|
|
auto* rhs_arena = other->GetArenaForAllocation();
|
|
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
|
|
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
|
|
&_impl_.column_name_, lhs_arena,
|
|
&other->_impl_.column_name_, rhs_arena
|
|
);
|
|
::PROTOBUF_NAMESPACE_ID::internal::memswap<
|
|
PROTOBUF_FIELD_OFFSET(ColumnSchema, _impl_.semantic_type_)
|
|
+ sizeof(ColumnSchema::_impl_.semantic_type_)
|
|
- PROTOBUF_FIELD_OFFSET(ColumnSchema, _impl_.datatype_)>(
|
|
reinterpret_cast<char*>(&_impl_.datatype_),
|
|
reinterpret_cast<char*>(&other->_impl_.datatype_));
|
|
}
|
|
|
|
::PROTOBUF_NAMESPACE_ID::Metadata ColumnSchema::GetMetadata() const {
|
|
return ::_pbi::AssignDescriptors(
|
|
&descriptor_table_greptime_2fv1_2frow_2eproto_getter, &descriptor_table_greptime_2fv1_2frow_2eproto_once,
|
|
file_level_metadata_greptime_2fv1_2frow_2eproto[1]);
|
|
}
|
|
|
|
// ===================================================================
|
|
|
|
class Row::_Internal {
|
|
public:
|
|
};
|
|
|
|
Row::Row(::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.Row)
|
|
}
|
|
Row::Row(const Row& from)
|
|
: ::PROTOBUF_NAMESPACE_ID::Message() {
|
|
Row* const _this = this; (void)_this;
|
|
new (&_impl_) Impl_{
|
|
decltype(_impl_.values_){from._impl_.values_}
|
|
, /*decltype(_impl_._cached_size_)*/{}};
|
|
|
|
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
|
|
// @@protoc_insertion_point(copy_constructor:greptime.v1.Row)
|
|
}
|
|
|
|
inline void Row::SharedCtor(
|
|
::_pb::Arena* arena, bool is_message_owned) {
|
|
(void)arena;
|
|
(void)is_message_owned;
|
|
new (&_impl_) Impl_{
|
|
decltype(_impl_.values_){arena}
|
|
, /*decltype(_impl_._cached_size_)*/{}
|
|
};
|
|
}
|
|
|
|
Row::~Row() {
|
|
// @@protoc_insertion_point(destructor:greptime.v1.Row)
|
|
if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
|
|
(void)arena;
|
|
return;
|
|
}
|
|
SharedDtor();
|
|
}
|
|
|
|
inline void Row::SharedDtor() {
|
|
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
|
|
_impl_.values_.~RepeatedPtrField();
|
|
}
|
|
|
|
void Row::SetCachedSize(int size) const {
|
|
_impl_._cached_size_.Set(size);
|
|
}
|
|
|
|
void Row::Clear() {
|
|
// @@protoc_insertion_point(message_clear_start:greptime.v1.Row)
|
|
uint32_t cached_has_bits = 0;
|
|
// Prevent compiler warnings about cached_has_bits being unused
|
|
(void) cached_has_bits;
|
|
|
|
_impl_.values_.Clear();
|
|
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
|
|
}
|
|
|
|
const char* Row::_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) {
|
|
// repeated .greptime.v1.Value values = 1;
|
|
case 1:
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
|
|
ptr -= 1;
|
|
do {
|
|
ptr += 1;
|
|
ptr = ctx->ParseMessage(_internal_add_values(), ptr);
|
|
CHK_(ptr);
|
|
if (!ctx->DataAvailable(ptr)) break;
|
|
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(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* Row::_InternalSerialize(
|
|
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
|
|
// @@protoc_insertion_point(serialize_to_array_start:greptime.v1.Row)
|
|
uint32_t cached_has_bits = 0;
|
|
(void) cached_has_bits;
|
|
|
|
// repeated .greptime.v1.Value values = 1;
|
|
for (unsigned i = 0,
|
|
n = static_cast<unsigned>(this->_internal_values_size()); i < n; i++) {
|
|
const auto& repfield = this->_internal_values(i);
|
|
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
|
|
InternalWriteMessage(1, 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);
|
|
}
|
|
// @@protoc_insertion_point(serialize_to_array_end:greptime.v1.Row)
|
|
return target;
|
|
}
|
|
|
|
size_t Row::ByteSizeLong() const {
|
|
// @@protoc_insertion_point(message_byte_size_start:greptime.v1.Row)
|
|
size_t total_size = 0;
|
|
|
|
uint32_t cached_has_bits = 0;
|
|
// Prevent compiler warnings about cached_has_bits being unused
|
|
(void) cached_has_bits;
|
|
|
|
// repeated .greptime.v1.Value values = 1;
|
|
total_size += 1UL * this->_internal_values_size();
|
|
for (const auto& msg : this->_impl_.values_) {
|
|
total_size +=
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
|
|
}
|
|
|
|
return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
|
|
}
|
|
|
|
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData Row::_class_data_ = {
|
|
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
|
|
Row::MergeImpl
|
|
};
|
|
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*Row::GetClassData() const { return &_class_data_; }
|
|
|
|
|
|
void Row::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
|
|
auto* const _this = static_cast<Row*>(&to_msg);
|
|
auto& from = static_cast<const Row&>(from_msg);
|
|
// @@protoc_insertion_point(class_specific_merge_from_start:greptime.v1.Row)
|
|
GOOGLE_DCHECK_NE(&from, _this);
|
|
uint32_t cached_has_bits = 0;
|
|
(void) cached_has_bits;
|
|
|
|
_this->_impl_.values_.MergeFrom(from._impl_.values_);
|
|
_this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
|
|
}
|
|
|
|
void Row::CopyFrom(const Row& from) {
|
|
// @@protoc_insertion_point(class_specific_copy_from_start:greptime.v1.Row)
|
|
if (&from == this) return;
|
|
Clear();
|
|
MergeFrom(from);
|
|
}
|
|
|
|
bool Row::IsInitialized() const {
|
|
return true;
|
|
}
|
|
|
|
void Row::InternalSwap(Row* other) {
|
|
using std::swap;
|
|
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
|
|
_impl_.values_.InternalSwap(&other->_impl_.values_);
|
|
}
|
|
|
|
::PROTOBUF_NAMESPACE_ID::Metadata Row::GetMetadata() const {
|
|
return ::_pbi::AssignDescriptors(
|
|
&descriptor_table_greptime_2fv1_2frow_2eproto_getter, &descriptor_table_greptime_2fv1_2frow_2eproto_once,
|
|
file_level_metadata_greptime_2fv1_2frow_2eproto[2]);
|
|
}
|
|
|
|
// ===================================================================
|
|
|
|
class Value::_Internal {
|
|
public:
|
|
};
|
|
|
|
Value::Value(::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.Value)
|
|
}
|
|
Value::Value(const Value& from)
|
|
: ::PROTOBUF_NAMESPACE_ID::Message() {
|
|
Value* const _this = this; (void)_this;
|
|
new (&_impl_) Impl_{
|
|
decltype(_impl_.value_data_){}
|
|
, /*decltype(_impl_._cached_size_)*/{}
|
|
, /*decltype(_impl_._oneof_case_)*/{}};
|
|
|
|
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
|
|
clear_has_value_data();
|
|
switch (from.value_data_case()) {
|
|
case kI8Value: {
|
|
_this->_internal_set_i8_value(from._internal_i8_value());
|
|
break;
|
|
}
|
|
case kI16Value: {
|
|
_this->_internal_set_i16_value(from._internal_i16_value());
|
|
break;
|
|
}
|
|
case kI32Value: {
|
|
_this->_internal_set_i32_value(from._internal_i32_value());
|
|
break;
|
|
}
|
|
case kI64Value: {
|
|
_this->_internal_set_i64_value(from._internal_i64_value());
|
|
break;
|
|
}
|
|
case kU8Value: {
|
|
_this->_internal_set_u8_value(from._internal_u8_value());
|
|
break;
|
|
}
|
|
case kU16Value: {
|
|
_this->_internal_set_u16_value(from._internal_u16_value());
|
|
break;
|
|
}
|
|
case kU32Value: {
|
|
_this->_internal_set_u32_value(from._internal_u32_value());
|
|
break;
|
|
}
|
|
case kU64Value: {
|
|
_this->_internal_set_u64_value(from._internal_u64_value());
|
|
break;
|
|
}
|
|
case kF32Value: {
|
|
_this->_internal_set_f32_value(from._internal_f32_value());
|
|
break;
|
|
}
|
|
case kF64Value: {
|
|
_this->_internal_set_f64_value(from._internal_f64_value());
|
|
break;
|
|
}
|
|
case kBoolValue: {
|
|
_this->_internal_set_bool_value(from._internal_bool_value());
|
|
break;
|
|
}
|
|
case kBinaryValue: {
|
|
_this->_internal_set_binary_value(from._internal_binary_value());
|
|
break;
|
|
}
|
|
case kStringValue: {
|
|
_this->_internal_set_string_value(from._internal_string_value());
|
|
break;
|
|
}
|
|
case kDateValue: {
|
|
_this->_internal_set_date_value(from._internal_date_value());
|
|
break;
|
|
}
|
|
case kDatetimeValue: {
|
|
_this->_internal_set_datetime_value(from._internal_datetime_value());
|
|
break;
|
|
}
|
|
case kTsSecondValue: {
|
|
_this->_internal_set_ts_second_value(from._internal_ts_second_value());
|
|
break;
|
|
}
|
|
case kTsMillisecondValue: {
|
|
_this->_internal_set_ts_millisecond_value(from._internal_ts_millisecond_value());
|
|
break;
|
|
}
|
|
case kTsMicrosecondValue: {
|
|
_this->_internal_set_ts_microsecond_value(from._internal_ts_microsecond_value());
|
|
break;
|
|
}
|
|
case kTsNanosecondValue: {
|
|
_this->_internal_set_ts_nanosecond_value(from._internal_ts_nanosecond_value());
|
|
break;
|
|
}
|
|
case kTimeSecondValue: {
|
|
_this->_internal_set_time_second_value(from._internal_time_second_value());
|
|
break;
|
|
}
|
|
case kTimeMillisecondValue: {
|
|
_this->_internal_set_time_millisecond_value(from._internal_time_millisecond_value());
|
|
break;
|
|
}
|
|
case kTimeMicrosecondValue: {
|
|
_this->_internal_set_time_microsecond_value(from._internal_time_microsecond_value());
|
|
break;
|
|
}
|
|
case kTimeNanosecondValue: {
|
|
_this->_internal_set_time_nanosecond_value(from._internal_time_nanosecond_value());
|
|
break;
|
|
}
|
|
case VALUE_DATA_NOT_SET: {
|
|
break;
|
|
}
|
|
}
|
|
// @@protoc_insertion_point(copy_constructor:greptime.v1.Value)
|
|
}
|
|
|
|
inline void Value::SharedCtor(
|
|
::_pb::Arena* arena, bool is_message_owned) {
|
|
(void)arena;
|
|
(void)is_message_owned;
|
|
new (&_impl_) Impl_{
|
|
decltype(_impl_.value_data_){}
|
|
, /*decltype(_impl_._cached_size_)*/{}
|
|
, /*decltype(_impl_._oneof_case_)*/{}
|
|
};
|
|
clear_has_value_data();
|
|
}
|
|
|
|
Value::~Value() {
|
|
// @@protoc_insertion_point(destructor:greptime.v1.Value)
|
|
if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
|
|
(void)arena;
|
|
return;
|
|
}
|
|
SharedDtor();
|
|
}
|
|
|
|
inline void Value::SharedDtor() {
|
|
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
|
|
if (has_value_data()) {
|
|
clear_value_data();
|
|
}
|
|
}
|
|
|
|
void Value::SetCachedSize(int size) const {
|
|
_impl_._cached_size_.Set(size);
|
|
}
|
|
|
|
void Value::clear_value_data() {
|
|
// @@protoc_insertion_point(one_of_clear_start:greptime.v1.Value)
|
|
switch (value_data_case()) {
|
|
case kI8Value: {
|
|
// No need to clear
|
|
break;
|
|
}
|
|
case kI16Value: {
|
|
// No need to clear
|
|
break;
|
|
}
|
|
case kI32Value: {
|
|
// No need to clear
|
|
break;
|
|
}
|
|
case kI64Value: {
|
|
// No need to clear
|
|
break;
|
|
}
|
|
case kU8Value: {
|
|
// No need to clear
|
|
break;
|
|
}
|
|
case kU16Value: {
|
|
// No need to clear
|
|
break;
|
|
}
|
|
case kU32Value: {
|
|
// No need to clear
|
|
break;
|
|
}
|
|
case kU64Value: {
|
|
// No need to clear
|
|
break;
|
|
}
|
|
case kF32Value: {
|
|
// No need to clear
|
|
break;
|
|
}
|
|
case kF64Value: {
|
|
// No need to clear
|
|
break;
|
|
}
|
|
case kBoolValue: {
|
|
// No need to clear
|
|
break;
|
|
}
|
|
case kBinaryValue: {
|
|
_impl_.value_data_.binary_value_.Destroy();
|
|
break;
|
|
}
|
|
case kStringValue: {
|
|
_impl_.value_data_.string_value_.Destroy();
|
|
break;
|
|
}
|
|
case kDateValue: {
|
|
// No need to clear
|
|
break;
|
|
}
|
|
case kDatetimeValue: {
|
|
// No need to clear
|
|
break;
|
|
}
|
|
case kTsSecondValue: {
|
|
// No need to clear
|
|
break;
|
|
}
|
|
case kTsMillisecondValue: {
|
|
// No need to clear
|
|
break;
|
|
}
|
|
case kTsMicrosecondValue: {
|
|
// No need to clear
|
|
break;
|
|
}
|
|
case kTsNanosecondValue: {
|
|
// No need to clear
|
|
break;
|
|
}
|
|
case kTimeSecondValue: {
|
|
// No need to clear
|
|
break;
|
|
}
|
|
case kTimeMillisecondValue: {
|
|
// No need to clear
|
|
break;
|
|
}
|
|
case kTimeMicrosecondValue: {
|
|
// No need to clear
|
|
break;
|
|
}
|
|
case kTimeNanosecondValue: {
|
|
// No need to clear
|
|
break;
|
|
}
|
|
case VALUE_DATA_NOT_SET: {
|
|
break;
|
|
}
|
|
}
|
|
_impl_._oneof_case_[0] = VALUE_DATA_NOT_SET;
|
|
}
|
|
|
|
|
|
void Value::Clear() {
|
|
// @@protoc_insertion_point(message_clear_start:greptime.v1.Value)
|
|
uint32_t cached_has_bits = 0;
|
|
// Prevent compiler warnings about cached_has_bits being unused
|
|
(void) cached_has_bits;
|
|
|
|
clear_value_data();
|
|
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
|
|
}
|
|
|
|
const char* Value::_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 i8_value = 1;
|
|
case 1:
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
|
|
_internal_set_i8_value(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
|
|
CHK_(ptr);
|
|
} else
|
|
goto handle_unusual;
|
|
continue;
|
|
// int32 i16_value = 2;
|
|
case 2:
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
|
|
_internal_set_i16_value(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
|
|
CHK_(ptr);
|
|
} else
|
|
goto handle_unusual;
|
|
continue;
|
|
// int32 i32_value = 3;
|
|
case 3:
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
|
|
_internal_set_i32_value(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
|
|
CHK_(ptr);
|
|
} else
|
|
goto handle_unusual;
|
|
continue;
|
|
// int64 i64_value = 4;
|
|
case 4:
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
|
|
_internal_set_i64_value(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr));
|
|
CHK_(ptr);
|
|
} else
|
|
goto handle_unusual;
|
|
continue;
|
|
// uint32 u8_value = 5;
|
|
case 5:
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 40)) {
|
|
_internal_set_u8_value(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
|
|
CHK_(ptr);
|
|
} else
|
|
goto handle_unusual;
|
|
continue;
|
|
// uint32 u16_value = 6;
|
|
case 6:
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 48)) {
|
|
_internal_set_u16_value(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
|
|
CHK_(ptr);
|
|
} else
|
|
goto handle_unusual;
|
|
continue;
|
|
// uint32 u32_value = 7;
|
|
case 7:
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 56)) {
|
|
_internal_set_u32_value(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
|
|
CHK_(ptr);
|
|
} else
|
|
goto handle_unusual;
|
|
continue;
|
|
// uint64 u64_value = 8;
|
|
case 8:
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 64)) {
|
|
_internal_set_u64_value(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr));
|
|
CHK_(ptr);
|
|
} else
|
|
goto handle_unusual;
|
|
continue;
|
|
// float f32_value = 9;
|
|
case 9:
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 77)) {
|
|
_internal_set_f32_value(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr));
|
|
ptr += sizeof(float);
|
|
} else
|
|
goto handle_unusual;
|
|
continue;
|
|
// double f64_value = 10;
|
|
case 10:
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 81)) {
|
|
_internal_set_f64_value(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr));
|
|
ptr += sizeof(double);
|
|
} else
|
|
goto handle_unusual;
|
|
continue;
|
|
// bool bool_value = 11;
|
|
case 11:
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 88)) {
|
|
_internal_set_bool_value(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr));
|
|
CHK_(ptr);
|
|
} else
|
|
goto handle_unusual;
|
|
continue;
|
|
// bytes binary_value = 12;
|
|
case 12:
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 98)) {
|
|
auto str = _internal_mutable_binary_value();
|
|
ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
|
|
CHK_(ptr);
|
|
} else
|
|
goto handle_unusual;
|
|
continue;
|
|
// string string_value = 13;
|
|
case 13:
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 106)) {
|
|
auto str = _internal_mutable_string_value();
|
|
ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
|
|
CHK_(ptr);
|
|
CHK_(::_pbi::VerifyUTF8(str, "greptime.v1.Value.string_value"));
|
|
} else
|
|
goto handle_unusual;
|
|
continue;
|
|
// int32 date_value = 14;
|
|
case 14:
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 112)) {
|
|
_internal_set_date_value(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
|
|
CHK_(ptr);
|
|
} else
|
|
goto handle_unusual;
|
|
continue;
|
|
// int64 datetime_value = 15;
|
|
case 15:
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 120)) {
|
|
_internal_set_datetime_value(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr));
|
|
CHK_(ptr);
|
|
} else
|
|
goto handle_unusual;
|
|
continue;
|
|
// int64 ts_second_value = 16;
|
|
case 16:
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 128)) {
|
|
_internal_set_ts_second_value(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr));
|
|
CHK_(ptr);
|
|
} else
|
|
goto handle_unusual;
|
|
continue;
|
|
// int64 ts_millisecond_value = 17;
|
|
case 17:
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 136)) {
|
|
_internal_set_ts_millisecond_value(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr));
|
|
CHK_(ptr);
|
|
} else
|
|
goto handle_unusual;
|
|
continue;
|
|
// int64 ts_microsecond_value = 18;
|
|
case 18:
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 144)) {
|
|
_internal_set_ts_microsecond_value(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr));
|
|
CHK_(ptr);
|
|
} else
|
|
goto handle_unusual;
|
|
continue;
|
|
// int64 ts_nanosecond_value = 19;
|
|
case 19:
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 152)) {
|
|
_internal_set_ts_nanosecond_value(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr));
|
|
CHK_(ptr);
|
|
} else
|
|
goto handle_unusual;
|
|
continue;
|
|
// int64 time_second_value = 20;
|
|
case 20:
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 160)) {
|
|
_internal_set_time_second_value(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr));
|
|
CHK_(ptr);
|
|
} else
|
|
goto handle_unusual;
|
|
continue;
|
|
// int64 time_millisecond_value = 21;
|
|
case 21:
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 168)) {
|
|
_internal_set_time_millisecond_value(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr));
|
|
CHK_(ptr);
|
|
} else
|
|
goto handle_unusual;
|
|
continue;
|
|
// int64 time_microsecond_value = 22;
|
|
case 22:
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 176)) {
|
|
_internal_set_time_microsecond_value(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr));
|
|
CHK_(ptr);
|
|
} else
|
|
goto handle_unusual;
|
|
continue;
|
|
// int64 time_nanosecond_value = 23;
|
|
case 23:
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 184)) {
|
|
_internal_set_time_nanosecond_value(::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* Value::_InternalSerialize(
|
|
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
|
|
// @@protoc_insertion_point(serialize_to_array_start:greptime.v1.Value)
|
|
uint32_t cached_has_bits = 0;
|
|
(void) cached_has_bits;
|
|
|
|
// int32 i8_value = 1;
|
|
if (_internal_has_i8_value()) {
|
|
target = stream->EnsureSpace(target);
|
|
target = ::_pbi::WireFormatLite::WriteInt32ToArray(1, this->_internal_i8_value(), target);
|
|
}
|
|
|
|
// int32 i16_value = 2;
|
|
if (_internal_has_i16_value()) {
|
|
target = stream->EnsureSpace(target);
|
|
target = ::_pbi::WireFormatLite::WriteInt32ToArray(2, this->_internal_i16_value(), target);
|
|
}
|
|
|
|
// int32 i32_value = 3;
|
|
if (_internal_has_i32_value()) {
|
|
target = stream->EnsureSpace(target);
|
|
target = ::_pbi::WireFormatLite::WriteInt32ToArray(3, this->_internal_i32_value(), target);
|
|
}
|
|
|
|
// int64 i64_value = 4;
|
|
if (_internal_has_i64_value()) {
|
|
target = stream->EnsureSpace(target);
|
|
target = ::_pbi::WireFormatLite::WriteInt64ToArray(4, this->_internal_i64_value(), target);
|
|
}
|
|
|
|
// uint32 u8_value = 5;
|
|
if (_internal_has_u8_value()) {
|
|
target = stream->EnsureSpace(target);
|
|
target = ::_pbi::WireFormatLite::WriteUInt32ToArray(5, this->_internal_u8_value(), target);
|
|
}
|
|
|
|
// uint32 u16_value = 6;
|
|
if (_internal_has_u16_value()) {
|
|
target = stream->EnsureSpace(target);
|
|
target = ::_pbi::WireFormatLite::WriteUInt32ToArray(6, this->_internal_u16_value(), target);
|
|
}
|
|
|
|
// uint32 u32_value = 7;
|
|
if (_internal_has_u32_value()) {
|
|
target = stream->EnsureSpace(target);
|
|
target = ::_pbi::WireFormatLite::WriteUInt32ToArray(7, this->_internal_u32_value(), target);
|
|
}
|
|
|
|
// uint64 u64_value = 8;
|
|
if (_internal_has_u64_value()) {
|
|
target = stream->EnsureSpace(target);
|
|
target = ::_pbi::WireFormatLite::WriteUInt64ToArray(8, this->_internal_u64_value(), target);
|
|
}
|
|
|
|
// float f32_value = 9;
|
|
if (_internal_has_f32_value()) {
|
|
target = stream->EnsureSpace(target);
|
|
target = ::_pbi::WireFormatLite::WriteFloatToArray(9, this->_internal_f32_value(), target);
|
|
}
|
|
|
|
// double f64_value = 10;
|
|
if (_internal_has_f64_value()) {
|
|
target = stream->EnsureSpace(target);
|
|
target = ::_pbi::WireFormatLite::WriteDoubleToArray(10, this->_internal_f64_value(), target);
|
|
}
|
|
|
|
// bool bool_value = 11;
|
|
if (_internal_has_bool_value()) {
|
|
target = stream->EnsureSpace(target);
|
|
target = ::_pbi::WireFormatLite::WriteBoolToArray(11, this->_internal_bool_value(), target);
|
|
}
|
|
|
|
// bytes binary_value = 12;
|
|
if (_internal_has_binary_value()) {
|
|
target = stream->WriteBytesMaybeAliased(
|
|
12, this->_internal_binary_value(), target);
|
|
}
|
|
|
|
// string string_value = 13;
|
|
if (_internal_has_string_value()) {
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
|
|
this->_internal_string_value().data(), static_cast<int>(this->_internal_string_value().length()),
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
|
|
"greptime.v1.Value.string_value");
|
|
target = stream->WriteStringMaybeAliased(
|
|
13, this->_internal_string_value(), target);
|
|
}
|
|
|
|
// int32 date_value = 14;
|
|
if (_internal_has_date_value()) {
|
|
target = stream->EnsureSpace(target);
|
|
target = ::_pbi::WireFormatLite::WriteInt32ToArray(14, this->_internal_date_value(), target);
|
|
}
|
|
|
|
// int64 datetime_value = 15;
|
|
if (_internal_has_datetime_value()) {
|
|
target = stream->EnsureSpace(target);
|
|
target = ::_pbi::WireFormatLite::WriteInt64ToArray(15, this->_internal_datetime_value(), target);
|
|
}
|
|
|
|
// int64 ts_second_value = 16;
|
|
if (_internal_has_ts_second_value()) {
|
|
target = stream->EnsureSpace(target);
|
|
target = ::_pbi::WireFormatLite::WriteInt64ToArray(16, this->_internal_ts_second_value(), target);
|
|
}
|
|
|
|
// int64 ts_millisecond_value = 17;
|
|
if (_internal_has_ts_millisecond_value()) {
|
|
target = stream->EnsureSpace(target);
|
|
target = ::_pbi::WireFormatLite::WriteInt64ToArray(17, this->_internal_ts_millisecond_value(), target);
|
|
}
|
|
|
|
// int64 ts_microsecond_value = 18;
|
|
if (_internal_has_ts_microsecond_value()) {
|
|
target = stream->EnsureSpace(target);
|
|
target = ::_pbi::WireFormatLite::WriteInt64ToArray(18, this->_internal_ts_microsecond_value(), target);
|
|
}
|
|
|
|
// int64 ts_nanosecond_value = 19;
|
|
if (_internal_has_ts_nanosecond_value()) {
|
|
target = stream->EnsureSpace(target);
|
|
target = ::_pbi::WireFormatLite::WriteInt64ToArray(19, this->_internal_ts_nanosecond_value(), target);
|
|
}
|
|
|
|
// int64 time_second_value = 20;
|
|
if (_internal_has_time_second_value()) {
|
|
target = stream->EnsureSpace(target);
|
|
target = ::_pbi::WireFormatLite::WriteInt64ToArray(20, this->_internal_time_second_value(), target);
|
|
}
|
|
|
|
// int64 time_millisecond_value = 21;
|
|
if (_internal_has_time_millisecond_value()) {
|
|
target = stream->EnsureSpace(target);
|
|
target = ::_pbi::WireFormatLite::WriteInt64ToArray(21, this->_internal_time_millisecond_value(), target);
|
|
}
|
|
|
|
// int64 time_microsecond_value = 22;
|
|
if (_internal_has_time_microsecond_value()) {
|
|
target = stream->EnsureSpace(target);
|
|
target = ::_pbi::WireFormatLite::WriteInt64ToArray(22, this->_internal_time_microsecond_value(), target);
|
|
}
|
|
|
|
// int64 time_nanosecond_value = 23;
|
|
if (_internal_has_time_nanosecond_value()) {
|
|
target = stream->EnsureSpace(target);
|
|
target = ::_pbi::WireFormatLite::WriteInt64ToArray(23, this->_internal_time_nanosecond_value(), 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.Value)
|
|
return target;
|
|
}
|
|
|
|
size_t Value::ByteSizeLong() const {
|
|
// @@protoc_insertion_point(message_byte_size_start:greptime.v1.Value)
|
|
size_t total_size = 0;
|
|
|
|
uint32_t cached_has_bits = 0;
|
|
// Prevent compiler warnings about cached_has_bits being unused
|
|
(void) cached_has_bits;
|
|
|
|
switch (value_data_case()) {
|
|
// int32 i8_value = 1;
|
|
case kI8Value: {
|
|
total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_i8_value());
|
|
break;
|
|
}
|
|
// int32 i16_value = 2;
|
|
case kI16Value: {
|
|
total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_i16_value());
|
|
break;
|
|
}
|
|
// int32 i32_value = 3;
|
|
case kI32Value: {
|
|
total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_i32_value());
|
|
break;
|
|
}
|
|
// int64 i64_value = 4;
|
|
case kI64Value: {
|
|
total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_i64_value());
|
|
break;
|
|
}
|
|
// uint32 u8_value = 5;
|
|
case kU8Value: {
|
|
total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_u8_value());
|
|
break;
|
|
}
|
|
// uint32 u16_value = 6;
|
|
case kU16Value: {
|
|
total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_u16_value());
|
|
break;
|
|
}
|
|
// uint32 u32_value = 7;
|
|
case kU32Value: {
|
|
total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_u32_value());
|
|
break;
|
|
}
|
|
// uint64 u64_value = 8;
|
|
case kU64Value: {
|
|
total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_u64_value());
|
|
break;
|
|
}
|
|
// float f32_value = 9;
|
|
case kF32Value: {
|
|
total_size += 1 + 4;
|
|
break;
|
|
}
|
|
// double f64_value = 10;
|
|
case kF64Value: {
|
|
total_size += 1 + 8;
|
|
break;
|
|
}
|
|
// bool bool_value = 11;
|
|
case kBoolValue: {
|
|
total_size += 1 + 1;
|
|
break;
|
|
}
|
|
// bytes binary_value = 12;
|
|
case kBinaryValue: {
|
|
total_size += 1 +
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
|
|
this->_internal_binary_value());
|
|
break;
|
|
}
|
|
// string string_value = 13;
|
|
case kStringValue: {
|
|
total_size += 1 +
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
|
|
this->_internal_string_value());
|
|
break;
|
|
}
|
|
// int32 date_value = 14;
|
|
case kDateValue: {
|
|
total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_date_value());
|
|
break;
|
|
}
|
|
// int64 datetime_value = 15;
|
|
case kDatetimeValue: {
|
|
total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_datetime_value());
|
|
break;
|
|
}
|
|
// int64 ts_second_value = 16;
|
|
case kTsSecondValue: {
|
|
total_size += 2 +
|
|
::_pbi::WireFormatLite::Int64Size(
|
|
this->_internal_ts_second_value());
|
|
break;
|
|
}
|
|
// int64 ts_millisecond_value = 17;
|
|
case kTsMillisecondValue: {
|
|
total_size += 2 +
|
|
::_pbi::WireFormatLite::Int64Size(
|
|
this->_internal_ts_millisecond_value());
|
|
break;
|
|
}
|
|
// int64 ts_microsecond_value = 18;
|
|
case kTsMicrosecondValue: {
|
|
total_size += 2 +
|
|
::_pbi::WireFormatLite::Int64Size(
|
|
this->_internal_ts_microsecond_value());
|
|
break;
|
|
}
|
|
// int64 ts_nanosecond_value = 19;
|
|
case kTsNanosecondValue: {
|
|
total_size += 2 +
|
|
::_pbi::WireFormatLite::Int64Size(
|
|
this->_internal_ts_nanosecond_value());
|
|
break;
|
|
}
|
|
// int64 time_second_value = 20;
|
|
case kTimeSecondValue: {
|
|
total_size += 2 +
|
|
::_pbi::WireFormatLite::Int64Size(
|
|
this->_internal_time_second_value());
|
|
break;
|
|
}
|
|
// int64 time_millisecond_value = 21;
|
|
case kTimeMillisecondValue: {
|
|
total_size += 2 +
|
|
::_pbi::WireFormatLite::Int64Size(
|
|
this->_internal_time_millisecond_value());
|
|
break;
|
|
}
|
|
// int64 time_microsecond_value = 22;
|
|
case kTimeMicrosecondValue: {
|
|
total_size += 2 +
|
|
::_pbi::WireFormatLite::Int64Size(
|
|
this->_internal_time_microsecond_value());
|
|
break;
|
|
}
|
|
// int64 time_nanosecond_value = 23;
|
|
case kTimeNanosecondValue: {
|
|
total_size += 2 +
|
|
::_pbi::WireFormatLite::Int64Size(
|
|
this->_internal_time_nanosecond_value());
|
|
break;
|
|
}
|
|
case VALUE_DATA_NOT_SET: {
|
|
break;
|
|
}
|
|
}
|
|
return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
|
|
}
|
|
|
|
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData Value::_class_data_ = {
|
|
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
|
|
Value::MergeImpl
|
|
};
|
|
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*Value::GetClassData() const { return &_class_data_; }
|
|
|
|
|
|
void Value::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
|
|
auto* const _this = static_cast<Value*>(&to_msg);
|
|
auto& from = static_cast<const Value&>(from_msg);
|
|
// @@protoc_insertion_point(class_specific_merge_from_start:greptime.v1.Value)
|
|
GOOGLE_DCHECK_NE(&from, _this);
|
|
uint32_t cached_has_bits = 0;
|
|
(void) cached_has_bits;
|
|
|
|
switch (from.value_data_case()) {
|
|
case kI8Value: {
|
|
_this->_internal_set_i8_value(from._internal_i8_value());
|
|
break;
|
|
}
|
|
case kI16Value: {
|
|
_this->_internal_set_i16_value(from._internal_i16_value());
|
|
break;
|
|
}
|
|
case kI32Value: {
|
|
_this->_internal_set_i32_value(from._internal_i32_value());
|
|
break;
|
|
}
|
|
case kI64Value: {
|
|
_this->_internal_set_i64_value(from._internal_i64_value());
|
|
break;
|
|
}
|
|
case kU8Value: {
|
|
_this->_internal_set_u8_value(from._internal_u8_value());
|
|
break;
|
|
}
|
|
case kU16Value: {
|
|
_this->_internal_set_u16_value(from._internal_u16_value());
|
|
break;
|
|
}
|
|
case kU32Value: {
|
|
_this->_internal_set_u32_value(from._internal_u32_value());
|
|
break;
|
|
}
|
|
case kU64Value: {
|
|
_this->_internal_set_u64_value(from._internal_u64_value());
|
|
break;
|
|
}
|
|
case kF32Value: {
|
|
_this->_internal_set_f32_value(from._internal_f32_value());
|
|
break;
|
|
}
|
|
case kF64Value: {
|
|
_this->_internal_set_f64_value(from._internal_f64_value());
|
|
break;
|
|
}
|
|
case kBoolValue: {
|
|
_this->_internal_set_bool_value(from._internal_bool_value());
|
|
break;
|
|
}
|
|
case kBinaryValue: {
|
|
_this->_internal_set_binary_value(from._internal_binary_value());
|
|
break;
|
|
}
|
|
case kStringValue: {
|
|
_this->_internal_set_string_value(from._internal_string_value());
|
|
break;
|
|
}
|
|
case kDateValue: {
|
|
_this->_internal_set_date_value(from._internal_date_value());
|
|
break;
|
|
}
|
|
case kDatetimeValue: {
|
|
_this->_internal_set_datetime_value(from._internal_datetime_value());
|
|
break;
|
|
}
|
|
case kTsSecondValue: {
|
|
_this->_internal_set_ts_second_value(from._internal_ts_second_value());
|
|
break;
|
|
}
|
|
case kTsMillisecondValue: {
|
|
_this->_internal_set_ts_millisecond_value(from._internal_ts_millisecond_value());
|
|
break;
|
|
}
|
|
case kTsMicrosecondValue: {
|
|
_this->_internal_set_ts_microsecond_value(from._internal_ts_microsecond_value());
|
|
break;
|
|
}
|
|
case kTsNanosecondValue: {
|
|
_this->_internal_set_ts_nanosecond_value(from._internal_ts_nanosecond_value());
|
|
break;
|
|
}
|
|
case kTimeSecondValue: {
|
|
_this->_internal_set_time_second_value(from._internal_time_second_value());
|
|
break;
|
|
}
|
|
case kTimeMillisecondValue: {
|
|
_this->_internal_set_time_millisecond_value(from._internal_time_millisecond_value());
|
|
break;
|
|
}
|
|
case kTimeMicrosecondValue: {
|
|
_this->_internal_set_time_microsecond_value(from._internal_time_microsecond_value());
|
|
break;
|
|
}
|
|
case kTimeNanosecondValue: {
|
|
_this->_internal_set_time_nanosecond_value(from._internal_time_nanosecond_value());
|
|
break;
|
|
}
|
|
case VALUE_DATA_NOT_SET: {
|
|
break;
|
|
}
|
|
}
|
|
_this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
|
|
}
|
|
|
|
void Value::CopyFrom(const Value& from) {
|
|
// @@protoc_insertion_point(class_specific_copy_from_start:greptime.v1.Value)
|
|
if (&from == this) return;
|
|
Clear();
|
|
MergeFrom(from);
|
|
}
|
|
|
|
bool Value::IsInitialized() const {
|
|
return true;
|
|
}
|
|
|
|
void Value::InternalSwap(Value* other) {
|
|
using std::swap;
|
|
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
|
|
swap(_impl_.value_data_, other->_impl_.value_data_);
|
|
swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]);
|
|
}
|
|
|
|
::PROTOBUF_NAMESPACE_ID::Metadata Value::GetMetadata() const {
|
|
return ::_pbi::AssignDescriptors(
|
|
&descriptor_table_greptime_2fv1_2frow_2eproto_getter, &descriptor_table_greptime_2fv1_2frow_2eproto_once,
|
|
file_level_metadata_greptime_2fv1_2frow_2eproto[3]);
|
|
}
|
|
|
|
// @@protoc_insertion_point(namespace_scope)
|
|
} // namespace v1
|
|
} // namespace greptime
|
|
PROTOBUF_NAMESPACE_OPEN
|
|
template<> PROTOBUF_NOINLINE ::greptime::v1::Rows*
|
|
Arena::CreateMaybeMessage< ::greptime::v1::Rows >(Arena* arena) {
|
|
return Arena::CreateMessageInternal< ::greptime::v1::Rows >(arena);
|
|
}
|
|
template<> PROTOBUF_NOINLINE ::greptime::v1::ColumnSchema*
|
|
Arena::CreateMaybeMessage< ::greptime::v1::ColumnSchema >(Arena* arena) {
|
|
return Arena::CreateMessageInternal< ::greptime::v1::ColumnSchema >(arena);
|
|
}
|
|
template<> PROTOBUF_NOINLINE ::greptime::v1::Row*
|
|
Arena::CreateMaybeMessage< ::greptime::v1::Row >(Arena* arena) {
|
|
return Arena::CreateMessageInternal< ::greptime::v1::Row >(arena);
|
|
}
|
|
template<> PROTOBUF_NOINLINE ::greptime::v1::Value*
|
|
Arena::CreateMaybeMessage< ::greptime::v1::Value >(Arena* arena) {
|
|
return Arena::CreateMessageInternal< ::greptime::v1::Value >(arena);
|
|
}
|
|
PROTOBUF_NAMESPACE_CLOSE
|
|
|
|
// @@protoc_insertion_point(global_scope)
|
|
#include <google/protobuf/port_undef.inc>
|