// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: substrait_extension/promql_plan.proto

#include "substrait_extension/promql_plan.pb.h"

#include <algorithm>

#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/extension_set.h>
#include <google/protobuf/wire_format_lite.h>
#include <google/protobuf/descriptor.h>
#include <google/protobuf/generated_message_reflection.h>
#include <google/protobuf/reflection_ops.h>
#include <google/protobuf/wire_format.h>
// @@protoc_insertion_point(includes)
#include <google/protobuf/port_def.inc>

PROTOBUF_PRAGMA_INIT_SEG

namespace _pb = ::PROTOBUF_NAMESPACE_ID;
namespace _pbi = _pb::internal;

namespace substrait_extension {
PROTOBUF_CONSTEXPR EmptyMetric::EmptyMetric(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.start_)*/int64_t{0}
  , /*decltype(_impl_.end_)*/int64_t{0}
  , /*decltype(_impl_.interval_)*/int64_t{0}
  , /*decltype(_impl_._cached_size_)*/{}} {}
struct EmptyMetricDefaultTypeInternal {
  PROTOBUF_CONSTEXPR EmptyMetricDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~EmptyMetricDefaultTypeInternal() {}
  union {
    EmptyMetric _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 EmptyMetricDefaultTypeInternal _EmptyMetric_default_instance_;
PROTOBUF_CONSTEXPR InstantManipulate::InstantManipulate(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.time_index_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
  , /*decltype(_impl_.field_index_)*/{&::_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_.lookback_delta_)*/int64_t{0}
  , /*decltype(_impl_._cached_size_)*/{}} {}
struct InstantManipulateDefaultTypeInternal {
  PROTOBUF_CONSTEXPR InstantManipulateDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~InstantManipulateDefaultTypeInternal() {}
  union {
    InstantManipulate _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 InstantManipulateDefaultTypeInternal _InstantManipulate_default_instance_;
PROTOBUF_CONSTEXPR SeriesNormalize::SeriesNormalize(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.tag_columns_)*/{}
  , /*decltype(_impl_.time_index_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
  , /*decltype(_impl_.offset_)*/int64_t{0}
  , /*decltype(_impl_.filter_nan_)*/false
  , /*decltype(_impl_._cached_size_)*/{}} {}
struct SeriesNormalizeDefaultTypeInternal {
  PROTOBUF_CONSTEXPR SeriesNormalizeDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~SeriesNormalizeDefaultTypeInternal() {}
  union {
    SeriesNormalize _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SeriesNormalizeDefaultTypeInternal _SeriesNormalize_default_instance_;
PROTOBUF_CONSTEXPR SeriesDivide::SeriesDivide(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.tag_columns_)*/{}
  , /*decltype(_impl_.time_index_column_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
  , /*decltype(_impl_._cached_size_)*/{}} {}
struct SeriesDivideDefaultTypeInternal {
  PROTOBUF_CONSTEXPR SeriesDivideDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~SeriesDivideDefaultTypeInternal() {}
  union {
    SeriesDivide _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SeriesDivideDefaultTypeInternal _SeriesDivide_default_instance_;
PROTOBUF_CONSTEXPR RangeManipulate::RangeManipulate(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.tag_columns_)*/{}
  , /*decltype(_impl_.time_index_)*/{&::_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_.range_)*/int64_t{0}
  , /*decltype(_impl_._cached_size_)*/{}} {}
struct RangeManipulateDefaultTypeInternal {
  PROTOBUF_CONSTEXPR RangeManipulateDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~RangeManipulateDefaultTypeInternal() {}
  union {
    RangeManipulate _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
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::ServiceDescriptor const** file_level_service_descriptors_substrait_5fextension_2fpromql_5fplan_2eproto = nullptr;

const uint32_t TableStruct_substrait_5fextension_2fpromql_5fplan_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::substrait_extension::EmptyMetric, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::substrait_extension::EmptyMetric, _impl_.start_),
  PROTOBUF_FIELD_OFFSET(::substrait_extension::EmptyMetric, _impl_.end_),
  PROTOBUF_FIELD_OFFSET(::substrait_extension::EmptyMetric, _impl_.interval_),
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::substrait_extension::InstantManipulate, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::substrait_extension::InstantManipulate, _impl_.start_),
  PROTOBUF_FIELD_OFFSET(::substrait_extension::InstantManipulate, _impl_.end_),
  PROTOBUF_FIELD_OFFSET(::substrait_extension::InstantManipulate, _impl_.interval_),
  PROTOBUF_FIELD_OFFSET(::substrait_extension::InstantManipulate, _impl_.lookback_delta_),
  PROTOBUF_FIELD_OFFSET(::substrait_extension::InstantManipulate, _impl_.time_index_),
  PROTOBUF_FIELD_OFFSET(::substrait_extension::InstantManipulate, _impl_.field_index_),
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::substrait_extension::SeriesNormalize, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::substrait_extension::SeriesNormalize, _impl_.offset_),
  PROTOBUF_FIELD_OFFSET(::substrait_extension::SeriesNormalize, _impl_.time_index_),
  PROTOBUF_FIELD_OFFSET(::substrait_extension::SeriesNormalize, _impl_.filter_nan_),
  PROTOBUF_FIELD_OFFSET(::substrait_extension::SeriesNormalize, _impl_.tag_columns_),
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::substrait_extension::SeriesDivide, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::substrait_extension::SeriesDivide, _impl_.tag_columns_),
  PROTOBUF_FIELD_OFFSET(::substrait_extension::SeriesDivide, _impl_.time_index_column_),
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::substrait_extension::RangeManipulate, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::substrait_extension::RangeManipulate, _impl_.start_),
  PROTOBUF_FIELD_OFFSET(::substrait_extension::RangeManipulate, _impl_.end_),
  PROTOBUF_FIELD_OFFSET(::substrait_extension::RangeManipulate, _impl_.interval_),
  PROTOBUF_FIELD_OFFSET(::substrait_extension::RangeManipulate, _impl_.range_),
  PROTOBUF_FIELD_OFFSET(::substrait_extension::RangeManipulate, _impl_.time_index_),
  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) = {
  { 0, -1, -1, sizeof(::substrait_extension::EmptyMetric)},
  { 9, -1, -1, sizeof(::substrait_extension::InstantManipulate)},
  { 21, -1, -1, sizeof(::substrait_extension::SeriesNormalize)},
  { 31, -1, -1, sizeof(::substrait_extension::SeriesDivide)},
  { 39, -1, -1, sizeof(::substrait_extension::RangeManipulate)},
  { 51, -1, -1, sizeof(::substrait_extension::ScalarCalculate)},
};

static const ::_pb::Message* const file_default_instances[] = {
  &::substrait_extension::_EmptyMetric_default_instance_._instance,
  &::substrait_extension::_InstantManipulate_default_instance_._instance,
  &::substrait_extension::_SeriesNormalize_default_instance_._instance,
  &::substrait_extension::_SeriesDivide_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) =
  "\n%substrait_extension/promql_plan.proto\022"
  "\023substrait_extension\";\n\013EmptyMetric\022\r\n\005s"
  "tart\030\001 \001(\003\022\013\n\003end\030\002 \001(\003\022\020\n\010interval\030\003 \001("
  "\003\"\202\001\n\021InstantManipulate\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\026\n\016lookbac"
  "k_delta\030\004 \001(\003\022\022\n\ntime_index\030\005 \001(\t\022\023\n\013fie"
  "ld_index\030\006 \001(\t\"^\n\017SeriesNormalize\022\016\n\006off"
  "set\030\001 \001(\003\022\022\n\ntime_index\030\002 \001(\t\022\022\n\nfilter_"
  "nan\030\003 \001(\010\022\023\n\013tag_columns\030\004 \003(\t\">\n\014Series"
  "Divide\022\023\n\013tag_columns\030\001 \003(\t\022\031\n\021time_inde"
  "x_column\030\002 \001(\t\"w\n\017RangeManipulate\022\r\n\005sta"
  "rt\030\001 \001(\003\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\013ta"
  "g_columns\030\006 \003(\t\"~\n\017ScalarCalculate\022\r\n\005st"
  "art\030\001 \001(\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\014field_column\030\007 \001(\tB\?Z=github.com/Gr"
  "eptimeTeam/greptime-proto/go/substrait_e"
  "xtensionb\006proto3"
  ;
static ::_pbi::once_flag descriptor_table_substrait_5fextension_2fpromql_5fplan_2eproto_once;
const ::_pbi::DescriptorTable descriptor_table_substrait_5fextension_2fpromql_5fplan_2eproto = {
    false, false, 736, descriptor_table_protodef_substrait_5fextension_2fpromql_5fplan_2eproto,
    "substrait_extension/promql_plan.proto",
    &descriptor_table_substrait_5fextension_2fpromql_5fplan_2eproto_once, nullptr, 0, 6,
    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_service_descriptors_substrait_5fextension_2fpromql_5fplan_2eproto,
};
PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_substrait_5fextension_2fpromql_5fplan_2eproto_getter() {
  return &descriptor_table_substrait_5fextension_2fpromql_5fplan_2eproto;
}

// Force running AddDescriptors() at dynamic initialization time.
PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_substrait_5fextension_2fpromql_5fplan_2eproto(&descriptor_table_substrait_5fextension_2fpromql_5fplan_2eproto);
namespace substrait_extension {

// ===================================================================

class EmptyMetric::_Internal {
 public:
};

EmptyMetric::EmptyMetric(::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.EmptyMetric)
}
EmptyMetric::EmptyMetric(const EmptyMetric& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  EmptyMetric* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.start_){}
    , decltype(_impl_.end_){}
    , decltype(_impl_.interval_){}
    , /*decltype(_impl_._cached_size_)*/{}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::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.EmptyMetric)
}

inline void EmptyMetric::SharedCtor(
    ::_pb::Arena* arena, bool is_message_owned) {
  (void)arena;
  (void)is_message_owned;
  new (&_impl_) Impl_{
      decltype(_impl_.start_){int64_t{0}}
    , decltype(_impl_.end_){int64_t{0}}
    , decltype(_impl_.interval_){int64_t{0}}
    , /*decltype(_impl_._cached_size_)*/{}
  };
}

EmptyMetric::~EmptyMetric() {
  // @@protoc_insertion_point(destructor:substrait_extension.EmptyMetric)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void EmptyMetric::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
}

void EmptyMetric::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void EmptyMetric::Clear() {
// @@protoc_insertion_point(message_clear_start:substrait_extension.EmptyMetric)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  ::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* EmptyMetric::_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;
      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* EmptyMetric::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:substrait_extension.EmptyMetric)
  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);
  }

  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.EmptyMetric)
  return target;
}

size_t EmptyMetric::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:substrait_extension.EmptyMetric)
  size_t total_size = 0;

  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // 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 EmptyMetric::_class_data_ = {
    ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
    EmptyMetric::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*EmptyMetric::GetClassData() const { return &_class_data_; }


void EmptyMetric::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
  auto* const _this = static_cast<EmptyMetric*>(&to_msg);
  auto& from = static_cast<const EmptyMetric&>(from_msg);
  // @@protoc_insertion_point(class_specific_merge_from_start:substrait_extension.EmptyMetric)
  GOOGLE_DCHECK_NE(&from, _this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  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 EmptyMetric::CopyFrom(const EmptyMetric& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:substrait_extension.EmptyMetric)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool EmptyMetric::IsInitialized() const {
  return true;
}

void EmptyMetric::InternalSwap(EmptyMetric* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(EmptyMetric, _impl_.interval_)
      + sizeof(EmptyMetric::_impl_.interval_)
      - PROTOBUF_FIELD_OFFSET(EmptyMetric, _impl_.start_)>(
          reinterpret_cast<char*>(&_impl_.start_),
          reinterpret_cast<char*>(&other->_impl_.start_));
}

::PROTOBUF_NAMESPACE_ID::Metadata EmptyMetric::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[0]);
}

// ===================================================================

class InstantManipulate::_Internal {
 public:
};

InstantManipulate::InstantManipulate(::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.InstantManipulate)
}
InstantManipulate::InstantManipulate(const InstantManipulate& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  InstantManipulate* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.time_index_){}
    , decltype(_impl_.field_index_){}
    , decltype(_impl_.start_){}
    , decltype(_impl_.end_){}
    , decltype(_impl_.interval_){}
    , decltype(_impl_.lookback_delta_){}
    , /*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_index_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.field_index_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_field_index().empty()) {
    _this->_impl_.field_index_.Set(from._internal_field_index(), 
      _this->GetArenaForAllocation());
  }
  ::memcpy(&_impl_.start_, &from._impl_.start_,
    static_cast<size_t>(reinterpret_cast<char*>(&_impl_.lookback_delta_) -
    reinterpret_cast<char*>(&_impl_.start_)) + sizeof(_impl_.lookback_delta_));
  // @@protoc_insertion_point(copy_constructor:substrait_extension.InstantManipulate)
}

inline void InstantManipulate::SharedCtor(
    ::_pb::Arena* arena, bool is_message_owned) {
  (void)arena;
  (void)is_message_owned;
  new (&_impl_) Impl_{
      decltype(_impl_.time_index_){}
    , decltype(_impl_.field_index_){}
    , decltype(_impl_.start_){int64_t{0}}
    , decltype(_impl_.end_){int64_t{0}}
    , decltype(_impl_.interval_){int64_t{0}}
    , decltype(_impl_.lookback_delta_){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_index_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.field_index_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}

InstantManipulate::~InstantManipulate() {
  // @@protoc_insertion_point(destructor:substrait_extension.InstantManipulate)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void InstantManipulate::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.time_index_.Destroy();
  _impl_.field_index_.Destroy();
}

void InstantManipulate::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void InstantManipulate::Clear() {
// @@protoc_insertion_point(message_clear_start:substrait_extension.InstantManipulate)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  _impl_.time_index_.ClearToEmpty();
  _impl_.field_index_.ClearToEmpty();
  ::memset(&_impl_.start_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&_impl_.lookback_delta_) -
      reinterpret_cast<char*>(&_impl_.start_)) + sizeof(_impl_.lookback_delta_));
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* InstantManipulate::_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;
      // int64 lookback_delta = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
          _impl_.lookback_delta_ = ::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.InstantManipulate.time_index"));
        } else
          goto handle_unusual;
        continue;
      // string field_index = 6;
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 50)) {
          auto str = _internal_mutable_field_index();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, "substrait_extension.InstantManipulate.field_index"));
        } 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* InstantManipulate::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:substrait_extension.InstantManipulate)
  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);
  }

  // int64 lookback_delta = 4;
  if (this->_internal_lookback_delta() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt64ToArray(4, this->_internal_lookback_delta(), 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.InstantManipulate.time_index");
    target = stream->WriteStringMaybeAliased(
        5, this->_internal_time_index(), target);
  }

  // string field_index = 6;
  if (!this->_internal_field_index().empty()) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
      this->_internal_field_index().data(), static_cast<int>(this->_internal_field_index().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
      "substrait_extension.InstantManipulate.field_index");
    target = stream->WriteStringMaybeAliased(
        6, this->_internal_field_index(), 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.InstantManipulate)
  return target;
}

size_t InstantManipulate::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:substrait_extension.InstantManipulate)
  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 time_index = 5;
  if (!this->_internal_time_index().empty()) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        this->_internal_time_index());
  }

  // string field_index = 6;
  if (!this->_internal_field_index().empty()) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        this->_internal_field_index());
  }

  // 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());
  }

  // int64 lookback_delta = 4;
  if (this->_internal_lookback_delta() != 0) {
    total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_lookback_delta());
  }

  return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}

const ::PROTOBUF_NAMESPACE_ID::Message::ClassData InstantManipulate::_class_data_ = {
    ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
    InstantManipulate::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*InstantManipulate::GetClassData() const { return &_class_data_; }


void InstantManipulate::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
  auto* const _this = static_cast<InstantManipulate*>(&to_msg);
  auto& from = static_cast<const InstantManipulate&>(from_msg);
  // @@protoc_insertion_point(class_specific_merge_from_start:substrait_extension.InstantManipulate)
  GOOGLE_DCHECK_NE(&from, _this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  if (!from._internal_time_index().empty()) {
    _this->_internal_set_time_index(from._internal_time_index());
  }
  if (!from._internal_field_index().empty()) {
    _this->_internal_set_field_index(from._internal_field_index());
  }
  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());
  }
  if (from._internal_lookback_delta() != 0) {
    _this->_internal_set_lookback_delta(from._internal_lookback_delta());
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void InstantManipulate::CopyFrom(const InstantManipulate& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:substrait_extension.InstantManipulate)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool InstantManipulate::IsInitialized() const {
  return true;
}

void InstantManipulate::InternalSwap(InstantManipulate* 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_.time_index_, lhs_arena,
      &other->_impl_.time_index_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &_impl_.field_index_, lhs_arena,
      &other->_impl_.field_index_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(InstantManipulate, _impl_.lookback_delta_)
      + sizeof(InstantManipulate::_impl_.lookback_delta_)
      - PROTOBUF_FIELD_OFFSET(InstantManipulate, _impl_.start_)>(
          reinterpret_cast<char*>(&_impl_.start_),
          reinterpret_cast<char*>(&other->_impl_.start_));
}

::PROTOBUF_NAMESPACE_ID::Metadata InstantManipulate::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[1]);
}

// ===================================================================

class SeriesNormalize::_Internal {
 public:
};

SeriesNormalize::SeriesNormalize(::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.SeriesNormalize)
}
SeriesNormalize::SeriesNormalize(const SeriesNormalize& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  SeriesNormalize* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.tag_columns_){from._impl_.tag_columns_}
    , decltype(_impl_.time_index_){}
    , decltype(_impl_.offset_){}
    , decltype(_impl_.filter_nan_){}
    , /*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());
  }
  ::memcpy(&_impl_.offset_, &from._impl_.offset_,
    static_cast<size_t>(reinterpret_cast<char*>(&_impl_.filter_nan_) -
    reinterpret_cast<char*>(&_impl_.offset_)) + sizeof(_impl_.filter_nan_));
  // @@protoc_insertion_point(copy_constructor:substrait_extension.SeriesNormalize)
}

inline void SeriesNormalize::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_.offset_){int64_t{0}}
    , decltype(_impl_.filter_nan_){false}
    , /*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
}

SeriesNormalize::~SeriesNormalize() {
  // @@protoc_insertion_point(destructor:substrait_extension.SeriesNormalize)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void SeriesNormalize::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.tag_columns_.~RepeatedPtrField();
  _impl_.time_index_.Destroy();
}

void SeriesNormalize::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void SeriesNormalize::Clear() {
// @@protoc_insertion_point(message_clear_start:substrait_extension.SeriesNormalize)
  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();
  ::memset(&_impl_.offset_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&_impl_.filter_nan_) -
      reinterpret_cast<char*>(&_impl_.offset_)) + sizeof(_impl_.filter_nan_));
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* SeriesNormalize::_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 offset = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
          _impl_.offset_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // string time_index = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
          auto str = _internal_mutable_time_index();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, "substrait_extension.SeriesNormalize.time_index"));
        } else
          goto handle_unusual;
        continue;
      // bool filter_nan = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
          _impl_.filter_nan_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // repeated string tag_columns = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
          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.SeriesNormalize.tag_columns"));
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<34>(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* SeriesNormalize::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:substrait_extension.SeriesNormalize)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // int64 offset = 1;
  if (this->_internal_offset() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt64ToArray(1, this->_internal_offset(), target);
  }

  // string time_index = 2;
  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.SeriesNormalize.time_index");
    target = stream->WriteStringMaybeAliased(
        2, this->_internal_time_index(), target);
  }

  // bool filter_nan = 3;
  if (this->_internal_filter_nan() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(3, this->_internal_filter_nan(), target);
  }

  // repeated string tag_columns = 4;
  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.SeriesNormalize.tag_columns");
    target = stream->WriteString(4, s, 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.SeriesNormalize)
  return target;
}

size_t SeriesNormalize::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:substrait_extension.SeriesNormalize)
  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 = 4;
  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 = 2;
  if (!this->_internal_time_index().empty()) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        this->_internal_time_index());
  }

  // int64 offset = 1;
  if (this->_internal_offset() != 0) {
    total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_offset());
  }

  // bool filter_nan = 3;
  if (this->_internal_filter_nan() != 0) {
    total_size += 1 + 1;
  }

  return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}

const ::PROTOBUF_NAMESPACE_ID::Message::ClassData SeriesNormalize::_class_data_ = {
    ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
    SeriesNormalize::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*SeriesNormalize::GetClassData() const { return &_class_data_; }


void SeriesNormalize::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
  auto* const _this = static_cast<SeriesNormalize*>(&to_msg);
  auto& from = static_cast<const SeriesNormalize&>(from_msg);
  // @@protoc_insertion_point(class_specific_merge_from_start:substrait_extension.SeriesNormalize)
  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_offset() != 0) {
    _this->_internal_set_offset(from._internal_offset());
  }
  if (from._internal_filter_nan() != 0) {
    _this->_internal_set_filter_nan(from._internal_filter_nan());
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void SeriesNormalize::CopyFrom(const SeriesNormalize& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:substrait_extension.SeriesNormalize)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool SeriesNormalize::IsInitialized() const {
  return true;
}

void SeriesNormalize::InternalSwap(SeriesNormalize* 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::memswap<
      PROTOBUF_FIELD_OFFSET(SeriesNormalize, _impl_.filter_nan_)
      + sizeof(SeriesNormalize::_impl_.filter_nan_)
      - PROTOBUF_FIELD_OFFSET(SeriesNormalize, _impl_.offset_)>(
          reinterpret_cast<char*>(&_impl_.offset_),
          reinterpret_cast<char*>(&other->_impl_.offset_));
}

::PROTOBUF_NAMESPACE_ID::Metadata SeriesNormalize::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[2]);
}

// ===================================================================

class SeriesDivide::_Internal {
 public:
};

SeriesDivide::SeriesDivide(::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.SeriesDivide)
}
SeriesDivide::SeriesDivide(const SeriesDivide& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  SeriesDivide* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.tag_columns_){from._impl_.tag_columns_}
    , decltype(_impl_.time_index_column_){}
    , /*decltype(_impl_._cached_size_)*/{}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  _impl_.time_index_column_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.time_index_column_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (!from._internal_time_index_column().empty()) {
    _this->_impl_.time_index_column_.Set(from._internal_time_index_column(), 
      _this->GetArenaForAllocation());
  }
  // @@protoc_insertion_point(copy_constructor:substrait_extension.SeriesDivide)
}

inline void SeriesDivide::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_column_){}
    , /*decltype(_impl_._cached_size_)*/{}
  };
  _impl_.time_index_column_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.time_index_column_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}

SeriesDivide::~SeriesDivide() {
  // @@protoc_insertion_point(destructor:substrait_extension.SeriesDivide)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void SeriesDivide::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.tag_columns_.~RepeatedPtrField();
  _impl_.time_index_column_.Destroy();
}

void SeriesDivide::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void SeriesDivide::Clear() {
// @@protoc_insertion_point(message_clear_start:substrait_extension.SeriesDivide)
  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_column_.ClearToEmpty();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* SeriesDivide::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // repeated string tag_columns = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          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.SeriesDivide.tag_columns"));
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
        } else
          goto handle_unusual;
        continue;
      // string time_index_column = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
          auto str = _internal_mutable_time_index_column();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          CHK_(::_pbi::VerifyUTF8(str, "substrait_extension.SeriesDivide.time_index_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* SeriesDivide::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:substrait_extension.SeriesDivide)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // repeated string tag_columns = 1;
  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.SeriesDivide.tag_columns");
    target = stream->WriteString(1, s, target);
  }

  // string time_index_column = 2;
  if (!this->_internal_time_index_column().empty()) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
      this->_internal_time_index_column().data(), static_cast<int>(this->_internal_time_index_column().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
      "substrait_extension.SeriesDivide.time_index_column");
    target = stream->WriteStringMaybeAliased(
        2, this->_internal_time_index_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.SeriesDivide)
  return target;
}

size_t SeriesDivide::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:substrait_extension.SeriesDivide)
  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 = 1;
  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_column = 2;
  if (!this->_internal_time_index_column().empty()) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        this->_internal_time_index_column());
  }

  return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}

const ::PROTOBUF_NAMESPACE_ID::Message::ClassData SeriesDivide::_class_data_ = {
    ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
    SeriesDivide::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*SeriesDivide::GetClassData() const { return &_class_data_; }


void SeriesDivide::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
  auto* const _this = static_cast<SeriesDivide*>(&to_msg);
  auto& from = static_cast<const SeriesDivide&>(from_msg);
  // @@protoc_insertion_point(class_specific_merge_from_start:substrait_extension.SeriesDivide)
  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_column().empty()) {
    _this->_internal_set_time_index_column(from._internal_time_index_column());
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void SeriesDivide::CopyFrom(const SeriesDivide& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:substrait_extension.SeriesDivide)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool SeriesDivide::IsInitialized() const {
  return true;
}

void SeriesDivide::InternalSwap(SeriesDivide* 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_column_, lhs_arena,
      &other->_impl_.time_index_column_, rhs_arena
  );
}

::PROTOBUF_NAMESPACE_ID::Metadata SeriesDivide::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[3]);
}

// ===================================================================

class RangeManipulate::_Internal {
 public:
};

RangeManipulate::RangeManipulate(::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.RangeManipulate)
}
RangeManipulate::RangeManipulate(const RangeManipulate& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  RangeManipulate* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.tag_columns_){from._impl_.tag_columns_}
    , decltype(_impl_.time_index_){}
    , decltype(_impl_.start_){}
    , decltype(_impl_.end_){}
    , decltype(_impl_.interval_){}
    , decltype(_impl_.range_){}
    , /*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());
  }
  ::memcpy(&_impl_.start_, &from._impl_.start_,
    static_cast<size_t>(reinterpret_cast<char*>(&_impl_.range_) -
    reinterpret_cast<char*>(&_impl_.start_)) + sizeof(_impl_.range_));
  // @@protoc_insertion_point(copy_constructor:substrait_extension.RangeManipulate)
}

inline void RangeManipulate::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_.start_){int64_t{0}}
    , decltype(_impl_.end_){int64_t{0}}
    , decltype(_impl_.interval_){int64_t{0}}
    , decltype(_impl_.range_){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
}

RangeManipulate::~RangeManipulate() {
  // @@protoc_insertion_point(destructor:substrait_extension.RangeManipulate)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void RangeManipulate::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.tag_columns_.~RepeatedPtrField();
  _impl_.time_index_.Destroy();
}

void RangeManipulate::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void RangeManipulate::Clear() {
// @@protoc_insertion_point(message_clear_start:substrait_extension.RangeManipulate)
  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();
  ::memset(&_impl_.start_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&_impl_.range_) -
      reinterpret_cast<char*>(&_impl_.start_)) + sizeof(_impl_.range_));
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* RangeManipulate::_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;
      // int64 range = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
          _impl_.range_ = ::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.RangeManipulate.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.RangeManipulate.tag_columns"));
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<50>(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* RangeManipulate::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:substrait_extension.RangeManipulate)
  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);
  }

  // int64 range = 4;
  if (this->_internal_range() != 0) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt64ToArray(4, this->_internal_range(), 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.RangeManipulate.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.RangeManipulate.tag_columns");
    target = stream->WriteString(6, s, 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.RangeManipulate)
  return target;
}

size_t RangeManipulate::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:substrait_extension.RangeManipulate)
  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());
  }

  // 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());
  }

  // int64 range = 4;
  if (this->_internal_range() != 0) {
    total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_range());
  }

  return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}

const ::PROTOBUF_NAMESPACE_ID::Message::ClassData RangeManipulate::_class_data_ = {
    ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
    RangeManipulate::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*RangeManipulate::GetClassData() const { return &_class_data_; }


void RangeManipulate::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
  auto* const _this = static_cast<RangeManipulate*>(&to_msg);
  auto& from = static_cast<const RangeManipulate&>(from_msg);
  // @@protoc_insertion_point(class_specific_merge_from_start:substrait_extension.RangeManipulate)
  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_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());
  }
  if (from._internal_range() != 0) {
    _this->_internal_set_range(from._internal_range());
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void RangeManipulate::CopyFrom(const RangeManipulate& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:substrait_extension.RangeManipulate)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool RangeManipulate::IsInitialized() const {
  return true;
}

void RangeManipulate::InternalSwap(RangeManipulate* 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::memswap<
      PROTOBUF_FIELD_OFFSET(RangeManipulate, _impl_.range_)
      + sizeof(RangeManipulate::_impl_.range_)
      - PROTOBUF_FIELD_OFFSET(RangeManipulate, _impl_.start_)>(
          reinterpret_cast<char*>(&_impl_.start_),
          reinterpret_cast<char*>(&other->_impl_.start_));
}

::PROTOBUF_NAMESPACE_ID::Metadata RangeManipulate::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[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)
}  // namespace substrait_extension
PROTOBUF_NAMESPACE_OPEN
template<> PROTOBUF_NOINLINE ::substrait_extension::EmptyMetric*
Arena::CreateMaybeMessage< ::substrait_extension::EmptyMetric >(Arena* arena) {
  return Arena::CreateMessageInternal< ::substrait_extension::EmptyMetric >(arena);
}
template<> PROTOBUF_NOINLINE ::substrait_extension::InstantManipulate*
Arena::CreateMaybeMessage< ::substrait_extension::InstantManipulate >(Arena* arena) {
  return Arena::CreateMessageInternal< ::substrait_extension::InstantManipulate >(arena);
}
template<> PROTOBUF_NOINLINE ::substrait_extension::SeriesNormalize*
Arena::CreateMaybeMessage< ::substrait_extension::SeriesNormalize >(Arena* arena) {
  return Arena::CreateMessageInternal< ::substrait_extension::SeriesNormalize >(arena);
}
template<> PROTOBUF_NOINLINE ::substrait_extension::SeriesDivide*
Arena::CreateMaybeMessage< ::substrait_extension::SeriesDivide >(Arena* arena) {
  return Arena::CreateMessageInternal< ::substrait_extension::SeriesDivide >(arena);
}
template<> PROTOBUF_NOINLINE ::substrait_extension::RangeManipulate*
Arena::CreateMaybeMessage< ::substrait_extension::RangeManipulate >(Arena* 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

// @@protoc_insertion_point(global_scope)
#include <google/protobuf/port_undef.inc>
