From eeae2d0dfa8ee320a7b9e987b4631a6c1c732ebd Mon Sep 17 00:00:00 2001 From: JeremyHi Date: Tue, 1 Aug 2023 18:51:10 +0800 Subject: [PATCH] refactor: common semantic type (#73) --- c++/greptime/v1/column.pb.cc | 480 +----- c++/greptime/v1/column.pb.h | 484 +----- c++/greptime/v1/common.pb.cc | 423 ++++- c++/greptime/v1/common.pb.h | 429 ++++++ c++/greptime/v1/ddl.pb.cc | 4 +- c++/greptime/v1/ddl.pb.h | 2 +- go/greptime/v1/column.pb.go | 483 ++---- go/greptime/v1/common.pb.go | 340 +++- go/greptime/v1/ddl.pb.go | 4 +- .../src/main/java/io/greptime/v1/Columns.java | 1367 +---------------- java/src/main/java/io/greptime/v1/Common.java | 1269 ++++++++++++++- java/src/main/java/io/greptime/v1/Ddl.java | 114 +- proto/greptime/v1/column.proto | 41 +- proto/greptime/v1/common.proto | 39 + proto/greptime/v1/ddl.proto | 2 +- 15 files changed, 2726 insertions(+), 2755 deletions(-) diff --git a/c++/greptime/v1/column.pb.cc b/c++/greptime/v1/column.pb.cc index b566384..a3c0fa8 100644 --- a/c++/greptime/v1/column.pb.cc +++ b/c++/greptime/v1/column.pb.cc @@ -92,26 +92,10 @@ struct ColumnDefaultTypeInternal { }; }; PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ColumnDefaultTypeInternal _Column_default_instance_; -PROTOBUF_CONSTEXPR ColumnDef::ColumnDef( - ::_pbi::ConstantInitialized): _impl_{ - /*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.default_constraint_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} - , /*decltype(_impl_.datatype_)*/0 - , /*decltype(_impl_.is_nullable_)*/false - , /*decltype(_impl_._cached_size_)*/{}} {} -struct ColumnDefDefaultTypeInternal { - PROTOBUF_CONSTEXPR ColumnDefDefaultTypeInternal() - : _instance(::_pbi::ConstantInitialized{}) {} - ~ColumnDefDefaultTypeInternal() {} - union { - ColumnDef _instance; - }; -}; -PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ColumnDefDefaultTypeInternal _ColumnDef_default_instance_; } // namespace v1 } // namespace greptime -static ::_pb::Metadata file_level_metadata_greptime_2fv1_2fcolumn_2eproto[3]; -static const ::_pb::EnumDescriptor* file_level_enum_descriptors_greptime_2fv1_2fcolumn_2eproto[2]; +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; const uint32_t TableStruct_greptime_2fv1_2fcolumn_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { @@ -155,73 +139,50 @@ 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::ColumnDef, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::greptime::v1::ColumnDef, _impl_.name_), - PROTOBUF_FIELD_OFFSET(::greptime::v1::ColumnDef, _impl_.datatype_), - PROTOBUF_FIELD_OFFSET(::greptime::v1::ColumnDef, _impl_.is_nullable_), - PROTOBUF_FIELD_OFFSET(::greptime::v1::ColumnDef, _impl_.default_constraint_), }; static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { { 0, -1, -1, sizeof(::greptime::v1::Column_Values)}, { 29, -1, -1, sizeof(::greptime::v1::Column)}, - { 40, -1, -1, sizeof(::greptime::v1::ColumnDef)}, }; static const ::_pb::Message* const file_default_instances[] = { &::greptime::v1::_Column_Values_default_instance_._instance, &::greptime::v1::_Column_default_instance_._instance, - &::greptime::v1::_ColumnDef_default_instance_._instance, }; const char descriptor_table_protodef_greptime_2fv1_2fcolumn_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = - "\n\030greptime/v1/column.proto\022\013greptime.v1\"" - "\255\006\n\006Column\022\023\n\013column_name\030\001 \001(\t\0227\n\rseman" - "tic_type\030\002 \001(\0162 .greptime.v1.Column.Sema" - "nticType\022*\n\006values\030\003 \001(\0132\032.greptime.v1.C" - "olumn.Values\022\021\n\tnull_mask\030\004 \001(\014\022-\n\010datat" - "ype\030\005 \001(\0162\033.greptime.v1.ColumnDataType\032\263" - "\004\n\006Values\022\021\n\ti8_values\030\001 \003(\005\022\022\n\ni16_valu" - "es\030\002 \003(\005\022\022\n\ni32_values\030\003 \003(\005\022\022\n\ni64_valu" - "es\030\004 \003(\003\022\021\n\tu8_values\030\005 \003(\r\022\022\n\nu16_value" - "s\030\006 \003(\r\022\022\n\nu32_values\030\007 \003(\r\022\022\n\nu64_value" - "s\030\010 \003(\004\022\022\n\nf32_values\030\t \003(\002\022\022\n\nf64_value" - "s\030\n \003(\001\022\023\n\013bool_values\030\013 \003(\010\022\025\n\rbinary_v" - "alues\030\014 \003(\014\022\025\n\rstring_values\030\r \003(\t\022\023\n\013da" - "te_values\030\016 \003(\005\022\027\n\017datetime_values\030\017 \003(\003" - "\022\030\n\020ts_second_values\030\020 \003(\003\022\035\n\025ts_millise" - "cond_values\030\021 \003(\003\022\035\n\025ts_microsecond_valu" - "es\030\022 \003(\003\022\034\n\024ts_nanosecond_values\030\023 \003(\003\022\032" - "\n\022time_second_values\030\024 \003(\003\022\037\n\027time_milli" - "second_values\030\025 \003(\003\022\037\n\027time_microsecond_" - "values\030\026 \003(\003\022\036\n\026time_nanosecond_values\030\027" - " \003(\003\"1\n\014SemanticType\022\007\n\003TAG\020\000\022\t\n\005FIELD\020\001" - "\022\r\n\tTIMESTAMP\020\002\"y\n\tColumnDef\022\014\n\004name\030\001 \001" - "(\t\022-\n\010datatype\030\002 \001(\0162\033.greptime.v1.Colum" - "nDataType\022\023\n\013is_nullable\030\003 \001(\010\022\032\n\022defaul" - "t_constraint\030\004 \001(\014*\371\002\n\016ColumnDataType\022\013\n" - "\007BOOLEAN\020\000\022\010\n\004INT8\020\001\022\t\n\005INT16\020\002\022\t\n\005INT32" - "\020\003\022\t\n\005INT64\020\004\022\t\n\005UINT8\020\005\022\n\n\006UINT16\020\006\022\n\n\006" - "UINT32\020\007\022\n\n\006UINT64\020\010\022\013\n\007FLOAT32\020\t\022\013\n\007FLO" - "AT64\020\n\022\n\n\006BINARY\020\013\022\n\n\006STRING\020\014\022\010\n\004DATE\020\r" - "\022\014\n\010DATETIME\020\016\022\024\n\020TIMESTAMP_SECOND\020\017\022\031\n\025" - "TIMESTAMP_MILLISECOND\020\020\022\031\n\025TIMESTAMP_MIC" - "ROSECOND\020\021\022\030\n\024TIMESTAMP_NANOSECOND\020\022\022\017\n\013" - "TIME_SECOND\020\023\022\024\n\020TIME_MILLISECOND\020\024\022\024\n\020T" - "IME_MICROSECOND\020\025\022\023\n\017TIME_NANOSECOND\020\026BP" - "\n\016io.greptime.v1B\007ColumnsZ5github.com/Gr" - "eptimeTeam/greptime-proto/go/greptime/v1" - "b\006proto3" + "\n\030greptime/v1/column.proto\022\013greptime.v1\032" + "\030greptime/v1/common.proto\"\363\005\n\006Column\022\023\n\013" + "column_name\030\001 \001(\t\0220\n\rsemantic_type\030\002 \001(\016" + "2\031.greptime.v1.SemanticType\022*\n\006values\030\003 " + "\001(\0132\032.greptime.v1.Column.Values\022\021\n\tnull_" + "mask\030\004 \001(\014\022-\n\010datatype\030\005 \001(\0162\033.greptime." + "v1.ColumnDataType\032\263\004\n\006Values\022\021\n\ti8_value" + "s\030\001 \003(\005\022\022\n\ni16_values\030\002 \003(\005\022\022\n\ni32_value" + "s\030\003 \003(\005\022\022\n\ni64_values\030\004 \003(\003\022\021\n\tu8_values" + "\030\005 \003(\r\022\022\n\nu16_values\030\006 \003(\r\022\022\n\nu32_values" + "\030\007 \003(\r\022\022\n\nu64_values\030\010 \003(\004\022\022\n\nf32_values" + "\030\t \003(\002\022\022\n\nf64_values\030\n \003(\001\022\023\n\013bool_value" + "s\030\013 \003(\010\022\025\n\rbinary_values\030\014 \003(\014\022\025\n\rstring" + "_values\030\r \003(\t\022\023\n\013date_values\030\016 \003(\005\022\027\n\017da" + "tetime_values\030\017 \003(\003\022\030\n\020ts_second_values\030" + "\020 \003(\003\022\035\n\025ts_millisecond_values\030\021 \003(\003\022\035\n\025" + "ts_microsecond_values\030\022 \003(\003\022\034\n\024ts_nanose" + "cond_values\030\023 \003(\003\022\032\n\022time_second_values\030" + "\024 \003(\003\022\037\n\027time_millisecond_values\030\025 \003(\003\022\037" + "\n\027time_microsecond_values\030\026 \003(\003\022\036\n\026time_" + "nanosecond_values\030\027 \003(\003BP\n\016io.greptime.v" + "1B\007ColumnsZ5github.com/GreptimeTeam/grep" + "time-proto/go/greptime/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, 1448, descriptor_table_protodef_greptime_2fv1_2fcolumn_2eproto, + false, false, 913, descriptor_table_protodef_greptime_2fv1_2fcolumn_2eproto, "greptime/v1/column.proto", - &descriptor_table_greptime_2fv1_2fcolumn_2eproto_once, nullptr, 0, 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, @@ -234,64 +195,6 @@ PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_greptime PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_greptime_2fv1_2fcolumn_2eproto(&descriptor_table_greptime_2fv1_2fcolumn_2eproto); namespace greptime { namespace v1 { -const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* Column_SemanticType_descriptor() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_greptime_2fv1_2fcolumn_2eproto); - return file_level_enum_descriptors_greptime_2fv1_2fcolumn_2eproto[0]; -} -bool Column_SemanticType_IsValid(int value) { - switch (value) { - case 0: - case 1: - case 2: - return true; - default: - return false; - } -} - -#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) -constexpr Column_SemanticType Column::TAG; -constexpr Column_SemanticType Column::FIELD; -constexpr Column_SemanticType Column::TIMESTAMP; -constexpr Column_SemanticType Column::SemanticType_MIN; -constexpr Column_SemanticType Column::SemanticType_MAX; -constexpr int Column::SemanticType_ARRAYSIZE; -#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) -const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* ColumnDataType_descriptor() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_greptime_2fv1_2fcolumn_2eproto); - return file_level_enum_descriptors_greptime_2fv1_2fcolumn_2eproto[1]; -} -bool ColumnDataType_IsValid(int value) { - switch (value) { - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 10: - case 11: - case 12: - case 13: - case 14: - case 15: - case 16: - case 17: - case 18: - case 19: - case 20: - case 21: - case 22: - return true; - default: - return false; - } -} - // =================================================================== @@ -1502,12 +1405,12 @@ const char* Column::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { } else goto handle_unusual; continue; - // .greptime.v1.Column.SemanticType semantic_type = 2; + // .greptime.v1.SemanticType semantic_type = 2; case 2: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); - _internal_set_semantic_type(static_cast<::greptime::v1::Column_SemanticType>(val)); + _internal_set_semantic_type(static_cast<::greptime::v1::SemanticType>(val)); } else goto handle_unusual; continue; @@ -1576,7 +1479,7 @@ uint8_t* Column::_InternalSerialize( 1, this->_internal_column_name(), target); } - // .greptime.v1.Column.SemanticType semantic_type = 2; + // .greptime.v1.SemanticType semantic_type = 2; if (this->_internal_semantic_type() != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteEnumToArray( @@ -1640,7 +1543,7 @@ size_t Column::ByteSizeLong() const { *_impl_.values_); } - // .greptime.v1.Column.SemanticType semantic_type = 2; + // .greptime.v1.SemanticType semantic_type = 2; if (this->_internal_semantic_type() != 0) { total_size += 1 + ::_pbi::WireFormatLite::EnumSize(this->_internal_semantic_type()); @@ -1727,317 +1630,6 @@ void Column::InternalSwap(Column* other) { file_level_metadata_greptime_2fv1_2fcolumn_2eproto[1]); } -// =================================================================== - -class ColumnDef::_Internal { - public: -}; - -ColumnDef::ColumnDef(::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.ColumnDef) -} -ColumnDef::ColumnDef(const ColumnDef& from) - : ::PROTOBUF_NAMESPACE_ID::Message() { - ColumnDef* const _this = this; (void)_this; - new (&_impl_) Impl_{ - decltype(_impl_.name_){} - , decltype(_impl_.default_constraint_){} - , decltype(_impl_.datatype_){} - , decltype(_impl_.is_nullable_){} - , /*decltype(_impl_._cached_size_)*/{}}; - - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - _impl_.name_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.name_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_name().empty()) { - _this->_impl_.name_.Set(from._internal_name(), - _this->GetArenaForAllocation()); - } - _impl_.default_constraint_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.default_constraint_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_default_constraint().empty()) { - _this->_impl_.default_constraint_.Set(from._internal_default_constraint(), - _this->GetArenaForAllocation()); - } - ::memcpy(&_impl_.datatype_, &from._impl_.datatype_, - static_cast(reinterpret_cast(&_impl_.is_nullable_) - - reinterpret_cast(&_impl_.datatype_)) + sizeof(_impl_.is_nullable_)); - // @@protoc_insertion_point(copy_constructor:greptime.v1.ColumnDef) -} - -inline void ColumnDef::SharedCtor( - ::_pb::Arena* arena, bool is_message_owned) { - (void)arena; - (void)is_message_owned; - new (&_impl_) Impl_{ - decltype(_impl_.name_){} - , decltype(_impl_.default_constraint_){} - , decltype(_impl_.datatype_){0} - , decltype(_impl_.is_nullable_){false} - , /*decltype(_impl_._cached_size_)*/{} - }; - _impl_.name_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.name_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.default_constraint_.InitDefault(); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.default_constraint_.Set("", GetArenaForAllocation()); - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING -} - -ColumnDef::~ColumnDef() { - // @@protoc_insertion_point(destructor:greptime.v1.ColumnDef) - if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { - (void)arena; - return; - } - SharedDtor(); -} - -inline void ColumnDef::SharedDtor() { - GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - _impl_.name_.Destroy(); - _impl_.default_constraint_.Destroy(); -} - -void ColumnDef::SetCachedSize(int size) const { - _impl_._cached_size_.Set(size); -} - -void ColumnDef::Clear() { -// @@protoc_insertion_point(message_clear_start:greptime.v1.ColumnDef) - uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - _impl_.name_.ClearToEmpty(); - _impl_.default_constraint_.ClearToEmpty(); - ::memset(&_impl_.datatype_, 0, static_cast( - reinterpret_cast(&_impl_.is_nullable_) - - reinterpret_cast(&_impl_.datatype_)) + sizeof(_impl_.is_nullable_)); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char* ColumnDef::_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 name = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { - auto str = _internal_mutable_name(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - CHK_(::_pbi::VerifyUTF8(str, "greptime.v1.ColumnDef.name")); - } else - goto handle_unusual; - continue; - // .greptime.v1.ColumnDataType datatype = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast(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; - // bool is_nullable = 3; - case 3: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 24)) { - _impl_.is_nullable_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // bytes default_constraint = 4; - case 4: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 34)) { - auto str = _internal_mutable_default_constraint(); - ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); - CHK_(ptr); - } else - goto handle_unusual; - continue; - default: - goto handle_unusual; - } // switch - handle_unusual: - if ((tag == 0) || ((tag & 7) == 4)) { - CHK_(ptr); - ctx->SetLastTag(tag); - goto message_done; - } - ptr = UnknownFieldParse( - tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), - ptr, ctx); - CHK_(ptr != nullptr); - } // while -message_done: - return ptr; -failure: - ptr = nullptr; - goto message_done; -#undef CHK_ -} - -uint8_t* ColumnDef::_InternalSerialize( - uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:greptime.v1.ColumnDef) - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - // string name = 1; - if (!this->_internal_name().empty()) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_name().data(), static_cast(this->_internal_name().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, - "greptime.v1.ColumnDef.name"); - target = stream->WriteStringMaybeAliased( - 1, this->_internal_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); - } - - // bool is_nullable = 3; - if (this->_internal_is_nullable() != 0) { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray(3, this->_internal_is_nullable(), target); - } - - // bytes default_constraint = 4; - if (!this->_internal_default_constraint().empty()) { - target = stream->WriteBytesMaybeAliased( - 4, this->_internal_default_constraint(), 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.ColumnDef) - return target; -} - -size_t ColumnDef::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:greptime.v1.ColumnDef) - 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 name = 1; - if (!this->_internal_name().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( - this->_internal_name()); - } - - // bytes default_constraint = 4; - if (!this->_internal_default_constraint().empty()) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( - this->_internal_default_constraint()); - } - - // .greptime.v1.ColumnDataType datatype = 2; - if (this->_internal_datatype() != 0) { - total_size += 1 + - ::_pbi::WireFormatLite::EnumSize(this->_internal_datatype()); - } - - // bool is_nullable = 3; - if (this->_internal_is_nullable() != 0) { - total_size += 1 + 1; - } - - return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); -} - -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ColumnDef::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, - ColumnDef::MergeImpl -}; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ColumnDef::GetClassData() const { return &_class_data_; } - - -void ColumnDef::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - // @@protoc_insertion_point(class_specific_merge_from_start:greptime.v1.ColumnDef) - GOOGLE_DCHECK_NE(&from, _this); - uint32_t cached_has_bits = 0; - (void) cached_has_bits; - - if (!from._internal_name().empty()) { - _this->_internal_set_name(from._internal_name()); - } - if (!from._internal_default_constraint().empty()) { - _this->_internal_set_default_constraint(from._internal_default_constraint()); - } - if (from._internal_datatype() != 0) { - _this->_internal_set_datatype(from._internal_datatype()); - } - if (from._internal_is_nullable() != 0) { - _this->_internal_set_is_nullable(from._internal_is_nullable()); - } - _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); -} - -void ColumnDef::CopyFrom(const ColumnDef& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:greptime.v1.ColumnDef) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool ColumnDef::IsInitialized() const { - return true; -} - -void ColumnDef::InternalSwap(ColumnDef* 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_.name_, lhs_arena, - &other->_impl_.name_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( - &_impl_.default_constraint_, lhs_arena, - &other->_impl_.default_constraint_, rhs_arena - ); - ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(ColumnDef, _impl_.is_nullable_) - + sizeof(ColumnDef::_impl_.is_nullable_) - - PROTOBUF_FIELD_OFFSET(ColumnDef, _impl_.datatype_)>( - reinterpret_cast(&_impl_.datatype_), - reinterpret_cast(&other->_impl_.datatype_)); -} - -::PROTOBUF_NAMESPACE_ID::Metadata ColumnDef::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 @@ -2050,10 +1642,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::ColumnDef* -Arena::CreateMaybeMessage< ::greptime::v1::ColumnDef >(Arena* arena) { - return Arena::CreateMessageInternal< ::greptime::v1::ColumnDef >(arena); -} PROTOBUF_NAMESPACE_CLOSE // @@protoc_insertion_point(global_scope) diff --git a/c++/greptime/v1/column.pb.h b/c++/greptime/v1/column.pb.h index 3f60c28..33a8910 100644 --- a/c++/greptime/v1/column.pb.h +++ b/c++/greptime/v1/column.pb.h @@ -29,8 +29,8 @@ #include #include // IWYU pragma: export #include // IWYU pragma: export -#include #include +#include "greptime/v1/common.pb.h" // @@protoc_insertion_point(includes) #include #define PROTOBUF_INTERNAL_EXPORT_greptime_2fv1_2fcolumn_2eproto @@ -50,9 +50,6 @@ namespace v1 { class Column; struct ColumnDefaultTypeInternal; extern ColumnDefaultTypeInternal _Column_default_instance_; -class ColumnDef; -struct ColumnDefDefaultTypeInternal; -extern ColumnDefDefaultTypeInternal _ColumnDef_default_instance_; class Column_Values; struct Column_ValuesDefaultTypeInternal; extern Column_ValuesDefaultTypeInternal _Column_Values_default_instance_; @@ -60,84 +57,11 @@ extern Column_ValuesDefaultTypeInternal _Column_Values_default_instance_; } // namespace greptime PROTOBUF_NAMESPACE_OPEN template<> ::greptime::v1::Column* Arena::CreateMaybeMessage<::greptime::v1::Column>(Arena*); -template<> ::greptime::v1::ColumnDef* Arena::CreateMaybeMessage<::greptime::v1::ColumnDef>(Arena*); template<> ::greptime::v1::Column_Values* Arena::CreateMaybeMessage<::greptime::v1::Column_Values>(Arena*); PROTOBUF_NAMESPACE_CLOSE namespace greptime { namespace v1 { -enum Column_SemanticType : int { - Column_SemanticType_TAG = 0, - Column_SemanticType_FIELD = 1, - Column_SemanticType_TIMESTAMP = 2, - Column_SemanticType_Column_SemanticType_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits::min(), - Column_SemanticType_Column_SemanticType_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits::max() -}; -bool Column_SemanticType_IsValid(int value); -constexpr Column_SemanticType Column_SemanticType_SemanticType_MIN = Column_SemanticType_TAG; -constexpr Column_SemanticType Column_SemanticType_SemanticType_MAX = Column_SemanticType_TIMESTAMP; -constexpr int Column_SemanticType_SemanticType_ARRAYSIZE = Column_SemanticType_SemanticType_MAX + 1; - -const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* Column_SemanticType_descriptor(); -template -inline const std::string& Column_SemanticType_Name(T enum_t_value) { - static_assert(::std::is_same::value || - ::std::is_integral::value, - "Incorrect type passed to function Column_SemanticType_Name."); - return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( - Column_SemanticType_descriptor(), enum_t_value); -} -inline bool Column_SemanticType_Parse( - ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, Column_SemanticType* value) { - return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( - Column_SemanticType_descriptor(), name, value); -} -enum ColumnDataType : int { - BOOLEAN = 0, - INT8 = 1, - INT16 = 2, - INT32 = 3, - INT64 = 4, - UINT8 = 5, - UINT16 = 6, - UINT32 = 7, - UINT64 = 8, - FLOAT32 = 9, - FLOAT64 = 10, - BINARY = 11, - STRING = 12, - DATE = 13, - DATETIME = 14, - TIMESTAMP_SECOND = 15, - TIMESTAMP_MILLISECOND = 16, - TIMESTAMP_MICROSECOND = 17, - TIMESTAMP_NANOSECOND = 18, - TIME_SECOND = 19, - TIME_MILLISECOND = 20, - TIME_MICROSECOND = 21, - TIME_NANOSECOND = 22, - ColumnDataType_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits::min(), - ColumnDataType_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits::max() -}; -bool ColumnDataType_IsValid(int value); -constexpr ColumnDataType ColumnDataType_MIN = BOOLEAN; -constexpr ColumnDataType ColumnDataType_MAX = TIME_NANOSECOND; -constexpr int ColumnDataType_ARRAYSIZE = ColumnDataType_MAX + 1; - -const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* ColumnDataType_descriptor(); -template -inline const std::string& ColumnDataType_Name(T enum_t_value) { - static_assert(::std::is_same::value || - ::std::is_integral::value, - "Incorrect type passed to function ColumnDataType_Name."); - return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( - ColumnDataType_descriptor(), enum_t_value); -} -inline bool ColumnDataType_Parse( - ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, ColumnDataType* value) { - return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( - ColumnDataType_descriptor(), name, value); -} // =================================================================== class Column_Values final : @@ -971,38 +895,6 @@ class Column final : typedef Column_Values Values; - typedef Column_SemanticType SemanticType; - static constexpr SemanticType TAG = - Column_SemanticType_TAG; - static constexpr SemanticType FIELD = - Column_SemanticType_FIELD; - static constexpr SemanticType TIMESTAMP = - Column_SemanticType_TIMESTAMP; - static inline bool SemanticType_IsValid(int value) { - return Column_SemanticType_IsValid(value); - } - static constexpr SemanticType SemanticType_MIN = - Column_SemanticType_SemanticType_MIN; - static constexpr SemanticType SemanticType_MAX = - Column_SemanticType_SemanticType_MAX; - static constexpr int SemanticType_ARRAYSIZE = - Column_SemanticType_SemanticType_ARRAYSIZE; - static inline const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* - SemanticType_descriptor() { - return Column_SemanticType_descriptor(); - } - template - static inline const std::string& SemanticType_Name(T enum_t_value) { - static_assert(::std::is_same::value || - ::std::is_integral::value, - "Incorrect type passed to function SemanticType_Name."); - return Column_SemanticType_Name(enum_t_value); - } - static inline bool SemanticType_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name, - SemanticType* value) { - return Column_SemanticType_Parse(name, value); - } - // accessors ------------------------------------------------------- enum : int { @@ -1058,13 +950,13 @@ class Column final : ::greptime::v1::Column_Values* values); ::greptime::v1::Column_Values* unsafe_arena_release_values(); - // .greptime.v1.Column.SemanticType semantic_type = 2; + // .greptime.v1.SemanticType semantic_type = 2; void clear_semantic_type(); - ::greptime::v1::Column_SemanticType semantic_type() const; - void set_semantic_type(::greptime::v1::Column_SemanticType value); + ::greptime::v1::SemanticType semantic_type() const; + void set_semantic_type(::greptime::v1::SemanticType value); private: - ::greptime::v1::Column_SemanticType _internal_semantic_type() const; - void _internal_set_semantic_type(::greptime::v1::Column_SemanticType value); + ::greptime::v1::SemanticType _internal_semantic_type() const; + void _internal_set_semantic_type(::greptime::v1::SemanticType value); public: // .greptime.v1.ColumnDataType datatype = 5; @@ -1094,197 +986,6 @@ class Column final : union { Impl_ _impl_; }; friend struct ::TableStruct_greptime_2fv1_2fcolumn_2eproto; }; -// ------------------------------------------------------------------- - -class ColumnDef final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:greptime.v1.ColumnDef) */ { - public: - inline ColumnDef() : ColumnDef(nullptr) {} - ~ColumnDef() override; - explicit PROTOBUF_CONSTEXPR ColumnDef(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); - - ColumnDef(const ColumnDef& from); - ColumnDef(ColumnDef&& from) noexcept - : ColumnDef() { - *this = ::std::move(from); - } - - inline ColumnDef& operator=(const ColumnDef& from) { - CopyFrom(from); - return *this; - } - inline ColumnDef& operator=(ColumnDef&& 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 ColumnDef& default_instance() { - return *internal_default_instance(); - } - static inline const ColumnDef* internal_default_instance() { - return reinterpret_cast( - &_ColumnDef_default_instance_); - } - static constexpr int kIndexInFileMessages = - 2; - - friend void swap(ColumnDef& a, ColumnDef& b) { - a.Swap(&b); - } - inline void Swap(ColumnDef* 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(ColumnDef* other) { - if (other == this) return; - GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - ColumnDef* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); - } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; - void CopyFrom(const ColumnDef& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; - void MergeFrom( const ColumnDef& from) { - ColumnDef::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(ColumnDef* other); - - private: - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "greptime.v1.ColumnDef"; - } - protected: - explicit ColumnDef(::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 { - kNameFieldNumber = 1, - kDefaultConstraintFieldNumber = 4, - kDatatypeFieldNumber = 2, - kIsNullableFieldNumber = 3, - }; - // string name = 1; - void clear_name(); - const std::string& name() const; - template - void set_name(ArgT0&& arg0, ArgT... args); - std::string* mutable_name(); - PROTOBUF_NODISCARD std::string* release_name(); - void set_allocated_name(std::string* name); - private: - const std::string& _internal_name() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_name(const std::string& value); - std::string* _internal_mutable_name(); - public: - - // bytes default_constraint = 4; - void clear_default_constraint(); - const std::string& default_constraint() const; - template - void set_default_constraint(ArgT0&& arg0, ArgT... args); - std::string* mutable_default_constraint(); - PROTOBUF_NODISCARD std::string* release_default_constraint(); - void set_allocated_default_constraint(std::string* default_constraint); - private: - const std::string& _internal_default_constraint() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_default_constraint(const std::string& value); - std::string* _internal_mutable_default_constraint(); - public: - - // .greptime.v1.ColumnDataType datatype = 2; - void clear_datatype(); - ::greptime::v1::ColumnDataType datatype() const; - void set_datatype(::greptime::v1::ColumnDataType value); - private: - ::greptime::v1::ColumnDataType _internal_datatype() const; - void _internal_set_datatype(::greptime::v1::ColumnDataType value); - public: - - // bool is_nullable = 3; - void clear_is_nullable(); - bool is_nullable() const; - void set_is_nullable(bool value); - private: - bool _internal_is_nullable() const; - void _internal_set_is_nullable(bool value); - public: - - // @@protoc_insertion_point(class_scope:greptime.v1.ColumnDef) - private: - class _Internal; - - template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - struct Impl_ { - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr default_constraint_; - int datatype_; - bool is_nullable_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_greptime_2fv1_2fcolumn_2eproto; -}; // =================================================================== @@ -2487,22 +2188,22 @@ inline void Column::set_allocated_column_name(std::string* column_name) { // @@protoc_insertion_point(field_set_allocated:greptime.v1.Column.column_name) } -// .greptime.v1.Column.SemanticType semantic_type = 2; +// .greptime.v1.SemanticType semantic_type = 2; inline void Column::clear_semantic_type() { _impl_.semantic_type_ = 0; } -inline ::greptime::v1::Column_SemanticType Column::_internal_semantic_type() const { - return static_cast< ::greptime::v1::Column_SemanticType >(_impl_.semantic_type_); +inline ::greptime::v1::SemanticType Column::_internal_semantic_type() const { + return static_cast< ::greptime::v1::SemanticType >(_impl_.semantic_type_); } -inline ::greptime::v1::Column_SemanticType Column::semantic_type() const { +inline ::greptime::v1::SemanticType Column::semantic_type() const { // @@protoc_insertion_point(field_get:greptime.v1.Column.semantic_type) return _internal_semantic_type(); } -inline void Column::_internal_set_semantic_type(::greptime::v1::Column_SemanticType value) { +inline void Column::_internal_set_semantic_type(::greptime::v1::SemanticType value) { _impl_.semantic_type_ = value; } -inline void Column::set_semantic_type(::greptime::v1::Column_SemanticType value) { +inline void Column::set_semantic_type(::greptime::v1::SemanticType value) { _internal_set_semantic_type(value); // @@protoc_insertion_point(field_set:greptime.v1.Column.semantic_type) } @@ -2667,178 +2368,17 @@ inline void Column::set_datatype(::greptime::v1::ColumnDataType value) { // @@protoc_insertion_point(field_set:greptime.v1.Column.datatype) } -// ------------------------------------------------------------------- - -// ColumnDef - -// string name = 1; -inline void ColumnDef::clear_name() { - _impl_.name_.ClearToEmpty(); -} -inline const std::string& ColumnDef::name() const { - // @@protoc_insertion_point(field_get:greptime.v1.ColumnDef.name) - return _internal_name(); -} -template -inline PROTOBUF_ALWAYS_INLINE -void ColumnDef::set_name(ArgT0&& arg0, ArgT... args) { - - _impl_.name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); - // @@protoc_insertion_point(field_set:greptime.v1.ColumnDef.name) -} -inline std::string* ColumnDef::mutable_name() { - std::string* _s = _internal_mutable_name(); - // @@protoc_insertion_point(field_mutable:greptime.v1.ColumnDef.name) - return _s; -} -inline const std::string& ColumnDef::_internal_name() const { - return _impl_.name_.Get(); -} -inline void ColumnDef::_internal_set_name(const std::string& value) { - - _impl_.name_.Set(value, GetArenaForAllocation()); -} -inline std::string* ColumnDef::_internal_mutable_name() { - - return _impl_.name_.Mutable(GetArenaForAllocation()); -} -inline std::string* ColumnDef::release_name() { - // @@protoc_insertion_point(field_release:greptime.v1.ColumnDef.name) - return _impl_.name_.Release(); -} -inline void ColumnDef::set_allocated_name(std::string* name) { - if (name != nullptr) { - - } else { - - } - _impl_.name_.SetAllocated(name, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.name_.IsDefault()) { - _impl_.name_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - // @@protoc_insertion_point(field_set_allocated:greptime.v1.ColumnDef.name) -} - -// .greptime.v1.ColumnDataType datatype = 2; -inline void ColumnDef::clear_datatype() { - _impl_.datatype_ = 0; -} -inline ::greptime::v1::ColumnDataType ColumnDef::_internal_datatype() const { - return static_cast< ::greptime::v1::ColumnDataType >(_impl_.datatype_); -} -inline ::greptime::v1::ColumnDataType ColumnDef::datatype() const { - // @@protoc_insertion_point(field_get:greptime.v1.ColumnDef.datatype) - return _internal_datatype(); -} -inline void ColumnDef::_internal_set_datatype(::greptime::v1::ColumnDataType value) { - - _impl_.datatype_ = value; -} -inline void ColumnDef::set_datatype(::greptime::v1::ColumnDataType value) { - _internal_set_datatype(value); - // @@protoc_insertion_point(field_set:greptime.v1.ColumnDef.datatype) -} - -// bool is_nullable = 3; -inline void ColumnDef::clear_is_nullable() { - _impl_.is_nullable_ = false; -} -inline bool ColumnDef::_internal_is_nullable() const { - return _impl_.is_nullable_; -} -inline bool ColumnDef::is_nullable() const { - // @@protoc_insertion_point(field_get:greptime.v1.ColumnDef.is_nullable) - return _internal_is_nullable(); -} -inline void ColumnDef::_internal_set_is_nullable(bool value) { - - _impl_.is_nullable_ = value; -} -inline void ColumnDef::set_is_nullable(bool value) { - _internal_set_is_nullable(value); - // @@protoc_insertion_point(field_set:greptime.v1.ColumnDef.is_nullable) -} - -// bytes default_constraint = 4; -inline void ColumnDef::clear_default_constraint() { - _impl_.default_constraint_.ClearToEmpty(); -} -inline const std::string& ColumnDef::default_constraint() const { - // @@protoc_insertion_point(field_get:greptime.v1.ColumnDef.default_constraint) - return _internal_default_constraint(); -} -template -inline PROTOBUF_ALWAYS_INLINE -void ColumnDef::set_default_constraint(ArgT0&& arg0, ArgT... args) { - - _impl_.default_constraint_.SetBytes(static_cast(arg0), args..., GetArenaForAllocation()); - // @@protoc_insertion_point(field_set:greptime.v1.ColumnDef.default_constraint) -} -inline std::string* ColumnDef::mutable_default_constraint() { - std::string* _s = _internal_mutable_default_constraint(); - // @@protoc_insertion_point(field_mutable:greptime.v1.ColumnDef.default_constraint) - return _s; -} -inline const std::string& ColumnDef::_internal_default_constraint() const { - return _impl_.default_constraint_.Get(); -} -inline void ColumnDef::_internal_set_default_constraint(const std::string& value) { - - _impl_.default_constraint_.Set(value, GetArenaForAllocation()); -} -inline std::string* ColumnDef::_internal_mutable_default_constraint() { - - return _impl_.default_constraint_.Mutable(GetArenaForAllocation()); -} -inline std::string* ColumnDef::release_default_constraint() { - // @@protoc_insertion_point(field_release:greptime.v1.ColumnDef.default_constraint) - return _impl_.default_constraint_.Release(); -} -inline void ColumnDef::set_allocated_default_constraint(std::string* default_constraint) { - if (default_constraint != nullptr) { - - } else { - - } - _impl_.default_constraint_.SetAllocated(default_constraint, GetArenaForAllocation()); -#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.default_constraint_.IsDefault()) { - _impl_.default_constraint_.Set("", GetArenaForAllocation()); - } -#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - // @@protoc_insertion_point(field_set_allocated:greptime.v1.ColumnDef.default_constraint) -} - #ifdef __GNUC__ #pragma GCC diagnostic pop #endif // __GNUC__ // ------------------------------------------------------------------- -// ------------------------------------------------------------------- - // @@protoc_insertion_point(namespace_scope) } // namespace v1 } // namespace greptime -PROTOBUF_NAMESPACE_OPEN - -template <> struct is_proto_enum< ::greptime::v1::Column_SemanticType> : ::std::true_type {}; -template <> -inline const EnumDescriptor* GetEnumDescriptor< ::greptime::v1::Column_SemanticType>() { - return ::greptime::v1::Column_SemanticType_descriptor(); -} -template <> struct is_proto_enum< ::greptime::v1::ColumnDataType> : ::std::true_type {}; -template <> -inline const EnumDescriptor* GetEnumDescriptor< ::greptime::v1::ColumnDataType>() { - return ::greptime::v1::ColumnDataType_descriptor(); -} - -PROTOBUF_NAMESPACE_CLOSE - // @@protoc_insertion_point(global_scope) #include diff --git a/c++/greptime/v1/common.pb.cc b/c++/greptime/v1/common.pb.cc index abb18d0..bd995ec 100644 --- a/c++/greptime/v1/common.pb.cc +++ b/c++/greptime/v1/common.pb.cc @@ -135,10 +135,26 @@ struct FlightMetadataDefaultTypeInternal { }; }; PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 FlightMetadataDefaultTypeInternal _FlightMetadata_default_instance_; +PROTOBUF_CONSTEXPR ColumnDef::ColumnDef( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.default_constraint_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.datatype_)*/0 + , /*decltype(_impl_.is_nullable_)*/false + , /*decltype(_impl_._cached_size_)*/{}} {} +struct ColumnDefDefaultTypeInternal { + PROTOBUF_CONSTEXPR ColumnDefDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~ColumnDefDefaultTypeInternal() {} + union { + ColumnDef _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ColumnDefDefaultTypeInternal _ColumnDef_default_instance_; } // namespace v1 } // namespace greptime -static ::_pb::Metadata file_level_metadata_greptime_2fv1_2fcommon_2eproto[8]; -static constexpr ::_pb::EnumDescriptor const** file_level_enum_descriptors_greptime_2fv1_2fcommon_2eproto = nullptr; +static ::_pb::Metadata file_level_metadata_greptime_2fv1_2fcommon_2eproto[9]; +static const ::_pb::EnumDescriptor* file_level_enum_descriptors_greptime_2fv1_2fcommon_2eproto[2]; static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_greptime_2fv1_2fcommon_2eproto = nullptr; const uint32_t TableStruct_greptime_2fv1_2fcommon_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { @@ -213,6 +229,16 @@ const uint32_t TableStruct_greptime_2fv1_2fcommon_2eproto::offsets[] PROTOBUF_SE ~0u, // no _weak_field_map_ ~0u, // no _inlined_string_donated_ PROTOBUF_FIELD_OFFSET(::greptime::v1::FlightMetadata, _impl_.affected_rows_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::greptime::v1::ColumnDef, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::greptime::v1::ColumnDef, _impl_.name_), + PROTOBUF_FIELD_OFFSET(::greptime::v1::ColumnDef, _impl_.datatype_), + PROTOBUF_FIELD_OFFSET(::greptime::v1::ColumnDef, _impl_.is_nullable_), + PROTOBUF_FIELD_OFFSET(::greptime::v1::ColumnDef, _impl_.default_constraint_), }; static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { { 0, 12, -1, sizeof(::greptime::v1::RequestHeader)}, @@ -223,6 +249,7 @@ static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protode { 50, -1, -1, sizeof(::greptime::v1::Token)}, { 57, -1, -1, sizeof(::greptime::v1::AffectedRows)}, { 64, -1, -1, sizeof(::greptime::v1::FlightMetadata)}, + { 71, -1, -1, sizeof(::greptime::v1::ColumnDef)}, }; static const ::_pb::Message* const file_default_instances[] = { @@ -234,6 +261,7 @@ static const ::_pb::Message* const file_default_instances[] = { &::greptime::v1::_Token_default_instance_._instance, &::greptime::v1::_AffectedRows_default_instance_._instance, &::greptime::v1::_FlightMetadata_default_instance_._instance, + &::greptime::v1::_ColumnDef_default_instance_._instance, }; const char descriptor_table_protodef_greptime_2fv1_2fcommon_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = @@ -251,16 +279,30 @@ const char descriptor_table_protodef_greptime_2fv1_2fcommon_2eproto[] PROTOBUF_S "\020\n\010username\030\001 \001(\t\022\020\n\010password\030\002 \001(\t\"\026\n\005T" "oken\022\r\n\005token\030\001 \001(\t\"\035\n\014AffectedRows\022\r\n\005v" "alue\030\001 \001(\r\"B\n\016FlightMetadata\0220\n\raffected" - "_rows\030\001 \001(\0132\031.greptime.v1.AffectedRowsBO" - "\n\016io.greptime.v1B\006CommonZ5github.com/Gre" - "ptimeTeam/greptime-proto/go/greptime/v1b" - "\006proto3" + "_rows\030\001 \001(\0132\031.greptime.v1.AffectedRows\"y" + "\n\tColumnDef\022\014\n\004name\030\001 \001(\t\022-\n\010datatype\030\002 " + "\001(\0162\033.greptime.v1.ColumnDataType\022\023\n\013is_n" + "ullable\030\003 \001(\010\022\032\n\022default_constraint\030\004 \001(" + "\014*1\n\014SemanticType\022\007\n\003TAG\020\000\022\t\n\005FIELD\020\001\022\r\n" + "\tTIMESTAMP\020\002*\371\002\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\026BO\n\016io.g" + "reptime.v1B\006CommonZ5github.com/GreptimeT" + "eam/greptime-proto/go/greptime/v1b\006proto" + "3" ; static ::_pbi::once_flag descriptor_table_greptime_2fv1_2fcommon_2eproto_once; const ::_pbi::DescriptorTable descriptor_table_greptime_2fv1_2fcommon_2eproto = { - false, false, 687, descriptor_table_protodef_greptime_2fv1_2fcommon_2eproto, + false, false, 1241, descriptor_table_protodef_greptime_2fv1_2fcommon_2eproto, "greptime/v1/common.proto", - &descriptor_table_greptime_2fv1_2fcommon_2eproto_once, nullptr, 0, 8, + &descriptor_table_greptime_2fv1_2fcommon_2eproto_once, nullptr, 0, 9, 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, @@ -273,6 +315,56 @@ PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_greptime PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_greptime_2fv1_2fcommon_2eproto(&descriptor_table_greptime_2fv1_2fcommon_2eproto); namespace greptime { namespace v1 { +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* SemanticType_descriptor() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_greptime_2fv1_2fcommon_2eproto); + return file_level_enum_descriptors_greptime_2fv1_2fcommon_2eproto[0]; +} +bool SemanticType_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + return true; + default: + return false; + } +} + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* ColumnDataType_descriptor() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_greptime_2fv1_2fcommon_2eproto); + return file_level_enum_descriptors_greptime_2fv1_2fcommon_2eproto[1]; +} +bool ColumnDataType_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + case 19: + case 20: + case 21: + case 22: + return true; + default: + return false; + } +} + // =================================================================== @@ -2258,6 +2350,317 @@ void FlightMetadata::InternalSwap(FlightMetadata* other) { file_level_metadata_greptime_2fv1_2fcommon_2eproto[7]); } +// =================================================================== + +class ColumnDef::_Internal { + public: +}; + +ColumnDef::ColumnDef(::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.ColumnDef) +} +ColumnDef::ColumnDef(const ColumnDef& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + ColumnDef* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.name_){} + , decltype(_impl_.default_constraint_){} + , decltype(_impl_.datatype_){} + , decltype(_impl_.is_nullable_){} + , /*decltype(_impl_._cached_size_)*/{}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _impl_.name_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.name_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_name().empty()) { + _this->_impl_.name_.Set(from._internal_name(), + _this->GetArenaForAllocation()); + } + _impl_.default_constraint_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.default_constraint_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_default_constraint().empty()) { + _this->_impl_.default_constraint_.Set(from._internal_default_constraint(), + _this->GetArenaForAllocation()); + } + ::memcpy(&_impl_.datatype_, &from._impl_.datatype_, + static_cast(reinterpret_cast(&_impl_.is_nullable_) - + reinterpret_cast(&_impl_.datatype_)) + sizeof(_impl_.is_nullable_)); + // @@protoc_insertion_point(copy_constructor:greptime.v1.ColumnDef) +} + +inline void ColumnDef::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_.name_){} + , decltype(_impl_.default_constraint_){} + , decltype(_impl_.datatype_){0} + , decltype(_impl_.is_nullable_){false} + , /*decltype(_impl_._cached_size_)*/{} + }; + _impl_.name_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.name_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.default_constraint_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.default_constraint_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +ColumnDef::~ColumnDef() { + // @@protoc_insertion_point(destructor:greptime.v1.ColumnDef) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void ColumnDef::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.name_.Destroy(); + _impl_.default_constraint_.Destroy(); +} + +void ColumnDef::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void ColumnDef::Clear() { +// @@protoc_insertion_point(message_clear_start:greptime.v1.ColumnDef) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.name_.ClearToEmpty(); + _impl_.default_constraint_.ClearToEmpty(); + ::memset(&_impl_.datatype_, 0, static_cast( + reinterpret_cast(&_impl_.is_nullable_) - + reinterpret_cast(&_impl_.datatype_)) + sizeof(_impl_.is_nullable_)); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* ColumnDef::_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 name = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_name(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "greptime.v1.ColumnDef.name")); + } else + goto handle_unusual; + continue; + // .greptime.v1.ColumnDataType datatype = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(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; + // bool is_nullable = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 24)) { + _impl_.is_nullable_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // bytes default_constraint = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 34)) { + auto str = _internal_mutable_default_constraint(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* ColumnDef::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:greptime.v1.ColumnDef) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // string name = 1; + if (!this->_internal_name().empty()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_name().data(), static_cast(this->_internal_name().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "greptime.v1.ColumnDef.name"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_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); + } + + // bool is_nullable = 3; + if (this->_internal_is_nullable() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray(3, this->_internal_is_nullable(), target); + } + + // bytes default_constraint = 4; + if (!this->_internal_default_constraint().empty()) { + target = stream->WriteBytesMaybeAliased( + 4, this->_internal_default_constraint(), 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.ColumnDef) + return target; +} + +size_t ColumnDef::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:greptime.v1.ColumnDef) + 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 name = 1; + if (!this->_internal_name().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_name()); + } + + // bytes default_constraint = 4; + if (!this->_internal_default_constraint().empty()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_default_constraint()); + } + + // .greptime.v1.ColumnDataType datatype = 2; + if (this->_internal_datatype() != 0) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_datatype()); + } + + // bool is_nullable = 3; + if (this->_internal_is_nullable() != 0) { + total_size += 1 + 1; + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ColumnDef::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + ColumnDef::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ColumnDef::GetClassData() const { return &_class_data_; } + + +void ColumnDef::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:greptime.v1.ColumnDef) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (!from._internal_name().empty()) { + _this->_internal_set_name(from._internal_name()); + } + if (!from._internal_default_constraint().empty()) { + _this->_internal_set_default_constraint(from._internal_default_constraint()); + } + if (from._internal_datatype() != 0) { + _this->_internal_set_datatype(from._internal_datatype()); + } + if (from._internal_is_nullable() != 0) { + _this->_internal_set_is_nullable(from._internal_is_nullable()); + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void ColumnDef::CopyFrom(const ColumnDef& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:greptime.v1.ColumnDef) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ColumnDef::IsInitialized() const { + return true; +} + +void ColumnDef::InternalSwap(ColumnDef* 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_.name_, lhs_arena, + &other->_impl_.name_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.default_constraint_, lhs_arena, + &other->_impl_.default_constraint_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(ColumnDef, _impl_.is_nullable_) + + sizeof(ColumnDef::_impl_.is_nullable_) + - PROTOBUF_FIELD_OFFSET(ColumnDef, _impl_.datatype_)>( + reinterpret_cast(&_impl_.datatype_), + reinterpret_cast(&other->_impl_.datatype_)); +} + +::PROTOBUF_NAMESPACE_ID::Metadata ColumnDef::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[8]); +} + // @@protoc_insertion_point(namespace_scope) } // namespace v1 } // namespace greptime @@ -2294,6 +2697,10 @@ template<> PROTOBUF_NOINLINE ::greptime::v1::FlightMetadata* Arena::CreateMaybeMessage< ::greptime::v1::FlightMetadata >(Arena* arena) { return Arena::CreateMessageInternal< ::greptime::v1::FlightMetadata >(arena); } +template<> PROTOBUF_NOINLINE ::greptime::v1::ColumnDef* +Arena::CreateMaybeMessage< ::greptime::v1::ColumnDef >(Arena* arena) { + return Arena::CreateMessageInternal< ::greptime::v1::ColumnDef >(arena); +} PROTOBUF_NAMESPACE_CLOSE // @@protoc_insertion_point(global_scope) diff --git a/c++/greptime/v1/common.pb.h b/c++/greptime/v1/common.pb.h index 23270fc..185da23 100644 --- a/c++/greptime/v1/common.pb.h +++ b/c++/greptime/v1/common.pb.h @@ -29,6 +29,7 @@ #include #include // IWYU pragma: export #include // IWYU pragma: export +#include #include // @@protoc_insertion_point(includes) #include @@ -55,6 +56,9 @@ extern AuthHeaderDefaultTypeInternal _AuthHeader_default_instance_; class Basic; struct BasicDefaultTypeInternal; extern BasicDefaultTypeInternal _Basic_default_instance_; +class ColumnDef; +struct ColumnDefDefaultTypeInternal; +extern ColumnDefDefaultTypeInternal _ColumnDef_default_instance_; class FlightMetadata; struct FlightMetadataDefaultTypeInternal; extern FlightMetadataDefaultTypeInternal _FlightMetadata_default_instance_; @@ -76,6 +80,7 @@ PROTOBUF_NAMESPACE_OPEN template<> ::greptime::v1::AffectedRows* Arena::CreateMaybeMessage<::greptime::v1::AffectedRows>(Arena*); template<> ::greptime::v1::AuthHeader* Arena::CreateMaybeMessage<::greptime::v1::AuthHeader>(Arena*); template<> ::greptime::v1::Basic* Arena::CreateMaybeMessage<::greptime::v1::Basic>(Arena*); +template<> ::greptime::v1::ColumnDef* Arena::CreateMaybeMessage<::greptime::v1::ColumnDef>(Arena*); template<> ::greptime::v1::FlightMetadata* Arena::CreateMaybeMessage<::greptime::v1::FlightMetadata>(Arena*); template<> ::greptime::v1::RequestHeader* Arena::CreateMaybeMessage<::greptime::v1::RequestHeader>(Arena*); template<> ::greptime::v1::ResponseHeader* Arena::CreateMaybeMessage<::greptime::v1::ResponseHeader>(Arena*); @@ -85,6 +90,78 @@ PROTOBUF_NAMESPACE_CLOSE namespace greptime { namespace v1 { +enum SemanticType : int { + TAG = 0, + FIELD = 1, + TIMESTAMP = 2, + SemanticType_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits::min(), + SemanticType_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits::max() +}; +bool SemanticType_IsValid(int value); +constexpr SemanticType SemanticType_MIN = TAG; +constexpr SemanticType SemanticType_MAX = TIMESTAMP; +constexpr int SemanticType_ARRAYSIZE = SemanticType_MAX + 1; + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* SemanticType_descriptor(); +template +inline const std::string& SemanticType_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function SemanticType_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + SemanticType_descriptor(), enum_t_value); +} +inline bool SemanticType_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, SemanticType* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( + SemanticType_descriptor(), name, value); +} +enum ColumnDataType : int { + BOOLEAN = 0, + INT8 = 1, + INT16 = 2, + INT32 = 3, + INT64 = 4, + UINT8 = 5, + UINT16 = 6, + UINT32 = 7, + UINT64 = 8, + FLOAT32 = 9, + FLOAT64 = 10, + BINARY = 11, + STRING = 12, + DATE = 13, + DATETIME = 14, + TIMESTAMP_SECOND = 15, + TIMESTAMP_MILLISECOND = 16, + TIMESTAMP_MICROSECOND = 17, + TIMESTAMP_NANOSECOND = 18, + TIME_SECOND = 19, + TIME_MILLISECOND = 20, + TIME_MICROSECOND = 21, + TIME_NANOSECOND = 22, + ColumnDataType_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits::min(), + ColumnDataType_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits::max() +}; +bool ColumnDataType_IsValid(int value); +constexpr ColumnDataType ColumnDataType_MIN = BOOLEAN; +constexpr ColumnDataType ColumnDataType_MAX = TIME_NANOSECOND; +constexpr int ColumnDataType_ARRAYSIZE = ColumnDataType_MAX + 1; + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* ColumnDataType_descriptor(); +template +inline const std::string& ColumnDataType_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function ColumnDataType_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + ColumnDataType_descriptor(), enum_t_value); +} +inline bool ColumnDataType_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, ColumnDataType* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( + ColumnDataType_descriptor(), name, value); +} // =================================================================== class RequestHeader final : @@ -1465,6 +1542,197 @@ class FlightMetadata final : union { Impl_ _impl_; }; friend struct ::TableStruct_greptime_2fv1_2fcommon_2eproto; }; +// ------------------------------------------------------------------- + +class ColumnDef final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:greptime.v1.ColumnDef) */ { + public: + inline ColumnDef() : ColumnDef(nullptr) {} + ~ColumnDef() override; + explicit PROTOBUF_CONSTEXPR ColumnDef(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ColumnDef(const ColumnDef& from); + ColumnDef(ColumnDef&& from) noexcept + : ColumnDef() { + *this = ::std::move(from); + } + + inline ColumnDef& operator=(const ColumnDef& from) { + CopyFrom(from); + return *this; + } + inline ColumnDef& operator=(ColumnDef&& 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 ColumnDef& default_instance() { + return *internal_default_instance(); + } + static inline const ColumnDef* internal_default_instance() { + return reinterpret_cast( + &_ColumnDef_default_instance_); + } + static constexpr int kIndexInFileMessages = + 8; + + friend void swap(ColumnDef& a, ColumnDef& b) { + a.Swap(&b); + } + inline void Swap(ColumnDef* 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(ColumnDef* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ColumnDef* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const ColumnDef& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const ColumnDef& from) { + ColumnDef::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(ColumnDef* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "greptime.v1.ColumnDef"; + } + protected: + explicit ColumnDef(::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 { + kNameFieldNumber = 1, + kDefaultConstraintFieldNumber = 4, + kDatatypeFieldNumber = 2, + kIsNullableFieldNumber = 3, + }; + // string name = 1; + void clear_name(); + const std::string& name() const; + template + void set_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_name(); + PROTOBUF_NODISCARD std::string* release_name(); + void set_allocated_name(std::string* name); + private: + const std::string& _internal_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_name(const std::string& value); + std::string* _internal_mutable_name(); + public: + + // bytes default_constraint = 4; + void clear_default_constraint(); + const std::string& default_constraint() const; + template + void set_default_constraint(ArgT0&& arg0, ArgT... args); + std::string* mutable_default_constraint(); + PROTOBUF_NODISCARD std::string* release_default_constraint(); + void set_allocated_default_constraint(std::string* default_constraint); + private: + const std::string& _internal_default_constraint() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_default_constraint(const std::string& value); + std::string* _internal_mutable_default_constraint(); + public: + + // .greptime.v1.ColumnDataType datatype = 2; + void clear_datatype(); + ::greptime::v1::ColumnDataType datatype() const; + void set_datatype(::greptime::v1::ColumnDataType value); + private: + ::greptime::v1::ColumnDataType _internal_datatype() const; + void _internal_set_datatype(::greptime::v1::ColumnDataType value); + public: + + // bool is_nullable = 3; + void clear_is_nullable(); + bool is_nullable() const; + void set_is_nullable(bool value); + private: + bool _internal_is_nullable() const; + void _internal_set_is_nullable(bool value); + public: + + // @@protoc_insertion_point(class_scope:greptime.v1.ColumnDef) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr default_constraint_; + int datatype_; + bool is_nullable_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_greptime_2fv1_2fcommon_2eproto; +}; // =================================================================== @@ -2377,6 +2645,150 @@ inline void FlightMetadata::set_allocated_affected_rows(::greptime::v1::Affected // @@protoc_insertion_point(field_set_allocated:greptime.v1.FlightMetadata.affected_rows) } +// ------------------------------------------------------------------- + +// ColumnDef + +// string name = 1; +inline void ColumnDef::clear_name() { + _impl_.name_.ClearToEmpty(); +} +inline const std::string& ColumnDef::name() const { + // @@protoc_insertion_point(field_get:greptime.v1.ColumnDef.name) + return _internal_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void ColumnDef::set_name(ArgT0&& arg0, ArgT... args) { + + _impl_.name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:greptime.v1.ColumnDef.name) +} +inline std::string* ColumnDef::mutable_name() { + std::string* _s = _internal_mutable_name(); + // @@protoc_insertion_point(field_mutable:greptime.v1.ColumnDef.name) + return _s; +} +inline const std::string& ColumnDef::_internal_name() const { + return _impl_.name_.Get(); +} +inline void ColumnDef::_internal_set_name(const std::string& value) { + + _impl_.name_.Set(value, GetArenaForAllocation()); +} +inline std::string* ColumnDef::_internal_mutable_name() { + + return _impl_.name_.Mutable(GetArenaForAllocation()); +} +inline std::string* ColumnDef::release_name() { + // @@protoc_insertion_point(field_release:greptime.v1.ColumnDef.name) + return _impl_.name_.Release(); +} +inline void ColumnDef::set_allocated_name(std::string* name) { + if (name != nullptr) { + + } else { + + } + _impl_.name_.SetAllocated(name, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.name_.IsDefault()) { + _impl_.name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:greptime.v1.ColumnDef.name) +} + +// .greptime.v1.ColumnDataType datatype = 2; +inline void ColumnDef::clear_datatype() { + _impl_.datatype_ = 0; +} +inline ::greptime::v1::ColumnDataType ColumnDef::_internal_datatype() const { + return static_cast< ::greptime::v1::ColumnDataType >(_impl_.datatype_); +} +inline ::greptime::v1::ColumnDataType ColumnDef::datatype() const { + // @@protoc_insertion_point(field_get:greptime.v1.ColumnDef.datatype) + return _internal_datatype(); +} +inline void ColumnDef::_internal_set_datatype(::greptime::v1::ColumnDataType value) { + + _impl_.datatype_ = value; +} +inline void ColumnDef::set_datatype(::greptime::v1::ColumnDataType value) { + _internal_set_datatype(value); + // @@protoc_insertion_point(field_set:greptime.v1.ColumnDef.datatype) +} + +// bool is_nullable = 3; +inline void ColumnDef::clear_is_nullable() { + _impl_.is_nullable_ = false; +} +inline bool ColumnDef::_internal_is_nullable() const { + return _impl_.is_nullable_; +} +inline bool ColumnDef::is_nullable() const { + // @@protoc_insertion_point(field_get:greptime.v1.ColumnDef.is_nullable) + return _internal_is_nullable(); +} +inline void ColumnDef::_internal_set_is_nullable(bool value) { + + _impl_.is_nullable_ = value; +} +inline void ColumnDef::set_is_nullable(bool value) { + _internal_set_is_nullable(value); + // @@protoc_insertion_point(field_set:greptime.v1.ColumnDef.is_nullable) +} + +// bytes default_constraint = 4; +inline void ColumnDef::clear_default_constraint() { + _impl_.default_constraint_.ClearToEmpty(); +} +inline const std::string& ColumnDef::default_constraint() const { + // @@protoc_insertion_point(field_get:greptime.v1.ColumnDef.default_constraint) + return _internal_default_constraint(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void ColumnDef::set_default_constraint(ArgT0&& arg0, ArgT... args) { + + _impl_.default_constraint_.SetBytes(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:greptime.v1.ColumnDef.default_constraint) +} +inline std::string* ColumnDef::mutable_default_constraint() { + std::string* _s = _internal_mutable_default_constraint(); + // @@protoc_insertion_point(field_mutable:greptime.v1.ColumnDef.default_constraint) + return _s; +} +inline const std::string& ColumnDef::_internal_default_constraint() const { + return _impl_.default_constraint_.Get(); +} +inline void ColumnDef::_internal_set_default_constraint(const std::string& value) { + + _impl_.default_constraint_.Set(value, GetArenaForAllocation()); +} +inline std::string* ColumnDef::_internal_mutable_default_constraint() { + + return _impl_.default_constraint_.Mutable(GetArenaForAllocation()); +} +inline std::string* ColumnDef::release_default_constraint() { + // @@protoc_insertion_point(field_release:greptime.v1.ColumnDef.default_constraint) + return _impl_.default_constraint_.Release(); +} +inline void ColumnDef::set_allocated_default_constraint(std::string* default_constraint) { + if (default_constraint != nullptr) { + + } else { + + } + _impl_.default_constraint_.SetAllocated(default_constraint, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.default_constraint_.IsDefault()) { + _impl_.default_constraint_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:greptime.v1.ColumnDef.default_constraint) +} + #ifdef __GNUC__ #pragma GCC diagnostic pop #endif // __GNUC__ @@ -2394,12 +2806,29 @@ inline void FlightMetadata::set_allocated_affected_rows(::greptime::v1::Affected // ------------------------------------------------------------------- +// ------------------------------------------------------------------- + // @@protoc_insertion_point(namespace_scope) } // namespace v1 } // namespace greptime +PROTOBUF_NAMESPACE_OPEN + +template <> struct is_proto_enum< ::greptime::v1::SemanticType> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::greptime::v1::SemanticType>() { + return ::greptime::v1::SemanticType_descriptor(); +} +template <> struct is_proto_enum< ::greptime::v1::ColumnDataType> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::greptime::v1::ColumnDataType>() { + return ::greptime::v1::ColumnDataType_descriptor(); +} + +PROTOBUF_NAMESPACE_CLOSE + // @@protoc_insertion_point(global_scope) #include diff --git a/c++/greptime/v1/ddl.pb.cc b/c++/greptime/v1/ddl.pb.cc index a49d5aa..9f27f34 100644 --- a/c++/greptime/v1/ddl.pb.cc +++ b/c++/greptime/v1/ddl.pb.cc @@ -481,7 +481,7 @@ static const ::_pb::Message* const file_default_instances[] = { const char descriptor_table_protodef_greptime_2fv1_2fddl_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = "\n\025greptime/v1/ddl.proto\022\013greptime.v1\032\030gr" - "eptime/v1/column.proto\"\207\003\n\nDdlRequest\022:\n" + "eptime/v1/common.proto\"\207\003\n\nDdlRequest\022:\n" "\017create_database\030\001 \001(\0132\037.greptime.v1.Cre" "ateDatabaseExprH\000\0224\n\014create_table\030\002 \001(\0132" "\034.greptime.v1.CreateTableExprH\000\022\'\n\005alter" @@ -541,7 +541,7 @@ const char descriptor_table_protodef_greptime_2fv1_2fddl_2eproto[] PROTOBUF_SECT "eptime-proto/go/greptime/v1b\006proto3" ; static const ::_pbi::DescriptorTable* const descriptor_table_greptime_2fv1_2fddl_2eproto_deps[1] = { - &::descriptor_table_greptime_2fv1_2fcolumn_2eproto, + &::descriptor_table_greptime_2fv1_2fcommon_2eproto, }; static ::_pbi::once_flag descriptor_table_greptime_2fv1_2fddl_2eproto_once; const ::_pbi::DescriptorTable descriptor_table_greptime_2fv1_2fddl_2eproto = { diff --git a/c++/greptime/v1/ddl.pb.h b/c++/greptime/v1/ddl.pb.h index cd6821b..1a4179a 100644 --- a/c++/greptime/v1/ddl.pb.h +++ b/c++/greptime/v1/ddl.pb.h @@ -34,7 +34,7 @@ #include #include #include -#include "greptime/v1/column.pb.h" +#include "greptime/v1/common.pb.h" // @@protoc_insertion_point(includes) #include #define PROTOBUF_INTERNAL_EXPORT_greptime_2fv1_2fddl_2eproto diff --git a/go/greptime/v1/column.pb.go b/go/greptime/v1/column.pb.go index bb11c0d..e45f9dc 100644 --- a/go/greptime/v1/column.pb.go +++ b/go/greptime/v1/column.pb.go @@ -34,171 +34,13 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -type ColumnDataType int32 - -const ( - ColumnDataType_BOOLEAN ColumnDataType = 0 - ColumnDataType_INT8 ColumnDataType = 1 - ColumnDataType_INT16 ColumnDataType = 2 - ColumnDataType_INT32 ColumnDataType = 3 - ColumnDataType_INT64 ColumnDataType = 4 - ColumnDataType_UINT8 ColumnDataType = 5 - ColumnDataType_UINT16 ColumnDataType = 6 - ColumnDataType_UINT32 ColumnDataType = 7 - ColumnDataType_UINT64 ColumnDataType = 8 - ColumnDataType_FLOAT32 ColumnDataType = 9 - ColumnDataType_FLOAT64 ColumnDataType = 10 - ColumnDataType_BINARY ColumnDataType = 11 - ColumnDataType_STRING ColumnDataType = 12 - ColumnDataType_DATE ColumnDataType = 13 - ColumnDataType_DATETIME ColumnDataType = 14 - ColumnDataType_TIMESTAMP_SECOND ColumnDataType = 15 - ColumnDataType_TIMESTAMP_MILLISECOND ColumnDataType = 16 - ColumnDataType_TIMESTAMP_MICROSECOND ColumnDataType = 17 - ColumnDataType_TIMESTAMP_NANOSECOND ColumnDataType = 18 - ColumnDataType_TIME_SECOND ColumnDataType = 19 - ColumnDataType_TIME_MILLISECOND ColumnDataType = 20 - ColumnDataType_TIME_MICROSECOND ColumnDataType = 21 - ColumnDataType_TIME_NANOSECOND ColumnDataType = 22 -) - -// Enum value maps for ColumnDataType. -var ( - ColumnDataType_name = map[int32]string{ - 0: "BOOLEAN", - 1: "INT8", - 2: "INT16", - 3: "INT32", - 4: "INT64", - 5: "UINT8", - 6: "UINT16", - 7: "UINT32", - 8: "UINT64", - 9: "FLOAT32", - 10: "FLOAT64", - 11: "BINARY", - 12: "STRING", - 13: "DATE", - 14: "DATETIME", - 15: "TIMESTAMP_SECOND", - 16: "TIMESTAMP_MILLISECOND", - 17: "TIMESTAMP_MICROSECOND", - 18: "TIMESTAMP_NANOSECOND", - 19: "TIME_SECOND", - 20: "TIME_MILLISECOND", - 21: "TIME_MICROSECOND", - 22: "TIME_NANOSECOND", - } - ColumnDataType_value = map[string]int32{ - "BOOLEAN": 0, - "INT8": 1, - "INT16": 2, - "INT32": 3, - "INT64": 4, - "UINT8": 5, - "UINT16": 6, - "UINT32": 7, - "UINT64": 8, - "FLOAT32": 9, - "FLOAT64": 10, - "BINARY": 11, - "STRING": 12, - "DATE": 13, - "DATETIME": 14, - "TIMESTAMP_SECOND": 15, - "TIMESTAMP_MILLISECOND": 16, - "TIMESTAMP_MICROSECOND": 17, - "TIMESTAMP_NANOSECOND": 18, - "TIME_SECOND": 19, - "TIME_MILLISECOND": 20, - "TIME_MICROSECOND": 21, - "TIME_NANOSECOND": 22, - } -) - -func (x ColumnDataType) Enum() *ColumnDataType { - p := new(ColumnDataType) - *p = x - return p -} - -func (x ColumnDataType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (ColumnDataType) Descriptor() protoreflect.EnumDescriptor { - return file_greptime_v1_column_proto_enumTypes[0].Descriptor() -} - -func (ColumnDataType) Type() protoreflect.EnumType { - return &file_greptime_v1_column_proto_enumTypes[0] -} - -func (x ColumnDataType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use ColumnDataType.Descriptor instead. -func (ColumnDataType) EnumDescriptor() ([]byte, []int) { - return file_greptime_v1_column_proto_rawDescGZIP(), []int{0} -} - -type Column_SemanticType int32 - -const ( - Column_TAG Column_SemanticType = 0 - Column_FIELD Column_SemanticType = 1 - Column_TIMESTAMP Column_SemanticType = 2 -) - -// Enum value maps for Column_SemanticType. -var ( - Column_SemanticType_name = map[int32]string{ - 0: "TAG", - 1: "FIELD", - 2: "TIMESTAMP", - } - Column_SemanticType_value = map[string]int32{ - "TAG": 0, - "FIELD": 1, - "TIMESTAMP": 2, - } -) - -func (x Column_SemanticType) Enum() *Column_SemanticType { - p := new(Column_SemanticType) - *p = x - return p -} - -func (x Column_SemanticType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (Column_SemanticType) Descriptor() protoreflect.EnumDescriptor { - return file_greptime_v1_column_proto_enumTypes[1].Descriptor() -} - -func (Column_SemanticType) Type() protoreflect.EnumType { - return &file_greptime_v1_column_proto_enumTypes[1] -} - -func (x Column_SemanticType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use Column_SemanticType.Descriptor instead. -func (Column_SemanticType) EnumDescriptor() ([]byte, []int) { - return file_greptime_v1_column_proto_rawDescGZIP(), []int{0, 0} -} - type Column struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - ColumnName string `protobuf:"bytes,1,opt,name=column_name,json=columnName,proto3" json:"column_name,omitempty"` - SemanticType Column_SemanticType `protobuf:"varint,2,opt,name=semantic_type,json=semanticType,proto3,enum=greptime.v1.Column_SemanticType" json:"semantic_type,omitempty"` + ColumnName string `protobuf:"bytes,1,opt,name=column_name,json=columnName,proto3" json:"column_name,omitempty"` + SemanticType SemanticType `protobuf:"varint,2,opt,name=semantic_type,json=semanticType,proto3,enum=greptime.v1.SemanticType" json:"semantic_type,omitempty"` // The array of non-null values in this column. // // For example: suppose there is a column "foo" that contains some int32 @@ -257,11 +99,11 @@ func (x *Column) GetColumnName() string { return "" } -func (x *Column) GetSemanticType() Column_SemanticType { +func (x *Column) GetSemanticType() SemanticType { if x != nil { return x.SemanticType } - return Column_TAG + return SemanticType_TAG } func (x *Column) GetValues() *Column_Values { @@ -285,77 +127,6 @@ func (x *Column) GetDatatype() ColumnDataType { return ColumnDataType_BOOLEAN } -type ColumnDef struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Datatype ColumnDataType `protobuf:"varint,2,opt,name=datatype,proto3,enum=greptime.v1.ColumnDataType" json:"datatype,omitempty"` - IsNullable bool `protobuf:"varint,3,opt,name=is_nullable,json=isNullable,proto3" json:"is_nullable,omitempty"` - DefaultConstraint []byte `protobuf:"bytes,4,opt,name=default_constraint,json=defaultConstraint,proto3" json:"default_constraint,omitempty"` -} - -func (x *ColumnDef) Reset() { - *x = ColumnDef{} - if protoimpl.UnsafeEnabled { - mi := &file_greptime_v1_column_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ColumnDef) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ColumnDef) ProtoMessage() {} - -func (x *ColumnDef) ProtoReflect() protoreflect.Message { - mi := &file_greptime_v1_column_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ColumnDef.ProtoReflect.Descriptor instead. -func (*ColumnDef) Descriptor() ([]byte, []int) { - return file_greptime_v1_column_proto_rawDescGZIP(), []int{1} -} - -func (x *ColumnDef) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *ColumnDef) GetDatatype() ColumnDataType { - if x != nil { - return x.Datatype - } - return ColumnDataType_BOOLEAN -} - -func (x *ColumnDef) GetIsNullable() bool { - if x != nil { - return x.IsNullable - } - return false -} - -func (x *ColumnDef) GetDefaultConstraint() []byte { - if x != nil { - return x.DefaultConstraint - } - return nil -} - type Column_Values struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -389,7 +160,7 @@ type Column_Values struct { func (x *Column_Values) Reset() { *x = Column_Values{} if protoimpl.UnsafeEnabled { - mi := &file_greptime_v1_column_proto_msgTypes[2] + mi := &file_greptime_v1_column_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -402,7 +173,7 @@ func (x *Column_Values) String() string { func (*Column_Values) ProtoMessage() {} func (x *Column_Values) ProtoReflect() protoreflect.Message { - mi := &file_greptime_v1_column_proto_msgTypes[2] + mi := &file_greptime_v1_column_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -584,123 +355,86 @@ var File_greptime_v1_column_proto protoreflect.FileDescriptor var file_greptime_v1_column_proto_rawDesc = []byte{ 0x0a, 0x18, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x67, 0x72, 0x65, 0x70, - 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x22, 0xb7, 0x09, 0x0a, 0x06, 0x43, 0x6f, 0x6c, 0x75, - 0x6d, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4e, - 0x61, 0x6d, 0x65, 0x12, 0x45, 0x0a, 0x0d, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x5f, - 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x67, 0x72, 0x65, - 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x2e, - 0x53, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0c, 0x73, 0x65, - 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x54, 0x79, 0x70, 0x65, 0x12, 0x32, 0x0a, 0x06, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x72, 0x65, - 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x2e, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x1b, - 0x0a, 0x09, 0x6e, 0x75, 0x6c, 0x6c, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x0c, 0x52, 0x08, 0x6e, 0x75, 0x6c, 0x6c, 0x4d, 0x61, 0x73, 0x6b, 0x12, 0x37, 0x0a, 0x08, 0x64, - 0x61, 0x74, 0x61, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, + 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x18, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, + 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0xfd, 0x08, 0x0a, 0x06, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, + 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x3e, 0x0a, + 0x0d, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, + 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x54, 0x79, 0x70, 0x65, 0x52, + 0x0c, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x54, 0x79, 0x70, 0x65, 0x12, 0x32, 0x0a, + 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6c, 0x75, - 0x6d, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x64, 0x61, 0x74, 0x61, - 0x74, 0x79, 0x70, 0x65, 0x1a, 0x87, 0x07, 0x0a, 0x06, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, - 0x1b, 0x0a, 0x09, 0x69, 0x38, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x05, 0x52, 0x08, 0x69, 0x38, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x1d, 0x0a, 0x0a, - 0x69, 0x31, 0x36, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x05, - 0x52, 0x09, 0x69, 0x31, 0x36, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x69, - 0x33, 0x32, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x05, 0x52, - 0x09, 0x69, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x36, - 0x34, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x03, 0x52, 0x09, - 0x69, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x75, 0x38, 0x5f, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x08, 0x75, 0x38, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x75, 0x31, 0x36, 0x5f, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x09, 0x75, 0x31, 0x36, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x75, 0x33, 0x32, 0x5f, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x09, 0x75, 0x33, 0x32, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x75, 0x36, 0x34, 0x5f, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x04, 0x52, 0x09, 0x75, 0x36, 0x34, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x66, 0x33, 0x32, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x02, 0x52, 0x09, 0x66, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x66, 0x36, 0x34, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, - 0x18, 0x0a, 0x20, 0x03, 0x28, 0x01, 0x52, 0x09, 0x66, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x62, 0x6f, 0x6f, 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, - 0x18, 0x0b, 0x20, 0x03, 0x28, 0x08, 0x52, 0x0a, 0x62, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x5f, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x73, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x0c, 0x62, 0x69, 0x6e, 0x61, 0x72, - 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x74, 0x72, 0x69, 0x6e, - 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, - 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x1f, 0x0a, 0x0b, - 0x64, 0x61, 0x74, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x0e, 0x20, 0x03, 0x28, - 0x05, 0x52, 0x0a, 0x64, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x27, 0x0a, - 0x0f, 0x64, 0x61, 0x74, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, - 0x18, 0x0f, 0x20, 0x03, 0x28, 0x03, 0x52, 0x0e, 0x64, 0x61, 0x74, 0x65, 0x74, 0x69, 0x6d, 0x65, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x28, 0x0a, 0x10, 0x74, 0x73, 0x5f, 0x73, 0x65, 0x63, - 0x6f, 0x6e, 0x64, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x10, 0x20, 0x03, 0x28, 0x03, - 0x52, 0x0e, 0x74, 0x73, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, - 0x12, 0x32, 0x0a, 0x15, 0x74, 0x73, 0x5f, 0x6d, 0x69, 0x6c, 0x6c, 0x69, 0x73, 0x65, 0x63, 0x6f, - 0x6e, 0x64, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x11, 0x20, 0x03, 0x28, 0x03, 0x52, - 0x13, 0x74, 0x73, 0x4d, 0x69, 0x6c, 0x6c, 0x69, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x73, 0x12, 0x32, 0x0a, 0x15, 0x74, 0x73, 0x5f, 0x6d, 0x69, 0x63, 0x72, 0x6f, - 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x12, 0x20, - 0x03, 0x28, 0x03, 0x52, 0x13, 0x74, 0x73, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x65, 0x63, 0x6f, - 0x6e, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x30, 0x0a, 0x14, 0x74, 0x73, 0x5f, 0x6e, - 0x61, 0x6e, 0x6f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, - 0x18, 0x13, 0x20, 0x03, 0x28, 0x03, 0x52, 0x12, 0x74, 0x73, 0x4e, 0x61, 0x6e, 0x6f, 0x73, 0x65, - 0x63, 0x6f, 0x6e, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x2c, 0x0a, 0x12, 0x74, 0x69, - 0x6d, 0x65, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, - 0x18, 0x14, 0x20, 0x03, 0x28, 0x03, 0x52, 0x10, 0x74, 0x69, 0x6d, 0x65, 0x53, 0x65, 0x63, 0x6f, - 0x6e, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x36, 0x0a, 0x17, 0x74, 0x69, 0x6d, 0x65, - 0x5f, 0x6d, 0x69, 0x6c, 0x6c, 0x69, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x5f, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x73, 0x18, 0x15, 0x20, 0x03, 0x28, 0x03, 0x52, 0x15, 0x74, 0x69, 0x6d, 0x65, 0x4d, - 0x69, 0x6c, 0x6c, 0x69, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, - 0x12, 0x36, 0x0a, 0x17, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x65, - 0x63, 0x6f, 0x6e, 0x64, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x16, 0x20, 0x03, 0x28, - 0x03, 0x52, 0x15, 0x74, 0x69, 0x6d, 0x65, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x65, 0x63, 0x6f, - 0x6e, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x34, 0x0a, 0x16, 0x74, 0x69, 0x6d, 0x65, - 0x5f, 0x6e, 0x61, 0x6e, 0x6f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x5f, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x73, 0x18, 0x17, 0x20, 0x03, 0x28, 0x03, 0x52, 0x14, 0x74, 0x69, 0x6d, 0x65, 0x4e, 0x61, - 0x6e, 0x6f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x22, 0x31, - 0x0a, 0x0c, 0x53, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x54, 0x79, 0x70, 0x65, 0x12, 0x07, - 0x0a, 0x03, 0x54, 0x41, 0x47, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x46, 0x49, 0x45, 0x4c, 0x44, - 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x54, 0x49, 0x4d, 0x45, 0x53, 0x54, 0x41, 0x4d, 0x50, 0x10, - 0x02, 0x22, 0xa8, 0x01, 0x0a, 0x09, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x44, 0x65, 0x66, 0x12, - 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x12, 0x37, 0x0a, 0x08, 0x64, 0x61, 0x74, 0x61, 0x74, 0x79, 0x70, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, - 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x54, 0x79, - 0x70, 0x65, 0x52, 0x08, 0x64, 0x61, 0x74, 0x61, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1f, 0x0a, 0x0b, - 0x69, 0x73, 0x5f, 0x6e, 0x75, 0x6c, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x0a, 0x69, 0x73, 0x4e, 0x75, 0x6c, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x2d, 0x0a, - 0x12, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, - 0x69, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x11, 0x64, 0x65, 0x66, 0x61, 0x75, - 0x6c, 0x74, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x2a, 0xf9, 0x02, 0x0a, - 0x0e, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, 0x12, - 0x0b, 0x0a, 0x07, 0x42, 0x4f, 0x4f, 0x4c, 0x45, 0x41, 0x4e, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, - 0x49, 0x4e, 0x54, 0x38, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x49, 0x4e, 0x54, 0x31, 0x36, 0x10, - 0x02, 0x12, 0x09, 0x0a, 0x05, 0x49, 0x4e, 0x54, 0x33, 0x32, 0x10, 0x03, 0x12, 0x09, 0x0a, 0x05, - 0x49, 0x4e, 0x54, 0x36, 0x34, 0x10, 0x04, 0x12, 0x09, 0x0a, 0x05, 0x55, 0x49, 0x4e, 0x54, 0x38, - 0x10, 0x05, 0x12, 0x0a, 0x0a, 0x06, 0x55, 0x49, 0x4e, 0x54, 0x31, 0x36, 0x10, 0x06, 0x12, 0x0a, - 0x0a, 0x06, 0x55, 0x49, 0x4e, 0x54, 0x33, 0x32, 0x10, 0x07, 0x12, 0x0a, 0x0a, 0x06, 0x55, 0x49, - 0x4e, 0x54, 0x36, 0x34, 0x10, 0x08, 0x12, 0x0b, 0x0a, 0x07, 0x46, 0x4c, 0x4f, 0x41, 0x54, 0x33, - 0x32, 0x10, 0x09, 0x12, 0x0b, 0x0a, 0x07, 0x46, 0x4c, 0x4f, 0x41, 0x54, 0x36, 0x34, 0x10, 0x0a, - 0x12, 0x0a, 0x0a, 0x06, 0x42, 0x49, 0x4e, 0x41, 0x52, 0x59, 0x10, 0x0b, 0x12, 0x0a, 0x0a, 0x06, - 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x0c, 0x12, 0x08, 0x0a, 0x04, 0x44, 0x41, 0x54, 0x45, - 0x10, 0x0d, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x41, 0x54, 0x45, 0x54, 0x49, 0x4d, 0x45, 0x10, 0x0e, - 0x12, 0x14, 0x0a, 0x10, 0x54, 0x49, 0x4d, 0x45, 0x53, 0x54, 0x41, 0x4d, 0x50, 0x5f, 0x53, 0x45, - 0x43, 0x4f, 0x4e, 0x44, 0x10, 0x0f, 0x12, 0x19, 0x0a, 0x15, 0x54, 0x49, 0x4d, 0x45, 0x53, 0x54, - 0x41, 0x4d, 0x50, 0x5f, 0x4d, 0x49, 0x4c, 0x4c, 0x49, 0x53, 0x45, 0x43, 0x4f, 0x4e, 0x44, 0x10, - 0x10, 0x12, 0x19, 0x0a, 0x15, 0x54, 0x49, 0x4d, 0x45, 0x53, 0x54, 0x41, 0x4d, 0x50, 0x5f, 0x4d, - 0x49, 0x43, 0x52, 0x4f, 0x53, 0x45, 0x43, 0x4f, 0x4e, 0x44, 0x10, 0x11, 0x12, 0x18, 0x0a, 0x14, - 0x54, 0x49, 0x4d, 0x45, 0x53, 0x54, 0x41, 0x4d, 0x50, 0x5f, 0x4e, 0x41, 0x4e, 0x4f, 0x53, 0x45, - 0x43, 0x4f, 0x4e, 0x44, 0x10, 0x12, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x49, 0x4d, 0x45, 0x5f, 0x53, - 0x45, 0x43, 0x4f, 0x4e, 0x44, 0x10, 0x13, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x49, 0x4d, 0x45, 0x5f, - 0x4d, 0x49, 0x4c, 0x4c, 0x49, 0x53, 0x45, 0x43, 0x4f, 0x4e, 0x44, 0x10, 0x14, 0x12, 0x14, 0x0a, - 0x10, 0x54, 0x49, 0x4d, 0x45, 0x5f, 0x4d, 0x49, 0x43, 0x52, 0x4f, 0x53, 0x45, 0x43, 0x4f, 0x4e, - 0x44, 0x10, 0x15, 0x12, 0x13, 0x0a, 0x0f, 0x54, 0x49, 0x4d, 0x45, 0x5f, 0x4e, 0x41, 0x4e, 0x4f, - 0x53, 0x45, 0x43, 0x4f, 0x4e, 0x44, 0x10, 0x16, 0x42, 0x50, 0x0a, 0x0e, 0x69, 0x6f, 0x2e, 0x67, - 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x07, 0x43, 0x6f, 0x6c, 0x75, - 0x6d, 0x6e, 0x73, 0x5a, 0x35, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x47, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x2f, 0x67, 0x72, 0x65, - 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x67, - 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x6d, 0x6e, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x75, 0x6c, 0x6c, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x6e, 0x75, 0x6c, 0x6c, 0x4d, 0x61, 0x73, 0x6b, 0x12, 0x37, + 0x0a, 0x08, 0x64, 0x61, 0x74, 0x61, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x1b, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, + 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x64, + 0x61, 0x74, 0x61, 0x74, 0x79, 0x70, 0x65, 0x1a, 0x87, 0x07, 0x0a, 0x06, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x69, 0x38, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x05, 0x52, 0x08, 0x69, 0x38, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, + 0x1d, 0x0a, 0x0a, 0x69, 0x31, 0x36, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x05, 0x52, 0x09, 0x69, 0x31, 0x36, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x1d, + 0x0a, 0x0a, 0x69, 0x33, 0x32, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, + 0x28, 0x05, 0x52, 0x09, 0x69, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x1d, 0x0a, + 0x0a, 0x69, 0x36, 0x34, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, + 0x03, 0x52, 0x09, 0x69, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x1b, 0x0a, 0x09, + 0x75, 0x38, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0d, 0x52, + 0x08, 0x75, 0x38, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x75, 0x31, 0x36, + 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x09, 0x75, + 0x31, 0x36, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x75, 0x33, 0x32, 0x5f, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x09, 0x75, 0x33, + 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x75, 0x36, 0x34, 0x5f, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x04, 0x52, 0x09, 0x75, 0x36, 0x34, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x66, 0x33, 0x32, 0x5f, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x02, 0x52, 0x09, 0x66, 0x33, 0x32, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x66, 0x36, 0x34, 0x5f, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x01, 0x52, 0x09, 0x66, 0x36, 0x34, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x62, 0x6f, 0x6f, 0x6c, 0x5f, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x08, 0x52, 0x0a, 0x62, 0x6f, 0x6f, 0x6c, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x5f, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x0c, 0x62, 0x69, + 0x6e, 0x61, 0x72, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x74, + 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, + 0x1f, 0x0a, 0x0b, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x0e, + 0x20, 0x03, 0x28, 0x05, 0x52, 0x0a, 0x64, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, + 0x12, 0x27, 0x0a, 0x0f, 0x64, 0x61, 0x74, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x73, 0x18, 0x0f, 0x20, 0x03, 0x28, 0x03, 0x52, 0x0e, 0x64, 0x61, 0x74, 0x65, 0x74, + 0x69, 0x6d, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x28, 0x0a, 0x10, 0x74, 0x73, 0x5f, + 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x10, 0x20, + 0x03, 0x28, 0x03, 0x52, 0x0e, 0x74, 0x73, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x73, 0x12, 0x32, 0x0a, 0x15, 0x74, 0x73, 0x5f, 0x6d, 0x69, 0x6c, 0x6c, 0x69, 0x73, + 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x11, 0x20, 0x03, + 0x28, 0x03, 0x52, 0x13, 0x74, 0x73, 0x4d, 0x69, 0x6c, 0x6c, 0x69, 0x73, 0x65, 0x63, 0x6f, 0x6e, + 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x32, 0x0a, 0x15, 0x74, 0x73, 0x5f, 0x6d, 0x69, + 0x63, 0x72, 0x6f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, + 0x18, 0x12, 0x20, 0x03, 0x28, 0x03, 0x52, 0x13, 0x74, 0x73, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, + 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x30, 0x0a, 0x14, 0x74, + 0x73, 0x5f, 0x6e, 0x61, 0x6e, 0x6f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x5f, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x73, 0x18, 0x13, 0x20, 0x03, 0x28, 0x03, 0x52, 0x12, 0x74, 0x73, 0x4e, 0x61, 0x6e, + 0x6f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x2c, 0x0a, + 0x12, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x5f, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x73, 0x18, 0x14, 0x20, 0x03, 0x28, 0x03, 0x52, 0x10, 0x74, 0x69, 0x6d, 0x65, 0x53, + 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x36, 0x0a, 0x17, 0x74, + 0x69, 0x6d, 0x65, 0x5f, 0x6d, 0x69, 0x6c, 0x6c, 0x69, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x5f, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x15, 0x20, 0x03, 0x28, 0x03, 0x52, 0x15, 0x74, 0x69, + 0x6d, 0x65, 0x4d, 0x69, 0x6c, 0x6c, 0x69, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x73, 0x12, 0x36, 0x0a, 0x17, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6d, 0x69, 0x63, 0x72, + 0x6f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x16, + 0x20, 0x03, 0x28, 0x03, 0x52, 0x15, 0x74, 0x69, 0x6d, 0x65, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, + 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x34, 0x0a, 0x16, 0x74, + 0x69, 0x6d, 0x65, 0x5f, 0x6e, 0x61, 0x6e, 0x6f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x5f, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x17, 0x20, 0x03, 0x28, 0x03, 0x52, 0x14, 0x74, 0x69, 0x6d, + 0x65, 0x4e, 0x61, 0x6e, 0x6f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x73, 0x42, 0x50, 0x0a, 0x0e, 0x69, 0x6f, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, + 0x2e, 0x76, 0x31, 0x42, 0x07, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x5a, 0x35, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, + 0x65, 0x54, 0x65, 0x61, 0x6d, 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2d, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, + 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -715,25 +449,22 @@ func file_greptime_v1_column_proto_rawDescGZIP() []byte { return file_greptime_v1_column_proto_rawDescData } -var file_greptime_v1_column_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_greptime_v1_column_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_greptime_v1_column_proto_msgTypes = make([]protoimpl.MessageInfo, 2) var file_greptime_v1_column_proto_goTypes = []interface{}{ - (ColumnDataType)(0), // 0: greptime.v1.ColumnDataType - (Column_SemanticType)(0), // 1: greptime.v1.Column.SemanticType - (*Column)(nil), // 2: greptime.v1.Column - (*ColumnDef)(nil), // 3: greptime.v1.ColumnDef - (*Column_Values)(nil), // 4: greptime.v1.Column.Values + (*Column)(nil), // 0: greptime.v1.Column + (*Column_Values)(nil), // 1: greptime.v1.Column.Values + (SemanticType)(0), // 2: greptime.v1.SemanticType + (ColumnDataType)(0), // 3: greptime.v1.ColumnDataType } var file_greptime_v1_column_proto_depIdxs = []int32{ - 1, // 0: greptime.v1.Column.semantic_type:type_name -> greptime.v1.Column.SemanticType - 4, // 1: greptime.v1.Column.values:type_name -> greptime.v1.Column.Values - 0, // 2: greptime.v1.Column.datatype:type_name -> greptime.v1.ColumnDataType - 0, // 3: greptime.v1.ColumnDef.datatype:type_name -> greptime.v1.ColumnDataType - 4, // [4:4] is the sub-list for method output_type - 4, // [4:4] is the sub-list for method input_type - 4, // [4:4] is the sub-list for extension type_name - 4, // [4:4] is the sub-list for extension extendee - 0, // [0:4] is the sub-list for field type_name + 2, // 0: greptime.v1.Column.semantic_type:type_name -> greptime.v1.SemanticType + 1, // 1: greptime.v1.Column.values:type_name -> greptime.v1.Column.Values + 3, // 2: greptime.v1.Column.datatype:type_name -> greptime.v1.ColumnDataType + 3, // [3:3] is the sub-list for method output_type + 3, // [3:3] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name } func init() { file_greptime_v1_column_proto_init() } @@ -741,6 +472,7 @@ func file_greptime_v1_column_proto_init() { if File_greptime_v1_column_proto != nil { return } + file_greptime_v1_common_proto_init() if !protoimpl.UnsafeEnabled { file_greptime_v1_column_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Column); i { @@ -755,18 +487,6 @@ func file_greptime_v1_column_proto_init() { } } file_greptime_v1_column_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ColumnDef); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_greptime_v1_column_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Column_Values); i { case 0: return &v.state @@ -784,14 +504,13 @@ func file_greptime_v1_column_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_greptime_v1_column_proto_rawDesc, - NumEnums: 2, - NumMessages: 3, + NumEnums: 0, + NumMessages: 2, NumExtensions: 0, NumServices: 0, }, GoTypes: file_greptime_v1_column_proto_goTypes, DependencyIndexes: file_greptime_v1_column_proto_depIdxs, - EnumInfos: file_greptime_v1_column_proto_enumTypes, MessageInfos: file_greptime_v1_column_proto_msgTypes, }.Build() File_greptime_v1_column_proto = out.File diff --git a/go/greptime/v1/common.pb.go b/go/greptime/v1/common.pb.go index 4ac4b30..5685883 100644 --- a/go/greptime/v1/common.pb.go +++ b/go/greptime/v1/common.pb.go @@ -34,6 +34,164 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +type SemanticType int32 + +const ( + SemanticType_TAG SemanticType = 0 + SemanticType_FIELD SemanticType = 1 + SemanticType_TIMESTAMP SemanticType = 2 +) + +// Enum value maps for SemanticType. +var ( + SemanticType_name = map[int32]string{ + 0: "TAG", + 1: "FIELD", + 2: "TIMESTAMP", + } + SemanticType_value = map[string]int32{ + "TAG": 0, + "FIELD": 1, + "TIMESTAMP": 2, + } +) + +func (x SemanticType) Enum() *SemanticType { + p := new(SemanticType) + *p = x + return p +} + +func (x SemanticType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SemanticType) Descriptor() protoreflect.EnumDescriptor { + return file_greptime_v1_common_proto_enumTypes[0].Descriptor() +} + +func (SemanticType) Type() protoreflect.EnumType { + return &file_greptime_v1_common_proto_enumTypes[0] +} + +func (x SemanticType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use SemanticType.Descriptor instead. +func (SemanticType) EnumDescriptor() ([]byte, []int) { + return file_greptime_v1_common_proto_rawDescGZIP(), []int{0} +} + +type ColumnDataType int32 + +const ( + ColumnDataType_BOOLEAN ColumnDataType = 0 + ColumnDataType_INT8 ColumnDataType = 1 + ColumnDataType_INT16 ColumnDataType = 2 + ColumnDataType_INT32 ColumnDataType = 3 + ColumnDataType_INT64 ColumnDataType = 4 + ColumnDataType_UINT8 ColumnDataType = 5 + ColumnDataType_UINT16 ColumnDataType = 6 + ColumnDataType_UINT32 ColumnDataType = 7 + ColumnDataType_UINT64 ColumnDataType = 8 + ColumnDataType_FLOAT32 ColumnDataType = 9 + ColumnDataType_FLOAT64 ColumnDataType = 10 + ColumnDataType_BINARY ColumnDataType = 11 + ColumnDataType_STRING ColumnDataType = 12 + ColumnDataType_DATE ColumnDataType = 13 + ColumnDataType_DATETIME ColumnDataType = 14 + ColumnDataType_TIMESTAMP_SECOND ColumnDataType = 15 + ColumnDataType_TIMESTAMP_MILLISECOND ColumnDataType = 16 + ColumnDataType_TIMESTAMP_MICROSECOND ColumnDataType = 17 + ColumnDataType_TIMESTAMP_NANOSECOND ColumnDataType = 18 + ColumnDataType_TIME_SECOND ColumnDataType = 19 + ColumnDataType_TIME_MILLISECOND ColumnDataType = 20 + ColumnDataType_TIME_MICROSECOND ColumnDataType = 21 + ColumnDataType_TIME_NANOSECOND ColumnDataType = 22 +) + +// Enum value maps for ColumnDataType. +var ( + ColumnDataType_name = map[int32]string{ + 0: "BOOLEAN", + 1: "INT8", + 2: "INT16", + 3: "INT32", + 4: "INT64", + 5: "UINT8", + 6: "UINT16", + 7: "UINT32", + 8: "UINT64", + 9: "FLOAT32", + 10: "FLOAT64", + 11: "BINARY", + 12: "STRING", + 13: "DATE", + 14: "DATETIME", + 15: "TIMESTAMP_SECOND", + 16: "TIMESTAMP_MILLISECOND", + 17: "TIMESTAMP_MICROSECOND", + 18: "TIMESTAMP_NANOSECOND", + 19: "TIME_SECOND", + 20: "TIME_MILLISECOND", + 21: "TIME_MICROSECOND", + 22: "TIME_NANOSECOND", + } + ColumnDataType_value = map[string]int32{ + "BOOLEAN": 0, + "INT8": 1, + "INT16": 2, + "INT32": 3, + "INT64": 4, + "UINT8": 5, + "UINT16": 6, + "UINT32": 7, + "UINT64": 8, + "FLOAT32": 9, + "FLOAT64": 10, + "BINARY": 11, + "STRING": 12, + "DATE": 13, + "DATETIME": 14, + "TIMESTAMP_SECOND": 15, + "TIMESTAMP_MILLISECOND": 16, + "TIMESTAMP_MICROSECOND": 17, + "TIMESTAMP_NANOSECOND": 18, + "TIME_SECOND": 19, + "TIME_MILLISECOND": 20, + "TIME_MICROSECOND": 21, + "TIME_NANOSECOND": 22, + } +) + +func (x ColumnDataType) Enum() *ColumnDataType { + p := new(ColumnDataType) + *p = x + return p +} + +func (x ColumnDataType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ColumnDataType) Descriptor() protoreflect.EnumDescriptor { + return file_greptime_v1_common_proto_enumTypes[1].Descriptor() +} + +func (ColumnDataType) Type() protoreflect.EnumType { + return &file_greptime_v1_common_proto_enumTypes[1] +} + +func (x ColumnDataType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ColumnDataType.Descriptor instead. +func (ColumnDataType) EnumDescriptor() ([]byte, []int) { + return file_greptime_v1_common_proto_rawDescGZIP(), []int{1} +} + type RequestHeader struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -507,6 +665,77 @@ func (x *FlightMetadata) GetAffectedRows() *AffectedRows { return nil } +type ColumnDef struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Datatype ColumnDataType `protobuf:"varint,2,opt,name=datatype,proto3,enum=greptime.v1.ColumnDataType" json:"datatype,omitempty"` + IsNullable bool `protobuf:"varint,3,opt,name=is_nullable,json=isNullable,proto3" json:"is_nullable,omitempty"` + DefaultConstraint []byte `protobuf:"bytes,4,opt,name=default_constraint,json=defaultConstraint,proto3" json:"default_constraint,omitempty"` +} + +func (x *ColumnDef) Reset() { + *x = ColumnDef{} + if protoimpl.UnsafeEnabled { + mi := &file_greptime_v1_common_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ColumnDef) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ColumnDef) ProtoMessage() {} + +func (x *ColumnDef) ProtoReflect() protoreflect.Message { + mi := &file_greptime_v1_common_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ColumnDef.ProtoReflect.Descriptor instead. +func (*ColumnDef) Descriptor() ([]byte, []int) { + return file_greptime_v1_common_proto_rawDescGZIP(), []int{8} +} + +func (x *ColumnDef) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *ColumnDef) GetDatatype() ColumnDataType { + if x != nil { + return x.Datatype + } + return ColumnDataType_BOOLEAN +} + +func (x *ColumnDef) GetIsNullable() bool { + if x != nil { + return x.IsNullable + } + return false +} + +func (x *ColumnDef) GetDefaultConstraint() []byte { + if x != nil { + return x.DefaultConstraint + } + return nil +} + var File_greptime_v1_common_proto protoreflect.FileDescriptor var file_greptime_v1_common_proto_rawDesc = []byte{ @@ -556,13 +785,50 @@ var file_greptime_v1_common_proto_rawDesc = []byte{ 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x72, 0x6f, 0x77, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x52, 0x6f, 0x77, 0x73, 0x52, 0x0c, 0x61, 0x66, 0x66, - 0x65, 0x63, 0x74, 0x65, 0x64, 0x52, 0x6f, 0x77, 0x73, 0x42, 0x4f, 0x0a, 0x0e, 0x69, 0x6f, 0x2e, - 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x06, 0x43, 0x6f, 0x6d, - 0x6d, 0x6f, 0x6e, 0x5a, 0x35, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x47, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x2f, 0x67, 0x72, 0x65, - 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x67, - 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x65, 0x63, 0x74, 0x65, 0x64, 0x52, 0x6f, 0x77, 0x73, 0x22, 0xa8, 0x01, 0x0a, 0x09, 0x43, 0x6f, + 0x6c, 0x75, 0x6d, 0x6e, 0x44, 0x65, 0x66, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x37, 0x0a, 0x08, 0x64, + 0x61, 0x74, 0x61, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, + 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6c, 0x75, + 0x6d, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x64, 0x61, 0x74, 0x61, + 0x74, 0x79, 0x70, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x73, 0x5f, 0x6e, 0x75, 0x6c, 0x6c, 0x61, + 0x62, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x73, 0x4e, 0x75, 0x6c, + 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x2d, 0x0a, 0x12, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, + 0x5f, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x11, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, + 0x61, 0x69, 0x6e, 0x74, 0x2a, 0x31, 0x0a, 0x0c, 0x53, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, + 0x54, 0x79, 0x70, 0x65, 0x12, 0x07, 0x0a, 0x03, 0x54, 0x41, 0x47, 0x10, 0x00, 0x12, 0x09, 0x0a, + 0x05, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x54, 0x49, 0x4d, 0x45, + 0x53, 0x54, 0x41, 0x4d, 0x50, 0x10, 0x02, 0x2a, 0xf9, 0x02, 0x0a, 0x0e, 0x43, 0x6f, 0x6c, 0x75, + 0x6d, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x42, 0x4f, + 0x4f, 0x4c, 0x45, 0x41, 0x4e, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x49, 0x4e, 0x54, 0x38, 0x10, + 0x01, 0x12, 0x09, 0x0a, 0x05, 0x49, 0x4e, 0x54, 0x31, 0x36, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, + 0x49, 0x4e, 0x54, 0x33, 0x32, 0x10, 0x03, 0x12, 0x09, 0x0a, 0x05, 0x49, 0x4e, 0x54, 0x36, 0x34, + 0x10, 0x04, 0x12, 0x09, 0x0a, 0x05, 0x55, 0x49, 0x4e, 0x54, 0x38, 0x10, 0x05, 0x12, 0x0a, 0x0a, + 0x06, 0x55, 0x49, 0x4e, 0x54, 0x31, 0x36, 0x10, 0x06, 0x12, 0x0a, 0x0a, 0x06, 0x55, 0x49, 0x4e, + 0x54, 0x33, 0x32, 0x10, 0x07, 0x12, 0x0a, 0x0a, 0x06, 0x55, 0x49, 0x4e, 0x54, 0x36, 0x34, 0x10, + 0x08, 0x12, 0x0b, 0x0a, 0x07, 0x46, 0x4c, 0x4f, 0x41, 0x54, 0x33, 0x32, 0x10, 0x09, 0x12, 0x0b, + 0x0a, 0x07, 0x46, 0x4c, 0x4f, 0x41, 0x54, 0x36, 0x34, 0x10, 0x0a, 0x12, 0x0a, 0x0a, 0x06, 0x42, + 0x49, 0x4e, 0x41, 0x52, 0x59, 0x10, 0x0b, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x54, 0x52, 0x49, 0x4e, + 0x47, 0x10, 0x0c, 0x12, 0x08, 0x0a, 0x04, 0x44, 0x41, 0x54, 0x45, 0x10, 0x0d, 0x12, 0x0c, 0x0a, + 0x08, 0x44, 0x41, 0x54, 0x45, 0x54, 0x49, 0x4d, 0x45, 0x10, 0x0e, 0x12, 0x14, 0x0a, 0x10, 0x54, + 0x49, 0x4d, 0x45, 0x53, 0x54, 0x41, 0x4d, 0x50, 0x5f, 0x53, 0x45, 0x43, 0x4f, 0x4e, 0x44, 0x10, + 0x0f, 0x12, 0x19, 0x0a, 0x15, 0x54, 0x49, 0x4d, 0x45, 0x53, 0x54, 0x41, 0x4d, 0x50, 0x5f, 0x4d, + 0x49, 0x4c, 0x4c, 0x49, 0x53, 0x45, 0x43, 0x4f, 0x4e, 0x44, 0x10, 0x10, 0x12, 0x19, 0x0a, 0x15, + 0x54, 0x49, 0x4d, 0x45, 0x53, 0x54, 0x41, 0x4d, 0x50, 0x5f, 0x4d, 0x49, 0x43, 0x52, 0x4f, 0x53, + 0x45, 0x43, 0x4f, 0x4e, 0x44, 0x10, 0x11, 0x12, 0x18, 0x0a, 0x14, 0x54, 0x49, 0x4d, 0x45, 0x53, + 0x54, 0x41, 0x4d, 0x50, 0x5f, 0x4e, 0x41, 0x4e, 0x4f, 0x53, 0x45, 0x43, 0x4f, 0x4e, 0x44, 0x10, + 0x12, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x49, 0x4d, 0x45, 0x5f, 0x53, 0x45, 0x43, 0x4f, 0x4e, 0x44, + 0x10, 0x13, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x49, 0x4d, 0x45, 0x5f, 0x4d, 0x49, 0x4c, 0x4c, 0x49, + 0x53, 0x45, 0x43, 0x4f, 0x4e, 0x44, 0x10, 0x14, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x49, 0x4d, 0x45, + 0x5f, 0x4d, 0x49, 0x43, 0x52, 0x4f, 0x53, 0x45, 0x43, 0x4f, 0x4e, 0x44, 0x10, 0x15, 0x12, 0x13, + 0x0a, 0x0f, 0x54, 0x49, 0x4d, 0x45, 0x5f, 0x4e, 0x41, 0x4e, 0x4f, 0x53, 0x45, 0x43, 0x4f, 0x4e, + 0x44, 0x10, 0x16, 0x42, 0x4f, 0x0a, 0x0e, 0x69, 0x6f, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, + 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x06, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5a, 0x35, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x70, 0x74, 0x69, + 0x6d, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2d, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, + 0x65, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -577,28 +843,33 @@ func file_greptime_v1_common_proto_rawDescGZIP() []byte { return file_greptime_v1_common_proto_rawDescData } -var file_greptime_v1_common_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_greptime_v1_common_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_greptime_v1_common_proto_msgTypes = make([]protoimpl.MessageInfo, 9) var file_greptime_v1_common_proto_goTypes = []interface{}{ - (*RequestHeader)(nil), // 0: greptime.v1.RequestHeader - (*ResponseHeader)(nil), // 1: greptime.v1.ResponseHeader - (*Status)(nil), // 2: greptime.v1.Status - (*AuthHeader)(nil), // 3: greptime.v1.AuthHeader - (*Basic)(nil), // 4: greptime.v1.Basic - (*Token)(nil), // 5: greptime.v1.Token - (*AffectedRows)(nil), // 6: greptime.v1.AffectedRows - (*FlightMetadata)(nil), // 7: greptime.v1.FlightMetadata + (SemanticType)(0), // 0: greptime.v1.SemanticType + (ColumnDataType)(0), // 1: greptime.v1.ColumnDataType + (*RequestHeader)(nil), // 2: greptime.v1.RequestHeader + (*ResponseHeader)(nil), // 3: greptime.v1.ResponseHeader + (*Status)(nil), // 4: greptime.v1.Status + (*AuthHeader)(nil), // 5: greptime.v1.AuthHeader + (*Basic)(nil), // 6: greptime.v1.Basic + (*Token)(nil), // 7: greptime.v1.Token + (*AffectedRows)(nil), // 8: greptime.v1.AffectedRows + (*FlightMetadata)(nil), // 9: greptime.v1.FlightMetadata + (*ColumnDef)(nil), // 10: greptime.v1.ColumnDef } var file_greptime_v1_common_proto_depIdxs = []int32{ - 3, // 0: greptime.v1.RequestHeader.authorization:type_name -> greptime.v1.AuthHeader - 2, // 1: greptime.v1.ResponseHeader.status:type_name -> greptime.v1.Status - 4, // 2: greptime.v1.AuthHeader.basic:type_name -> greptime.v1.Basic - 5, // 3: greptime.v1.AuthHeader.token:type_name -> greptime.v1.Token - 6, // 4: greptime.v1.FlightMetadata.affected_rows:type_name -> greptime.v1.AffectedRows - 5, // [5:5] is the sub-list for method output_type - 5, // [5:5] is the sub-list for method input_type - 5, // [5:5] is the sub-list for extension type_name - 5, // [5:5] is the sub-list for extension extendee - 0, // [0:5] is the sub-list for field type_name + 5, // 0: greptime.v1.RequestHeader.authorization:type_name -> greptime.v1.AuthHeader + 4, // 1: greptime.v1.ResponseHeader.status:type_name -> greptime.v1.Status + 6, // 2: greptime.v1.AuthHeader.basic:type_name -> greptime.v1.Basic + 7, // 3: greptime.v1.AuthHeader.token:type_name -> greptime.v1.Token + 8, // 4: greptime.v1.FlightMetadata.affected_rows:type_name -> greptime.v1.AffectedRows + 1, // 5: greptime.v1.ColumnDef.datatype:type_name -> greptime.v1.ColumnDataType + 6, // [6:6] is the sub-list for method output_type + 6, // [6:6] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name } func init() { file_greptime_v1_common_proto_init() } @@ -703,6 +974,18 @@ func file_greptime_v1_common_proto_init() { return nil } } + file_greptime_v1_common_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ColumnDef); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } file_greptime_v1_common_proto_msgTypes[0].OneofWrappers = []interface{}{} file_greptime_v1_common_proto_msgTypes[3].OneofWrappers = []interface{}{ @@ -714,13 +997,14 @@ func file_greptime_v1_common_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_greptime_v1_common_proto_rawDesc, - NumEnums: 0, - NumMessages: 8, + NumEnums: 2, + NumMessages: 9, NumExtensions: 0, NumServices: 0, }, GoTypes: file_greptime_v1_common_proto_goTypes, DependencyIndexes: file_greptime_v1_common_proto_depIdxs, + EnumInfos: file_greptime_v1_common_proto_enumTypes, MessageInfos: file_greptime_v1_common_proto_msgTypes, }.Build() File_greptime_v1_common_proto = out.File diff --git a/go/greptime/v1/ddl.pb.go b/go/greptime/v1/ddl.pb.go index 6540b33..c39d3f0 100644 --- a/go/greptime/v1/ddl.pb.go +++ b/go/greptime/v1/ddl.pb.go @@ -1212,7 +1212,7 @@ var file_greptime_v1_ddl_proto_rawDesc = []byte{ 0x0a, 0x15, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x64, 0x64, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x18, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, - 0x31, 0x2f, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xdf, + 0x31, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xdf, 0x03, 0x0a, 0x0a, 0x44, 0x64, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4a, 0x0a, 0x0f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, @@ -1470,7 +1470,7 @@ func file_greptime_v1_ddl_proto_init() { if File_greptime_v1_ddl_proto != nil { return } - file_greptime_v1_column_proto_init() + file_greptime_v1_common_proto_init() if !protoimpl.UnsafeEnabled { file_greptime_v1_ddl_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DdlRequest); i { diff --git a/java/src/main/java/io/greptime/v1/Columns.java b/java/src/main/java/io/greptime/v1/Columns.java index 455f805..ed1dfcb 100644 --- a/java/src/main/java/io/greptime/v1/Columns.java +++ b/java/src/main/java/io/greptime/v1/Columns.java @@ -14,303 +14,6 @@ public final class Columns { registerAllExtensions( (com.google.protobuf.ExtensionRegistryLite) registry); } - /** - * Protobuf enum {@code greptime.v1.ColumnDataType} - */ - public enum ColumnDataType - implements com.google.protobuf.ProtocolMessageEnum { - /** - * BOOLEAN = 0; - */ - BOOLEAN(0), - /** - * INT8 = 1; - */ - INT8(1), - /** - * INT16 = 2; - */ - INT16(2), - /** - * INT32 = 3; - */ - INT32(3), - /** - * INT64 = 4; - */ - INT64(4), - /** - * UINT8 = 5; - */ - UINT8(5), - /** - * UINT16 = 6; - */ - UINT16(6), - /** - * UINT32 = 7; - */ - UINT32(7), - /** - * UINT64 = 8; - */ - UINT64(8), - /** - * FLOAT32 = 9; - */ - FLOAT32(9), - /** - * FLOAT64 = 10; - */ - FLOAT64(10), - /** - * BINARY = 11; - */ - BINARY(11), - /** - * STRING = 12; - */ - STRING(12), - /** - * DATE = 13; - */ - DATE(13), - /** - * DATETIME = 14; - */ - DATETIME(14), - /** - * TIMESTAMP_SECOND = 15; - */ - TIMESTAMP_SECOND(15), - /** - * TIMESTAMP_MILLISECOND = 16; - */ - TIMESTAMP_MILLISECOND(16), - /** - * TIMESTAMP_MICROSECOND = 17; - */ - TIMESTAMP_MICROSECOND(17), - /** - * TIMESTAMP_NANOSECOND = 18; - */ - TIMESTAMP_NANOSECOND(18), - /** - * TIME_SECOND = 19; - */ - TIME_SECOND(19), - /** - * TIME_MILLISECOND = 20; - */ - TIME_MILLISECOND(20), - /** - * TIME_MICROSECOND = 21; - */ - TIME_MICROSECOND(21), - /** - * TIME_NANOSECOND = 22; - */ - TIME_NANOSECOND(22), - UNRECOGNIZED(-1), - ; - - /** - * BOOLEAN = 0; - */ - public static final int BOOLEAN_VALUE = 0; - /** - * INT8 = 1; - */ - public static final int INT8_VALUE = 1; - /** - * INT16 = 2; - */ - public static final int INT16_VALUE = 2; - /** - * INT32 = 3; - */ - public static final int INT32_VALUE = 3; - /** - * INT64 = 4; - */ - public static final int INT64_VALUE = 4; - /** - * UINT8 = 5; - */ - public static final int UINT8_VALUE = 5; - /** - * UINT16 = 6; - */ - public static final int UINT16_VALUE = 6; - /** - * UINT32 = 7; - */ - public static final int UINT32_VALUE = 7; - /** - * UINT64 = 8; - */ - public static final int UINT64_VALUE = 8; - /** - * FLOAT32 = 9; - */ - public static final int FLOAT32_VALUE = 9; - /** - * FLOAT64 = 10; - */ - public static final int FLOAT64_VALUE = 10; - /** - * BINARY = 11; - */ - public static final int BINARY_VALUE = 11; - /** - * STRING = 12; - */ - public static final int STRING_VALUE = 12; - /** - * DATE = 13; - */ - public static final int DATE_VALUE = 13; - /** - * DATETIME = 14; - */ - public static final int DATETIME_VALUE = 14; - /** - * TIMESTAMP_SECOND = 15; - */ - public static final int TIMESTAMP_SECOND_VALUE = 15; - /** - * TIMESTAMP_MILLISECOND = 16; - */ - public static final int TIMESTAMP_MILLISECOND_VALUE = 16; - /** - * TIMESTAMP_MICROSECOND = 17; - */ - public static final int TIMESTAMP_MICROSECOND_VALUE = 17; - /** - * TIMESTAMP_NANOSECOND = 18; - */ - public static final int TIMESTAMP_NANOSECOND_VALUE = 18; - /** - * TIME_SECOND = 19; - */ - public static final int TIME_SECOND_VALUE = 19; - /** - * TIME_MILLISECOND = 20; - */ - public static final int TIME_MILLISECOND_VALUE = 20; - /** - * TIME_MICROSECOND = 21; - */ - public static final int TIME_MICROSECOND_VALUE = 21; - /** - * TIME_NANOSECOND = 22; - */ - public static final int TIME_NANOSECOND_VALUE = 22; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static ColumnDataType valueOf(int value) { - return forNumber(value); - } - - /** - * @param value The numeric wire value of the corresponding enum entry. - * @return The enum associated with the given numeric wire value. - */ - public static ColumnDataType forNumber(int value) { - switch (value) { - case 0: return BOOLEAN; - case 1: return INT8; - case 2: return INT16; - case 3: return INT32; - case 4: return INT64; - case 5: return UINT8; - case 6: return UINT16; - case 7: return UINT32; - case 8: return UINT64; - case 9: return FLOAT32; - case 10: return FLOAT64; - case 11: return BINARY; - case 12: return STRING; - case 13: return DATE; - case 14: return DATETIME; - case 15: return TIMESTAMP_SECOND; - case 16: return TIMESTAMP_MILLISECOND; - case 17: return TIMESTAMP_MICROSECOND; - case 18: return TIMESTAMP_NANOSECOND; - case 19: return TIME_SECOND; - case 20: return TIME_MILLISECOND; - case 21: return TIME_MICROSECOND; - case 22: return TIME_NANOSECOND; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - ColumnDataType> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public ColumnDataType findValueByNumber(int number) { - return ColumnDataType.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return io.greptime.v1.Columns.getDescriptor().getEnumTypes().get(0); - } - - private static final ColumnDataType[] VALUES = values(); - - public static ColumnDataType valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private ColumnDataType(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:greptime.v1.ColumnDataType) - } - public interface ColumnOrBuilder extends // @@protoc_insertion_point(interface_extends:greptime.v1.Column) com.google.protobuf.MessageOrBuilder { @@ -328,15 +31,15 @@ public final class Columns { getColumnNameBytes(); /** - * .greptime.v1.Column.SemanticType semantic_type = 2; + * .greptime.v1.SemanticType semantic_type = 2; * @return The enum numeric value on the wire for semanticType. */ int getSemanticTypeValue(); /** - * .greptime.v1.Column.SemanticType semantic_type = 2; + * .greptime.v1.SemanticType semantic_type = 2; * @return The semanticType. */ - io.greptime.v1.Columns.Column.SemanticType getSemanticType(); + io.greptime.v1.Common.SemanticType getSemanticType(); /** *
@@ -415,7 +118,7 @@ public final class Columns {
      * .greptime.v1.ColumnDataType datatype = 5;
      * @return The datatype.
      */
-    io.greptime.v1.Columns.ColumnDataType getDatatype();
+    io.greptime.v1.Common.ColumnDataType getDatatype();
   }
   /**
    * Protobuf type {@code greptime.v1.Column}
@@ -536,123 +239,6 @@ public final class Columns {
               io.greptime.v1.Columns.Column.class, io.greptime.v1.Columns.Column.Builder.class);
     }
 
-    /**
-     * Protobuf enum {@code greptime.v1.Column.SemanticType}
-     */
-    public enum SemanticType
-        implements com.google.protobuf.ProtocolMessageEnum {
-      /**
-       * TAG = 0;
-       */
-      TAG(0),
-      /**
-       * FIELD = 1;
-       */
-      FIELD(1),
-      /**
-       * TIMESTAMP = 2;
-       */
-      TIMESTAMP(2),
-      UNRECOGNIZED(-1),
-      ;
-
-      /**
-       * TAG = 0;
-       */
-      public static final int TAG_VALUE = 0;
-      /**
-       * FIELD = 1;
-       */
-      public static final int FIELD_VALUE = 1;
-      /**
-       * TIMESTAMP = 2;
-       */
-      public static final int TIMESTAMP_VALUE = 2;
-
-
-      public final int getNumber() {
-        if (this == UNRECOGNIZED) {
-          throw new java.lang.IllegalArgumentException(
-              "Can't get the number of an unknown enum value.");
-        }
-        return value;
-      }
-
-      /**
-       * @param value The numeric wire value of the corresponding enum entry.
-       * @return The enum associated with the given numeric wire value.
-       * @deprecated Use {@link #forNumber(int)} instead.
-       */
-      @java.lang.Deprecated
-      public static SemanticType valueOf(int value) {
-        return forNumber(value);
-      }
-
-      /**
-       * @param value The numeric wire value of the corresponding enum entry.
-       * @return The enum associated with the given numeric wire value.
-       */
-      public static SemanticType forNumber(int value) {
-        switch (value) {
-          case 0: return TAG;
-          case 1: return FIELD;
-          case 2: return TIMESTAMP;
-          default: return null;
-        }
-      }
-
-      public static com.google.protobuf.Internal.EnumLiteMap
-          internalGetValueMap() {
-        return internalValueMap;
-      }
-      private static final com.google.protobuf.Internal.EnumLiteMap<
-          SemanticType> internalValueMap =
-            new com.google.protobuf.Internal.EnumLiteMap() {
-              public SemanticType findValueByNumber(int number) {
-                return SemanticType.forNumber(number);
-              }
-            };
-
-      public final com.google.protobuf.Descriptors.EnumValueDescriptor
-          getValueDescriptor() {
-        if (this == UNRECOGNIZED) {
-          throw new java.lang.IllegalStateException(
-              "Can't get the descriptor of an unrecognized enum value.");
-        }
-        return getDescriptor().getValues().get(ordinal());
-      }
-      public final com.google.protobuf.Descriptors.EnumDescriptor
-          getDescriptorForType() {
-        return getDescriptor();
-      }
-      public static final com.google.protobuf.Descriptors.EnumDescriptor
-          getDescriptor() {
-        return io.greptime.v1.Columns.Column.getDescriptor().getEnumTypes().get(0);
-      }
-
-      private static final SemanticType[] VALUES = values();
-
-      public static SemanticType valueOf(
-          com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
-        if (desc.getType() != getDescriptor()) {
-          throw new java.lang.IllegalArgumentException(
-            "EnumValueDescriptor is not for this type.");
-        }
-        if (desc.getIndex() == -1) {
-          return UNRECOGNIZED;
-        }
-        return VALUES[desc.getIndex()];
-      }
-
-      private final int value;
-
-      private SemanticType(int value) {
-        this.value = value;
-      }
-
-      // @@protoc_insertion_point(enum_scope:greptime.v1.Column.SemanticType)
-    }
-
     public interface ValuesOrBuilder extends
         // @@protoc_insertion_point(interface_extends:greptime.v1.Column.Values)
         com.google.protobuf.MessageOrBuilder {
@@ -5555,20 +5141,20 @@ public final class Columns {
     public static final int SEMANTIC_TYPE_FIELD_NUMBER = 2;
     private int semanticType_;
     /**
-     * .greptime.v1.Column.SemanticType semantic_type = 2;
+     * .greptime.v1.SemanticType semantic_type = 2;
      * @return The enum numeric value on the wire for semanticType.
      */
     @java.lang.Override public int getSemanticTypeValue() {
       return semanticType_;
     }
     /**
-     * .greptime.v1.Column.SemanticType semantic_type = 2;
+     * .greptime.v1.SemanticType semantic_type = 2;
      * @return The semanticType.
      */
-    @java.lang.Override public io.greptime.v1.Columns.Column.SemanticType getSemanticType() {
+    @java.lang.Override public io.greptime.v1.Common.SemanticType getSemanticType() {
       @SuppressWarnings("deprecation")
-      io.greptime.v1.Columns.Column.SemanticType result = io.greptime.v1.Columns.Column.SemanticType.valueOf(semanticType_);
-      return result == null ? io.greptime.v1.Columns.Column.SemanticType.UNRECOGNIZED : result;
+      io.greptime.v1.Common.SemanticType result = io.greptime.v1.Common.SemanticType.valueOf(semanticType_);
+      return result == null ? io.greptime.v1.Common.SemanticType.UNRECOGNIZED : result;
     }
 
     public static final int VALUES_FIELD_NUMBER = 3;
@@ -5668,10 +5254,10 @@ public final class Columns {
      * .greptime.v1.ColumnDataType datatype = 5;
      * @return The datatype.
      */
-    @java.lang.Override public io.greptime.v1.Columns.ColumnDataType getDatatype() {
+    @java.lang.Override public io.greptime.v1.Common.ColumnDataType getDatatype() {
       @SuppressWarnings("deprecation")
-      io.greptime.v1.Columns.ColumnDataType result = io.greptime.v1.Columns.ColumnDataType.valueOf(datatype_);
-      return result == null ? io.greptime.v1.Columns.ColumnDataType.UNRECOGNIZED : result;
+      io.greptime.v1.Common.ColumnDataType result = io.greptime.v1.Common.ColumnDataType.valueOf(datatype_);
+      return result == null ? io.greptime.v1.Common.ColumnDataType.UNRECOGNIZED : result;
     }
 
     private byte memoizedIsInitialized = -1;
@@ -5691,7 +5277,7 @@ public final class Columns {
       if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(columnName_)) {
         com.google.protobuf.GeneratedMessageV3.writeString(output, 1, columnName_);
       }
-      if (semanticType_ != io.greptime.v1.Columns.Column.SemanticType.TAG.getNumber()) {
+      if (semanticType_ != io.greptime.v1.Common.SemanticType.TAG.getNumber()) {
         output.writeEnum(2, semanticType_);
       }
       if (values_ != null) {
@@ -5700,7 +5286,7 @@ public final class Columns {
       if (!nullMask_.isEmpty()) {
         output.writeBytes(4, nullMask_);
       }
-      if (datatype_ != io.greptime.v1.Columns.ColumnDataType.BOOLEAN.getNumber()) {
+      if (datatype_ != io.greptime.v1.Common.ColumnDataType.BOOLEAN.getNumber()) {
         output.writeEnum(5, datatype_);
       }
       unknownFields.writeTo(output);
@@ -5715,7 +5301,7 @@ public final class Columns {
       if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(columnName_)) {
         size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, columnName_);
       }
-      if (semanticType_ != io.greptime.v1.Columns.Column.SemanticType.TAG.getNumber()) {
+      if (semanticType_ != io.greptime.v1.Common.SemanticType.TAG.getNumber()) {
         size += com.google.protobuf.CodedOutputStream
           .computeEnumSize(2, semanticType_);
       }
@@ -5727,7 +5313,7 @@ public final class Columns {
         size += com.google.protobuf.CodedOutputStream
           .computeBytesSize(4, nullMask_);
       }
-      if (datatype_ != io.greptime.v1.Columns.ColumnDataType.BOOLEAN.getNumber()) {
+      if (datatype_ != io.greptime.v1.Common.ColumnDataType.BOOLEAN.getNumber()) {
         size += com.google.protobuf.CodedOutputStream
           .computeEnumSize(5, datatype_);
       }
@@ -6133,14 +5719,14 @@ public final class Columns {
 
       private int semanticType_ = 0;
       /**
-       * .greptime.v1.Column.SemanticType semantic_type = 2;
+       * .greptime.v1.SemanticType semantic_type = 2;
        * @return The enum numeric value on the wire for semanticType.
        */
       @java.lang.Override public int getSemanticTypeValue() {
         return semanticType_;
       }
       /**
-       * .greptime.v1.Column.SemanticType semantic_type = 2;
+       * .greptime.v1.SemanticType semantic_type = 2;
        * @param value The enum numeric value on the wire for semanticType to set.
        * @return This builder for chaining.
        */
@@ -6151,21 +5737,21 @@ public final class Columns {
         return this;
       }
       /**
-       * .greptime.v1.Column.SemanticType semantic_type = 2;
+       * .greptime.v1.SemanticType semantic_type = 2;
        * @return The semanticType.
        */
       @java.lang.Override
-      public io.greptime.v1.Columns.Column.SemanticType getSemanticType() {
+      public io.greptime.v1.Common.SemanticType getSemanticType() {
         @SuppressWarnings("deprecation")
-        io.greptime.v1.Columns.Column.SemanticType result = io.greptime.v1.Columns.Column.SemanticType.valueOf(semanticType_);
-        return result == null ? io.greptime.v1.Columns.Column.SemanticType.UNRECOGNIZED : result;
+        io.greptime.v1.Common.SemanticType result = io.greptime.v1.Common.SemanticType.valueOf(semanticType_);
+        return result == null ? io.greptime.v1.Common.SemanticType.UNRECOGNIZED : result;
       }
       /**
-       * .greptime.v1.Column.SemanticType semantic_type = 2;
+       * .greptime.v1.SemanticType semantic_type = 2;
        * @param value The semanticType to set.
        * @return This builder for chaining.
        */
-      public Builder setSemanticType(io.greptime.v1.Columns.Column.SemanticType value) {
+      public Builder setSemanticType(io.greptime.v1.Common.SemanticType value) {
         if (value == null) {
           throw new NullPointerException();
         }
@@ -6175,7 +5761,7 @@ public final class Columns {
         return this;
       }
       /**
-       * .greptime.v1.Column.SemanticType semantic_type = 2;
+       * .greptime.v1.SemanticType semantic_type = 2;
        * @return This builder for chaining.
        */
       public Builder clearSemanticType() {
@@ -6491,10 +6077,10 @@ public final class Columns {
        * @return The datatype.
        */
       @java.lang.Override
-      public io.greptime.v1.Columns.ColumnDataType getDatatype() {
+      public io.greptime.v1.Common.ColumnDataType getDatatype() {
         @SuppressWarnings("deprecation")
-        io.greptime.v1.Columns.ColumnDataType result = io.greptime.v1.Columns.ColumnDataType.valueOf(datatype_);
-        return result == null ? io.greptime.v1.Columns.ColumnDataType.UNRECOGNIZED : result;
+        io.greptime.v1.Common.ColumnDataType result = io.greptime.v1.Common.ColumnDataType.valueOf(datatype_);
+        return result == null ? io.greptime.v1.Common.ColumnDataType.UNRECOGNIZED : result;
       }
       /**
        * 
@@ -6505,7 +6091,7 @@ public final class Columns {
        * @param value The datatype to set.
        * @return This builder for chaining.
        */
-      public Builder setDatatype(io.greptime.v1.Columns.ColumnDataType value) {
+      public Builder setDatatype(io.greptime.v1.Common.ColumnDataType value) {
         if (value == null) {
           throw new NullPointerException();
         }
@@ -6581,828 +6167,6 @@ public final class Columns {
 
   }
 
-  public interface ColumnDefOrBuilder extends
-      // @@protoc_insertion_point(interface_extends:greptime.v1.ColumnDef)
-      com.google.protobuf.MessageOrBuilder {
-
-    /**
-     * string name = 1;
-     * @return The name.
-     */
-    java.lang.String getName();
-    /**
-     * string name = 1;
-     * @return The bytes for name.
-     */
-    com.google.protobuf.ByteString
-        getNameBytes();
-
-    /**
-     * .greptime.v1.ColumnDataType datatype = 2;
-     * @return The enum numeric value on the wire for datatype.
-     */
-    int getDatatypeValue();
-    /**
-     * .greptime.v1.ColumnDataType datatype = 2;
-     * @return The datatype.
-     */
-    io.greptime.v1.Columns.ColumnDataType getDatatype();
-
-    /**
-     * bool is_nullable = 3;
-     * @return The isNullable.
-     */
-    boolean getIsNullable();
-
-    /**
-     * bytes default_constraint = 4;
-     * @return The defaultConstraint.
-     */
-    com.google.protobuf.ByteString getDefaultConstraint();
-  }
-  /**
-   * Protobuf type {@code greptime.v1.ColumnDef}
-   */
-  public static final class ColumnDef extends
-      com.google.protobuf.GeneratedMessageV3 implements
-      // @@protoc_insertion_point(message_implements:greptime.v1.ColumnDef)
-      ColumnDefOrBuilder {
-  private static final long serialVersionUID = 0L;
-    // Use ColumnDef.newBuilder() to construct.
-    private ColumnDef(com.google.protobuf.GeneratedMessageV3.Builder builder) {
-      super(builder);
-    }
-    private ColumnDef() {
-      name_ = "";
-      datatype_ = 0;
-      defaultConstraint_ = com.google.protobuf.ByteString.EMPTY;
-    }
-
-    @java.lang.Override
-    @SuppressWarnings({"unused"})
-    protected java.lang.Object newInstance(
-        UnusedPrivateParameter unused) {
-      return new ColumnDef();
-    }
-
-    @java.lang.Override
-    public final com.google.protobuf.UnknownFieldSet
-    getUnknownFields() {
-      return this.unknownFields;
-    }
-    private ColumnDef(
-        com.google.protobuf.CodedInputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      this();
-      if (extensionRegistry == null) {
-        throw new java.lang.NullPointerException();
-      }
-      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
-          com.google.protobuf.UnknownFieldSet.newBuilder();
-      try {
-        boolean done = false;
-        while (!done) {
-          int tag = input.readTag();
-          switch (tag) {
-            case 0:
-              done = true;
-              break;
-            case 10: {
-              java.lang.String s = input.readStringRequireUtf8();
-
-              name_ = s;
-              break;
-            }
-            case 16: {
-              int rawValue = input.readEnum();
-
-              datatype_ = rawValue;
-              break;
-            }
-            case 24: {
-
-              isNullable_ = input.readBool();
-              break;
-            }
-            case 34: {
-
-              defaultConstraint_ = input.readBytes();
-              break;
-            }
-            default: {
-              if (!parseUnknownField(
-                  input, unknownFields, extensionRegistry, tag)) {
-                done = true;
-              }
-              break;
-            }
-          }
-        }
-      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-        throw e.setUnfinishedMessage(this);
-      } catch (com.google.protobuf.UninitializedMessageException e) {
-        throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
-      } catch (java.io.IOException e) {
-        throw new com.google.protobuf.InvalidProtocolBufferException(
-            e).setUnfinishedMessage(this);
-      } finally {
-        this.unknownFields = unknownFields.build();
-        makeExtensionsImmutable();
-      }
-    }
-    public static final com.google.protobuf.Descriptors.Descriptor
-        getDescriptor() {
-      return io.greptime.v1.Columns.internal_static_greptime_v1_ColumnDef_descriptor;
-    }
-
-    @java.lang.Override
-    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
-        internalGetFieldAccessorTable() {
-      return io.greptime.v1.Columns.internal_static_greptime_v1_ColumnDef_fieldAccessorTable
-          .ensureFieldAccessorsInitialized(
-              io.greptime.v1.Columns.ColumnDef.class, io.greptime.v1.Columns.ColumnDef.Builder.class);
-    }
-
-    public static final int NAME_FIELD_NUMBER = 1;
-    private volatile java.lang.Object name_;
-    /**
-     * string name = 1;
-     * @return The name.
-     */
-    @java.lang.Override
-    public java.lang.String getName() {
-      java.lang.Object ref = name_;
-      if (ref instanceof java.lang.String) {
-        return (java.lang.String) ref;
-      } else {
-        com.google.protobuf.ByteString bs = 
-            (com.google.protobuf.ByteString) ref;
-        java.lang.String s = bs.toStringUtf8();
-        name_ = s;
-        return s;
-      }
-    }
-    /**
-     * string name = 1;
-     * @return The bytes for name.
-     */
-    @java.lang.Override
-    public com.google.protobuf.ByteString
-        getNameBytes() {
-      java.lang.Object ref = name_;
-      if (ref instanceof java.lang.String) {
-        com.google.protobuf.ByteString b = 
-            com.google.protobuf.ByteString.copyFromUtf8(
-                (java.lang.String) ref);
-        name_ = b;
-        return b;
-      } else {
-        return (com.google.protobuf.ByteString) ref;
-      }
-    }
-
-    public static final int DATATYPE_FIELD_NUMBER = 2;
-    private int datatype_;
-    /**
-     * .greptime.v1.ColumnDataType datatype = 2;
-     * @return The enum numeric value on the wire for datatype.
-     */
-    @java.lang.Override public int getDatatypeValue() {
-      return datatype_;
-    }
-    /**
-     * .greptime.v1.ColumnDataType datatype = 2;
-     * @return The datatype.
-     */
-    @java.lang.Override public io.greptime.v1.Columns.ColumnDataType getDatatype() {
-      @SuppressWarnings("deprecation")
-      io.greptime.v1.Columns.ColumnDataType result = io.greptime.v1.Columns.ColumnDataType.valueOf(datatype_);
-      return result == null ? io.greptime.v1.Columns.ColumnDataType.UNRECOGNIZED : result;
-    }
-
-    public static final int IS_NULLABLE_FIELD_NUMBER = 3;
-    private boolean isNullable_;
-    /**
-     * bool is_nullable = 3;
-     * @return The isNullable.
-     */
-    @java.lang.Override
-    public boolean getIsNullable() {
-      return isNullable_;
-    }
-
-    public static final int DEFAULT_CONSTRAINT_FIELD_NUMBER = 4;
-    private com.google.protobuf.ByteString defaultConstraint_;
-    /**
-     * bytes default_constraint = 4;
-     * @return The defaultConstraint.
-     */
-    @java.lang.Override
-    public com.google.protobuf.ByteString getDefaultConstraint() {
-      return defaultConstraint_;
-    }
-
-    private byte memoizedIsInitialized = -1;
-    @java.lang.Override
-    public final boolean isInitialized() {
-      byte isInitialized = memoizedIsInitialized;
-      if (isInitialized == 1) return true;
-      if (isInitialized == 0) return false;
-
-      memoizedIsInitialized = 1;
-      return true;
-    }
-
-    @java.lang.Override
-    public void writeTo(com.google.protobuf.CodedOutputStream output)
-                        throws java.io.IOException {
-      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
-        com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
-      }
-      if (datatype_ != io.greptime.v1.Columns.ColumnDataType.BOOLEAN.getNumber()) {
-        output.writeEnum(2, datatype_);
-      }
-      if (isNullable_ != false) {
-        output.writeBool(3, isNullable_);
-      }
-      if (!defaultConstraint_.isEmpty()) {
-        output.writeBytes(4, defaultConstraint_);
-      }
-      unknownFields.writeTo(output);
-    }
-
-    @java.lang.Override
-    public int getSerializedSize() {
-      int size = memoizedSize;
-      if (size != -1) return size;
-
-      size = 0;
-      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
-        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
-      }
-      if (datatype_ != io.greptime.v1.Columns.ColumnDataType.BOOLEAN.getNumber()) {
-        size += com.google.protobuf.CodedOutputStream
-          .computeEnumSize(2, datatype_);
-      }
-      if (isNullable_ != false) {
-        size += com.google.protobuf.CodedOutputStream
-          .computeBoolSize(3, isNullable_);
-      }
-      if (!defaultConstraint_.isEmpty()) {
-        size += com.google.protobuf.CodedOutputStream
-          .computeBytesSize(4, defaultConstraint_);
-      }
-      size += unknownFields.getSerializedSize();
-      memoizedSize = size;
-      return size;
-    }
-
-    @java.lang.Override
-    public boolean equals(final java.lang.Object obj) {
-      if (obj == this) {
-       return true;
-      }
-      if (!(obj instanceof io.greptime.v1.Columns.ColumnDef)) {
-        return super.equals(obj);
-      }
-      io.greptime.v1.Columns.ColumnDef other = (io.greptime.v1.Columns.ColumnDef) obj;
-
-      if (!getName()
-          .equals(other.getName())) return false;
-      if (datatype_ != other.datatype_) return false;
-      if (getIsNullable()
-          != other.getIsNullable()) return false;
-      if (!getDefaultConstraint()
-          .equals(other.getDefaultConstraint())) return false;
-      if (!unknownFields.equals(other.unknownFields)) return false;
-      return true;
-    }
-
-    @java.lang.Override
-    public int hashCode() {
-      if (memoizedHashCode != 0) {
-        return memoizedHashCode;
-      }
-      int hash = 41;
-      hash = (19 * hash) + getDescriptor().hashCode();
-      hash = (37 * hash) + NAME_FIELD_NUMBER;
-      hash = (53 * hash) + getName().hashCode();
-      hash = (37 * hash) + DATATYPE_FIELD_NUMBER;
-      hash = (53 * hash) + datatype_;
-      hash = (37 * hash) + IS_NULLABLE_FIELD_NUMBER;
-      hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
-          getIsNullable());
-      hash = (37 * hash) + DEFAULT_CONSTRAINT_FIELD_NUMBER;
-      hash = (53 * hash) + getDefaultConstraint().hashCode();
-      hash = (29 * hash) + unknownFields.hashCode();
-      memoizedHashCode = hash;
-      return hash;
-    }
-
-    public static io.greptime.v1.Columns.ColumnDef parseFrom(
-        java.nio.ByteBuffer data)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      return PARSER.parseFrom(data);
-    }
-    public static io.greptime.v1.Columns.ColumnDef parseFrom(
-        java.nio.ByteBuffer data,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      return PARSER.parseFrom(data, extensionRegistry);
-    }
-    public static io.greptime.v1.Columns.ColumnDef parseFrom(
-        com.google.protobuf.ByteString data)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      return PARSER.parseFrom(data);
-    }
-    public static io.greptime.v1.Columns.ColumnDef parseFrom(
-        com.google.protobuf.ByteString data,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      return PARSER.parseFrom(data, extensionRegistry);
-    }
-    public static io.greptime.v1.Columns.ColumnDef parseFrom(byte[] data)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      return PARSER.parseFrom(data);
-    }
-    public static io.greptime.v1.Columns.ColumnDef parseFrom(
-        byte[] data,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      return PARSER.parseFrom(data, extensionRegistry);
-    }
-    public static io.greptime.v1.Columns.ColumnDef parseFrom(java.io.InputStream input)
-        throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
-          .parseWithIOException(PARSER, input);
-    }
-    public static io.greptime.v1.Columns.ColumnDef parseFrom(
-        java.io.InputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
-          .parseWithIOException(PARSER, input, extensionRegistry);
-    }
-    public static io.greptime.v1.Columns.ColumnDef parseDelimitedFrom(java.io.InputStream input)
-        throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
-          .parseDelimitedWithIOException(PARSER, input);
-    }
-    public static io.greptime.v1.Columns.ColumnDef parseDelimitedFrom(
-        java.io.InputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
-          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
-    }
-    public static io.greptime.v1.Columns.ColumnDef parseFrom(
-        com.google.protobuf.CodedInputStream input)
-        throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
-          .parseWithIOException(PARSER, input);
-    }
-    public static io.greptime.v1.Columns.ColumnDef parseFrom(
-        com.google.protobuf.CodedInputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws java.io.IOException {
-      return com.google.protobuf.GeneratedMessageV3
-          .parseWithIOException(PARSER, input, extensionRegistry);
-    }
-
-    @java.lang.Override
-    public Builder newBuilderForType() { return newBuilder(); }
-    public static Builder newBuilder() {
-      return DEFAULT_INSTANCE.toBuilder();
-    }
-    public static Builder newBuilder(io.greptime.v1.Columns.ColumnDef prototype) {
-      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
-    }
-    @java.lang.Override
-    public Builder toBuilder() {
-      return this == DEFAULT_INSTANCE
-          ? new Builder() : new Builder().mergeFrom(this);
-    }
-
-    @java.lang.Override
-    protected Builder newBuilderForType(
-        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
-      Builder builder = new Builder(parent);
-      return builder;
-    }
-    /**
-     * Protobuf type {@code greptime.v1.ColumnDef}
-     */
-    public static final class Builder extends
-        com.google.protobuf.GeneratedMessageV3.Builder implements
-        // @@protoc_insertion_point(builder_implements:greptime.v1.ColumnDef)
-        io.greptime.v1.Columns.ColumnDefOrBuilder {
-      public static final com.google.protobuf.Descriptors.Descriptor
-          getDescriptor() {
-        return io.greptime.v1.Columns.internal_static_greptime_v1_ColumnDef_descriptor;
-      }
-
-      @java.lang.Override
-      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
-          internalGetFieldAccessorTable() {
-        return io.greptime.v1.Columns.internal_static_greptime_v1_ColumnDef_fieldAccessorTable
-            .ensureFieldAccessorsInitialized(
-                io.greptime.v1.Columns.ColumnDef.class, io.greptime.v1.Columns.ColumnDef.Builder.class);
-      }
-
-      // Construct using io.greptime.v1.Columns.ColumnDef.newBuilder()
-      private Builder() {
-        maybeForceBuilderInitialization();
-      }
-
-      private Builder(
-          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
-        super(parent);
-        maybeForceBuilderInitialization();
-      }
-      private void maybeForceBuilderInitialization() {
-        if (com.google.protobuf.GeneratedMessageV3
-                .alwaysUseFieldBuilders) {
-        }
-      }
-      @java.lang.Override
-      public Builder clear() {
-        super.clear();
-        name_ = "";
-
-        datatype_ = 0;
-
-        isNullable_ = false;
-
-        defaultConstraint_ = com.google.protobuf.ByteString.EMPTY;
-
-        return this;
-      }
-
-      @java.lang.Override
-      public com.google.protobuf.Descriptors.Descriptor
-          getDescriptorForType() {
-        return io.greptime.v1.Columns.internal_static_greptime_v1_ColumnDef_descriptor;
-      }
-
-      @java.lang.Override
-      public io.greptime.v1.Columns.ColumnDef getDefaultInstanceForType() {
-        return io.greptime.v1.Columns.ColumnDef.getDefaultInstance();
-      }
-
-      @java.lang.Override
-      public io.greptime.v1.Columns.ColumnDef build() {
-        io.greptime.v1.Columns.ColumnDef result = buildPartial();
-        if (!result.isInitialized()) {
-          throw newUninitializedMessageException(result);
-        }
-        return result;
-      }
-
-      @java.lang.Override
-      public io.greptime.v1.Columns.ColumnDef buildPartial() {
-        io.greptime.v1.Columns.ColumnDef result = new io.greptime.v1.Columns.ColumnDef(this);
-        result.name_ = name_;
-        result.datatype_ = datatype_;
-        result.isNullable_ = isNullable_;
-        result.defaultConstraint_ = defaultConstraint_;
-        onBuilt();
-        return result;
-      }
-
-      @java.lang.Override
-      public Builder clone() {
-        return super.clone();
-      }
-      @java.lang.Override
-      public Builder setField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          java.lang.Object value) {
-        return super.setField(field, value);
-      }
-      @java.lang.Override
-      public Builder clearField(
-          com.google.protobuf.Descriptors.FieldDescriptor field) {
-        return super.clearField(field);
-      }
-      @java.lang.Override
-      public Builder clearOneof(
-          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
-        return super.clearOneof(oneof);
-      }
-      @java.lang.Override
-      public Builder setRepeatedField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          int index, java.lang.Object value) {
-        return super.setRepeatedField(field, index, value);
-      }
-      @java.lang.Override
-      public Builder addRepeatedField(
-          com.google.protobuf.Descriptors.FieldDescriptor field,
-          java.lang.Object value) {
-        return super.addRepeatedField(field, value);
-      }
-      @java.lang.Override
-      public Builder mergeFrom(com.google.protobuf.Message other) {
-        if (other instanceof io.greptime.v1.Columns.ColumnDef) {
-          return mergeFrom((io.greptime.v1.Columns.ColumnDef)other);
-        } else {
-          super.mergeFrom(other);
-          return this;
-        }
-      }
-
-      public Builder mergeFrom(io.greptime.v1.Columns.ColumnDef other) {
-        if (other == io.greptime.v1.Columns.ColumnDef.getDefaultInstance()) return this;
-        if (!other.getName().isEmpty()) {
-          name_ = other.name_;
-          onChanged();
-        }
-        if (other.datatype_ != 0) {
-          setDatatypeValue(other.getDatatypeValue());
-        }
-        if (other.getIsNullable() != false) {
-          setIsNullable(other.getIsNullable());
-        }
-        if (other.getDefaultConstraint() != com.google.protobuf.ByteString.EMPTY) {
-          setDefaultConstraint(other.getDefaultConstraint());
-        }
-        this.mergeUnknownFields(other.unknownFields);
-        onChanged();
-        return this;
-      }
-
-      @java.lang.Override
-      public final boolean isInitialized() {
-        return true;
-      }
-
-      @java.lang.Override
-      public Builder mergeFrom(
-          com.google.protobuf.CodedInputStream input,
-          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-          throws java.io.IOException {
-        io.greptime.v1.Columns.ColumnDef parsedMessage = null;
-        try {
-          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
-        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-          parsedMessage = (io.greptime.v1.Columns.ColumnDef) e.getUnfinishedMessage();
-          throw e.unwrapIOException();
-        } finally {
-          if (parsedMessage != null) {
-            mergeFrom(parsedMessage);
-          }
-        }
-        return this;
-      }
-
-      private java.lang.Object name_ = "";
-      /**
-       * string name = 1;
-       * @return The name.
-       */
-      public java.lang.String getName() {
-        java.lang.Object ref = name_;
-        if (!(ref instanceof java.lang.String)) {
-          com.google.protobuf.ByteString bs =
-              (com.google.protobuf.ByteString) ref;
-          java.lang.String s = bs.toStringUtf8();
-          name_ = s;
-          return s;
-        } else {
-          return (java.lang.String) ref;
-        }
-      }
-      /**
-       * string name = 1;
-       * @return The bytes for name.
-       */
-      public com.google.protobuf.ByteString
-          getNameBytes() {
-        java.lang.Object ref = name_;
-        if (ref instanceof String) {
-          com.google.protobuf.ByteString b = 
-              com.google.protobuf.ByteString.copyFromUtf8(
-                  (java.lang.String) ref);
-          name_ = b;
-          return b;
-        } else {
-          return (com.google.protobuf.ByteString) ref;
-        }
-      }
-      /**
-       * string name = 1;
-       * @param value The name to set.
-       * @return This builder for chaining.
-       */
-      public Builder setName(
-          java.lang.String value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  
-        name_ = value;
-        onChanged();
-        return this;
-      }
-      /**
-       * string name = 1;
-       * @return This builder for chaining.
-       */
-      public Builder clearName() {
-        
-        name_ = getDefaultInstance().getName();
-        onChanged();
-        return this;
-      }
-      /**
-       * string name = 1;
-       * @param value The bytes for name to set.
-       * @return This builder for chaining.
-       */
-      public Builder setNameBytes(
-          com.google.protobuf.ByteString value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  checkByteStringIsUtf8(value);
-        
-        name_ = value;
-        onChanged();
-        return this;
-      }
-
-      private int datatype_ = 0;
-      /**
-       * .greptime.v1.ColumnDataType datatype = 2;
-       * @return The enum numeric value on the wire for datatype.
-       */
-      @java.lang.Override public int getDatatypeValue() {
-        return datatype_;
-      }
-      /**
-       * .greptime.v1.ColumnDataType datatype = 2;
-       * @param value The enum numeric value on the wire for datatype to set.
-       * @return This builder for chaining.
-       */
-      public Builder setDatatypeValue(int value) {
-        
-        datatype_ = value;
-        onChanged();
-        return this;
-      }
-      /**
-       * .greptime.v1.ColumnDataType datatype = 2;
-       * @return The datatype.
-       */
-      @java.lang.Override
-      public io.greptime.v1.Columns.ColumnDataType getDatatype() {
-        @SuppressWarnings("deprecation")
-        io.greptime.v1.Columns.ColumnDataType result = io.greptime.v1.Columns.ColumnDataType.valueOf(datatype_);
-        return result == null ? io.greptime.v1.Columns.ColumnDataType.UNRECOGNIZED : result;
-      }
-      /**
-       * .greptime.v1.ColumnDataType datatype = 2;
-       * @param value The datatype to set.
-       * @return This builder for chaining.
-       */
-      public Builder setDatatype(io.greptime.v1.Columns.ColumnDataType value) {
-        if (value == null) {
-          throw new NullPointerException();
-        }
-        
-        datatype_ = value.getNumber();
-        onChanged();
-        return this;
-      }
-      /**
-       * .greptime.v1.ColumnDataType datatype = 2;
-       * @return This builder for chaining.
-       */
-      public Builder clearDatatype() {
-        
-        datatype_ = 0;
-        onChanged();
-        return this;
-      }
-
-      private boolean isNullable_ ;
-      /**
-       * bool is_nullable = 3;
-       * @return The isNullable.
-       */
-      @java.lang.Override
-      public boolean getIsNullable() {
-        return isNullable_;
-      }
-      /**
-       * bool is_nullable = 3;
-       * @param value The isNullable to set.
-       * @return This builder for chaining.
-       */
-      public Builder setIsNullable(boolean value) {
-        
-        isNullable_ = value;
-        onChanged();
-        return this;
-      }
-      /**
-       * bool is_nullable = 3;
-       * @return This builder for chaining.
-       */
-      public Builder clearIsNullable() {
-        
-        isNullable_ = false;
-        onChanged();
-        return this;
-      }
-
-      private com.google.protobuf.ByteString defaultConstraint_ = com.google.protobuf.ByteString.EMPTY;
-      /**
-       * bytes default_constraint = 4;
-       * @return The defaultConstraint.
-       */
-      @java.lang.Override
-      public com.google.protobuf.ByteString getDefaultConstraint() {
-        return defaultConstraint_;
-      }
-      /**
-       * bytes default_constraint = 4;
-       * @param value The defaultConstraint to set.
-       * @return This builder for chaining.
-       */
-      public Builder setDefaultConstraint(com.google.protobuf.ByteString value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  
-        defaultConstraint_ = value;
-        onChanged();
-        return this;
-      }
-      /**
-       * bytes default_constraint = 4;
-       * @return This builder for chaining.
-       */
-      public Builder clearDefaultConstraint() {
-        
-        defaultConstraint_ = getDefaultInstance().getDefaultConstraint();
-        onChanged();
-        return this;
-      }
-      @java.lang.Override
-      public final Builder setUnknownFields(
-          final com.google.protobuf.UnknownFieldSet unknownFields) {
-        return super.setUnknownFields(unknownFields);
-      }
-
-      @java.lang.Override
-      public final Builder mergeUnknownFields(
-          final com.google.protobuf.UnknownFieldSet unknownFields) {
-        return super.mergeUnknownFields(unknownFields);
-      }
-
-
-      // @@protoc_insertion_point(builder_scope:greptime.v1.ColumnDef)
-    }
-
-    // @@protoc_insertion_point(class_scope:greptime.v1.ColumnDef)
-    private static final io.greptime.v1.Columns.ColumnDef DEFAULT_INSTANCE;
-    static {
-      DEFAULT_INSTANCE = new io.greptime.v1.Columns.ColumnDef();
-    }
-
-    public static io.greptime.v1.Columns.ColumnDef getDefaultInstance() {
-      return DEFAULT_INSTANCE;
-    }
-
-    private static final com.google.protobuf.Parser
-        PARSER = new com.google.protobuf.AbstractParser() {
-      @java.lang.Override
-      public ColumnDef parsePartialFrom(
-          com.google.protobuf.CodedInputStream input,
-          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-          throws com.google.protobuf.InvalidProtocolBufferException {
-        return new ColumnDef(input, extensionRegistry);
-      }
-    };
-
-    public static com.google.protobuf.Parser parser() {
-      return PARSER;
-    }
-
-    @java.lang.Override
-    public com.google.protobuf.Parser getParserForType() {
-      return PARSER;
-    }
-
-    @java.lang.Override
-    public io.greptime.v1.Columns.ColumnDef getDefaultInstanceForType() {
-      return DEFAULT_INSTANCE;
-    }
-
-  }
-
   private static final com.google.protobuf.Descriptors.Descriptor
     internal_static_greptime_v1_Column_descriptor;
   private static final 
@@ -7413,11 +6177,6 @@ public final class Columns {
   private static final 
     com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
       internal_static_greptime_v1_Column_Values_fieldAccessorTable;
-  private static final com.google.protobuf.Descriptors.Descriptor
-    internal_static_greptime_v1_ColumnDef_descriptor;
-  private static final 
-    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
-      internal_static_greptime_v1_ColumnDef_fieldAccessorTable;
 
   public static com.google.protobuf.Descriptors.FileDescriptor
       getDescriptor() {
@@ -7427,47 +6186,34 @@ public final class Columns {
       descriptor;
   static {
     java.lang.String[] descriptorData = {
-      "\n\030greptime/v1/column.proto\022\013greptime.v1\"" +
-      "\255\006\n\006Column\022\023\n\013column_name\030\001 \001(\t\0227\n\rseman" +
-      "tic_type\030\002 \001(\0162 .greptime.v1.Column.Sema" +
-      "nticType\022*\n\006values\030\003 \001(\0132\032.greptime.v1.C" +
-      "olumn.Values\022\021\n\tnull_mask\030\004 \001(\014\022-\n\010datat" +
-      "ype\030\005 \001(\0162\033.greptime.v1.ColumnDataType\032\263" +
-      "\004\n\006Values\022\021\n\ti8_values\030\001 \003(\005\022\022\n\ni16_valu" +
-      "es\030\002 \003(\005\022\022\n\ni32_values\030\003 \003(\005\022\022\n\ni64_valu" +
-      "es\030\004 \003(\003\022\021\n\tu8_values\030\005 \003(\r\022\022\n\nu16_value" +
-      "s\030\006 \003(\r\022\022\n\nu32_values\030\007 \003(\r\022\022\n\nu64_value" +
-      "s\030\010 \003(\004\022\022\n\nf32_values\030\t \003(\002\022\022\n\nf64_value" +
-      "s\030\n \003(\001\022\023\n\013bool_values\030\013 \003(\010\022\025\n\rbinary_v" +
-      "alues\030\014 \003(\014\022\025\n\rstring_values\030\r \003(\t\022\023\n\013da" +
-      "te_values\030\016 \003(\005\022\027\n\017datetime_values\030\017 \003(\003" +
-      "\022\030\n\020ts_second_values\030\020 \003(\003\022\035\n\025ts_millise" +
-      "cond_values\030\021 \003(\003\022\035\n\025ts_microsecond_valu" +
-      "es\030\022 \003(\003\022\034\n\024ts_nanosecond_values\030\023 \003(\003\022\032" +
-      "\n\022time_second_values\030\024 \003(\003\022\037\n\027time_milli" +
-      "second_values\030\025 \003(\003\022\037\n\027time_microsecond_" +
-      "values\030\026 \003(\003\022\036\n\026time_nanosecond_values\030\027" +
-      " \003(\003\"1\n\014SemanticType\022\007\n\003TAG\020\000\022\t\n\005FIELD\020\001" +
-      "\022\r\n\tTIMESTAMP\020\002\"y\n\tColumnDef\022\014\n\004name\030\001 \001" +
-      "(\t\022-\n\010datatype\030\002 \001(\0162\033.greptime.v1.Colum" +
-      "nDataType\022\023\n\013is_nullable\030\003 \001(\010\022\032\n\022defaul" +
-      "t_constraint\030\004 \001(\014*\371\002\n\016ColumnDataType\022\013\n" +
-      "\007BOOLEAN\020\000\022\010\n\004INT8\020\001\022\t\n\005INT16\020\002\022\t\n\005INT32" +
-      "\020\003\022\t\n\005INT64\020\004\022\t\n\005UINT8\020\005\022\n\n\006UINT16\020\006\022\n\n\006" +
-      "UINT32\020\007\022\n\n\006UINT64\020\010\022\013\n\007FLOAT32\020\t\022\013\n\007FLO" +
-      "AT64\020\n\022\n\n\006BINARY\020\013\022\n\n\006STRING\020\014\022\010\n\004DATE\020\r" +
-      "\022\014\n\010DATETIME\020\016\022\024\n\020TIMESTAMP_SECOND\020\017\022\031\n\025" +
-      "TIMESTAMP_MILLISECOND\020\020\022\031\n\025TIMESTAMP_MIC" +
-      "ROSECOND\020\021\022\030\n\024TIMESTAMP_NANOSECOND\020\022\022\017\n\013" +
-      "TIME_SECOND\020\023\022\024\n\020TIME_MILLISECOND\020\024\022\024\n\020T" +
-      "IME_MICROSECOND\020\025\022\023\n\017TIME_NANOSECOND\020\026BP" +
-      "\n\016io.greptime.v1B\007ColumnsZ5github.com/Gr" +
-      "eptimeTeam/greptime-proto/go/greptime/v1" +
-      "b\006proto3"
+      "\n\030greptime/v1/column.proto\022\013greptime.v1\032" +
+      "\030greptime/v1/common.proto\"\363\005\n\006Column\022\023\n\013" +
+      "column_name\030\001 \001(\t\0220\n\rsemantic_type\030\002 \001(\016" +
+      "2\031.greptime.v1.SemanticType\022*\n\006values\030\003 " +
+      "\001(\0132\032.greptime.v1.Column.Values\022\021\n\tnull_" +
+      "mask\030\004 \001(\014\022-\n\010datatype\030\005 \001(\0162\033.greptime." +
+      "v1.ColumnDataType\032\263\004\n\006Values\022\021\n\ti8_value" +
+      "s\030\001 \003(\005\022\022\n\ni16_values\030\002 \003(\005\022\022\n\ni32_value" +
+      "s\030\003 \003(\005\022\022\n\ni64_values\030\004 \003(\003\022\021\n\tu8_values" +
+      "\030\005 \003(\r\022\022\n\nu16_values\030\006 \003(\r\022\022\n\nu32_values" +
+      "\030\007 \003(\r\022\022\n\nu64_values\030\010 \003(\004\022\022\n\nf32_values" +
+      "\030\t \003(\002\022\022\n\nf64_values\030\n \003(\001\022\023\n\013bool_value" +
+      "s\030\013 \003(\010\022\025\n\rbinary_values\030\014 \003(\014\022\025\n\rstring" +
+      "_values\030\r \003(\t\022\023\n\013date_values\030\016 \003(\005\022\027\n\017da" +
+      "tetime_values\030\017 \003(\003\022\030\n\020ts_second_values\030" +
+      "\020 \003(\003\022\035\n\025ts_millisecond_values\030\021 \003(\003\022\035\n\025" +
+      "ts_microsecond_values\030\022 \003(\003\022\034\n\024ts_nanose" +
+      "cond_values\030\023 \003(\003\022\032\n\022time_second_values\030" +
+      "\024 \003(\003\022\037\n\027time_millisecond_values\030\025 \003(\003\022\037" +
+      "\n\027time_microsecond_values\030\026 \003(\003\022\036\n\026time_" +
+      "nanosecond_values\030\027 \003(\003BP\n\016io.greptime.v" +
+      "1B\007ColumnsZ5github.com/GreptimeTeam/grep" +
+      "time-proto/go/greptime/v1b\006proto3"
     };
     descriptor = com.google.protobuf.Descriptors.FileDescriptor
       .internalBuildGeneratedFileFrom(descriptorData,
         new com.google.protobuf.Descriptors.FileDescriptor[] {
+          io.greptime.v1.Common.getDescriptor(),
         });
     internal_static_greptime_v1_Column_descriptor =
       getDescriptor().getMessageTypes().get(0);
@@ -7481,12 +6227,7 @@ public final class Columns {
       com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
         internal_static_greptime_v1_Column_Values_descriptor,
         new java.lang.String[] { "I8Values", "I16Values", "I32Values", "I64Values", "U8Values", "U16Values", "U32Values", "U64Values", "F32Values", "F64Values", "BoolValues", "BinaryValues", "StringValues", "DateValues", "DatetimeValues", "TsSecondValues", "TsMillisecondValues", "TsMicrosecondValues", "TsNanosecondValues", "TimeSecondValues", "TimeMillisecondValues", "TimeMicrosecondValues", "TimeNanosecondValues", });
-    internal_static_greptime_v1_ColumnDef_descriptor =
-      getDescriptor().getMessageTypes().get(1);
-    internal_static_greptime_v1_ColumnDef_fieldAccessorTable = new
-      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
-        internal_static_greptime_v1_ColumnDef_descriptor,
-        new java.lang.String[] { "Name", "Datatype", "IsNullable", "DefaultConstraint", });
+    io.greptime.v1.Common.getDescriptor();
   }
 
   // @@protoc_insertion_point(outer_class_scope)
diff --git a/java/src/main/java/io/greptime/v1/Common.java b/java/src/main/java/io/greptime/v1/Common.java
index 55109cc..029a51e 100644
--- a/java/src/main/java/io/greptime/v1/Common.java
+++ b/java/src/main/java/io/greptime/v1/Common.java
@@ -14,6 +14,420 @@ public final class Common {
     registerAllExtensions(
         (com.google.protobuf.ExtensionRegistryLite) registry);
   }
+  /**
+   * Protobuf enum {@code greptime.v1.SemanticType}
+   */
+  public enum SemanticType
+      implements com.google.protobuf.ProtocolMessageEnum {
+    /**
+     * TAG = 0;
+     */
+    TAG(0),
+    /**
+     * FIELD = 1;
+     */
+    FIELD(1),
+    /**
+     * TIMESTAMP = 2;
+     */
+    TIMESTAMP(2),
+    UNRECOGNIZED(-1),
+    ;
+
+    /**
+     * TAG = 0;
+     */
+    public static final int TAG_VALUE = 0;
+    /**
+     * FIELD = 1;
+     */
+    public static final int FIELD_VALUE = 1;
+    /**
+     * TIMESTAMP = 2;
+     */
+    public static final int TIMESTAMP_VALUE = 2;
+
+
+    public final int getNumber() {
+      if (this == UNRECOGNIZED) {
+        throw new java.lang.IllegalArgumentException(
+            "Can't get the number of an unknown enum value.");
+      }
+      return value;
+    }
+
+    /**
+     * @param value The numeric wire value of the corresponding enum entry.
+     * @return The enum associated with the given numeric wire value.
+     * @deprecated Use {@link #forNumber(int)} instead.
+     */
+    @java.lang.Deprecated
+    public static SemanticType valueOf(int value) {
+      return forNumber(value);
+    }
+
+    /**
+     * @param value The numeric wire value of the corresponding enum entry.
+     * @return The enum associated with the given numeric wire value.
+     */
+    public static SemanticType forNumber(int value) {
+      switch (value) {
+        case 0: return TAG;
+        case 1: return FIELD;
+        case 2: return TIMESTAMP;
+        default: return null;
+      }
+    }
+
+    public static com.google.protobuf.Internal.EnumLiteMap
+        internalGetValueMap() {
+      return internalValueMap;
+    }
+    private static final com.google.protobuf.Internal.EnumLiteMap<
+        SemanticType> internalValueMap =
+          new com.google.protobuf.Internal.EnumLiteMap() {
+            public SemanticType findValueByNumber(int number) {
+              return SemanticType.forNumber(number);
+            }
+          };
+
+    public final com.google.protobuf.Descriptors.EnumValueDescriptor
+        getValueDescriptor() {
+      if (this == UNRECOGNIZED) {
+        throw new java.lang.IllegalStateException(
+            "Can't get the descriptor of an unrecognized enum value.");
+      }
+      return getDescriptor().getValues().get(ordinal());
+    }
+    public final com.google.protobuf.Descriptors.EnumDescriptor
+        getDescriptorForType() {
+      return getDescriptor();
+    }
+    public static final com.google.protobuf.Descriptors.EnumDescriptor
+        getDescriptor() {
+      return io.greptime.v1.Common.getDescriptor().getEnumTypes().get(0);
+    }
+
+    private static final SemanticType[] VALUES = values();
+
+    public static SemanticType valueOf(
+        com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
+      if (desc.getType() != getDescriptor()) {
+        throw new java.lang.IllegalArgumentException(
+          "EnumValueDescriptor is not for this type.");
+      }
+      if (desc.getIndex() == -1) {
+        return UNRECOGNIZED;
+      }
+      return VALUES[desc.getIndex()];
+    }
+
+    private final int value;
+
+    private SemanticType(int value) {
+      this.value = value;
+    }
+
+    // @@protoc_insertion_point(enum_scope:greptime.v1.SemanticType)
+  }
+
+  /**
+   * Protobuf enum {@code greptime.v1.ColumnDataType}
+   */
+  public enum ColumnDataType
+      implements com.google.protobuf.ProtocolMessageEnum {
+    /**
+     * BOOLEAN = 0;
+     */
+    BOOLEAN(0),
+    /**
+     * INT8 = 1;
+     */
+    INT8(1),
+    /**
+     * INT16 = 2;
+     */
+    INT16(2),
+    /**
+     * INT32 = 3;
+     */
+    INT32(3),
+    /**
+     * INT64 = 4;
+     */
+    INT64(4),
+    /**
+     * UINT8 = 5;
+     */
+    UINT8(5),
+    /**
+     * UINT16 = 6;
+     */
+    UINT16(6),
+    /**
+     * UINT32 = 7;
+     */
+    UINT32(7),
+    /**
+     * UINT64 = 8;
+     */
+    UINT64(8),
+    /**
+     * FLOAT32 = 9;
+     */
+    FLOAT32(9),
+    /**
+     * FLOAT64 = 10;
+     */
+    FLOAT64(10),
+    /**
+     * BINARY = 11;
+     */
+    BINARY(11),
+    /**
+     * STRING = 12;
+     */
+    STRING(12),
+    /**
+     * DATE = 13;
+     */
+    DATE(13),
+    /**
+     * DATETIME = 14;
+     */
+    DATETIME(14),
+    /**
+     * TIMESTAMP_SECOND = 15;
+     */
+    TIMESTAMP_SECOND(15),
+    /**
+     * TIMESTAMP_MILLISECOND = 16;
+     */
+    TIMESTAMP_MILLISECOND(16),
+    /**
+     * TIMESTAMP_MICROSECOND = 17;
+     */
+    TIMESTAMP_MICROSECOND(17),
+    /**
+     * TIMESTAMP_NANOSECOND = 18;
+     */
+    TIMESTAMP_NANOSECOND(18),
+    /**
+     * TIME_SECOND = 19;
+     */
+    TIME_SECOND(19),
+    /**
+     * TIME_MILLISECOND = 20;
+     */
+    TIME_MILLISECOND(20),
+    /**
+     * TIME_MICROSECOND = 21;
+     */
+    TIME_MICROSECOND(21),
+    /**
+     * TIME_NANOSECOND = 22;
+     */
+    TIME_NANOSECOND(22),
+    UNRECOGNIZED(-1),
+    ;
+
+    /**
+     * BOOLEAN = 0;
+     */
+    public static final int BOOLEAN_VALUE = 0;
+    /**
+     * INT8 = 1;
+     */
+    public static final int INT8_VALUE = 1;
+    /**
+     * INT16 = 2;
+     */
+    public static final int INT16_VALUE = 2;
+    /**
+     * INT32 = 3;
+     */
+    public static final int INT32_VALUE = 3;
+    /**
+     * INT64 = 4;
+     */
+    public static final int INT64_VALUE = 4;
+    /**
+     * UINT8 = 5;
+     */
+    public static final int UINT8_VALUE = 5;
+    /**
+     * UINT16 = 6;
+     */
+    public static final int UINT16_VALUE = 6;
+    /**
+     * UINT32 = 7;
+     */
+    public static final int UINT32_VALUE = 7;
+    /**
+     * UINT64 = 8;
+     */
+    public static final int UINT64_VALUE = 8;
+    /**
+     * FLOAT32 = 9;
+     */
+    public static final int FLOAT32_VALUE = 9;
+    /**
+     * FLOAT64 = 10;
+     */
+    public static final int FLOAT64_VALUE = 10;
+    /**
+     * BINARY = 11;
+     */
+    public static final int BINARY_VALUE = 11;
+    /**
+     * STRING = 12;
+     */
+    public static final int STRING_VALUE = 12;
+    /**
+     * DATE = 13;
+     */
+    public static final int DATE_VALUE = 13;
+    /**
+     * DATETIME = 14;
+     */
+    public static final int DATETIME_VALUE = 14;
+    /**
+     * TIMESTAMP_SECOND = 15;
+     */
+    public static final int TIMESTAMP_SECOND_VALUE = 15;
+    /**
+     * TIMESTAMP_MILLISECOND = 16;
+     */
+    public static final int TIMESTAMP_MILLISECOND_VALUE = 16;
+    /**
+     * TIMESTAMP_MICROSECOND = 17;
+     */
+    public static final int TIMESTAMP_MICROSECOND_VALUE = 17;
+    /**
+     * TIMESTAMP_NANOSECOND = 18;
+     */
+    public static final int TIMESTAMP_NANOSECOND_VALUE = 18;
+    /**
+     * TIME_SECOND = 19;
+     */
+    public static final int TIME_SECOND_VALUE = 19;
+    /**
+     * TIME_MILLISECOND = 20;
+     */
+    public static final int TIME_MILLISECOND_VALUE = 20;
+    /**
+     * TIME_MICROSECOND = 21;
+     */
+    public static final int TIME_MICROSECOND_VALUE = 21;
+    /**
+     * TIME_NANOSECOND = 22;
+     */
+    public static final int TIME_NANOSECOND_VALUE = 22;
+
+
+    public final int getNumber() {
+      if (this == UNRECOGNIZED) {
+        throw new java.lang.IllegalArgumentException(
+            "Can't get the number of an unknown enum value.");
+      }
+      return value;
+    }
+
+    /**
+     * @param value The numeric wire value of the corresponding enum entry.
+     * @return The enum associated with the given numeric wire value.
+     * @deprecated Use {@link #forNumber(int)} instead.
+     */
+    @java.lang.Deprecated
+    public static ColumnDataType valueOf(int value) {
+      return forNumber(value);
+    }
+
+    /**
+     * @param value The numeric wire value of the corresponding enum entry.
+     * @return The enum associated with the given numeric wire value.
+     */
+    public static ColumnDataType forNumber(int value) {
+      switch (value) {
+        case 0: return BOOLEAN;
+        case 1: return INT8;
+        case 2: return INT16;
+        case 3: return INT32;
+        case 4: return INT64;
+        case 5: return UINT8;
+        case 6: return UINT16;
+        case 7: return UINT32;
+        case 8: return UINT64;
+        case 9: return FLOAT32;
+        case 10: return FLOAT64;
+        case 11: return BINARY;
+        case 12: return STRING;
+        case 13: return DATE;
+        case 14: return DATETIME;
+        case 15: return TIMESTAMP_SECOND;
+        case 16: return TIMESTAMP_MILLISECOND;
+        case 17: return TIMESTAMP_MICROSECOND;
+        case 18: return TIMESTAMP_NANOSECOND;
+        case 19: return TIME_SECOND;
+        case 20: return TIME_MILLISECOND;
+        case 21: return TIME_MICROSECOND;
+        case 22: return TIME_NANOSECOND;
+        default: return null;
+      }
+    }
+
+    public static com.google.protobuf.Internal.EnumLiteMap
+        internalGetValueMap() {
+      return internalValueMap;
+    }
+    private static final com.google.protobuf.Internal.EnumLiteMap<
+        ColumnDataType> internalValueMap =
+          new com.google.protobuf.Internal.EnumLiteMap() {
+            public ColumnDataType findValueByNumber(int number) {
+              return ColumnDataType.forNumber(number);
+            }
+          };
+
+    public final com.google.protobuf.Descriptors.EnumValueDescriptor
+        getValueDescriptor() {
+      if (this == UNRECOGNIZED) {
+        throw new java.lang.IllegalStateException(
+            "Can't get the descriptor of an unrecognized enum value.");
+      }
+      return getDescriptor().getValues().get(ordinal());
+    }
+    public final com.google.protobuf.Descriptors.EnumDescriptor
+        getDescriptorForType() {
+      return getDescriptor();
+    }
+    public static final com.google.protobuf.Descriptors.EnumDescriptor
+        getDescriptor() {
+      return io.greptime.v1.Common.getDescriptor().getEnumTypes().get(1);
+    }
+
+    private static final ColumnDataType[] VALUES = values();
+
+    public static ColumnDataType valueOf(
+        com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
+      if (desc.getType() != getDescriptor()) {
+        throw new java.lang.IllegalArgumentException(
+          "EnumValueDescriptor is not for this type.");
+      }
+      if (desc.getIndex() == -1) {
+        return UNRECOGNIZED;
+      }
+      return VALUES[desc.getIndex()];
+    }
+
+    private final int value;
+
+    private ColumnDataType(int value) {
+      this.value = value;
+    }
+
+    // @@protoc_insertion_point(enum_scope:greptime.v1.ColumnDataType)
+  }
+
   public interface RequestHeaderOrBuilder extends
       // @@protoc_insertion_point(interface_extends:greptime.v1.RequestHeader)
       com.google.protobuf.MessageOrBuilder {
@@ -6162,6 +6576,828 @@ public final class Common {
 
   }
 
+  public interface ColumnDefOrBuilder extends
+      // @@protoc_insertion_point(interface_extends:greptime.v1.ColumnDef)
+      com.google.protobuf.MessageOrBuilder {
+
+    /**
+     * string name = 1;
+     * @return The name.
+     */
+    java.lang.String getName();
+    /**
+     * string name = 1;
+     * @return The bytes for name.
+     */
+    com.google.protobuf.ByteString
+        getNameBytes();
+
+    /**
+     * .greptime.v1.ColumnDataType datatype = 2;
+     * @return The enum numeric value on the wire for datatype.
+     */
+    int getDatatypeValue();
+    /**
+     * .greptime.v1.ColumnDataType datatype = 2;
+     * @return The datatype.
+     */
+    io.greptime.v1.Common.ColumnDataType getDatatype();
+
+    /**
+     * bool is_nullable = 3;
+     * @return The isNullable.
+     */
+    boolean getIsNullable();
+
+    /**
+     * bytes default_constraint = 4;
+     * @return The defaultConstraint.
+     */
+    com.google.protobuf.ByteString getDefaultConstraint();
+  }
+  /**
+   * Protobuf type {@code greptime.v1.ColumnDef}
+   */
+  public static final class ColumnDef extends
+      com.google.protobuf.GeneratedMessageV3 implements
+      // @@protoc_insertion_point(message_implements:greptime.v1.ColumnDef)
+      ColumnDefOrBuilder {
+  private static final long serialVersionUID = 0L;
+    // Use ColumnDef.newBuilder() to construct.
+    private ColumnDef(com.google.protobuf.GeneratedMessageV3.Builder builder) {
+      super(builder);
+    }
+    private ColumnDef() {
+      name_ = "";
+      datatype_ = 0;
+      defaultConstraint_ = com.google.protobuf.ByteString.EMPTY;
+    }
+
+    @java.lang.Override
+    @SuppressWarnings({"unused"})
+    protected java.lang.Object newInstance(
+        UnusedPrivateParameter unused) {
+      return new ColumnDef();
+    }
+
+    @java.lang.Override
+    public final com.google.protobuf.UnknownFieldSet
+    getUnknownFields() {
+      return this.unknownFields;
+    }
+    private ColumnDef(
+        com.google.protobuf.CodedInputStream input,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      this();
+      if (extensionRegistry == null) {
+        throw new java.lang.NullPointerException();
+      }
+      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+          com.google.protobuf.UnknownFieldSet.newBuilder();
+      try {
+        boolean done = false;
+        while (!done) {
+          int tag = input.readTag();
+          switch (tag) {
+            case 0:
+              done = true;
+              break;
+            case 10: {
+              java.lang.String s = input.readStringRequireUtf8();
+
+              name_ = s;
+              break;
+            }
+            case 16: {
+              int rawValue = input.readEnum();
+
+              datatype_ = rawValue;
+              break;
+            }
+            case 24: {
+
+              isNullable_ = input.readBool();
+              break;
+            }
+            case 34: {
+
+              defaultConstraint_ = input.readBytes();
+              break;
+            }
+            default: {
+              if (!parseUnknownField(
+                  input, unknownFields, extensionRegistry, tag)) {
+                done = true;
+              }
+              break;
+            }
+          }
+        }
+      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+        throw e.setUnfinishedMessage(this);
+      } catch (com.google.protobuf.UninitializedMessageException e) {
+        throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
+      } catch (java.io.IOException e) {
+        throw new com.google.protobuf.InvalidProtocolBufferException(
+            e).setUnfinishedMessage(this);
+      } finally {
+        this.unknownFields = unknownFields.build();
+        makeExtensionsImmutable();
+      }
+    }
+    public static final com.google.protobuf.Descriptors.Descriptor
+        getDescriptor() {
+      return io.greptime.v1.Common.internal_static_greptime_v1_ColumnDef_descriptor;
+    }
+
+    @java.lang.Override
+    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+        internalGetFieldAccessorTable() {
+      return io.greptime.v1.Common.internal_static_greptime_v1_ColumnDef_fieldAccessorTable
+          .ensureFieldAccessorsInitialized(
+              io.greptime.v1.Common.ColumnDef.class, io.greptime.v1.Common.ColumnDef.Builder.class);
+    }
+
+    public static final int NAME_FIELD_NUMBER = 1;
+    private volatile java.lang.Object name_;
+    /**
+     * string name = 1;
+     * @return The name.
+     */
+    @java.lang.Override
+    public java.lang.String getName() {
+      java.lang.Object ref = name_;
+      if (ref instanceof java.lang.String) {
+        return (java.lang.String) ref;
+      } else {
+        com.google.protobuf.ByteString bs = 
+            (com.google.protobuf.ByteString) ref;
+        java.lang.String s = bs.toStringUtf8();
+        name_ = s;
+        return s;
+      }
+    }
+    /**
+     * string name = 1;
+     * @return The bytes for name.
+     */
+    @java.lang.Override
+    public com.google.protobuf.ByteString
+        getNameBytes() {
+      java.lang.Object ref = name_;
+      if (ref instanceof java.lang.String) {
+        com.google.protobuf.ByteString b = 
+            com.google.protobuf.ByteString.copyFromUtf8(
+                (java.lang.String) ref);
+        name_ = b;
+        return b;
+      } else {
+        return (com.google.protobuf.ByteString) ref;
+      }
+    }
+
+    public static final int DATATYPE_FIELD_NUMBER = 2;
+    private int datatype_;
+    /**
+     * .greptime.v1.ColumnDataType datatype = 2;
+     * @return The enum numeric value on the wire for datatype.
+     */
+    @java.lang.Override public int getDatatypeValue() {
+      return datatype_;
+    }
+    /**
+     * .greptime.v1.ColumnDataType datatype = 2;
+     * @return The datatype.
+     */
+    @java.lang.Override public io.greptime.v1.Common.ColumnDataType getDatatype() {
+      @SuppressWarnings("deprecation")
+      io.greptime.v1.Common.ColumnDataType result = io.greptime.v1.Common.ColumnDataType.valueOf(datatype_);
+      return result == null ? io.greptime.v1.Common.ColumnDataType.UNRECOGNIZED : result;
+    }
+
+    public static final int IS_NULLABLE_FIELD_NUMBER = 3;
+    private boolean isNullable_;
+    /**
+     * bool is_nullable = 3;
+     * @return The isNullable.
+     */
+    @java.lang.Override
+    public boolean getIsNullable() {
+      return isNullable_;
+    }
+
+    public static final int DEFAULT_CONSTRAINT_FIELD_NUMBER = 4;
+    private com.google.protobuf.ByteString defaultConstraint_;
+    /**
+     * bytes default_constraint = 4;
+     * @return The defaultConstraint.
+     */
+    @java.lang.Override
+    public com.google.protobuf.ByteString getDefaultConstraint() {
+      return defaultConstraint_;
+    }
+
+    private byte memoizedIsInitialized = -1;
+    @java.lang.Override
+    public final boolean isInitialized() {
+      byte isInitialized = memoizedIsInitialized;
+      if (isInitialized == 1) return true;
+      if (isInitialized == 0) return false;
+
+      memoizedIsInitialized = 1;
+      return true;
+    }
+
+    @java.lang.Override
+    public void writeTo(com.google.protobuf.CodedOutputStream output)
+                        throws java.io.IOException {
+      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
+        com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
+      }
+      if (datatype_ != io.greptime.v1.Common.ColumnDataType.BOOLEAN.getNumber()) {
+        output.writeEnum(2, datatype_);
+      }
+      if (isNullable_ != false) {
+        output.writeBool(3, isNullable_);
+      }
+      if (!defaultConstraint_.isEmpty()) {
+        output.writeBytes(4, defaultConstraint_);
+      }
+      unknownFields.writeTo(output);
+    }
+
+    @java.lang.Override
+    public int getSerializedSize() {
+      int size = memoizedSize;
+      if (size != -1) return size;
+
+      size = 0;
+      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
+        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
+      }
+      if (datatype_ != io.greptime.v1.Common.ColumnDataType.BOOLEAN.getNumber()) {
+        size += com.google.protobuf.CodedOutputStream
+          .computeEnumSize(2, datatype_);
+      }
+      if (isNullable_ != false) {
+        size += com.google.protobuf.CodedOutputStream
+          .computeBoolSize(3, isNullable_);
+      }
+      if (!defaultConstraint_.isEmpty()) {
+        size += com.google.protobuf.CodedOutputStream
+          .computeBytesSize(4, defaultConstraint_);
+      }
+      size += unknownFields.getSerializedSize();
+      memoizedSize = size;
+      return size;
+    }
+
+    @java.lang.Override
+    public boolean equals(final java.lang.Object obj) {
+      if (obj == this) {
+       return true;
+      }
+      if (!(obj instanceof io.greptime.v1.Common.ColumnDef)) {
+        return super.equals(obj);
+      }
+      io.greptime.v1.Common.ColumnDef other = (io.greptime.v1.Common.ColumnDef) obj;
+
+      if (!getName()
+          .equals(other.getName())) return false;
+      if (datatype_ != other.datatype_) return false;
+      if (getIsNullable()
+          != other.getIsNullable()) return false;
+      if (!getDefaultConstraint()
+          .equals(other.getDefaultConstraint())) return false;
+      if (!unknownFields.equals(other.unknownFields)) return false;
+      return true;
+    }
+
+    @java.lang.Override
+    public int hashCode() {
+      if (memoizedHashCode != 0) {
+        return memoizedHashCode;
+      }
+      int hash = 41;
+      hash = (19 * hash) + getDescriptor().hashCode();
+      hash = (37 * hash) + NAME_FIELD_NUMBER;
+      hash = (53 * hash) + getName().hashCode();
+      hash = (37 * hash) + DATATYPE_FIELD_NUMBER;
+      hash = (53 * hash) + datatype_;
+      hash = (37 * hash) + IS_NULLABLE_FIELD_NUMBER;
+      hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
+          getIsNullable());
+      hash = (37 * hash) + DEFAULT_CONSTRAINT_FIELD_NUMBER;
+      hash = (53 * hash) + getDefaultConstraint().hashCode();
+      hash = (29 * hash) + unknownFields.hashCode();
+      memoizedHashCode = hash;
+      return hash;
+    }
+
+    public static io.greptime.v1.Common.ColumnDef parseFrom(
+        java.nio.ByteBuffer data)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      return PARSER.parseFrom(data);
+    }
+    public static io.greptime.v1.Common.ColumnDef parseFrom(
+        java.nio.ByteBuffer data,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      return PARSER.parseFrom(data, extensionRegistry);
+    }
+    public static io.greptime.v1.Common.ColumnDef parseFrom(
+        com.google.protobuf.ByteString data)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      return PARSER.parseFrom(data);
+    }
+    public static io.greptime.v1.Common.ColumnDef parseFrom(
+        com.google.protobuf.ByteString data,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      return PARSER.parseFrom(data, extensionRegistry);
+    }
+    public static io.greptime.v1.Common.ColumnDef parseFrom(byte[] data)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      return PARSER.parseFrom(data);
+    }
+    public static io.greptime.v1.Common.ColumnDef parseFrom(
+        byte[] data,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      return PARSER.parseFrom(data, extensionRegistry);
+    }
+    public static io.greptime.v1.Common.ColumnDef parseFrom(java.io.InputStream input)
+        throws java.io.IOException {
+      return com.google.protobuf.GeneratedMessageV3
+          .parseWithIOException(PARSER, input);
+    }
+    public static io.greptime.v1.Common.ColumnDef parseFrom(
+        java.io.InputStream input,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws java.io.IOException {
+      return com.google.protobuf.GeneratedMessageV3
+          .parseWithIOException(PARSER, input, extensionRegistry);
+    }
+    public static io.greptime.v1.Common.ColumnDef parseDelimitedFrom(java.io.InputStream input)
+        throws java.io.IOException {
+      return com.google.protobuf.GeneratedMessageV3
+          .parseDelimitedWithIOException(PARSER, input);
+    }
+    public static io.greptime.v1.Common.ColumnDef parseDelimitedFrom(
+        java.io.InputStream input,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws java.io.IOException {
+      return com.google.protobuf.GeneratedMessageV3
+          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
+    }
+    public static io.greptime.v1.Common.ColumnDef parseFrom(
+        com.google.protobuf.CodedInputStream input)
+        throws java.io.IOException {
+      return com.google.protobuf.GeneratedMessageV3
+          .parseWithIOException(PARSER, input);
+    }
+    public static io.greptime.v1.Common.ColumnDef parseFrom(
+        com.google.protobuf.CodedInputStream input,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws java.io.IOException {
+      return com.google.protobuf.GeneratedMessageV3
+          .parseWithIOException(PARSER, input, extensionRegistry);
+    }
+
+    @java.lang.Override
+    public Builder newBuilderForType() { return newBuilder(); }
+    public static Builder newBuilder() {
+      return DEFAULT_INSTANCE.toBuilder();
+    }
+    public static Builder newBuilder(io.greptime.v1.Common.ColumnDef prototype) {
+      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+    }
+    @java.lang.Override
+    public Builder toBuilder() {
+      return this == DEFAULT_INSTANCE
+          ? new Builder() : new Builder().mergeFrom(this);
+    }
+
+    @java.lang.Override
+    protected Builder newBuilderForType(
+        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+      Builder builder = new Builder(parent);
+      return builder;
+    }
+    /**
+     * Protobuf type {@code greptime.v1.ColumnDef}
+     */
+    public static final class Builder extends
+        com.google.protobuf.GeneratedMessageV3.Builder implements
+        // @@protoc_insertion_point(builder_implements:greptime.v1.ColumnDef)
+        io.greptime.v1.Common.ColumnDefOrBuilder {
+      public static final com.google.protobuf.Descriptors.Descriptor
+          getDescriptor() {
+        return io.greptime.v1.Common.internal_static_greptime_v1_ColumnDef_descriptor;
+      }
+
+      @java.lang.Override
+      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+          internalGetFieldAccessorTable() {
+        return io.greptime.v1.Common.internal_static_greptime_v1_ColumnDef_fieldAccessorTable
+            .ensureFieldAccessorsInitialized(
+                io.greptime.v1.Common.ColumnDef.class, io.greptime.v1.Common.ColumnDef.Builder.class);
+      }
+
+      // Construct using io.greptime.v1.Common.ColumnDef.newBuilder()
+      private Builder() {
+        maybeForceBuilderInitialization();
+      }
+
+      private Builder(
+          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+        super(parent);
+        maybeForceBuilderInitialization();
+      }
+      private void maybeForceBuilderInitialization() {
+        if (com.google.protobuf.GeneratedMessageV3
+                .alwaysUseFieldBuilders) {
+        }
+      }
+      @java.lang.Override
+      public Builder clear() {
+        super.clear();
+        name_ = "";
+
+        datatype_ = 0;
+
+        isNullable_ = false;
+
+        defaultConstraint_ = com.google.protobuf.ByteString.EMPTY;
+
+        return this;
+      }
+
+      @java.lang.Override
+      public com.google.protobuf.Descriptors.Descriptor
+          getDescriptorForType() {
+        return io.greptime.v1.Common.internal_static_greptime_v1_ColumnDef_descriptor;
+      }
+
+      @java.lang.Override
+      public io.greptime.v1.Common.ColumnDef getDefaultInstanceForType() {
+        return io.greptime.v1.Common.ColumnDef.getDefaultInstance();
+      }
+
+      @java.lang.Override
+      public io.greptime.v1.Common.ColumnDef build() {
+        io.greptime.v1.Common.ColumnDef result = buildPartial();
+        if (!result.isInitialized()) {
+          throw newUninitializedMessageException(result);
+        }
+        return result;
+      }
+
+      @java.lang.Override
+      public io.greptime.v1.Common.ColumnDef buildPartial() {
+        io.greptime.v1.Common.ColumnDef result = new io.greptime.v1.Common.ColumnDef(this);
+        result.name_ = name_;
+        result.datatype_ = datatype_;
+        result.isNullable_ = isNullable_;
+        result.defaultConstraint_ = defaultConstraint_;
+        onBuilt();
+        return result;
+      }
+
+      @java.lang.Override
+      public Builder clone() {
+        return super.clone();
+      }
+      @java.lang.Override
+      public Builder setField(
+          com.google.protobuf.Descriptors.FieldDescriptor field,
+          java.lang.Object value) {
+        return super.setField(field, value);
+      }
+      @java.lang.Override
+      public Builder clearField(
+          com.google.protobuf.Descriptors.FieldDescriptor field) {
+        return super.clearField(field);
+      }
+      @java.lang.Override
+      public Builder clearOneof(
+          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+        return super.clearOneof(oneof);
+      }
+      @java.lang.Override
+      public Builder setRepeatedField(
+          com.google.protobuf.Descriptors.FieldDescriptor field,
+          int index, java.lang.Object value) {
+        return super.setRepeatedField(field, index, value);
+      }
+      @java.lang.Override
+      public Builder addRepeatedField(
+          com.google.protobuf.Descriptors.FieldDescriptor field,
+          java.lang.Object value) {
+        return super.addRepeatedField(field, value);
+      }
+      @java.lang.Override
+      public Builder mergeFrom(com.google.protobuf.Message other) {
+        if (other instanceof io.greptime.v1.Common.ColumnDef) {
+          return mergeFrom((io.greptime.v1.Common.ColumnDef)other);
+        } else {
+          super.mergeFrom(other);
+          return this;
+        }
+      }
+
+      public Builder mergeFrom(io.greptime.v1.Common.ColumnDef other) {
+        if (other == io.greptime.v1.Common.ColumnDef.getDefaultInstance()) return this;
+        if (!other.getName().isEmpty()) {
+          name_ = other.name_;
+          onChanged();
+        }
+        if (other.datatype_ != 0) {
+          setDatatypeValue(other.getDatatypeValue());
+        }
+        if (other.getIsNullable() != false) {
+          setIsNullable(other.getIsNullable());
+        }
+        if (other.getDefaultConstraint() != com.google.protobuf.ByteString.EMPTY) {
+          setDefaultConstraint(other.getDefaultConstraint());
+        }
+        this.mergeUnknownFields(other.unknownFields);
+        onChanged();
+        return this;
+      }
+
+      @java.lang.Override
+      public final boolean isInitialized() {
+        return true;
+      }
+
+      @java.lang.Override
+      public Builder mergeFrom(
+          com.google.protobuf.CodedInputStream input,
+          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+          throws java.io.IOException {
+        io.greptime.v1.Common.ColumnDef parsedMessage = null;
+        try {
+          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+          parsedMessage = (io.greptime.v1.Common.ColumnDef) e.getUnfinishedMessage();
+          throw e.unwrapIOException();
+        } finally {
+          if (parsedMessage != null) {
+            mergeFrom(parsedMessage);
+          }
+        }
+        return this;
+      }
+
+      private java.lang.Object name_ = "";
+      /**
+       * string name = 1;
+       * @return The name.
+       */
+      public java.lang.String getName() {
+        java.lang.Object ref = name_;
+        if (!(ref instanceof java.lang.String)) {
+          com.google.protobuf.ByteString bs =
+              (com.google.protobuf.ByteString) ref;
+          java.lang.String s = bs.toStringUtf8();
+          name_ = s;
+          return s;
+        } else {
+          return (java.lang.String) ref;
+        }
+      }
+      /**
+       * string name = 1;
+       * @return The bytes for name.
+       */
+      public com.google.protobuf.ByteString
+          getNameBytes() {
+        java.lang.Object ref = name_;
+        if (ref instanceof String) {
+          com.google.protobuf.ByteString b = 
+              com.google.protobuf.ByteString.copyFromUtf8(
+                  (java.lang.String) ref);
+          name_ = b;
+          return b;
+        } else {
+          return (com.google.protobuf.ByteString) ref;
+        }
+      }
+      /**
+       * string name = 1;
+       * @param value The name to set.
+       * @return This builder for chaining.
+       */
+      public Builder setName(
+          java.lang.String value) {
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  
+        name_ = value;
+        onChanged();
+        return this;
+      }
+      /**
+       * string name = 1;
+       * @return This builder for chaining.
+       */
+      public Builder clearName() {
+        
+        name_ = getDefaultInstance().getName();
+        onChanged();
+        return this;
+      }
+      /**
+       * string name = 1;
+       * @param value The bytes for name to set.
+       * @return This builder for chaining.
+       */
+      public Builder setNameBytes(
+          com.google.protobuf.ByteString value) {
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  checkByteStringIsUtf8(value);
+        
+        name_ = value;
+        onChanged();
+        return this;
+      }
+
+      private int datatype_ = 0;
+      /**
+       * .greptime.v1.ColumnDataType datatype = 2;
+       * @return The enum numeric value on the wire for datatype.
+       */
+      @java.lang.Override public int getDatatypeValue() {
+        return datatype_;
+      }
+      /**
+       * .greptime.v1.ColumnDataType datatype = 2;
+       * @param value The enum numeric value on the wire for datatype to set.
+       * @return This builder for chaining.
+       */
+      public Builder setDatatypeValue(int value) {
+        
+        datatype_ = value;
+        onChanged();
+        return this;
+      }
+      /**
+       * .greptime.v1.ColumnDataType datatype = 2;
+       * @return The datatype.
+       */
+      @java.lang.Override
+      public io.greptime.v1.Common.ColumnDataType getDatatype() {
+        @SuppressWarnings("deprecation")
+        io.greptime.v1.Common.ColumnDataType result = io.greptime.v1.Common.ColumnDataType.valueOf(datatype_);
+        return result == null ? io.greptime.v1.Common.ColumnDataType.UNRECOGNIZED : result;
+      }
+      /**
+       * .greptime.v1.ColumnDataType datatype = 2;
+       * @param value The datatype to set.
+       * @return This builder for chaining.
+       */
+      public Builder setDatatype(io.greptime.v1.Common.ColumnDataType value) {
+        if (value == null) {
+          throw new NullPointerException();
+        }
+        
+        datatype_ = value.getNumber();
+        onChanged();
+        return this;
+      }
+      /**
+       * .greptime.v1.ColumnDataType datatype = 2;
+       * @return This builder for chaining.
+       */
+      public Builder clearDatatype() {
+        
+        datatype_ = 0;
+        onChanged();
+        return this;
+      }
+
+      private boolean isNullable_ ;
+      /**
+       * bool is_nullable = 3;
+       * @return The isNullable.
+       */
+      @java.lang.Override
+      public boolean getIsNullable() {
+        return isNullable_;
+      }
+      /**
+       * bool is_nullable = 3;
+       * @param value The isNullable to set.
+       * @return This builder for chaining.
+       */
+      public Builder setIsNullable(boolean value) {
+        
+        isNullable_ = value;
+        onChanged();
+        return this;
+      }
+      /**
+       * bool is_nullable = 3;
+       * @return This builder for chaining.
+       */
+      public Builder clearIsNullable() {
+        
+        isNullable_ = false;
+        onChanged();
+        return this;
+      }
+
+      private com.google.protobuf.ByteString defaultConstraint_ = com.google.protobuf.ByteString.EMPTY;
+      /**
+       * bytes default_constraint = 4;
+       * @return The defaultConstraint.
+       */
+      @java.lang.Override
+      public com.google.protobuf.ByteString getDefaultConstraint() {
+        return defaultConstraint_;
+      }
+      /**
+       * bytes default_constraint = 4;
+       * @param value The defaultConstraint to set.
+       * @return This builder for chaining.
+       */
+      public Builder setDefaultConstraint(com.google.protobuf.ByteString value) {
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  
+        defaultConstraint_ = value;
+        onChanged();
+        return this;
+      }
+      /**
+       * bytes default_constraint = 4;
+       * @return This builder for chaining.
+       */
+      public Builder clearDefaultConstraint() {
+        
+        defaultConstraint_ = getDefaultInstance().getDefaultConstraint();
+        onChanged();
+        return this;
+      }
+      @java.lang.Override
+      public final Builder setUnknownFields(
+          final com.google.protobuf.UnknownFieldSet unknownFields) {
+        return super.setUnknownFields(unknownFields);
+      }
+
+      @java.lang.Override
+      public final Builder mergeUnknownFields(
+          final com.google.protobuf.UnknownFieldSet unknownFields) {
+        return super.mergeUnknownFields(unknownFields);
+      }
+
+
+      // @@protoc_insertion_point(builder_scope:greptime.v1.ColumnDef)
+    }
+
+    // @@protoc_insertion_point(class_scope:greptime.v1.ColumnDef)
+    private static final io.greptime.v1.Common.ColumnDef DEFAULT_INSTANCE;
+    static {
+      DEFAULT_INSTANCE = new io.greptime.v1.Common.ColumnDef();
+    }
+
+    public static io.greptime.v1.Common.ColumnDef getDefaultInstance() {
+      return DEFAULT_INSTANCE;
+    }
+
+    private static final com.google.protobuf.Parser
+        PARSER = new com.google.protobuf.AbstractParser() {
+      @java.lang.Override
+      public ColumnDef parsePartialFrom(
+          com.google.protobuf.CodedInputStream input,
+          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+          throws com.google.protobuf.InvalidProtocolBufferException {
+        return new ColumnDef(input, extensionRegistry);
+      }
+    };
+
+    public static com.google.protobuf.Parser parser() {
+      return PARSER;
+    }
+
+    @java.lang.Override
+    public com.google.protobuf.Parser getParserForType() {
+      return PARSER;
+    }
+
+    @java.lang.Override
+    public io.greptime.v1.Common.ColumnDef getDefaultInstanceForType() {
+      return DEFAULT_INSTANCE;
+    }
+
+  }
+
   private static final com.google.protobuf.Descriptors.Descriptor
     internal_static_greptime_v1_RequestHeader_descriptor;
   private static final 
@@ -6202,6 +7438,11 @@ public final class Common {
   private static final 
     com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
       internal_static_greptime_v1_FlightMetadata_fieldAccessorTable;
+  private static final com.google.protobuf.Descriptors.Descriptor
+    internal_static_greptime_v1_ColumnDef_descriptor;
+  private static final 
+    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+      internal_static_greptime_v1_ColumnDef_fieldAccessorTable;
 
   public static com.google.protobuf.Descriptors.FileDescriptor
       getDescriptor() {
@@ -6225,10 +7466,24 @@ public final class Common {
       "\020\n\010username\030\001 \001(\t\022\020\n\010password\030\002 \001(\t\"\026\n\005T" +
       "oken\022\r\n\005token\030\001 \001(\t\"\035\n\014AffectedRows\022\r\n\005v" +
       "alue\030\001 \001(\r\"B\n\016FlightMetadata\0220\n\raffected" +
-      "_rows\030\001 \001(\0132\031.greptime.v1.AffectedRowsBO" +
-      "\n\016io.greptime.v1B\006CommonZ5github.com/Gre" +
-      "ptimeTeam/greptime-proto/go/greptime/v1b" +
-      "\006proto3"
+      "_rows\030\001 \001(\0132\031.greptime.v1.AffectedRows\"y" +
+      "\n\tColumnDef\022\014\n\004name\030\001 \001(\t\022-\n\010datatype\030\002 " +
+      "\001(\0162\033.greptime.v1.ColumnDataType\022\023\n\013is_n" +
+      "ullable\030\003 \001(\010\022\032\n\022default_constraint\030\004 \001(" +
+      "\014*1\n\014SemanticType\022\007\n\003TAG\020\000\022\t\n\005FIELD\020\001\022\r\n" +
+      "\tTIMESTAMP\020\002*\371\002\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\026BO\n\016io.g" +
+      "reptime.v1B\006CommonZ5github.com/GreptimeT" +
+      "eam/greptime-proto/go/greptime/v1b\006proto" +
+      "3"
     };
     descriptor = com.google.protobuf.Descriptors.FileDescriptor
       .internalBuildGeneratedFileFrom(descriptorData,
@@ -6282,6 +7537,12 @@ public final class Common {
       com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
         internal_static_greptime_v1_FlightMetadata_descriptor,
         new java.lang.String[] { "AffectedRows", });
+    internal_static_greptime_v1_ColumnDef_descriptor =
+      getDescriptor().getMessageTypes().get(8);
+    internal_static_greptime_v1_ColumnDef_fieldAccessorTable = new
+      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+        internal_static_greptime_v1_ColumnDef_descriptor,
+        new java.lang.String[] { "Name", "Datatype", "IsNullable", "DefaultConstraint", });
   }
 
   // @@protoc_insertion_point(outer_class_scope)
diff --git a/java/src/main/java/io/greptime/v1/Ddl.java b/java/src/main/java/io/greptime/v1/Ddl.java
index d3cbb87..f45c889 100644
--- a/java/src/main/java/io/greptime/v1/Ddl.java
+++ b/java/src/main/java/io/greptime/v1/Ddl.java
@@ -2184,12 +2184,12 @@ public final class Ddl {
     /**
      * repeated .greptime.v1.ColumnDef column_defs = 5;
      */
-    java.util.List 
+    java.util.List 
         getColumnDefsList();
     /**
      * repeated .greptime.v1.ColumnDef column_defs = 5;
      */
-    io.greptime.v1.Columns.ColumnDef getColumnDefs(int index);
+    io.greptime.v1.Common.ColumnDef getColumnDefs(int index);
     /**
      * repeated .greptime.v1.ColumnDef column_defs = 5;
      */
@@ -2197,12 +2197,12 @@ public final class Ddl {
     /**
      * repeated .greptime.v1.ColumnDef column_defs = 5;
      */
-    java.util.List 
+    java.util.List 
         getColumnDefsOrBuilderList();
     /**
      * repeated .greptime.v1.ColumnDef column_defs = 5;
      */
-    io.greptime.v1.Columns.ColumnDefOrBuilder getColumnDefsOrBuilder(
+    io.greptime.v1.Common.ColumnDefOrBuilder getColumnDefsOrBuilder(
         int index);
 
     /**
@@ -2409,11 +2409,11 @@ java.lang.String defaultValue);
             }
             case 42: {
               if (!((mutable_bitField0_ & 0x00000001) != 0)) {
-                columnDefs_ = new java.util.ArrayList();
+                columnDefs_ = new java.util.ArrayList();
                 mutable_bitField0_ |= 0x00000001;
               }
               columnDefs_.add(
-                  input.readMessage(io.greptime.v1.Columns.ColumnDef.parser(), extensionRegistry));
+                  input.readMessage(io.greptime.v1.Common.ColumnDef.parser(), extensionRegistry));
               break;
             }
             case 50: {
@@ -2697,19 +2697,19 @@ java.lang.String defaultValue);
     }
 
     public static final int COLUMN_DEFS_FIELD_NUMBER = 5;
-    private java.util.List columnDefs_;
+    private java.util.List columnDefs_;
     /**
      * repeated .greptime.v1.ColumnDef column_defs = 5;
      */
     @java.lang.Override
-    public java.util.List getColumnDefsList() {
+    public java.util.List getColumnDefsList() {
       return columnDefs_;
     }
     /**
      * repeated .greptime.v1.ColumnDef column_defs = 5;
      */
     @java.lang.Override
-    public java.util.List 
+    public java.util.List 
         getColumnDefsOrBuilderList() {
       return columnDefs_;
     }
@@ -2724,14 +2724,14 @@ java.lang.String defaultValue);
      * repeated .greptime.v1.ColumnDef column_defs = 5;
      */
     @java.lang.Override
-    public io.greptime.v1.Columns.ColumnDef getColumnDefs(int index) {
+    public io.greptime.v1.Common.ColumnDef getColumnDefs(int index) {
       return columnDefs_.get(index);
     }
     /**
      * repeated .greptime.v1.ColumnDef column_defs = 5;
      */
     @java.lang.Override
-    public io.greptime.v1.Columns.ColumnDefOrBuilder getColumnDefsOrBuilder(
+    public io.greptime.v1.Common.ColumnDefOrBuilder getColumnDefsOrBuilder(
         int index) {
       return columnDefs_.get(index);
     }
@@ -3917,22 +3917,22 @@ java.lang.String defaultValue);
         return this;
       }
 
-      private java.util.List columnDefs_ =
+      private java.util.List columnDefs_ =
         java.util.Collections.emptyList();
       private void ensureColumnDefsIsMutable() {
         if (!((bitField0_ & 0x00000001) != 0)) {
-          columnDefs_ = new java.util.ArrayList(columnDefs_);
+          columnDefs_ = new java.util.ArrayList(columnDefs_);
           bitField0_ |= 0x00000001;
          }
       }
 
       private com.google.protobuf.RepeatedFieldBuilderV3<
-          io.greptime.v1.Columns.ColumnDef, io.greptime.v1.Columns.ColumnDef.Builder, io.greptime.v1.Columns.ColumnDefOrBuilder> columnDefsBuilder_;
+          io.greptime.v1.Common.ColumnDef, io.greptime.v1.Common.ColumnDef.Builder, io.greptime.v1.Common.ColumnDefOrBuilder> columnDefsBuilder_;
 
       /**
        * repeated .greptime.v1.ColumnDef column_defs = 5;
        */
-      public java.util.List getColumnDefsList() {
+      public java.util.List getColumnDefsList() {
         if (columnDefsBuilder_ == null) {
           return java.util.Collections.unmodifiableList(columnDefs_);
         } else {
@@ -3952,7 +3952,7 @@ java.lang.String defaultValue);
       /**
        * repeated .greptime.v1.ColumnDef column_defs = 5;
        */
-      public io.greptime.v1.Columns.ColumnDef getColumnDefs(int index) {
+      public io.greptime.v1.Common.ColumnDef getColumnDefs(int index) {
         if (columnDefsBuilder_ == null) {
           return columnDefs_.get(index);
         } else {
@@ -3963,7 +3963,7 @@ java.lang.String defaultValue);
        * repeated .greptime.v1.ColumnDef column_defs = 5;
        */
       public Builder setColumnDefs(
-          int index, io.greptime.v1.Columns.ColumnDef value) {
+          int index, io.greptime.v1.Common.ColumnDef value) {
         if (columnDefsBuilder_ == null) {
           if (value == null) {
             throw new NullPointerException();
@@ -3980,7 +3980,7 @@ java.lang.String defaultValue);
        * repeated .greptime.v1.ColumnDef column_defs = 5;
        */
       public Builder setColumnDefs(
-          int index, io.greptime.v1.Columns.ColumnDef.Builder builderForValue) {
+          int index, io.greptime.v1.Common.ColumnDef.Builder builderForValue) {
         if (columnDefsBuilder_ == null) {
           ensureColumnDefsIsMutable();
           columnDefs_.set(index, builderForValue.build());
@@ -3993,7 +3993,7 @@ java.lang.String defaultValue);
       /**
        * repeated .greptime.v1.ColumnDef column_defs = 5;
        */
-      public Builder addColumnDefs(io.greptime.v1.Columns.ColumnDef value) {
+      public Builder addColumnDefs(io.greptime.v1.Common.ColumnDef value) {
         if (columnDefsBuilder_ == null) {
           if (value == null) {
             throw new NullPointerException();
@@ -4010,7 +4010,7 @@ java.lang.String defaultValue);
        * repeated .greptime.v1.ColumnDef column_defs = 5;
        */
       public Builder addColumnDefs(
-          int index, io.greptime.v1.Columns.ColumnDef value) {
+          int index, io.greptime.v1.Common.ColumnDef value) {
         if (columnDefsBuilder_ == null) {
           if (value == null) {
             throw new NullPointerException();
@@ -4027,7 +4027,7 @@ java.lang.String defaultValue);
        * repeated .greptime.v1.ColumnDef column_defs = 5;
        */
       public Builder addColumnDefs(
-          io.greptime.v1.Columns.ColumnDef.Builder builderForValue) {
+          io.greptime.v1.Common.ColumnDef.Builder builderForValue) {
         if (columnDefsBuilder_ == null) {
           ensureColumnDefsIsMutable();
           columnDefs_.add(builderForValue.build());
@@ -4041,7 +4041,7 @@ java.lang.String defaultValue);
        * repeated .greptime.v1.ColumnDef column_defs = 5;
        */
       public Builder addColumnDefs(
-          int index, io.greptime.v1.Columns.ColumnDef.Builder builderForValue) {
+          int index, io.greptime.v1.Common.ColumnDef.Builder builderForValue) {
         if (columnDefsBuilder_ == null) {
           ensureColumnDefsIsMutable();
           columnDefs_.add(index, builderForValue.build());
@@ -4055,7 +4055,7 @@ java.lang.String defaultValue);
        * repeated .greptime.v1.ColumnDef column_defs = 5;
        */
       public Builder addAllColumnDefs(
-          java.lang.Iterable values) {
+          java.lang.Iterable values) {
         if (columnDefsBuilder_ == null) {
           ensureColumnDefsIsMutable();
           com.google.protobuf.AbstractMessageLite.Builder.addAll(
@@ -4095,14 +4095,14 @@ java.lang.String defaultValue);
       /**
        * repeated .greptime.v1.ColumnDef column_defs = 5;
        */
-      public io.greptime.v1.Columns.ColumnDef.Builder getColumnDefsBuilder(
+      public io.greptime.v1.Common.ColumnDef.Builder getColumnDefsBuilder(
           int index) {
         return getColumnDefsFieldBuilder().getBuilder(index);
       }
       /**
        * repeated .greptime.v1.ColumnDef column_defs = 5;
        */
-      public io.greptime.v1.Columns.ColumnDefOrBuilder getColumnDefsOrBuilder(
+      public io.greptime.v1.Common.ColumnDefOrBuilder getColumnDefsOrBuilder(
           int index) {
         if (columnDefsBuilder_ == null) {
           return columnDefs_.get(index);  } else {
@@ -4112,7 +4112,7 @@ java.lang.String defaultValue);
       /**
        * repeated .greptime.v1.ColumnDef column_defs = 5;
        */
-      public java.util.List 
+      public java.util.List 
            getColumnDefsOrBuilderList() {
         if (columnDefsBuilder_ != null) {
           return columnDefsBuilder_.getMessageOrBuilderList();
@@ -4123,31 +4123,31 @@ java.lang.String defaultValue);
       /**
        * repeated .greptime.v1.ColumnDef column_defs = 5;
        */
-      public io.greptime.v1.Columns.ColumnDef.Builder addColumnDefsBuilder() {
+      public io.greptime.v1.Common.ColumnDef.Builder addColumnDefsBuilder() {
         return getColumnDefsFieldBuilder().addBuilder(
-            io.greptime.v1.Columns.ColumnDef.getDefaultInstance());
+            io.greptime.v1.Common.ColumnDef.getDefaultInstance());
       }
       /**
        * repeated .greptime.v1.ColumnDef column_defs = 5;
        */
-      public io.greptime.v1.Columns.ColumnDef.Builder addColumnDefsBuilder(
+      public io.greptime.v1.Common.ColumnDef.Builder addColumnDefsBuilder(
           int index) {
         return getColumnDefsFieldBuilder().addBuilder(
-            index, io.greptime.v1.Columns.ColumnDef.getDefaultInstance());
+            index, io.greptime.v1.Common.ColumnDef.getDefaultInstance());
       }
       /**
        * repeated .greptime.v1.ColumnDef column_defs = 5;
        */
-      public java.util.List 
+      public java.util.List 
            getColumnDefsBuilderList() {
         return getColumnDefsFieldBuilder().getBuilderList();
       }
       private com.google.protobuf.RepeatedFieldBuilderV3<
-          io.greptime.v1.Columns.ColumnDef, io.greptime.v1.Columns.ColumnDef.Builder, io.greptime.v1.Columns.ColumnDefOrBuilder> 
+          io.greptime.v1.Common.ColumnDef, io.greptime.v1.Common.ColumnDef.Builder, io.greptime.v1.Common.ColumnDefOrBuilder> 
           getColumnDefsFieldBuilder() {
         if (columnDefsBuilder_ == null) {
           columnDefsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
-              io.greptime.v1.Columns.ColumnDef, io.greptime.v1.Columns.ColumnDef.Builder, io.greptime.v1.Columns.ColumnDefOrBuilder>(
+              io.greptime.v1.Common.ColumnDef, io.greptime.v1.Common.ColumnDef.Builder, io.greptime.v1.Common.ColumnDefOrBuilder>(
                   columnDefs_,
                   ((bitField0_ & 0x00000001) != 0),
                   getParentForChildren(),
@@ -13869,11 +13869,11 @@ java.lang.String defaultValue);
      * .greptime.v1.ColumnDef column_def = 1;
      * @return The columnDef.
      */
-    io.greptime.v1.Columns.ColumnDef getColumnDef();
+    io.greptime.v1.Common.ColumnDef getColumnDef();
     /**
      * .greptime.v1.ColumnDef column_def = 1;
      */
-    io.greptime.v1.Columns.ColumnDefOrBuilder getColumnDefOrBuilder();
+    io.greptime.v1.Common.ColumnDefOrBuilder getColumnDefOrBuilder();
 
     /**
      * bool is_key = 2;
@@ -13942,11 +13942,11 @@ java.lang.String defaultValue);
               done = true;
               break;
             case 10: {
-              io.greptime.v1.Columns.ColumnDef.Builder subBuilder = null;
+              io.greptime.v1.Common.ColumnDef.Builder subBuilder = null;
               if (columnDef_ != null) {
                 subBuilder = columnDef_.toBuilder();
               }
-              columnDef_ = input.readMessage(io.greptime.v1.Columns.ColumnDef.parser(), extensionRegistry);
+              columnDef_ = input.readMessage(io.greptime.v1.Common.ColumnDef.parser(), extensionRegistry);
               if (subBuilder != null) {
                 subBuilder.mergeFrom(columnDef_);
                 columnDef_ = subBuilder.buildPartial();
@@ -14792,7 +14792,7 @@ java.lang.String defaultValue);
     }
 
     public static final int COLUMN_DEF_FIELD_NUMBER = 1;
-    private io.greptime.v1.Columns.ColumnDef columnDef_;
+    private io.greptime.v1.Common.ColumnDef columnDef_;
     /**
      * .greptime.v1.ColumnDef column_def = 1;
      * @return Whether the columnDef field is set.
@@ -14806,14 +14806,14 @@ java.lang.String defaultValue);
      * @return The columnDef.
      */
     @java.lang.Override
-    public io.greptime.v1.Columns.ColumnDef getColumnDef() {
-      return columnDef_ == null ? io.greptime.v1.Columns.ColumnDef.getDefaultInstance() : columnDef_;
+    public io.greptime.v1.Common.ColumnDef getColumnDef() {
+      return columnDef_ == null ? io.greptime.v1.Common.ColumnDef.getDefaultInstance() : columnDef_;
     }
     /**
      * .greptime.v1.ColumnDef column_def = 1;
      */
     @java.lang.Override
-    public io.greptime.v1.Columns.ColumnDefOrBuilder getColumnDefOrBuilder() {
+    public io.greptime.v1.Common.ColumnDefOrBuilder getColumnDefOrBuilder() {
       return getColumnDef();
     }
 
@@ -15217,9 +15217,9 @@ java.lang.String defaultValue);
         return this;
       }
 
-      private io.greptime.v1.Columns.ColumnDef columnDef_;
+      private io.greptime.v1.Common.ColumnDef columnDef_;
       private com.google.protobuf.SingleFieldBuilderV3<
-          io.greptime.v1.Columns.ColumnDef, io.greptime.v1.Columns.ColumnDef.Builder, io.greptime.v1.Columns.ColumnDefOrBuilder> columnDefBuilder_;
+          io.greptime.v1.Common.ColumnDef, io.greptime.v1.Common.ColumnDef.Builder, io.greptime.v1.Common.ColumnDefOrBuilder> columnDefBuilder_;
       /**
        * .greptime.v1.ColumnDef column_def = 1;
        * @return Whether the columnDef field is set.
@@ -15231,9 +15231,9 @@ java.lang.String defaultValue);
        * .greptime.v1.ColumnDef column_def = 1;
        * @return The columnDef.
        */
-      public io.greptime.v1.Columns.ColumnDef getColumnDef() {
+      public io.greptime.v1.Common.ColumnDef getColumnDef() {
         if (columnDefBuilder_ == null) {
-          return columnDef_ == null ? io.greptime.v1.Columns.ColumnDef.getDefaultInstance() : columnDef_;
+          return columnDef_ == null ? io.greptime.v1.Common.ColumnDef.getDefaultInstance() : columnDef_;
         } else {
           return columnDefBuilder_.getMessage();
         }
@@ -15241,7 +15241,7 @@ java.lang.String defaultValue);
       /**
        * .greptime.v1.ColumnDef column_def = 1;
        */
-      public Builder setColumnDef(io.greptime.v1.Columns.ColumnDef value) {
+      public Builder setColumnDef(io.greptime.v1.Common.ColumnDef value) {
         if (columnDefBuilder_ == null) {
           if (value == null) {
             throw new NullPointerException();
@@ -15258,7 +15258,7 @@ java.lang.String defaultValue);
        * .greptime.v1.ColumnDef column_def = 1;
        */
       public Builder setColumnDef(
-          io.greptime.v1.Columns.ColumnDef.Builder builderForValue) {
+          io.greptime.v1.Common.ColumnDef.Builder builderForValue) {
         if (columnDefBuilder_ == null) {
           columnDef_ = builderForValue.build();
           onChanged();
@@ -15271,11 +15271,11 @@ java.lang.String defaultValue);
       /**
        * .greptime.v1.ColumnDef column_def = 1;
        */
-      public Builder mergeColumnDef(io.greptime.v1.Columns.ColumnDef value) {
+      public Builder mergeColumnDef(io.greptime.v1.Common.ColumnDef value) {
         if (columnDefBuilder_ == null) {
           if (columnDef_ != null) {
             columnDef_ =
-              io.greptime.v1.Columns.ColumnDef.newBuilder(columnDef_).mergeFrom(value).buildPartial();
+              io.greptime.v1.Common.ColumnDef.newBuilder(columnDef_).mergeFrom(value).buildPartial();
           } else {
             columnDef_ = value;
           }
@@ -15303,7 +15303,7 @@ java.lang.String defaultValue);
       /**
        * .greptime.v1.ColumnDef column_def = 1;
        */
-      public io.greptime.v1.Columns.ColumnDef.Builder getColumnDefBuilder() {
+      public io.greptime.v1.Common.ColumnDef.Builder getColumnDefBuilder() {
         
         onChanged();
         return getColumnDefFieldBuilder().getBuilder();
@@ -15311,23 +15311,23 @@ java.lang.String defaultValue);
       /**
        * .greptime.v1.ColumnDef column_def = 1;
        */
-      public io.greptime.v1.Columns.ColumnDefOrBuilder getColumnDefOrBuilder() {
+      public io.greptime.v1.Common.ColumnDefOrBuilder getColumnDefOrBuilder() {
         if (columnDefBuilder_ != null) {
           return columnDefBuilder_.getMessageOrBuilder();
         } else {
           return columnDef_ == null ?
-              io.greptime.v1.Columns.ColumnDef.getDefaultInstance() : columnDef_;
+              io.greptime.v1.Common.ColumnDef.getDefaultInstance() : columnDef_;
         }
       }
       /**
        * .greptime.v1.ColumnDef column_def = 1;
        */
       private com.google.protobuf.SingleFieldBuilderV3<
-          io.greptime.v1.Columns.ColumnDef, io.greptime.v1.Columns.ColumnDef.Builder, io.greptime.v1.Columns.ColumnDefOrBuilder> 
+          io.greptime.v1.Common.ColumnDef, io.greptime.v1.Common.ColumnDef.Builder, io.greptime.v1.Common.ColumnDefOrBuilder> 
           getColumnDefFieldBuilder() {
         if (columnDefBuilder_ == null) {
           columnDefBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
-              io.greptime.v1.Columns.ColumnDef, io.greptime.v1.Columns.ColumnDef.Builder, io.greptime.v1.Columns.ColumnDefOrBuilder>(
+              io.greptime.v1.Common.ColumnDef, io.greptime.v1.Common.ColumnDef.Builder, io.greptime.v1.Common.ColumnDefOrBuilder>(
                   getColumnDef(),
                   getParentForChildren(),
                   isClean());
@@ -16688,7 +16688,7 @@ java.lang.String defaultValue);
   static {
     java.lang.String[] descriptorData = {
       "\n\025greptime/v1/ddl.proto\022\013greptime.v1\032\030gr" +
-      "eptime/v1/column.proto\"\207\003\n\nDdlRequest\022:\n" +
+      "eptime/v1/common.proto\"\207\003\n\nDdlRequest\022:\n" +
       "\017create_database\030\001 \001(\0132\037.greptime.v1.Cre" +
       "ateDatabaseExprH\000\0224\n\014create_table\030\002 \001(\0132" +
       "\034.greptime.v1.CreateTableExprH\000\022\'\n\005alter" +
@@ -16750,7 +16750,7 @@ java.lang.String defaultValue);
     descriptor = com.google.protobuf.Descriptors.FileDescriptor
       .internalBuildGeneratedFileFrom(descriptorData,
         new com.google.protobuf.Descriptors.FileDescriptor[] {
-          io.greptime.v1.Columns.getDescriptor(),
+          io.greptime.v1.Common.getDescriptor(),
         });
     internal_static_greptime_v1_DdlRequest_descriptor =
       getDescriptor().getMessageTypes().get(0);
@@ -16848,7 +16848,7 @@ java.lang.String defaultValue);
       com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
         internal_static_greptime_v1_TableId_descriptor,
         new java.lang.String[] { "Id", });
-    io.greptime.v1.Columns.getDescriptor();
+    io.greptime.v1.Common.getDescriptor();
   }
 
   // @@protoc_insertion_point(outer_class_scope)
diff --git a/proto/greptime/v1/column.proto b/proto/greptime/v1/column.proto
index f7c4661..785b682 100644
--- a/proto/greptime/v1/column.proto
+++ b/proto/greptime/v1/column.proto
@@ -20,14 +20,10 @@ option java_package = "io.greptime.v1";
 option java_outer_classname = "Columns";
 option go_package = "github.com/GreptimeTeam/greptime-proto/go/greptime/v1";
 
+import "greptime/v1/common.proto";
+
 message Column {
   string column_name = 1;
-
-  enum SemanticType {
-    TAG = 0;
-    FIELD = 1;
-    TIMESTAMP = 2;
-  }
   SemanticType semantic_type = 2;
 
   message Values {
@@ -78,36 +74,3 @@ message Column {
   // Helpful in creating vector from column.
   ColumnDataType datatype = 5;
 }
-
-message ColumnDef {
-  string name = 1;
-  ColumnDataType datatype = 2;
-  bool is_nullable = 3;
-  bytes default_constraint = 4;
-}
-
-enum ColumnDataType {
-  BOOLEAN = 0;
-  INT8 = 1;
-  INT16 = 2;
-  INT32 = 3;
-  INT64 = 4;
-  UINT8 = 5;
-  UINT16 = 6;
-  UINT32 = 7;
-  UINT64 = 8;
-  FLOAT32 = 9;
-  FLOAT64 = 10;
-  BINARY = 11;
-  STRING = 12;
-  DATE = 13;
-  DATETIME = 14;
-  TIMESTAMP_SECOND = 15;
-  TIMESTAMP_MILLISECOND = 16;
-  TIMESTAMP_MICROSECOND = 17;
-  TIMESTAMP_NANOSECOND = 18;
-  TIME_SECOND = 19;
-  TIME_MILLISECOND = 20;
-  TIME_MICROSECOND = 21;
-  TIME_NANOSECOND = 22;
-}
diff --git a/proto/greptime/v1/common.proto b/proto/greptime/v1/common.proto
index bcefcbf..adb61aa 100644
--- a/proto/greptime/v1/common.proto
+++ b/proto/greptime/v1/common.proto
@@ -62,3 +62,42 @@ message Token { string token = 1; }
 message AffectedRows { uint32 value = 1; }
 
 message FlightMetadata { AffectedRows affected_rows = 1; }
+
+enum SemanticType {
+  TAG = 0;
+  FIELD = 1;
+  TIMESTAMP = 2;
+}
+
+message ColumnDef {
+  string name = 1;
+  ColumnDataType datatype = 2;
+  bool is_nullable = 3;
+  bytes default_constraint = 4;
+}
+
+enum ColumnDataType {
+  BOOLEAN = 0;
+  INT8 = 1;
+  INT16 = 2;
+  INT32 = 3;
+  INT64 = 4;
+  UINT8 = 5;
+  UINT16 = 6;
+  UINT32 = 7;
+  UINT64 = 8;
+  FLOAT32 = 9;
+  FLOAT64 = 10;
+  BINARY = 11;
+  STRING = 12;
+  DATE = 13;
+  DATETIME = 14;
+  TIMESTAMP_SECOND = 15;
+  TIMESTAMP_MILLISECOND = 16;
+  TIMESTAMP_MICROSECOND = 17;
+  TIMESTAMP_NANOSECOND = 18;
+  TIME_SECOND = 19;
+  TIME_MILLISECOND = 20;
+  TIME_MICROSECOND = 21;
+  TIME_NANOSECOND = 22;
+}
diff --git a/proto/greptime/v1/ddl.proto b/proto/greptime/v1/ddl.proto
index c701235..80b6750 100644
--- a/proto/greptime/v1/ddl.proto
+++ b/proto/greptime/v1/ddl.proto
@@ -20,7 +20,7 @@ option java_package = "io.greptime.v1";
 option java_outer_classname = "Ddl";
 option go_package = "github.com/GreptimeTeam/greptime-proto/go/greptime/v1";
 
-import "greptime/v1/column.proto";
+import "greptime/v1/common.proto";
 
 // "Data Definition Language" requests, that create, modify or delete the
 // database structures but not the data. `DdlRequest` could carry more