feat: PromQL ScalarCalculate plan (#147)
This commit is contained in:
@@ -100,8 +100,26 @@ struct RangeManipulateDefaultTypeInternal {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RangeManipulateDefaultTypeInternal _RangeManipulate_default_instance_;
|
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RangeManipulateDefaultTypeInternal _RangeManipulate_default_instance_;
|
||||||
|
PROTOBUF_CONSTEXPR ScalarCalculate::ScalarCalculate(
|
||||||
|
::_pbi::ConstantInitialized): _impl_{
|
||||||
|
/*decltype(_impl_.tag_columns_)*/{}
|
||||||
|
, /*decltype(_impl_.time_index_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
|
||||||
|
, /*decltype(_impl_.field_column_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
|
||||||
|
, /*decltype(_impl_.start_)*/int64_t{0}
|
||||||
|
, /*decltype(_impl_.end_)*/int64_t{0}
|
||||||
|
, /*decltype(_impl_.interval_)*/int64_t{0}
|
||||||
|
, /*decltype(_impl_._cached_size_)*/{}} {}
|
||||||
|
struct ScalarCalculateDefaultTypeInternal {
|
||||||
|
PROTOBUF_CONSTEXPR ScalarCalculateDefaultTypeInternal()
|
||||||
|
: _instance(::_pbi::ConstantInitialized{}) {}
|
||||||
|
~ScalarCalculateDefaultTypeInternal() {}
|
||||||
|
union {
|
||||||
|
ScalarCalculate _instance;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ScalarCalculateDefaultTypeInternal _ScalarCalculate_default_instance_;
|
||||||
} // namespace substrait_extension
|
} // namespace substrait_extension
|
||||||
static ::_pb::Metadata file_level_metadata_substrait_5fextension_2fpromql_5fplan_2eproto[5];
|
static ::_pb::Metadata file_level_metadata_substrait_5fextension_2fpromql_5fplan_2eproto[6];
|
||||||
static constexpr ::_pb::EnumDescriptor const** file_level_enum_descriptors_substrait_5fextension_2fpromql_5fplan_2eproto = nullptr;
|
static constexpr ::_pb::EnumDescriptor const** file_level_enum_descriptors_substrait_5fextension_2fpromql_5fplan_2eproto = nullptr;
|
||||||
static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_substrait_5fextension_2fpromql_5fplan_2eproto = nullptr;
|
static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_substrait_5fextension_2fpromql_5fplan_2eproto = nullptr;
|
||||||
|
|
||||||
@@ -155,6 +173,18 @@ const uint32_t TableStruct_substrait_5fextension_2fpromql_5fplan_2eproto::offset
|
|||||||
PROTOBUF_FIELD_OFFSET(::substrait_extension::RangeManipulate, _impl_.range_),
|
PROTOBUF_FIELD_OFFSET(::substrait_extension::RangeManipulate, _impl_.range_),
|
||||||
PROTOBUF_FIELD_OFFSET(::substrait_extension::RangeManipulate, _impl_.time_index_),
|
PROTOBUF_FIELD_OFFSET(::substrait_extension::RangeManipulate, _impl_.time_index_),
|
||||||
PROTOBUF_FIELD_OFFSET(::substrait_extension::RangeManipulate, _impl_.tag_columns_),
|
PROTOBUF_FIELD_OFFSET(::substrait_extension::RangeManipulate, _impl_.tag_columns_),
|
||||||
|
~0u, // no _has_bits_
|
||||||
|
PROTOBUF_FIELD_OFFSET(::substrait_extension::ScalarCalculate, _internal_metadata_),
|
||||||
|
~0u, // no _extensions_
|
||||||
|
~0u, // no _oneof_case_
|
||||||
|
~0u, // no _weak_field_map_
|
||||||
|
~0u, // no _inlined_string_donated_
|
||||||
|
PROTOBUF_FIELD_OFFSET(::substrait_extension::ScalarCalculate, _impl_.start_),
|
||||||
|
PROTOBUF_FIELD_OFFSET(::substrait_extension::ScalarCalculate, _impl_.end_),
|
||||||
|
PROTOBUF_FIELD_OFFSET(::substrait_extension::ScalarCalculate, _impl_.interval_),
|
||||||
|
PROTOBUF_FIELD_OFFSET(::substrait_extension::ScalarCalculate, _impl_.time_index_),
|
||||||
|
PROTOBUF_FIELD_OFFSET(::substrait_extension::ScalarCalculate, _impl_.tag_columns_),
|
||||||
|
PROTOBUF_FIELD_OFFSET(::substrait_extension::ScalarCalculate, _impl_.field_column_),
|
||||||
};
|
};
|
||||||
static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
|
static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
|
||||||
{ 0, -1, -1, sizeof(::substrait_extension::EmptyMetric)},
|
{ 0, -1, -1, sizeof(::substrait_extension::EmptyMetric)},
|
||||||
@@ -162,6 +192,7 @@ static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protode
|
|||||||
{ 21, -1, -1, sizeof(::substrait_extension::SeriesNormalize)},
|
{ 21, -1, -1, sizeof(::substrait_extension::SeriesNormalize)},
|
||||||
{ 30, -1, -1, sizeof(::substrait_extension::SeriesDivide)},
|
{ 30, -1, -1, sizeof(::substrait_extension::SeriesDivide)},
|
||||||
{ 37, -1, -1, sizeof(::substrait_extension::RangeManipulate)},
|
{ 37, -1, -1, sizeof(::substrait_extension::RangeManipulate)},
|
||||||
|
{ 49, -1, -1, sizeof(::substrait_extension::ScalarCalculate)},
|
||||||
};
|
};
|
||||||
|
|
||||||
static const ::_pb::Message* const file_default_instances[] = {
|
static const ::_pb::Message* const file_default_instances[] = {
|
||||||
@@ -170,6 +201,7 @@ static const ::_pb::Message* const file_default_instances[] = {
|
|||||||
&::substrait_extension::_SeriesNormalize_default_instance_._instance,
|
&::substrait_extension::_SeriesNormalize_default_instance_._instance,
|
||||||
&::substrait_extension::_SeriesDivide_default_instance_._instance,
|
&::substrait_extension::_SeriesDivide_default_instance_._instance,
|
||||||
&::substrait_extension::_RangeManipulate_default_instance_._instance,
|
&::substrait_extension::_RangeManipulate_default_instance_._instance,
|
||||||
|
&::substrait_extension::_ScalarCalculate_default_instance_._instance,
|
||||||
};
|
};
|
||||||
|
|
||||||
const char descriptor_table_protodef_substrait_5fextension_2fpromql_5fplan_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
|
const char descriptor_table_protodef_substrait_5fextension_2fpromql_5fplan_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
|
||||||
@@ -185,14 +217,18 @@ const char descriptor_table_protodef_substrait_5fextension_2fpromql_5fplan_2epro
|
|||||||
"\030\001 \003(\t\"w\n\017RangeManipulate\022\r\n\005start\030\001 \001(\003"
|
"\030\001 \003(\t\"w\n\017RangeManipulate\022\r\n\005start\030\001 \001(\003"
|
||||||
"\022\013\n\003end\030\002 \001(\003\022\020\n\010interval\030\003 \001(\003\022\r\n\005range"
|
"\022\013\n\003end\030\002 \001(\003\022\020\n\010interval\030\003 \001(\003\022\r\n\005range"
|
||||||
"\030\004 \001(\003\022\022\n\ntime_index\030\005 \001(\t\022\023\n\013tag_column"
|
"\030\004 \001(\003\022\022\n\ntime_index\030\005 \001(\t\022\023\n\013tag_column"
|
||||||
"s\030\006 \003(\tB\?Z=github.com/GreptimeTeam/grept"
|
"s\030\006 \003(\t\"~\n\017ScalarCalculate\022\r\n\005start\030\001 \001("
|
||||||
"ime-proto/go/substrait_extensionb\006proto3"
|
"\003\022\013\n\003end\030\002 \001(\003\022\020\n\010interval\030\003 \001(\003\022\022\n\ntime"
|
||||||
|
"_index\030\005 \001(\t\022\023\n\013tag_columns\030\006 \003(\t\022\024\n\014fie"
|
||||||
|
"ld_column\030\007 \001(\tB\?Z=github.com/GreptimeTe"
|
||||||
|
"am/greptime-proto/go/substrait_extension"
|
||||||
|
"b\006proto3"
|
||||||
;
|
;
|
||||||
static ::_pbi::once_flag descriptor_table_substrait_5fextension_2fpromql_5fplan_2eproto_once;
|
static ::_pbi::once_flag descriptor_table_substrait_5fextension_2fpromql_5fplan_2eproto_once;
|
||||||
const ::_pbi::DescriptorTable descriptor_table_substrait_5fextension_2fpromql_5fplan_2eproto = {
|
const ::_pbi::DescriptorTable descriptor_table_substrait_5fextension_2fpromql_5fplan_2eproto = {
|
||||||
false, false, 560, descriptor_table_protodef_substrait_5fextension_2fpromql_5fplan_2eproto,
|
false, false, 688, descriptor_table_protodef_substrait_5fextension_2fpromql_5fplan_2eproto,
|
||||||
"substrait_extension/promql_plan.proto",
|
"substrait_extension/promql_plan.proto",
|
||||||
&descriptor_table_substrait_5fextension_2fpromql_5fplan_2eproto_once, nullptr, 0, 5,
|
&descriptor_table_substrait_5fextension_2fpromql_5fplan_2eproto_once, nullptr, 0, 6,
|
||||||
schemas, file_default_instances, TableStruct_substrait_5fextension_2fpromql_5fplan_2eproto::offsets,
|
schemas, file_default_instances, TableStruct_substrait_5fextension_2fpromql_5fplan_2eproto::offsets,
|
||||||
file_level_metadata_substrait_5fextension_2fpromql_5fplan_2eproto, file_level_enum_descriptors_substrait_5fextension_2fpromql_5fplan_2eproto,
|
file_level_metadata_substrait_5fextension_2fpromql_5fplan_2eproto, file_level_enum_descriptors_substrait_5fextension_2fpromql_5fplan_2eproto,
|
||||||
file_level_service_descriptors_substrait_5fextension_2fpromql_5fplan_2eproto,
|
file_level_service_descriptors_substrait_5fextension_2fpromql_5fplan_2eproto,
|
||||||
@@ -1604,6 +1640,382 @@ void RangeManipulate::InternalSwap(RangeManipulate* other) {
|
|||||||
file_level_metadata_substrait_5fextension_2fpromql_5fplan_2eproto[4]);
|
file_level_metadata_substrait_5fextension_2fpromql_5fplan_2eproto[4]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ===================================================================
|
||||||
|
|
||||||
|
class ScalarCalculate::_Internal {
|
||||||
|
public:
|
||||||
|
};
|
||||||
|
|
||||||
|
ScalarCalculate::ScalarCalculate(::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:substrait_extension.ScalarCalculate)
|
||||||
|
}
|
||||||
|
ScalarCalculate::ScalarCalculate(const ScalarCalculate& from)
|
||||||
|
: ::PROTOBUF_NAMESPACE_ID::Message() {
|
||||||
|
ScalarCalculate* const _this = this; (void)_this;
|
||||||
|
new (&_impl_) Impl_{
|
||||||
|
decltype(_impl_.tag_columns_){from._impl_.tag_columns_}
|
||||||
|
, decltype(_impl_.time_index_){}
|
||||||
|
, decltype(_impl_.field_column_){}
|
||||||
|
, decltype(_impl_.start_){}
|
||||||
|
, decltype(_impl_.end_){}
|
||||||
|
, decltype(_impl_.interval_){}
|
||||||
|
, /*decltype(_impl_._cached_size_)*/{}};
|
||||||
|
|
||||||
|
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
|
||||||
|
_impl_.time_index_.InitDefault();
|
||||||
|
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||||||
|
_impl_.time_index_.Set("", GetArenaForAllocation());
|
||||||
|
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||||||
|
if (!from._internal_time_index().empty()) {
|
||||||
|
_this->_impl_.time_index_.Set(from._internal_time_index(),
|
||||||
|
_this->GetArenaForAllocation());
|
||||||
|
}
|
||||||
|
_impl_.field_column_.InitDefault();
|
||||||
|
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||||||
|
_impl_.field_column_.Set("", GetArenaForAllocation());
|
||||||
|
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||||||
|
if (!from._internal_field_column().empty()) {
|
||||||
|
_this->_impl_.field_column_.Set(from._internal_field_column(),
|
||||||
|
_this->GetArenaForAllocation());
|
||||||
|
}
|
||||||
|
::memcpy(&_impl_.start_, &from._impl_.start_,
|
||||||
|
static_cast<size_t>(reinterpret_cast<char*>(&_impl_.interval_) -
|
||||||
|
reinterpret_cast<char*>(&_impl_.start_)) + sizeof(_impl_.interval_));
|
||||||
|
// @@protoc_insertion_point(copy_constructor:substrait_extension.ScalarCalculate)
|
||||||
|
}
|
||||||
|
|
||||||
|
inline void ScalarCalculate::SharedCtor(
|
||||||
|
::_pb::Arena* arena, bool is_message_owned) {
|
||||||
|
(void)arena;
|
||||||
|
(void)is_message_owned;
|
||||||
|
new (&_impl_) Impl_{
|
||||||
|
decltype(_impl_.tag_columns_){arena}
|
||||||
|
, decltype(_impl_.time_index_){}
|
||||||
|
, decltype(_impl_.field_column_){}
|
||||||
|
, decltype(_impl_.start_){int64_t{0}}
|
||||||
|
, decltype(_impl_.end_){int64_t{0}}
|
||||||
|
, decltype(_impl_.interval_){int64_t{0}}
|
||||||
|
, /*decltype(_impl_._cached_size_)*/{}
|
||||||
|
};
|
||||||
|
_impl_.time_index_.InitDefault();
|
||||||
|
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||||||
|
_impl_.time_index_.Set("", GetArenaForAllocation());
|
||||||
|
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||||||
|
_impl_.field_column_.InitDefault();
|
||||||
|
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||||||
|
_impl_.field_column_.Set("", GetArenaForAllocation());
|
||||||
|
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||||||
|
}
|
||||||
|
|
||||||
|
ScalarCalculate::~ScalarCalculate() {
|
||||||
|
// @@protoc_insertion_point(destructor:substrait_extension.ScalarCalculate)
|
||||||
|
if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
|
||||||
|
(void)arena;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
SharedDtor();
|
||||||
|
}
|
||||||
|
|
||||||
|
inline void ScalarCalculate::SharedDtor() {
|
||||||
|
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
|
||||||
|
_impl_.tag_columns_.~RepeatedPtrField();
|
||||||
|
_impl_.time_index_.Destroy();
|
||||||
|
_impl_.field_column_.Destroy();
|
||||||
|
}
|
||||||
|
|
||||||
|
void ScalarCalculate::SetCachedSize(int size) const {
|
||||||
|
_impl_._cached_size_.Set(size);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ScalarCalculate::Clear() {
|
||||||
|
// @@protoc_insertion_point(message_clear_start:substrait_extension.ScalarCalculate)
|
||||||
|
uint32_t cached_has_bits = 0;
|
||||||
|
// Prevent compiler warnings about cached_has_bits being unused
|
||||||
|
(void) cached_has_bits;
|
||||||
|
|
||||||
|
_impl_.tag_columns_.Clear();
|
||||||
|
_impl_.time_index_.ClearToEmpty();
|
||||||
|
_impl_.field_column_.ClearToEmpty();
|
||||||
|
::memset(&_impl_.start_, 0, static_cast<size_t>(
|
||||||
|
reinterpret_cast<char*>(&_impl_.interval_) -
|
||||||
|
reinterpret_cast<char*>(&_impl_.start_)) + sizeof(_impl_.interval_));
|
||||||
|
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
|
||||||
|
}
|
||||||
|
|
||||||
|
const char* ScalarCalculate::_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) {
|
||||||
|
// int64 start = 1;
|
||||||
|
case 1:
|
||||||
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
|
||||||
|
_impl_.start_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
|
||||||
|
CHK_(ptr);
|
||||||
|
} else
|
||||||
|
goto handle_unusual;
|
||||||
|
continue;
|
||||||
|
// int64 end = 2;
|
||||||
|
case 2:
|
||||||
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
|
||||||
|
_impl_.end_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
|
||||||
|
CHK_(ptr);
|
||||||
|
} else
|
||||||
|
goto handle_unusual;
|
||||||
|
continue;
|
||||||
|
// int64 interval = 3;
|
||||||
|
case 3:
|
||||||
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
|
||||||
|
_impl_.interval_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
|
||||||
|
CHK_(ptr);
|
||||||
|
} else
|
||||||
|
goto handle_unusual;
|
||||||
|
continue;
|
||||||
|
// string time_index = 5;
|
||||||
|
case 5:
|
||||||
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 42)) {
|
||||||
|
auto str = _internal_mutable_time_index();
|
||||||
|
ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
|
||||||
|
CHK_(ptr);
|
||||||
|
CHK_(::_pbi::VerifyUTF8(str, "substrait_extension.ScalarCalculate.time_index"));
|
||||||
|
} else
|
||||||
|
goto handle_unusual;
|
||||||
|
continue;
|
||||||
|
// repeated string tag_columns = 6;
|
||||||
|
case 6:
|
||||||
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 50)) {
|
||||||
|
ptr -= 1;
|
||||||
|
do {
|
||||||
|
ptr += 1;
|
||||||
|
auto str = _internal_add_tag_columns();
|
||||||
|
ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
|
||||||
|
CHK_(ptr);
|
||||||
|
CHK_(::_pbi::VerifyUTF8(str, "substrait_extension.ScalarCalculate.tag_columns"));
|
||||||
|
if (!ctx->DataAvailable(ptr)) break;
|
||||||
|
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<50>(ptr));
|
||||||
|
} else
|
||||||
|
goto handle_unusual;
|
||||||
|
continue;
|
||||||
|
// string field_column = 7;
|
||||||
|
case 7:
|
||||||
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 58)) {
|
||||||
|
auto str = _internal_mutable_field_column();
|
||||||
|
ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
|
||||||
|
CHK_(ptr);
|
||||||
|
CHK_(::_pbi::VerifyUTF8(str, "substrait_extension.ScalarCalculate.field_column"));
|
||||||
|
} 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* ScalarCalculate::_InternalSerialize(
|
||||||
|
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
|
||||||
|
// @@protoc_insertion_point(serialize_to_array_start:substrait_extension.ScalarCalculate)
|
||||||
|
uint32_t cached_has_bits = 0;
|
||||||
|
(void) cached_has_bits;
|
||||||
|
|
||||||
|
// int64 start = 1;
|
||||||
|
if (this->_internal_start() != 0) {
|
||||||
|
target = stream->EnsureSpace(target);
|
||||||
|
target = ::_pbi::WireFormatLite::WriteInt64ToArray(1, this->_internal_start(), target);
|
||||||
|
}
|
||||||
|
|
||||||
|
// int64 end = 2;
|
||||||
|
if (this->_internal_end() != 0) {
|
||||||
|
target = stream->EnsureSpace(target);
|
||||||
|
target = ::_pbi::WireFormatLite::WriteInt64ToArray(2, this->_internal_end(), target);
|
||||||
|
}
|
||||||
|
|
||||||
|
// int64 interval = 3;
|
||||||
|
if (this->_internal_interval() != 0) {
|
||||||
|
target = stream->EnsureSpace(target);
|
||||||
|
target = ::_pbi::WireFormatLite::WriteInt64ToArray(3, this->_internal_interval(), target);
|
||||||
|
}
|
||||||
|
|
||||||
|
// string time_index = 5;
|
||||||
|
if (!this->_internal_time_index().empty()) {
|
||||||
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
|
||||||
|
this->_internal_time_index().data(), static_cast<int>(this->_internal_time_index().length()),
|
||||||
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
|
||||||
|
"substrait_extension.ScalarCalculate.time_index");
|
||||||
|
target = stream->WriteStringMaybeAliased(
|
||||||
|
5, this->_internal_time_index(), target);
|
||||||
|
}
|
||||||
|
|
||||||
|
// repeated string tag_columns = 6;
|
||||||
|
for (int i = 0, n = this->_internal_tag_columns_size(); i < n; i++) {
|
||||||
|
const auto& s = this->_internal_tag_columns(i);
|
||||||
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
|
||||||
|
s.data(), static_cast<int>(s.length()),
|
||||||
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
|
||||||
|
"substrait_extension.ScalarCalculate.tag_columns");
|
||||||
|
target = stream->WriteString(6, s, target);
|
||||||
|
}
|
||||||
|
|
||||||
|
// string field_column = 7;
|
||||||
|
if (!this->_internal_field_column().empty()) {
|
||||||
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
|
||||||
|
this->_internal_field_column().data(), static_cast<int>(this->_internal_field_column().length()),
|
||||||
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
|
||||||
|
"substrait_extension.ScalarCalculate.field_column");
|
||||||
|
target = stream->WriteStringMaybeAliased(
|
||||||
|
7, this->_internal_field_column(), 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:substrait_extension.ScalarCalculate)
|
||||||
|
return target;
|
||||||
|
}
|
||||||
|
|
||||||
|
size_t ScalarCalculate::ByteSizeLong() const {
|
||||||
|
// @@protoc_insertion_point(message_byte_size_start:substrait_extension.ScalarCalculate)
|
||||||
|
size_t total_size = 0;
|
||||||
|
|
||||||
|
uint32_t cached_has_bits = 0;
|
||||||
|
// Prevent compiler warnings about cached_has_bits being unused
|
||||||
|
(void) cached_has_bits;
|
||||||
|
|
||||||
|
// repeated string tag_columns = 6;
|
||||||
|
total_size += 1 *
|
||||||
|
::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_impl_.tag_columns_.size());
|
||||||
|
for (int i = 0, n = _impl_.tag_columns_.size(); i < n; i++) {
|
||||||
|
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
|
||||||
|
_impl_.tag_columns_.Get(i));
|
||||||
|
}
|
||||||
|
|
||||||
|
// string time_index = 5;
|
||||||
|
if (!this->_internal_time_index().empty()) {
|
||||||
|
total_size += 1 +
|
||||||
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
|
||||||
|
this->_internal_time_index());
|
||||||
|
}
|
||||||
|
|
||||||
|
// string field_column = 7;
|
||||||
|
if (!this->_internal_field_column().empty()) {
|
||||||
|
total_size += 1 +
|
||||||
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
|
||||||
|
this->_internal_field_column());
|
||||||
|
}
|
||||||
|
|
||||||
|
// int64 start = 1;
|
||||||
|
if (this->_internal_start() != 0) {
|
||||||
|
total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_start());
|
||||||
|
}
|
||||||
|
|
||||||
|
// int64 end = 2;
|
||||||
|
if (this->_internal_end() != 0) {
|
||||||
|
total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_end());
|
||||||
|
}
|
||||||
|
|
||||||
|
// int64 interval = 3;
|
||||||
|
if (this->_internal_interval() != 0) {
|
||||||
|
total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_interval());
|
||||||
|
}
|
||||||
|
|
||||||
|
return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
|
||||||
|
}
|
||||||
|
|
||||||
|
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ScalarCalculate::_class_data_ = {
|
||||||
|
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
|
||||||
|
ScalarCalculate::MergeImpl
|
||||||
|
};
|
||||||
|
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ScalarCalculate::GetClassData() const { return &_class_data_; }
|
||||||
|
|
||||||
|
|
||||||
|
void ScalarCalculate::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
|
||||||
|
auto* const _this = static_cast<ScalarCalculate*>(&to_msg);
|
||||||
|
auto& from = static_cast<const ScalarCalculate&>(from_msg);
|
||||||
|
// @@protoc_insertion_point(class_specific_merge_from_start:substrait_extension.ScalarCalculate)
|
||||||
|
GOOGLE_DCHECK_NE(&from, _this);
|
||||||
|
uint32_t cached_has_bits = 0;
|
||||||
|
(void) cached_has_bits;
|
||||||
|
|
||||||
|
_this->_impl_.tag_columns_.MergeFrom(from._impl_.tag_columns_);
|
||||||
|
if (!from._internal_time_index().empty()) {
|
||||||
|
_this->_internal_set_time_index(from._internal_time_index());
|
||||||
|
}
|
||||||
|
if (!from._internal_field_column().empty()) {
|
||||||
|
_this->_internal_set_field_column(from._internal_field_column());
|
||||||
|
}
|
||||||
|
if (from._internal_start() != 0) {
|
||||||
|
_this->_internal_set_start(from._internal_start());
|
||||||
|
}
|
||||||
|
if (from._internal_end() != 0) {
|
||||||
|
_this->_internal_set_end(from._internal_end());
|
||||||
|
}
|
||||||
|
if (from._internal_interval() != 0) {
|
||||||
|
_this->_internal_set_interval(from._internal_interval());
|
||||||
|
}
|
||||||
|
_this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ScalarCalculate::CopyFrom(const ScalarCalculate& from) {
|
||||||
|
// @@protoc_insertion_point(class_specific_copy_from_start:substrait_extension.ScalarCalculate)
|
||||||
|
if (&from == this) return;
|
||||||
|
Clear();
|
||||||
|
MergeFrom(from);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ScalarCalculate::IsInitialized() const {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ScalarCalculate::InternalSwap(ScalarCalculate* other) {
|
||||||
|
using std::swap;
|
||||||
|
auto* lhs_arena = GetArenaForAllocation();
|
||||||
|
auto* rhs_arena = other->GetArenaForAllocation();
|
||||||
|
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
|
||||||
|
_impl_.tag_columns_.InternalSwap(&other->_impl_.tag_columns_);
|
||||||
|
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
|
||||||
|
&_impl_.time_index_, lhs_arena,
|
||||||
|
&other->_impl_.time_index_, rhs_arena
|
||||||
|
);
|
||||||
|
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
|
||||||
|
&_impl_.field_column_, lhs_arena,
|
||||||
|
&other->_impl_.field_column_, rhs_arena
|
||||||
|
);
|
||||||
|
::PROTOBUF_NAMESPACE_ID::internal::memswap<
|
||||||
|
PROTOBUF_FIELD_OFFSET(ScalarCalculate, _impl_.interval_)
|
||||||
|
+ sizeof(ScalarCalculate::_impl_.interval_)
|
||||||
|
- PROTOBUF_FIELD_OFFSET(ScalarCalculate, _impl_.start_)>(
|
||||||
|
reinterpret_cast<char*>(&_impl_.start_),
|
||||||
|
reinterpret_cast<char*>(&other->_impl_.start_));
|
||||||
|
}
|
||||||
|
|
||||||
|
::PROTOBUF_NAMESPACE_ID::Metadata ScalarCalculate::GetMetadata() const {
|
||||||
|
return ::_pbi::AssignDescriptors(
|
||||||
|
&descriptor_table_substrait_5fextension_2fpromql_5fplan_2eproto_getter, &descriptor_table_substrait_5fextension_2fpromql_5fplan_2eproto_once,
|
||||||
|
file_level_metadata_substrait_5fextension_2fpromql_5fplan_2eproto[5]);
|
||||||
|
}
|
||||||
|
|
||||||
// @@protoc_insertion_point(namespace_scope)
|
// @@protoc_insertion_point(namespace_scope)
|
||||||
} // namespace substrait_extension
|
} // namespace substrait_extension
|
||||||
PROTOBUF_NAMESPACE_OPEN
|
PROTOBUF_NAMESPACE_OPEN
|
||||||
@@ -1627,6 +2039,10 @@ template<> PROTOBUF_NOINLINE ::substrait_extension::RangeManipulate*
|
|||||||
Arena::CreateMaybeMessage< ::substrait_extension::RangeManipulate >(Arena* arena) {
|
Arena::CreateMaybeMessage< ::substrait_extension::RangeManipulate >(Arena* arena) {
|
||||||
return Arena::CreateMessageInternal< ::substrait_extension::RangeManipulate >(arena);
|
return Arena::CreateMessageInternal< ::substrait_extension::RangeManipulate >(arena);
|
||||||
}
|
}
|
||||||
|
template<> PROTOBUF_NOINLINE ::substrait_extension::ScalarCalculate*
|
||||||
|
Arena::CreateMaybeMessage< ::substrait_extension::ScalarCalculate >(Arena* arena) {
|
||||||
|
return Arena::CreateMessageInternal< ::substrait_extension::ScalarCalculate >(arena);
|
||||||
|
}
|
||||||
PROTOBUF_NAMESPACE_CLOSE
|
PROTOBUF_NAMESPACE_CLOSE
|
||||||
|
|
||||||
// @@protoc_insertion_point(global_scope)
|
// @@protoc_insertion_point(global_scope)
|
||||||
|
|||||||
@@ -54,6 +54,9 @@ extern InstantManipulateDefaultTypeInternal _InstantManipulate_default_instance_
|
|||||||
class RangeManipulate;
|
class RangeManipulate;
|
||||||
struct RangeManipulateDefaultTypeInternal;
|
struct RangeManipulateDefaultTypeInternal;
|
||||||
extern RangeManipulateDefaultTypeInternal _RangeManipulate_default_instance_;
|
extern RangeManipulateDefaultTypeInternal _RangeManipulate_default_instance_;
|
||||||
|
class ScalarCalculate;
|
||||||
|
struct ScalarCalculateDefaultTypeInternal;
|
||||||
|
extern ScalarCalculateDefaultTypeInternal _ScalarCalculate_default_instance_;
|
||||||
class SeriesDivide;
|
class SeriesDivide;
|
||||||
struct SeriesDivideDefaultTypeInternal;
|
struct SeriesDivideDefaultTypeInternal;
|
||||||
extern SeriesDivideDefaultTypeInternal _SeriesDivide_default_instance_;
|
extern SeriesDivideDefaultTypeInternal _SeriesDivide_default_instance_;
|
||||||
@@ -65,6 +68,7 @@ PROTOBUF_NAMESPACE_OPEN
|
|||||||
template<> ::substrait_extension::EmptyMetric* Arena::CreateMaybeMessage<::substrait_extension::EmptyMetric>(Arena*);
|
template<> ::substrait_extension::EmptyMetric* Arena::CreateMaybeMessage<::substrait_extension::EmptyMetric>(Arena*);
|
||||||
template<> ::substrait_extension::InstantManipulate* Arena::CreateMaybeMessage<::substrait_extension::InstantManipulate>(Arena*);
|
template<> ::substrait_extension::InstantManipulate* Arena::CreateMaybeMessage<::substrait_extension::InstantManipulate>(Arena*);
|
||||||
template<> ::substrait_extension::RangeManipulate* Arena::CreateMaybeMessage<::substrait_extension::RangeManipulate>(Arena*);
|
template<> ::substrait_extension::RangeManipulate* Arena::CreateMaybeMessage<::substrait_extension::RangeManipulate>(Arena*);
|
||||||
|
template<> ::substrait_extension::ScalarCalculate* Arena::CreateMaybeMessage<::substrait_extension::ScalarCalculate>(Arena*);
|
||||||
template<> ::substrait_extension::SeriesDivide* Arena::CreateMaybeMessage<::substrait_extension::SeriesDivide>(Arena*);
|
template<> ::substrait_extension::SeriesDivide* Arena::CreateMaybeMessage<::substrait_extension::SeriesDivide>(Arena*);
|
||||||
template<> ::substrait_extension::SeriesNormalize* Arena::CreateMaybeMessage<::substrait_extension::SeriesNormalize>(Arena*);
|
template<> ::substrait_extension::SeriesNormalize* Arena::CreateMaybeMessage<::substrait_extension::SeriesNormalize>(Arena*);
|
||||||
PROTOBUF_NAMESPACE_CLOSE
|
PROTOBUF_NAMESPACE_CLOSE
|
||||||
@@ -1014,6 +1018,234 @@ class RangeManipulate final :
|
|||||||
union { Impl_ _impl_; };
|
union { Impl_ _impl_; };
|
||||||
friend struct ::TableStruct_substrait_5fextension_2fpromql_5fplan_2eproto;
|
friend struct ::TableStruct_substrait_5fextension_2fpromql_5fplan_2eproto;
|
||||||
};
|
};
|
||||||
|
// -------------------------------------------------------------------
|
||||||
|
|
||||||
|
class ScalarCalculate final :
|
||||||
|
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:substrait_extension.ScalarCalculate) */ {
|
||||||
|
public:
|
||||||
|
inline ScalarCalculate() : ScalarCalculate(nullptr) {}
|
||||||
|
~ScalarCalculate() override;
|
||||||
|
explicit PROTOBUF_CONSTEXPR ScalarCalculate(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized);
|
||||||
|
|
||||||
|
ScalarCalculate(const ScalarCalculate& from);
|
||||||
|
ScalarCalculate(ScalarCalculate&& from) noexcept
|
||||||
|
: ScalarCalculate() {
|
||||||
|
*this = ::std::move(from);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline ScalarCalculate& operator=(const ScalarCalculate& from) {
|
||||||
|
CopyFrom(from);
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
inline ScalarCalculate& operator=(ScalarCalculate&& 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 ScalarCalculate& default_instance() {
|
||||||
|
return *internal_default_instance();
|
||||||
|
}
|
||||||
|
static inline const ScalarCalculate* internal_default_instance() {
|
||||||
|
return reinterpret_cast<const ScalarCalculate*>(
|
||||||
|
&_ScalarCalculate_default_instance_);
|
||||||
|
}
|
||||||
|
static constexpr int kIndexInFileMessages =
|
||||||
|
5;
|
||||||
|
|
||||||
|
friend void swap(ScalarCalculate& a, ScalarCalculate& b) {
|
||||||
|
a.Swap(&b);
|
||||||
|
}
|
||||||
|
inline void Swap(ScalarCalculate* 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(ScalarCalculate* other) {
|
||||||
|
if (other == this) return;
|
||||||
|
GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena());
|
||||||
|
InternalSwap(other);
|
||||||
|
}
|
||||||
|
|
||||||
|
// implements Message ----------------------------------------------
|
||||||
|
|
||||||
|
ScalarCalculate* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final {
|
||||||
|
return CreateMaybeMessage<ScalarCalculate>(arena);
|
||||||
|
}
|
||||||
|
using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom;
|
||||||
|
void CopyFrom(const ScalarCalculate& from);
|
||||||
|
using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom;
|
||||||
|
void MergeFrom( const ScalarCalculate& from) {
|
||||||
|
ScalarCalculate::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(ScalarCalculate* other);
|
||||||
|
|
||||||
|
private:
|
||||||
|
friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
|
||||||
|
static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
|
||||||
|
return "substrait_extension.ScalarCalculate";
|
||||||
|
}
|
||||||
|
protected:
|
||||||
|
explicit ScalarCalculate(::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 {
|
||||||
|
kTagColumnsFieldNumber = 6,
|
||||||
|
kTimeIndexFieldNumber = 5,
|
||||||
|
kFieldColumnFieldNumber = 7,
|
||||||
|
kStartFieldNumber = 1,
|
||||||
|
kEndFieldNumber = 2,
|
||||||
|
kIntervalFieldNumber = 3,
|
||||||
|
};
|
||||||
|
// repeated string tag_columns = 6;
|
||||||
|
int tag_columns_size() const;
|
||||||
|
private:
|
||||||
|
int _internal_tag_columns_size() const;
|
||||||
|
public:
|
||||||
|
void clear_tag_columns();
|
||||||
|
const std::string& tag_columns(int index) const;
|
||||||
|
std::string* mutable_tag_columns(int index);
|
||||||
|
void set_tag_columns(int index, const std::string& value);
|
||||||
|
void set_tag_columns(int index, std::string&& value);
|
||||||
|
void set_tag_columns(int index, const char* value);
|
||||||
|
void set_tag_columns(int index, const char* value, size_t size);
|
||||||
|
std::string* add_tag_columns();
|
||||||
|
void add_tag_columns(const std::string& value);
|
||||||
|
void add_tag_columns(std::string&& value);
|
||||||
|
void add_tag_columns(const char* value);
|
||||||
|
void add_tag_columns(const char* value, size_t size);
|
||||||
|
const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<std::string>& tag_columns() const;
|
||||||
|
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<std::string>* mutable_tag_columns();
|
||||||
|
private:
|
||||||
|
const std::string& _internal_tag_columns(int index) const;
|
||||||
|
std::string* _internal_add_tag_columns();
|
||||||
|
public:
|
||||||
|
|
||||||
|
// string time_index = 5;
|
||||||
|
void clear_time_index();
|
||||||
|
const std::string& time_index() const;
|
||||||
|
template <typename ArgT0 = const std::string&, typename... ArgT>
|
||||||
|
void set_time_index(ArgT0&& arg0, ArgT... args);
|
||||||
|
std::string* mutable_time_index();
|
||||||
|
PROTOBUF_NODISCARD std::string* release_time_index();
|
||||||
|
void set_allocated_time_index(std::string* time_index);
|
||||||
|
private:
|
||||||
|
const std::string& _internal_time_index() const;
|
||||||
|
inline PROTOBUF_ALWAYS_INLINE void _internal_set_time_index(const std::string& value);
|
||||||
|
std::string* _internal_mutable_time_index();
|
||||||
|
public:
|
||||||
|
|
||||||
|
// string field_column = 7;
|
||||||
|
void clear_field_column();
|
||||||
|
const std::string& field_column() const;
|
||||||
|
template <typename ArgT0 = const std::string&, typename... ArgT>
|
||||||
|
void set_field_column(ArgT0&& arg0, ArgT... args);
|
||||||
|
std::string* mutable_field_column();
|
||||||
|
PROTOBUF_NODISCARD std::string* release_field_column();
|
||||||
|
void set_allocated_field_column(std::string* field_column);
|
||||||
|
private:
|
||||||
|
const std::string& _internal_field_column() const;
|
||||||
|
inline PROTOBUF_ALWAYS_INLINE void _internal_set_field_column(const std::string& value);
|
||||||
|
std::string* _internal_mutable_field_column();
|
||||||
|
public:
|
||||||
|
|
||||||
|
// int64 start = 1;
|
||||||
|
void clear_start();
|
||||||
|
int64_t start() const;
|
||||||
|
void set_start(int64_t value);
|
||||||
|
private:
|
||||||
|
int64_t _internal_start() const;
|
||||||
|
void _internal_set_start(int64_t value);
|
||||||
|
public:
|
||||||
|
|
||||||
|
// int64 end = 2;
|
||||||
|
void clear_end();
|
||||||
|
int64_t end() const;
|
||||||
|
void set_end(int64_t value);
|
||||||
|
private:
|
||||||
|
int64_t _internal_end() const;
|
||||||
|
void _internal_set_end(int64_t value);
|
||||||
|
public:
|
||||||
|
|
||||||
|
// int64 interval = 3;
|
||||||
|
void clear_interval();
|
||||||
|
int64_t interval() const;
|
||||||
|
void set_interval(int64_t value);
|
||||||
|
private:
|
||||||
|
int64_t _internal_interval() const;
|
||||||
|
void _internal_set_interval(int64_t value);
|
||||||
|
public:
|
||||||
|
|
||||||
|
// @@protoc_insertion_point(class_scope:substrait_extension.ScalarCalculate)
|
||||||
|
private:
|
||||||
|
class _Internal;
|
||||||
|
|
||||||
|
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
|
||||||
|
typedef void InternalArenaConstructable_;
|
||||||
|
typedef void DestructorSkippable_;
|
||||||
|
struct Impl_ {
|
||||||
|
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<std::string> tag_columns_;
|
||||||
|
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr time_index_;
|
||||||
|
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr field_column_;
|
||||||
|
int64_t start_;
|
||||||
|
int64_t end_;
|
||||||
|
int64_t interval_;
|
||||||
|
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
|
||||||
|
};
|
||||||
|
union { Impl_ _impl_; };
|
||||||
|
friend struct ::TableStruct_substrait_5fextension_2fpromql_5fplan_2eproto;
|
||||||
|
};
|
||||||
// ===================================================================
|
// ===================================================================
|
||||||
|
|
||||||
|
|
||||||
@@ -1651,6 +1883,245 @@ RangeManipulate::mutable_tag_columns() {
|
|||||||
return &_impl_.tag_columns_;
|
return &_impl_.tag_columns_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// -------------------------------------------------------------------
|
||||||
|
|
||||||
|
// ScalarCalculate
|
||||||
|
|
||||||
|
// int64 start = 1;
|
||||||
|
inline void ScalarCalculate::clear_start() {
|
||||||
|
_impl_.start_ = int64_t{0};
|
||||||
|
}
|
||||||
|
inline int64_t ScalarCalculate::_internal_start() const {
|
||||||
|
return _impl_.start_;
|
||||||
|
}
|
||||||
|
inline int64_t ScalarCalculate::start() const {
|
||||||
|
// @@protoc_insertion_point(field_get:substrait_extension.ScalarCalculate.start)
|
||||||
|
return _internal_start();
|
||||||
|
}
|
||||||
|
inline void ScalarCalculate::_internal_set_start(int64_t value) {
|
||||||
|
|
||||||
|
_impl_.start_ = value;
|
||||||
|
}
|
||||||
|
inline void ScalarCalculate::set_start(int64_t value) {
|
||||||
|
_internal_set_start(value);
|
||||||
|
// @@protoc_insertion_point(field_set:substrait_extension.ScalarCalculate.start)
|
||||||
|
}
|
||||||
|
|
||||||
|
// int64 end = 2;
|
||||||
|
inline void ScalarCalculate::clear_end() {
|
||||||
|
_impl_.end_ = int64_t{0};
|
||||||
|
}
|
||||||
|
inline int64_t ScalarCalculate::_internal_end() const {
|
||||||
|
return _impl_.end_;
|
||||||
|
}
|
||||||
|
inline int64_t ScalarCalculate::end() const {
|
||||||
|
// @@protoc_insertion_point(field_get:substrait_extension.ScalarCalculate.end)
|
||||||
|
return _internal_end();
|
||||||
|
}
|
||||||
|
inline void ScalarCalculate::_internal_set_end(int64_t value) {
|
||||||
|
|
||||||
|
_impl_.end_ = value;
|
||||||
|
}
|
||||||
|
inline void ScalarCalculate::set_end(int64_t value) {
|
||||||
|
_internal_set_end(value);
|
||||||
|
// @@protoc_insertion_point(field_set:substrait_extension.ScalarCalculate.end)
|
||||||
|
}
|
||||||
|
|
||||||
|
// int64 interval = 3;
|
||||||
|
inline void ScalarCalculate::clear_interval() {
|
||||||
|
_impl_.interval_ = int64_t{0};
|
||||||
|
}
|
||||||
|
inline int64_t ScalarCalculate::_internal_interval() const {
|
||||||
|
return _impl_.interval_;
|
||||||
|
}
|
||||||
|
inline int64_t ScalarCalculate::interval() const {
|
||||||
|
// @@protoc_insertion_point(field_get:substrait_extension.ScalarCalculate.interval)
|
||||||
|
return _internal_interval();
|
||||||
|
}
|
||||||
|
inline void ScalarCalculate::_internal_set_interval(int64_t value) {
|
||||||
|
|
||||||
|
_impl_.interval_ = value;
|
||||||
|
}
|
||||||
|
inline void ScalarCalculate::set_interval(int64_t value) {
|
||||||
|
_internal_set_interval(value);
|
||||||
|
// @@protoc_insertion_point(field_set:substrait_extension.ScalarCalculate.interval)
|
||||||
|
}
|
||||||
|
|
||||||
|
// string time_index = 5;
|
||||||
|
inline void ScalarCalculate::clear_time_index() {
|
||||||
|
_impl_.time_index_.ClearToEmpty();
|
||||||
|
}
|
||||||
|
inline const std::string& ScalarCalculate::time_index() const {
|
||||||
|
// @@protoc_insertion_point(field_get:substrait_extension.ScalarCalculate.time_index)
|
||||||
|
return _internal_time_index();
|
||||||
|
}
|
||||||
|
template <typename ArgT0, typename... ArgT>
|
||||||
|
inline PROTOBUF_ALWAYS_INLINE
|
||||||
|
void ScalarCalculate::set_time_index(ArgT0&& arg0, ArgT... args) {
|
||||||
|
|
||||||
|
_impl_.time_index_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
|
||||||
|
// @@protoc_insertion_point(field_set:substrait_extension.ScalarCalculate.time_index)
|
||||||
|
}
|
||||||
|
inline std::string* ScalarCalculate::mutable_time_index() {
|
||||||
|
std::string* _s = _internal_mutable_time_index();
|
||||||
|
// @@protoc_insertion_point(field_mutable:substrait_extension.ScalarCalculate.time_index)
|
||||||
|
return _s;
|
||||||
|
}
|
||||||
|
inline const std::string& ScalarCalculate::_internal_time_index() const {
|
||||||
|
return _impl_.time_index_.Get();
|
||||||
|
}
|
||||||
|
inline void ScalarCalculate::_internal_set_time_index(const std::string& value) {
|
||||||
|
|
||||||
|
_impl_.time_index_.Set(value, GetArenaForAllocation());
|
||||||
|
}
|
||||||
|
inline std::string* ScalarCalculate::_internal_mutable_time_index() {
|
||||||
|
|
||||||
|
return _impl_.time_index_.Mutable(GetArenaForAllocation());
|
||||||
|
}
|
||||||
|
inline std::string* ScalarCalculate::release_time_index() {
|
||||||
|
// @@protoc_insertion_point(field_release:substrait_extension.ScalarCalculate.time_index)
|
||||||
|
return _impl_.time_index_.Release();
|
||||||
|
}
|
||||||
|
inline void ScalarCalculate::set_allocated_time_index(std::string* time_index) {
|
||||||
|
if (time_index != nullptr) {
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
}
|
||||||
|
_impl_.time_index_.SetAllocated(time_index, GetArenaForAllocation());
|
||||||
|
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||||||
|
if (_impl_.time_index_.IsDefault()) {
|
||||||
|
_impl_.time_index_.Set("", GetArenaForAllocation());
|
||||||
|
}
|
||||||
|
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||||||
|
// @@protoc_insertion_point(field_set_allocated:substrait_extension.ScalarCalculate.time_index)
|
||||||
|
}
|
||||||
|
|
||||||
|
// repeated string tag_columns = 6;
|
||||||
|
inline int ScalarCalculate::_internal_tag_columns_size() const {
|
||||||
|
return _impl_.tag_columns_.size();
|
||||||
|
}
|
||||||
|
inline int ScalarCalculate::tag_columns_size() const {
|
||||||
|
return _internal_tag_columns_size();
|
||||||
|
}
|
||||||
|
inline void ScalarCalculate::clear_tag_columns() {
|
||||||
|
_impl_.tag_columns_.Clear();
|
||||||
|
}
|
||||||
|
inline std::string* ScalarCalculate::add_tag_columns() {
|
||||||
|
std::string* _s = _internal_add_tag_columns();
|
||||||
|
// @@protoc_insertion_point(field_add_mutable:substrait_extension.ScalarCalculate.tag_columns)
|
||||||
|
return _s;
|
||||||
|
}
|
||||||
|
inline const std::string& ScalarCalculate::_internal_tag_columns(int index) const {
|
||||||
|
return _impl_.tag_columns_.Get(index);
|
||||||
|
}
|
||||||
|
inline const std::string& ScalarCalculate::tag_columns(int index) const {
|
||||||
|
// @@protoc_insertion_point(field_get:substrait_extension.ScalarCalculate.tag_columns)
|
||||||
|
return _internal_tag_columns(index);
|
||||||
|
}
|
||||||
|
inline std::string* ScalarCalculate::mutable_tag_columns(int index) {
|
||||||
|
// @@protoc_insertion_point(field_mutable:substrait_extension.ScalarCalculate.tag_columns)
|
||||||
|
return _impl_.tag_columns_.Mutable(index);
|
||||||
|
}
|
||||||
|
inline void ScalarCalculate::set_tag_columns(int index, const std::string& value) {
|
||||||
|
_impl_.tag_columns_.Mutable(index)->assign(value);
|
||||||
|
// @@protoc_insertion_point(field_set:substrait_extension.ScalarCalculate.tag_columns)
|
||||||
|
}
|
||||||
|
inline void ScalarCalculate::set_tag_columns(int index, std::string&& value) {
|
||||||
|
_impl_.tag_columns_.Mutable(index)->assign(std::move(value));
|
||||||
|
// @@protoc_insertion_point(field_set:substrait_extension.ScalarCalculate.tag_columns)
|
||||||
|
}
|
||||||
|
inline void ScalarCalculate::set_tag_columns(int index, const char* value) {
|
||||||
|
GOOGLE_DCHECK(value != nullptr);
|
||||||
|
_impl_.tag_columns_.Mutable(index)->assign(value);
|
||||||
|
// @@protoc_insertion_point(field_set_char:substrait_extension.ScalarCalculate.tag_columns)
|
||||||
|
}
|
||||||
|
inline void ScalarCalculate::set_tag_columns(int index, const char* value, size_t size) {
|
||||||
|
_impl_.tag_columns_.Mutable(index)->assign(
|
||||||
|
reinterpret_cast<const char*>(value), size);
|
||||||
|
// @@protoc_insertion_point(field_set_pointer:substrait_extension.ScalarCalculate.tag_columns)
|
||||||
|
}
|
||||||
|
inline std::string* ScalarCalculate::_internal_add_tag_columns() {
|
||||||
|
return _impl_.tag_columns_.Add();
|
||||||
|
}
|
||||||
|
inline void ScalarCalculate::add_tag_columns(const std::string& value) {
|
||||||
|
_impl_.tag_columns_.Add()->assign(value);
|
||||||
|
// @@protoc_insertion_point(field_add:substrait_extension.ScalarCalculate.tag_columns)
|
||||||
|
}
|
||||||
|
inline void ScalarCalculate::add_tag_columns(std::string&& value) {
|
||||||
|
_impl_.tag_columns_.Add(std::move(value));
|
||||||
|
// @@protoc_insertion_point(field_add:substrait_extension.ScalarCalculate.tag_columns)
|
||||||
|
}
|
||||||
|
inline void ScalarCalculate::add_tag_columns(const char* value) {
|
||||||
|
GOOGLE_DCHECK(value != nullptr);
|
||||||
|
_impl_.tag_columns_.Add()->assign(value);
|
||||||
|
// @@protoc_insertion_point(field_add_char:substrait_extension.ScalarCalculate.tag_columns)
|
||||||
|
}
|
||||||
|
inline void ScalarCalculate::add_tag_columns(const char* value, size_t size) {
|
||||||
|
_impl_.tag_columns_.Add()->assign(reinterpret_cast<const char*>(value), size);
|
||||||
|
// @@protoc_insertion_point(field_add_pointer:substrait_extension.ScalarCalculate.tag_columns)
|
||||||
|
}
|
||||||
|
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<std::string>&
|
||||||
|
ScalarCalculate::tag_columns() const {
|
||||||
|
// @@protoc_insertion_point(field_list:substrait_extension.ScalarCalculate.tag_columns)
|
||||||
|
return _impl_.tag_columns_;
|
||||||
|
}
|
||||||
|
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<std::string>*
|
||||||
|
ScalarCalculate::mutable_tag_columns() {
|
||||||
|
// @@protoc_insertion_point(field_mutable_list:substrait_extension.ScalarCalculate.tag_columns)
|
||||||
|
return &_impl_.tag_columns_;
|
||||||
|
}
|
||||||
|
|
||||||
|
// string field_column = 7;
|
||||||
|
inline void ScalarCalculate::clear_field_column() {
|
||||||
|
_impl_.field_column_.ClearToEmpty();
|
||||||
|
}
|
||||||
|
inline const std::string& ScalarCalculate::field_column() const {
|
||||||
|
// @@protoc_insertion_point(field_get:substrait_extension.ScalarCalculate.field_column)
|
||||||
|
return _internal_field_column();
|
||||||
|
}
|
||||||
|
template <typename ArgT0, typename... ArgT>
|
||||||
|
inline PROTOBUF_ALWAYS_INLINE
|
||||||
|
void ScalarCalculate::set_field_column(ArgT0&& arg0, ArgT... args) {
|
||||||
|
|
||||||
|
_impl_.field_column_.Set(static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
|
||||||
|
// @@protoc_insertion_point(field_set:substrait_extension.ScalarCalculate.field_column)
|
||||||
|
}
|
||||||
|
inline std::string* ScalarCalculate::mutable_field_column() {
|
||||||
|
std::string* _s = _internal_mutable_field_column();
|
||||||
|
// @@protoc_insertion_point(field_mutable:substrait_extension.ScalarCalculate.field_column)
|
||||||
|
return _s;
|
||||||
|
}
|
||||||
|
inline const std::string& ScalarCalculate::_internal_field_column() const {
|
||||||
|
return _impl_.field_column_.Get();
|
||||||
|
}
|
||||||
|
inline void ScalarCalculate::_internal_set_field_column(const std::string& value) {
|
||||||
|
|
||||||
|
_impl_.field_column_.Set(value, GetArenaForAllocation());
|
||||||
|
}
|
||||||
|
inline std::string* ScalarCalculate::_internal_mutable_field_column() {
|
||||||
|
|
||||||
|
return _impl_.field_column_.Mutable(GetArenaForAllocation());
|
||||||
|
}
|
||||||
|
inline std::string* ScalarCalculate::release_field_column() {
|
||||||
|
// @@protoc_insertion_point(field_release:substrait_extension.ScalarCalculate.field_column)
|
||||||
|
return _impl_.field_column_.Release();
|
||||||
|
}
|
||||||
|
inline void ScalarCalculate::set_allocated_field_column(std::string* field_column) {
|
||||||
|
if (field_column != nullptr) {
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
}
|
||||||
|
_impl_.field_column_.SetAllocated(field_column, GetArenaForAllocation());
|
||||||
|
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||||||
|
if (_impl_.field_column_.IsDefault()) {
|
||||||
|
_impl_.field_column_.Set("", GetArenaForAllocation());
|
||||||
|
}
|
||||||
|
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
||||||
|
// @@protoc_insertion_point(field_set_allocated:substrait_extension.ScalarCalculate.field_column)
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
#pragma GCC diagnostic pop
|
#pragma GCC diagnostic pop
|
||||||
#endif // __GNUC__
|
#endif // __GNUC__
|
||||||
@@ -1662,6 +2133,8 @@ RangeManipulate::mutable_tag_columns() {
|
|||||||
|
|
||||||
// -------------------------------------------------------------------
|
// -------------------------------------------------------------------
|
||||||
|
|
||||||
|
// -------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
// @@protoc_insertion_point(namespace_scope)
|
// @@protoc_insertion_point(namespace_scope)
|
||||||
|
|
||||||
|
|||||||
@@ -400,6 +400,99 @@ func (x *RangeManipulate) GetTagColumns() []string {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type ScalarCalculate struct {
|
||||||
|
state protoimpl.MessageState
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
|
// Start timestamp in millisecond
|
||||||
|
Start int64 `protobuf:"varint,1,opt,name=start,proto3" json:"start,omitempty"`
|
||||||
|
// End timestamp in millisecond
|
||||||
|
End int64 `protobuf:"varint,2,opt,name=end,proto3" json:"end,omitempty"`
|
||||||
|
// Interval in millisecond
|
||||||
|
Interval int64 `protobuf:"varint,3,opt,name=interval,proto3" json:"interval,omitempty"`
|
||||||
|
// Column name of time index column
|
||||||
|
TimeIndex string `protobuf:"bytes,5,opt,name=time_index,json=timeIndex,proto3" json:"time_index,omitempty"`
|
||||||
|
// Names of tag columns
|
||||||
|
TagColumns []string `protobuf:"bytes,6,rep,name=tag_columns,json=tagColumns,proto3" json:"tag_columns,omitempty"`
|
||||||
|
// Column name of field column
|
||||||
|
FieldColumn string `protobuf:"bytes,7,opt,name=field_column,json=fieldColumn,proto3" json:"field_column,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ScalarCalculate) Reset() {
|
||||||
|
*x = ScalarCalculate{}
|
||||||
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_substrait_extension_promql_plan_proto_msgTypes[5]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ScalarCalculate) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*ScalarCalculate) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *ScalarCalculate) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_substrait_extension_promql_plan_proto_msgTypes[5]
|
||||||
|
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 ScalarCalculate.ProtoReflect.Descriptor instead.
|
||||||
|
func (*ScalarCalculate) Descriptor() ([]byte, []int) {
|
||||||
|
return file_substrait_extension_promql_plan_proto_rawDescGZIP(), []int{5}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ScalarCalculate) GetStart() int64 {
|
||||||
|
if x != nil {
|
||||||
|
return x.Start
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ScalarCalculate) GetEnd() int64 {
|
||||||
|
if x != nil {
|
||||||
|
return x.End
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ScalarCalculate) GetInterval() int64 {
|
||||||
|
if x != nil {
|
||||||
|
return x.Interval
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ScalarCalculate) GetTimeIndex() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.TimeIndex
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ScalarCalculate) GetTagColumns() []string {
|
||||||
|
if x != nil {
|
||||||
|
return x.TagColumns
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ScalarCalculate) GetFieldColumn() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.FieldColumn
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
var File_substrait_extension_promql_plan_proto protoreflect.FileDescriptor
|
var File_substrait_extension_promql_plan_proto protoreflect.FileDescriptor
|
||||||
|
|
||||||
var file_substrait_extension_promql_plan_proto_rawDesc = []byte{
|
var file_substrait_extension_promql_plan_proto_rawDesc = []byte{
|
||||||
@@ -444,12 +537,23 @@ var file_substrait_extension_promql_plan_proto_rawDesc = []byte{
|
|||||||
0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x69,
|
0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x69,
|
||||||
0x6d, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x61, 0x67, 0x5f, 0x63,
|
0x6d, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x61, 0x67, 0x5f, 0x63,
|
||||||
0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x74, 0x61,
|
0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x74, 0x61,
|
||||||
0x67, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x42, 0x3f, 0x5a, 0x3d, 0x67, 0x69, 0x74, 0x68,
|
0x67, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x22, 0xb8, 0x01, 0x0a, 0x0f, 0x53, 0x63, 0x61,
|
||||||
0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x54,
|
0x6c, 0x61, 0x72, 0x43, 0x61, 0x6c, 0x63, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x14, 0x0a, 0x05,
|
||||||
0x65, 0x61, 0x6d, 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2d, 0x70, 0x72, 0x6f,
|
0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, 0x74, 0x61,
|
||||||
0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x61, 0x69, 0x74, 0x5f,
|
0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52,
|
||||||
0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
0x03, 0x65, 0x6e, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c,
|
||||||
0x33,
|
0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c,
|
||||||
|
0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x05,
|
||||||
|
0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12,
|
||||||
|
0x1f, 0x0a, 0x0b, 0x74, 0x61, 0x67, 0x5f, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x18, 0x06,
|
||||||
|
0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x74, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73,
|
||||||
|
0x12, 0x21, 0x0a, 0x0c, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e,
|
||||||
|
0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x43, 0x6f, 0x6c,
|
||||||
|
0x75, 0x6d, 0x6e, 0x42, 0x3f, 0x5a, 0x3d, 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, 0x73, 0x75, 0x62, 0x73, 0x74, 0x72, 0x61, 0x69, 0x74, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e,
|
||||||
|
0x73, 0x69, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@@ -464,13 +568,14 @@ func file_substrait_extension_promql_plan_proto_rawDescGZIP() []byte {
|
|||||||
return file_substrait_extension_promql_plan_proto_rawDescData
|
return file_substrait_extension_promql_plan_proto_rawDescData
|
||||||
}
|
}
|
||||||
|
|
||||||
var file_substrait_extension_promql_plan_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
|
var file_substrait_extension_promql_plan_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
|
||||||
var file_substrait_extension_promql_plan_proto_goTypes = []interface{}{
|
var file_substrait_extension_promql_plan_proto_goTypes = []interface{}{
|
||||||
(*EmptyMetric)(nil), // 0: substrait_extension.EmptyMetric
|
(*EmptyMetric)(nil), // 0: substrait_extension.EmptyMetric
|
||||||
(*InstantManipulate)(nil), // 1: substrait_extension.InstantManipulate
|
(*InstantManipulate)(nil), // 1: substrait_extension.InstantManipulate
|
||||||
(*SeriesNormalize)(nil), // 2: substrait_extension.SeriesNormalize
|
(*SeriesNormalize)(nil), // 2: substrait_extension.SeriesNormalize
|
||||||
(*SeriesDivide)(nil), // 3: substrait_extension.SeriesDivide
|
(*SeriesDivide)(nil), // 3: substrait_extension.SeriesDivide
|
||||||
(*RangeManipulate)(nil), // 4: substrait_extension.RangeManipulate
|
(*RangeManipulate)(nil), // 4: substrait_extension.RangeManipulate
|
||||||
|
(*ScalarCalculate)(nil), // 5: substrait_extension.ScalarCalculate
|
||||||
}
|
}
|
||||||
var file_substrait_extension_promql_plan_proto_depIdxs = []int32{
|
var file_substrait_extension_promql_plan_proto_depIdxs = []int32{
|
||||||
0, // [0:0] is the sub-list for method output_type
|
0, // [0:0] is the sub-list for method output_type
|
||||||
@@ -546,6 +651,18 @@ func file_substrait_extension_promql_plan_proto_init() {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
file_substrait_extension_promql_plan_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*ScalarCalculate); i {
|
||||||
|
case 0:
|
||||||
|
return &v.state
|
||||||
|
case 1:
|
||||||
|
return &v.sizeCache
|
||||||
|
case 2:
|
||||||
|
return &v.unknownFields
|
||||||
|
default:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
type x struct{}
|
type x struct{}
|
||||||
out := protoimpl.TypeBuilder{
|
out := protoimpl.TypeBuilder{
|
||||||
@@ -553,7 +670,7 @@ func file_substrait_extension_promql_plan_proto_init() {
|
|||||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||||
RawDescriptor: file_substrait_extension_promql_plan_proto_rawDesc,
|
RawDescriptor: file_substrait_extension_promql_plan_proto_rawDesc,
|
||||||
NumEnums: 0,
|
NumEnums: 0,
|
||||||
NumMessages: 5,
|
NumMessages: 6,
|
||||||
NumExtensions: 0,
|
NumExtensions: 0,
|
||||||
NumServices: 0,
|
NumServices: 0,
|
||||||
},
|
},
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -70,3 +70,18 @@ message RangeManipulate {
|
|||||||
// Names of tag columns
|
// Names of tag columns
|
||||||
repeated string tag_columns = 6;
|
repeated string tag_columns = 6;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
message ScalarCalculate {
|
||||||
|
// Start timestamp in millisecond
|
||||||
|
int64 start = 1;
|
||||||
|
// End timestamp in millisecond
|
||||||
|
int64 end = 2;
|
||||||
|
// Interval in millisecond
|
||||||
|
int64 interval = 3;
|
||||||
|
// Column name of time index column
|
||||||
|
string time_index = 5;
|
||||||
|
// Names of tag columns
|
||||||
|
repeated string tag_columns = 6;
|
||||||
|
// Column name of field column
|
||||||
|
string field_column = 7;
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user