// Generated by the protocol buffer compiler.  DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: substrait/plan.proto
// Protobuf C++ Version: 7.35.1

#include "substrait/plan.pb.h"

#include <algorithm>
#include <type_traits>
#include "google/protobuf/io/coded_stream.h"
#include "google/protobuf/generated_message_tctable_impl.h"
#include "google/protobuf/internal_visibility.h"
#include "google/protobuf/extension_set.h"
#include "google/protobuf/generated_message_util.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)

// Must be included last.
#include "google/protobuf/port_def.inc"
PROTOBUF_PRAGMA_INIT_SEG
namespace _pb = ::google::protobuf;
namespace _pbi = ::google::protobuf::internal;
namespace _fl = ::google::protobuf::internal::field_layout;
#ifdef PROTOBUF_MESSAGE_GLOBALS
namespace {
PROTOBUF_CONSTINIT ::google::protobuf::internal::ReflectionData
    file_reflection_data[] = {
        // ::substrait::PlanRel
        {&::_pbi::kDescriptorMethods, &::descriptor_table_substrait_2fplan_2eproto, /* tracker*/ nullptr,},
        // ::substrait::Plan
        {&::_pbi::kDescriptorMethods, &::descriptor_table_substrait_2fplan_2eproto, /* tracker*/ nullptr,},
        // ::substrait::PlanVersion
        {&::_pbi::kDescriptorMethods, &::descriptor_table_substrait_2fplan_2eproto, /* tracker*/ nullptr,},
        // ::substrait::Version
        {&::_pbi::kDescriptorMethods, &::descriptor_table_substrait_2fplan_2eproto, /* tracker*/ nullptr,},
};
}  // namespace
#endif
namespace substrait {
class Version::_Internal {
 public:
  using HasBits = decltype(::std::declval<Version>()._impl_._has_bits_);
  static constexpr ::int32_t kHasBitsOffset =
      8 * PROTOBUF_FIELD_OFFSET(Version, _impl_._has_bits_);
};

constexpr Version::ParseTableT_ Version::InternalGenerateParseTable_(const ::_pbi::ClassData* class_data) {
  return ParseTableT_{
    {
      PROTOBUF_FIELD_OFFSET(Version, _impl_._has_bits_),
      0, // no _extensions_
      5, 56,  // max_field_number, fast_idx_mask
      offsetof(ParseTableT_, field_lookup_table),
      4294967264,  // skipmap
      offsetof(ParseTableT_, field_entries),
      5,  // num_field_entries
      0,  // num_aux_entries
      offsetof(ParseTableT_, field_names),  // no aux_entries
      class_data,
      nullptr,  // post_loop_handler
      ::_pbi::TcParser::GenericFallback,  // fallback
      #ifdef PROTOBUF_PREFETCH_PARSE_TABLE
      ::_pbi::TcParser::GetTable<::substrait::Version>(),  // to_prefetch
      #endif  // PROTOBUF_PREFETCH_PARSE_TABLE
    }, {{
      {::_pbi::TcParser::MiniParse, {}},
      // uint32 major_number = 1;
      {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(Version, _impl_.major_number_), 2>(),
       {8, 2, 0,
        PROTOBUF_FIELD_OFFSET(Version, _impl_.major_number_)}},
      // uint32 minor_number = 2;
      {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(Version, _impl_.minor_number_), 3>(),
       {16, 3, 0,
        PROTOBUF_FIELD_OFFSET(Version, _impl_.minor_number_)}},
      // uint32 patch_number = 3;
      {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(Version, _impl_.patch_number_), 4>(),
       {24, 4, 0,
        PROTOBUF_FIELD_OFFSET(Version, _impl_.patch_number_)}},
      // string git_hash = 4;
      {::_pbi::TcParser::FastUS1,
       {34, 0, 0,
        PROTOBUF_FIELD_OFFSET(Version, _impl_.git_hash_)}},
      // string producer = 5;
      {::_pbi::TcParser::FastUS1,
       {42, 1, 0,
        PROTOBUF_FIELD_OFFSET(Version, _impl_.producer_)}},
      {::_pbi::TcParser::MiniParse, {}},
      {::_pbi::TcParser::MiniParse, {}},
    }}, {{
      65535, 65535
    }}, {{
      // uint32 major_number = 1;
      {PROTOBUF_FIELD_OFFSET(Version, _impl_.major_number_), _Internal::kHasBitsOffset + 2, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)},
      // uint32 minor_number = 2;
      {PROTOBUF_FIELD_OFFSET(Version, _impl_.minor_number_), _Internal::kHasBitsOffset + 3, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)},
      // uint32 patch_number = 3;
      {PROTOBUF_FIELD_OFFSET(Version, _impl_.patch_number_), _Internal::kHasBitsOffset + 4, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)},
      // string git_hash = 4;
      {PROTOBUF_FIELD_OFFSET(Version, _impl_.git_hash_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)},
      // string producer = 5;
      {PROTOBUF_FIELD_OFFSET(Version, _impl_.producer_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)},
    }},
    // no aux_entries
    {{
      "\21\0\0\0\10\10\0\0"
      "substrait.Version"
      "git_hash"
      "producer"
    }},
  };
}


inline constexpr Version::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    ::_pbi::ConstantInitialized) noexcept
      : _cached_size_{0},
        git_hash_(
            &::google::protobuf::internal::fixed_address_empty_string,
            ::_pbi::ConstantInitialized()),
        producer_(
            &::google::protobuf::internal::fixed_address_empty_string,
            ::_pbi::ConstantInitialized()),
        major_number_{0u},
        minor_number_{0u},
        patch_number_{0u} {}

template <typename>
constexpr Version::Version(::_pbi::ConstantInitialized,
                       const ::_pbi::ClassData* PROTOBUF_NONNULL class_data)
    : ::google::protobuf::Message(
#if defined(PROTOBUF_CUSTOM_VTABLE)
          class_data
#endif  // PROTOBUF_CUSTOM_VTABLE
          ),
      _impl_(internal_visibility(), ::_pbi::ConstantInitialized()) {
}
inline void* PROTOBUF_NONNULL Version::PlacementNew_(
    const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem,
    ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) {
  return ::new (mem) Version(arena);
}
constexpr auto Version::InternalNewImpl_() {
  return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(Version), alignof(Version));
}
constexpr auto Version::InternalGenerateClassData_(
    const MessageLite& prototype,
    const ::google::protobuf::internal::TcParseTableBase* tc_table) {
  return ::google::protobuf::internal::ClassDataFull{
      ::google::protobuf::internal::ClassData{
          &prototype,
#ifndef PROTOBUF_MESSAGE_GLOBALS
          &_table_.header,
#else
          tc_table,
#endif
          nullptr,  // IsInitialized
          &Version::MergeImpl,
          ::google::protobuf::Message::GetNewImpl<Version>(),
#if defined(PROTOBUF_CUSTOM_VTABLE)
          &Version::SharedDtor,
          ::google::protobuf::Message::GetClearImpl<Version>(), &Version::ByteSizeLong,
              &Version::_InternalSerialize,
#endif  // PROTOBUF_CUSTOM_VTABLE
          PROTOBUF_FIELD_OFFSET(Version, _impl_._cached_size_),
          false,
      },
#ifdef PROTOBUF_MESSAGE_GLOBALS
      &file_reflection_data[3],
#else   // !PROTOBUF_MESSAGE_GLOBALS
      &::_pbi::kDescriptorMethods,
      &descriptor_table_substrait_2fplan_2eproto,
      nullptr,  // tracker
#endif  // PROTOBUF_MESSAGE_GLOBALS
  };
}
struct VersionGlobalsTypeInternal : ::_pbi::MessageGlobalsBase {
  constexpr VersionGlobalsTypeInternal()
      :
#ifndef PROTOBUF_MESSAGE_GLOBALS
        _default(::_pbi::ConstantInitialized{},
                 Version_class_data_.base())
#else   // !PROTOBUF_MESSAGE_GLOBALS
        MessageGlobalsBase(Version::InternalGenerateClassData_(
            _default, &Version_globals_._table.header)),
        _default(::_pbi::ConstantInitialized{}, GetClassData()),
        _table(::_pbi::PrivateAccess::GenerateParseTable<Version>(
            GetClassData()))
#endif  // PROTOBUF_MESSAGE_GLOBALS
  {
  }
  ~VersionGlobalsTypeInternal() {}
  union {
    alignas(::_pbi::kMaxMessageAlignment) Version _default;
  };
#ifdef PROTOBUF_MESSAGE_GLOBALS
  decltype(::_pbi::PrivateAccess::GenerateParseTable<Version>(
      ::std::declval<const ::_pbi::ClassData*>())) _table;
#endif
};
#ifdef PROTOBUF_MESSAGE_GLOBALS
static_assert(PROTOBUF_FIELD_OFFSET(VersionGlobalsTypeInternal, _default) ==
              ::_pbi::MessageGlobalsBase::OffsetToDefault());
#endif  // PROTOBUF_MESSAGE_GLOBALS

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PROTOBUF_MESSAGE_GLOBALS_CONST VersionGlobalsTypeInternal Version_globals_
        PROTOBUF_MESSAGE_GLOBALS_SECTION(.data.rel.ro);
#if defined(PROTOBUF_CUSTOM_VTABLE)
namespace {
const ::_pbi::ClassData* Version_get_class_data() {
#ifdef PROTOBUF_MESSAGE_GLOBALS
  return Version_globals_.GetClassData();
#else
  return Version_class_data_.base();
#endif  // PROTOBUF_MESSAGE_GLOBALS
}
}  // namespace
#endif  // PROTOBUF_CUSTOM_VTABLE
class PlanVersion::_Internal {
 public:
  using HasBits = decltype(::std::declval<PlanVersion>()._impl_._has_bits_);
  static constexpr ::int32_t kHasBitsOffset =
      8 * PROTOBUF_FIELD_OFFSET(PlanVersion, _impl_._has_bits_);
};

constexpr PlanVersion::ParseTableT_ PlanVersion::InternalGenerateParseTable_(const ::_pbi::ClassData* class_data) {
  return ParseTableT_{
    {
      PROTOBUF_FIELD_OFFSET(PlanVersion, _impl_._has_bits_),
      0, // no _extensions_
      6, 0,  // max_field_number, fast_idx_mask
      offsetof(ParseTableT_, field_lookup_table),
      4294967263,  // skipmap
      offsetof(ParseTableT_, field_entries),
      1,  // num_field_entries
      1,  // num_aux_entries
      offsetof(ParseTableT_, aux_entries),
      class_data,
      nullptr,  // post_loop_handler
      ::_pbi::TcParser::GenericFallback,  // fallback
      #ifdef PROTOBUF_PREFETCH_PARSE_TABLE
      ::_pbi::TcParser::GetTable<::substrait::PlanVersion>(),  // to_prefetch
      #endif  // PROTOBUF_PREFETCH_PARSE_TABLE
    }, {{
      // .substrait.Version version = 6;
      {::_pbi::TcParser::FastMtS1,
       {50, 0, 0,
        PROTOBUF_FIELD_OFFSET(PlanVersion, _impl_.version_)}},
    }}, {{
      65535, 65535
    }}, {{
      // .substrait.Version version = 6;
      {PROTOBUF_FIELD_OFFSET(PlanVersion, _impl_.version_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)},
    }},
    {{
        #ifndef PROTOBUF_MESSAGE_GLOBALS
        {::_pbi::TcParser::GetTable<::substrait::Version>()},
        #else
        {::_pbi::FieldAuxMessageGlobals(), &::substrait::Version_globals_},
        #endif
    }},
    {{
    }},
  };
}


inline constexpr PlanVersion::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    ::_pbi::ConstantInitialized) noexcept
      : _cached_size_{0},
        version_{nullptr} {}

template <typename>
constexpr PlanVersion::PlanVersion(::_pbi::ConstantInitialized,
                       const ::_pbi::ClassData* PROTOBUF_NONNULL class_data)
    : ::google::protobuf::Message(
#if defined(PROTOBUF_CUSTOM_VTABLE)
          class_data
#endif  // PROTOBUF_CUSTOM_VTABLE
          ),
      _impl_(internal_visibility(), ::_pbi::ConstantInitialized()) {
}
inline void* PROTOBUF_NONNULL PlanVersion::PlacementNew_(
    const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem,
    ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) {
  return ::new (mem) PlanVersion(arena);
}
constexpr auto PlanVersion::InternalNewImpl_() {
  return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(PlanVersion), alignof(PlanVersion));
}
constexpr auto PlanVersion::InternalGenerateClassData_(
    const MessageLite& prototype,
    const ::google::protobuf::internal::TcParseTableBase* tc_table) {
  return ::google::protobuf::internal::ClassDataFull{
      ::google::protobuf::internal::ClassData{
          &prototype,
#ifndef PROTOBUF_MESSAGE_GLOBALS
          &_table_.header,
#else
          tc_table,
#endif
          nullptr,  // IsInitialized
          &PlanVersion::MergeImpl,
          ::google::protobuf::Message::GetNewImpl<PlanVersion>(),
#if defined(PROTOBUF_CUSTOM_VTABLE)
          &PlanVersion::SharedDtor,
          ::google::protobuf::Message::GetClearImpl<PlanVersion>(), &PlanVersion::ByteSizeLong,
              &PlanVersion::_InternalSerialize,
#endif  // PROTOBUF_CUSTOM_VTABLE
          PROTOBUF_FIELD_OFFSET(PlanVersion, _impl_._cached_size_),
          false,
      },
#ifdef PROTOBUF_MESSAGE_GLOBALS
      &file_reflection_data[2],
#else   // !PROTOBUF_MESSAGE_GLOBALS
      &::_pbi::kDescriptorMethods,
      &descriptor_table_substrait_2fplan_2eproto,
      nullptr,  // tracker
#endif  // PROTOBUF_MESSAGE_GLOBALS
  };
}
struct PlanVersionGlobalsTypeInternal : ::_pbi::MessageGlobalsBase {
  constexpr PlanVersionGlobalsTypeInternal()
      :
#ifndef PROTOBUF_MESSAGE_GLOBALS
        _default(::_pbi::ConstantInitialized{},
                 PlanVersion_class_data_.base())
#else   // !PROTOBUF_MESSAGE_GLOBALS
        MessageGlobalsBase(PlanVersion::InternalGenerateClassData_(
            _default, &PlanVersion_globals_._table.header)),
        _default(::_pbi::ConstantInitialized{}, GetClassData()),
        _table(::_pbi::PrivateAccess::GenerateParseTable<PlanVersion>(
            GetClassData()))
#endif  // PROTOBUF_MESSAGE_GLOBALS
  {
  }
  ~PlanVersionGlobalsTypeInternal() {}
  union {
    alignas(::_pbi::kMaxMessageAlignment) PlanVersion _default;
  };
#ifdef PROTOBUF_MESSAGE_GLOBALS
  decltype(::_pbi::PrivateAccess::GenerateParseTable<PlanVersion>(
      ::std::declval<const ::_pbi::ClassData*>())) _table;
#endif
};
#ifdef PROTOBUF_MESSAGE_GLOBALS
static_assert(PROTOBUF_FIELD_OFFSET(PlanVersionGlobalsTypeInternal, _default) ==
              ::_pbi::MessageGlobalsBase::OffsetToDefault());
#endif  // PROTOBUF_MESSAGE_GLOBALS

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PROTOBUF_MESSAGE_GLOBALS_CONST PlanVersionGlobalsTypeInternal PlanVersion_globals_
        PROTOBUF_MESSAGE_GLOBALS_SECTION(.data.rel.ro);
#if defined(PROTOBUF_CUSTOM_VTABLE)
namespace {
const ::_pbi::ClassData* PlanVersion_get_class_data() {
#ifdef PROTOBUF_MESSAGE_GLOBALS
  return PlanVersion_globals_.GetClassData();
#else
  return PlanVersion_class_data_.base();
#endif  // PROTOBUF_MESSAGE_GLOBALS
}
}  // namespace
#endif  // PROTOBUF_CUSTOM_VTABLE
class PlanRel::_Internal {
 public:
  static constexpr ::int32_t kOneofCaseOffset =
      PROTOBUF_FIELD_OFFSET(::substrait::PlanRel, _impl_._oneof_case_);
};

constexpr PlanRel::ParseTableT_ PlanRel::InternalGenerateParseTable_(const ::_pbi::ClassData* class_data) {
  return ParseTableT_{
    {
      PROTOBUF_FIELD_OFFSET(PlanRel,
                            _impl_._cached_size_),  // no hasbits
      0, // no _extensions_
      2, 0,  // max_field_number, fast_idx_mask
      offsetof(ParseTableT_, field_lookup_table),
      4294967292,  // skipmap
      offsetof(ParseTableT_, field_entries),
      2,  // num_field_entries
      2,  // num_aux_entries
      offsetof(ParseTableT_, aux_entries),
      class_data,
      nullptr,  // post_loop_handler
      ::_pbi::TcParser::GenericFallback,  // fallback
      #ifdef PROTOBUF_PREFETCH_PARSE_TABLE
      ::_pbi::TcParser::GetTable<::substrait::PlanRel>(),  // to_prefetch
      #endif  // PROTOBUF_PREFETCH_PARSE_TABLE
    }, {{
      {::_pbi::TcParser::MiniParse, {}},
    }}, {{
      65535, 65535
    }}, {{
      // .substrait.Rel rel = 1;
      {PROTOBUF_FIELD_OFFSET(PlanRel, _impl_.rel_type_.rel_), _Internal::kOneofCaseOffset + 0, 0, (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)},
      // .substrait.RelRoot root = 2;
      {PROTOBUF_FIELD_OFFSET(PlanRel, _impl_.rel_type_.root_), _Internal::kOneofCaseOffset + 0, 1, (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)},
    }},
    {{
        #ifndef PROTOBUF_MESSAGE_GLOBALS
        {::_pbi::TcParser::GetTable<::substrait::Rel>()},
        #else
        {::_pbi::FieldAuxMessageGlobals(), &::substrait::Rel_globals_},
        #endif
        #ifndef PROTOBUF_MESSAGE_GLOBALS
        {::_pbi::TcParser::GetTable<::substrait::RelRoot>()},
        #else
        {::_pbi::FieldAuxMessageGlobals(), &::substrait::RelRoot_globals_},
        #endif
    }},
    {{
    }},
  };
}


inline constexpr PlanRel::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    ::_pbi::ConstantInitialized) noexcept
      : rel_type_{},
        _cached_size_{0},
        _oneof_case_{} {}

template <typename>
constexpr PlanRel::PlanRel(::_pbi::ConstantInitialized,
                       const ::_pbi::ClassData* PROTOBUF_NONNULL class_data)
    : ::google::protobuf::Message(
#if defined(PROTOBUF_CUSTOM_VTABLE)
          class_data
#endif  // PROTOBUF_CUSTOM_VTABLE
          ),
      _impl_(internal_visibility(), ::_pbi::ConstantInitialized()) {
}
inline void* PROTOBUF_NONNULL PlanRel::PlacementNew_(
    const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem,
    ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) {
  return ::new (mem) PlanRel(arena);
}
constexpr auto PlanRel::InternalNewImpl_() {
  return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(PlanRel), alignof(PlanRel));
}
constexpr auto PlanRel::InternalGenerateClassData_(
    const MessageLite& prototype,
    const ::google::protobuf::internal::TcParseTableBase* tc_table) {
  return ::google::protobuf::internal::ClassDataFull{
      ::google::protobuf::internal::ClassData{
          &prototype,
#ifndef PROTOBUF_MESSAGE_GLOBALS
          &_table_.header,
#else
          tc_table,
#endif
          nullptr,  // IsInitialized
          &PlanRel::MergeImpl,
          ::google::protobuf::Message::GetNewImpl<PlanRel>(),
#if defined(PROTOBUF_CUSTOM_VTABLE)
          &PlanRel::SharedDtor,
          ::google::protobuf::Message::GetClearImpl<PlanRel>(), &PlanRel::ByteSizeLong,
              &PlanRel::_InternalSerialize,
#endif  // PROTOBUF_CUSTOM_VTABLE
          PROTOBUF_FIELD_OFFSET(PlanRel, _impl_._cached_size_),
          false,
      },
#ifdef PROTOBUF_MESSAGE_GLOBALS
      &file_reflection_data[0],
#else   // !PROTOBUF_MESSAGE_GLOBALS
      &::_pbi::kDescriptorMethods,
      &descriptor_table_substrait_2fplan_2eproto,
      nullptr,  // tracker
#endif  // PROTOBUF_MESSAGE_GLOBALS
  };
}
struct PlanRelGlobalsTypeInternal : ::_pbi::MessageGlobalsBase {
  constexpr PlanRelGlobalsTypeInternal()
      :
#ifndef PROTOBUF_MESSAGE_GLOBALS
        _default(::_pbi::ConstantInitialized{},
                 PlanRel_class_data_.base())
#else   // !PROTOBUF_MESSAGE_GLOBALS
        MessageGlobalsBase(PlanRel::InternalGenerateClassData_(
            _default, &PlanRel_globals_._table.header)),
        _default(::_pbi::ConstantInitialized{}, GetClassData()),
        _table(::_pbi::PrivateAccess::GenerateParseTable<PlanRel>(
            GetClassData()))
#endif  // PROTOBUF_MESSAGE_GLOBALS
  {
  }
  ~PlanRelGlobalsTypeInternal() {}
  union {
    alignas(::_pbi::kMaxMessageAlignment) PlanRel _default;
  };
#ifdef PROTOBUF_MESSAGE_GLOBALS
  decltype(::_pbi::PrivateAccess::GenerateParseTable<PlanRel>(
      ::std::declval<const ::_pbi::ClassData*>())) _table;
#endif
};
#ifdef PROTOBUF_MESSAGE_GLOBALS
static_assert(PROTOBUF_FIELD_OFFSET(PlanRelGlobalsTypeInternal, _default) ==
              ::_pbi::MessageGlobalsBase::OffsetToDefault());
#endif  // PROTOBUF_MESSAGE_GLOBALS

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PROTOBUF_MESSAGE_GLOBALS_CONST PlanRelGlobalsTypeInternal PlanRel_globals_
        PROTOBUF_MESSAGE_GLOBALS_SECTION(.data.rel.ro);
#if defined(PROTOBUF_CUSTOM_VTABLE)
namespace {
const ::_pbi::ClassData* PlanRel_get_class_data() {
#ifdef PROTOBUF_MESSAGE_GLOBALS
  return PlanRel_globals_.GetClassData();
#else
  return PlanRel_class_data_.base();
#endif  // PROTOBUF_MESSAGE_GLOBALS
}
}  // namespace
#endif  // PROTOBUF_CUSTOM_VTABLE
class Plan::_Internal {
 public:
  using HasBits = decltype(::std::declval<Plan>()._impl_._has_bits_);
  static constexpr ::int32_t kHasBitsOffset =
      8 * PROTOBUF_FIELD_OFFSET(Plan, _impl_._has_bits_);
};

constexpr Plan::ParseTableT_ Plan::InternalGenerateParseTable_(const ::_pbi::ClassData* class_data) {
  return ParseTableT_{
    {
      PROTOBUF_FIELD_OFFSET(Plan, _impl_._has_bits_),
      0, // no _extensions_
      6, 56,  // max_field_number, fast_idx_mask
      offsetof(ParseTableT_, field_lookup_table),
      4294967232,  // skipmap
      offsetof(ParseTableT_, field_entries),
      6,  // num_field_entries
      5,  // num_aux_entries
      offsetof(ParseTableT_, aux_entries),
      class_data,
      nullptr,  // post_loop_handler
      ::_pbi::TcParser::GenericFallback,  // fallback
      #ifdef PROTOBUF_PREFETCH_PARSE_TABLE
      ::_pbi::TcParser::GetTable<::substrait::Plan>(),  // to_prefetch
      #endif  // PROTOBUF_PREFETCH_PARSE_TABLE
    }, {{
      {::_pbi::TcParser::MiniParse, {}},
      // repeated .substrait.extensions.SimpleExtensionURI extension_uris = 1;
      {::_pbi::TcParser::FastMtR1,
       {10, 0, 0,
        PROTOBUF_FIELD_OFFSET(Plan, _impl_.extension_uris_)}},
      // repeated .substrait.extensions.SimpleExtensionDeclaration extensions = 2;
      {::_pbi::TcParser::FastMtR1,
       {18, 1, 1,
        PROTOBUF_FIELD_OFFSET(Plan, _impl_.extensions_)}},
      // repeated .substrait.PlanRel relations = 3;
      {::_pbi::TcParser::FastMtR1,
       {26, 2, 2,
        PROTOBUF_FIELD_OFFSET(Plan, _impl_.relations_)}},
      // .substrait.extensions.AdvancedExtension advanced_extensions = 4;
      {::_pbi::TcParser::FastMtS1,
       {34, 4, 3,
        PROTOBUF_FIELD_OFFSET(Plan, _impl_.advanced_extensions_)}},
      // repeated string expected_type_urls = 5;
      {::_pbi::TcParser::FastUR1,
       {42, 3, 0,
        PROTOBUF_FIELD_OFFSET(Plan, _impl_.expected_type_urls_)}},
      // .substrait.Version version = 6;
      {::_pbi::TcParser::FastMtS1,
       {50, 5, 4,
        PROTOBUF_FIELD_OFFSET(Plan, _impl_.version_)}},
      {::_pbi::TcParser::MiniParse, {}},
    }}, {{
      65535, 65535
    }}, {{
      // repeated .substrait.extensions.SimpleExtensionURI extension_uris = 1;
      {PROTOBUF_FIELD_OFFSET(Plan, _impl_.extension_uris_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)},
      // repeated .substrait.extensions.SimpleExtensionDeclaration extensions = 2;
      {PROTOBUF_FIELD_OFFSET(Plan, _impl_.extensions_), _Internal::kHasBitsOffset + 1, 1, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)},
      // repeated .substrait.PlanRel relations = 3;
      {PROTOBUF_FIELD_OFFSET(Plan, _impl_.relations_), _Internal::kHasBitsOffset + 2, 2, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)},
      // .substrait.extensions.AdvancedExtension advanced_extensions = 4;
      {PROTOBUF_FIELD_OFFSET(Plan, _impl_.advanced_extensions_), _Internal::kHasBitsOffset + 4, 3, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)},
      // repeated string expected_type_urls = 5;
      {PROTOBUF_FIELD_OFFSET(Plan, _impl_.expected_type_urls_), _Internal::kHasBitsOffset + 3, 0, (0 | ::_fl::kFcRepeated | ::_fl::kUtf8String | ::_fl::kRepSString)},
      // .substrait.Version version = 6;
      {PROTOBUF_FIELD_OFFSET(Plan, _impl_.version_), _Internal::kHasBitsOffset + 5, 4, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)},
    }},
    {{
        #ifndef PROTOBUF_MESSAGE_GLOBALS
        {::_pbi::TcParser::GetTable<::substrait::extensions::SimpleExtensionURI>()},
        #else
        {::_pbi::FieldAuxMessageGlobals(), &::substrait::extensions::SimpleExtensionURI_globals_},
        #endif
        #ifndef PROTOBUF_MESSAGE_GLOBALS
        {::_pbi::TcParser::GetTable<::substrait::extensions::SimpleExtensionDeclaration>()},
        #else
        {::_pbi::FieldAuxMessageGlobals(), &::substrait::extensions::SimpleExtensionDeclaration_globals_},
        #endif
        #ifndef PROTOBUF_MESSAGE_GLOBALS
        {::_pbi::TcParser::GetTable<::substrait::PlanRel>()},
        #else
        {::_pbi::FieldAuxMessageGlobals(), &::substrait::PlanRel_globals_},
        #endif
        #ifndef PROTOBUF_MESSAGE_GLOBALS
        {::_pbi::TcParser::GetTable<::substrait::extensions::AdvancedExtension>()},
        #else
        {::_pbi::FieldAuxMessageGlobals(), &::substrait::extensions::AdvancedExtension_globals_},
        #endif
        #ifndef PROTOBUF_MESSAGE_GLOBALS
        {::_pbi::TcParser::GetTable<::substrait::Version>()},
        #else
        {::_pbi::FieldAuxMessageGlobals(), &::substrait::Version_globals_},
        #endif
    }},
    {{
      "\16\0\0\0\0\22\0\0"
      "substrait.Plan"
      "expected_type_urls"
    }},
  };
}


inline constexpr Plan::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    ::_pbi::ConstantInitialized) noexcept
      : _cached_size_{0},
        extension_uris_ { visibility, ::_pbi::InternalMetadataOffset::Build<
            ::substrait::Plan,
            PROTOBUF_FIELD_OFFSET(::substrait::Plan, _impl_.extension_uris_)>()
         }
        ,
        extensions_ { visibility, ::_pbi::InternalMetadataOffset::Build<
            ::substrait::Plan,
            PROTOBUF_FIELD_OFFSET(::substrait::Plan, _impl_.extensions_)>()
         }
        ,
        relations_ { visibility, ::_pbi::InternalMetadataOffset::Build<
            ::substrait::Plan,
            PROTOBUF_FIELD_OFFSET(::substrait::Plan, _impl_.relations_)>()
         }
        ,
        expected_type_urls_ { visibility, ::_pbi::InternalMetadataOffset::Build<
            ::substrait::Plan,
            PROTOBUF_FIELD_OFFSET(::substrait::Plan, _impl_.expected_type_urls_)>()
         }
        ,
        advanced_extensions_{nullptr},
        version_{nullptr} {}

template <typename>
constexpr Plan::Plan(::_pbi::ConstantInitialized,
                       const ::_pbi::ClassData* PROTOBUF_NONNULL class_data)
    : ::google::protobuf::Message(
#if defined(PROTOBUF_CUSTOM_VTABLE)
          class_data
#endif  // PROTOBUF_CUSTOM_VTABLE
          ),
      _impl_(internal_visibility(), ::_pbi::ConstantInitialized()) {
}
inline void* PROTOBUF_NONNULL Plan::PlacementNew_(
    const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem,
    ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) {
  return ::new (mem) Plan(arena);
}
constexpr auto Plan::InternalNewImpl_() {
  return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(Plan), alignof(Plan));
}
constexpr auto Plan::InternalGenerateClassData_(
    const MessageLite& prototype,
    const ::google::protobuf::internal::TcParseTableBase* tc_table) {
  return ::google::protobuf::internal::ClassDataFull{
      ::google::protobuf::internal::ClassData{
          &prototype,
#ifndef PROTOBUF_MESSAGE_GLOBALS
          &_table_.header,
#else
          tc_table,
#endif
          nullptr,  // IsInitialized
          &Plan::MergeImpl,
          ::google::protobuf::Message::GetNewImpl<Plan>(),
#if defined(PROTOBUF_CUSTOM_VTABLE)
          &Plan::SharedDtor,
          ::google::protobuf::Message::GetClearImpl<Plan>(), &Plan::ByteSizeLong,
              &Plan::_InternalSerialize,
#endif  // PROTOBUF_CUSTOM_VTABLE
          PROTOBUF_FIELD_OFFSET(Plan, _impl_._cached_size_),
          false,
      },
#ifdef PROTOBUF_MESSAGE_GLOBALS
      &file_reflection_data[1],
#else   // !PROTOBUF_MESSAGE_GLOBALS
      &::_pbi::kDescriptorMethods,
      &descriptor_table_substrait_2fplan_2eproto,
      nullptr,  // tracker
#endif  // PROTOBUF_MESSAGE_GLOBALS
  };
}
struct PlanGlobalsTypeInternal : ::_pbi::MessageGlobalsBase {
  constexpr PlanGlobalsTypeInternal()
      :
#ifndef PROTOBUF_MESSAGE_GLOBALS
        _default(::_pbi::ConstantInitialized{},
                 Plan_class_data_.base())
#else   // !PROTOBUF_MESSAGE_GLOBALS
        MessageGlobalsBase(Plan::InternalGenerateClassData_(
            _default, &Plan_globals_._table.header)),
        _default(::_pbi::ConstantInitialized{}, GetClassData()),
        _table(::_pbi::PrivateAccess::GenerateParseTable<Plan>(
            GetClassData()))
#endif  // PROTOBUF_MESSAGE_GLOBALS
  {
  }
  ~PlanGlobalsTypeInternal() {}
  union {
    alignas(::_pbi::kMaxMessageAlignment) Plan _default;
  };
#ifdef PROTOBUF_MESSAGE_GLOBALS
  decltype(::_pbi::PrivateAccess::GenerateParseTable<Plan>(
      ::std::declval<const ::_pbi::ClassData*>())) _table;
#endif
};
#ifdef PROTOBUF_MESSAGE_GLOBALS
static_assert(PROTOBUF_FIELD_OFFSET(PlanGlobalsTypeInternal, _default) ==
              ::_pbi::MessageGlobalsBase::OffsetToDefault());
#endif  // PROTOBUF_MESSAGE_GLOBALS

PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
    PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PROTOBUF_MESSAGE_GLOBALS_CONST PlanGlobalsTypeInternal Plan_globals_
        PROTOBUF_MESSAGE_GLOBALS_SECTION(.data.rel.ro);
#if defined(PROTOBUF_CUSTOM_VTABLE)
namespace {
const ::_pbi::ClassData* Plan_get_class_data() {
#ifdef PROTOBUF_MESSAGE_GLOBALS
  return Plan_globals_.GetClassData();
#else
  return Plan_class_data_.base();
#endif  // PROTOBUF_MESSAGE_GLOBALS
}
}  // namespace
#endif  // PROTOBUF_CUSTOM_VTABLE
}  // namespace substrait
static constexpr const ::_pb::EnumDescriptor* PROTOBUF_NONNULL* PROTOBUF_NULLABLE
    file_level_enum_descriptors_substrait_2fplan_2eproto = nullptr;
static constexpr const ::_pb::ServiceDescriptor* PROTOBUF_NONNULL* PROTOBUF_NULLABLE
    file_level_service_descriptors_substrait_2fplan_2eproto = nullptr;
const ::uint32_t
    TableStruct_substrait_2fplan_2eproto::offsets[] ABSL_ATTRIBUTE_SECTION_VARIABLE(
        protodesc_cold) = {
        0x004, // bitmap
        PROTOBUF_FIELD_OFFSET(::substrait::PlanRel, _impl_._oneof_case_[0]),
        PROTOBUF_FIELD_OFFSET(::substrait::PlanRel, _impl_.rel_type_),
        PROTOBUF_FIELD_OFFSET(::substrait::PlanRel, _impl_.rel_type_),
        PROTOBUF_FIELD_OFFSET(::substrait::PlanRel, _impl_.rel_type_),
        0x081, // bitmap
        PROTOBUF_FIELD_OFFSET(::substrait::Plan, _impl_._has_bits_),
        9, // hasbit index offset
        PROTOBUF_FIELD_OFFSET(::substrait::Plan, _impl_.version_),
        PROTOBUF_FIELD_OFFSET(::substrait::Plan, _impl_.extension_uris_),
        PROTOBUF_FIELD_OFFSET(::substrait::Plan, _impl_.extensions_),
        PROTOBUF_FIELD_OFFSET(::substrait::Plan, _impl_.relations_),
        PROTOBUF_FIELD_OFFSET(::substrait::Plan, _impl_.advanced_extensions_),
        PROTOBUF_FIELD_OFFSET(::substrait::Plan, _impl_.expected_type_urls_),
        5,
        0,
        1,
        2,
        4,
        3,
        0x081, // bitmap
        PROTOBUF_FIELD_OFFSET(::substrait::PlanVersion, _impl_._has_bits_),
        4, // hasbit index offset
        PROTOBUF_FIELD_OFFSET(::substrait::PlanVersion, _impl_.version_),
        0,
        0x081, // bitmap
        PROTOBUF_FIELD_OFFSET(::substrait::Version, _impl_._has_bits_),
        8, // hasbit index offset
        PROTOBUF_FIELD_OFFSET(::substrait::Version, _impl_.major_number_),
        PROTOBUF_FIELD_OFFSET(::substrait::Version, _impl_.minor_number_),
        PROTOBUF_FIELD_OFFSET(::substrait::Version, _impl_.patch_number_),
        PROTOBUF_FIELD_OFFSET(::substrait::Version, _impl_.git_hash_),
        PROTOBUF_FIELD_OFFSET(::substrait::Version, _impl_.producer_),
        2,
        3,
        4,
        0,
        1,
};

static const ::_pbi::MigrationSchema
    schemas[] ABSL_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
        {0, sizeof(::substrait::PlanRel)},
        {5, sizeof(::substrait::Plan)},
        {20, sizeof(::substrait::PlanVersion)},
        {25, sizeof(::substrait::Version)},
};
static const ::_pbi::MessageGlobalsBase* PROTOBUF_NONNULL const
    file_message_globals[] = {
        &::substrait::PlanRel_globals_,
        &::substrait::Plan_globals_,
        &::substrait::PlanVersion_globals_,
        &::substrait::Version_globals_,
};
const char descriptor_table_protodef_substrait_2fplan_2eproto[] ABSL_ATTRIBUTE_SECTION_VARIABLE(
    protodesc_cold) = {
    "\n\024substrait/plan.proto\022\tsubstrait\032\027subst"
    "rait/algebra.proto\032%substrait/extensions"
    "/extensions.proto\"X\n\007PlanRel\022\035\n\003rel\030\001 \001("
    "\0132\016.substrait.RelH\000\022\"\n\004root\030\002 \001(\0132\022.subs"
    "trait.RelRootH\000B\n\n\010rel_type\"\274\002\n\004Plan\022#\n\007"
    "version\030\006 \001(\0132\022.substrait.Version\022@\n\016ext"
    "ension_uris\030\001 \003(\0132(.substrait.extensions"
    ".SimpleExtensionURI\022D\n\nextensions\030\002 \003(\0132"
    "0.substrait.extensions.SimpleExtensionDe"
    "claration\022%\n\trelations\030\003 \003(\0132\022.substrait"
    ".PlanRel\022D\n\023advanced_extensions\030\004 \001(\0132\'."
    "substrait.extensions.AdvancedExtension\022\032"
    "\n\022expected_type_urls\030\005 \003(\t\"2\n\013PlanVersio"
    "n\022#\n\007version\030\006 \001(\0132\022.substrait.Version\"o"
    "\n\007Version\022\024\n\014major_number\030\001 \001(\r\022\024\n\014minor"
    "_number\030\002 \001(\r\022\024\n\014patch_number\030\003 \001(\r\022\020\n\010g"
    "it_hash\030\004 \001(\t\022\020\n\010producer\030\005 \001(\tBW\n\022io.su"
    "bstrait.protoP\001Z*github.com/substrait-io"
    "/substrait-go/proto\252\002\022Substrait.Protobuf"
    "b\006proto3"
};
static const ::_pbi::DescriptorTable* PROTOBUF_NONNULL const
    descriptor_table_substrait_2fplan_2eproto_deps[2] = {
        &::descriptor_table_substrait_2falgebra_2eproto,
        &::descriptor_table_substrait_2fextensions_2fextensions_2eproto,
};
static ::absl::once_flag descriptor_table_substrait_2fplan_2eproto_once;
PROTOBUF_CONSTINIT const ::_pbi::DescriptorTable descriptor_table_substrait_2fplan_2eproto = {
    false,
    false,
    768,
    descriptor_table_protodef_substrait_2fplan_2eproto,
    "substrait/plan.proto",
    &descriptor_table_substrait_2fplan_2eproto_once,
    descriptor_table_substrait_2fplan_2eproto_deps,
    2,
    4,
    schemas,
    file_message_globals,
    TableStruct_substrait_2fplan_2eproto::offsets,
    file_level_enum_descriptors_substrait_2fplan_2eproto,
    file_level_service_descriptors_substrait_2fplan_2eproto,
};
namespace substrait {
// ===================================================================

void PlanRel::set_allocated_rel(::substrait::Rel* PROTOBUF_NULLABLE rel) {
  ::google::protobuf::Arena* message_arena = GetArena();
  clear_rel_type();
  if (rel) {
    ::google::protobuf::Arena* submessage_arena = reinterpret_cast<::google::protobuf::Message*>(rel)->GetArena();
    if (message_arena != submessage_arena) {
      rel = ::google::protobuf::internal::GetOwnedMessage(message_arena, rel, submessage_arena);
    }
    set_has_rel();
    _impl_.rel_type_.rel_ = rel;
  }
  // @@protoc_insertion_point(field_set_allocated:substrait.PlanRel.rel)
}
void PlanRel::clear_rel() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  if (rel_type_case() == kRel) {
    if (GetArena() == nullptr) {
      delete _impl_.rel_type_.rel_;
    } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) {
      ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.rel_type_.rel_);
    }
    clear_has_rel_type();
  }
}
void PlanRel::set_allocated_root(::substrait::RelRoot* PROTOBUF_NULLABLE root) {
  ::google::protobuf::Arena* message_arena = GetArena();
  clear_rel_type();
  if (root) {
    ::google::protobuf::Arena* submessage_arena = reinterpret_cast<::google::protobuf::Message*>(root)->GetArena();
    if (message_arena != submessage_arena) {
      root = ::google::protobuf::internal::GetOwnedMessage(message_arena, root, submessage_arena);
    }
    set_has_root();
    _impl_.rel_type_.root_ = root;
  }
  // @@protoc_insertion_point(field_set_allocated:substrait.PlanRel.root)
}
void PlanRel::clear_root() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  if (rel_type_case() == kRoot) {
    if (GetArena() == nullptr) {
      delete _impl_.rel_type_.root_;
    } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) {
      ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.rel_type_.root_);
    }
    clear_has_rel_type();
  }
}
PlanRel::PlanRel(::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::Message(arena, PlanRel_get_class_data()) {
#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::Message(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:substrait.PlanRel)
}
PROTOBUF_NDEBUG_INLINE PlanRel::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from,
    [[maybe_unused]] const ::substrait::PlanRel& from_msg)
      : rel_type_{},
        _cached_size_{0},
        _oneof_case_{from._oneof_case_[0]} {}

PlanRel::PlanRel(
    ::google::protobuf::Arena* PROTOBUF_NULLABLE arena,
    const PlanRel& from)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::Message(arena, PlanRel_get_class_data()) {

#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::Message(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  PlanRel* const _this = this;
  (void)_this;
  _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
      from._internal_metadata_);
  new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from);
  switch (rel_type_case()) {
    case REL_TYPE_NOT_SET:
      break;
      case kRel:
        _impl_.rel_type_.rel_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.rel_type_.rel_);
        break;
      case kRoot:
        _impl_.rel_type_.root_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.rel_type_.root_);
        break;
  }

  // @@protoc_insertion_point(copy_constructor:substrait.PlanRel)
}
PROTOBUF_NDEBUG_INLINE PlanRel::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
      : rel_type_{},
        _cached_size_{0},
        _oneof_case_{} {}

inline void PlanRel::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) {
  new (&_impl_) Impl_(internal_visibility(), arena);
}
PlanRel::~PlanRel() {
  // @@protoc_insertion_point(destructor:substrait.PlanRel)
  SharedDtor(*this);
}
inline void PlanRel::SharedDtor(MessageLite& self) {
  PlanRel& this_ = static_cast<PlanRel&>(self);
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    this_.CheckHasBitConsistency();
  }
  this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
  ABSL_DCHECK(this_.GetArena() == nullptr);
  if (this_.has_rel_type()) {
    this_.clear_rel_type();
  }
  this_._impl_.~Impl_();
}

void PlanRel::clear_rel_type() {
// @@protoc_insertion_point(one_of_clear_start:substrait.PlanRel)
  ::google::protobuf::internal::TSanWrite(&_impl_);
  switch (rel_type_case()) {
    case kRel: {
      if (GetArena() == nullptr) {
        delete _impl_.rel_type_.rel_;
      } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) {
        ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.rel_type_.rel_);
      }
      break;
    }
    case kRoot: {
      if (GetArena() == nullptr) {
        delete _impl_.rel_type_.root_;
      } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) {
        ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.rel_type_.root_);
      }
      break;
    }
    case REL_TYPE_NOT_SET: {
      break;
    }
  }
  _impl_._oneof_case_[0] = REL_TYPE_NOT_SET;
}


#ifndef PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const
    ::google::protobuf::internal::ClassDataFull PlanRel_class_data_ =
        PlanRel::InternalGenerateClassData_(PlanRel_globals_._default);

PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
PlanRel::GetClassData() const {
  ::google::protobuf::internal::PrefetchToLocalCache(&PlanRel_class_data_);
  ::google::protobuf::internal::PrefetchToLocalCache(PlanRel_class_data_.tc_table);
  return PlanRel_class_data_.base();
}
#else
PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
PlanRel::GetClassData() const {
  ::google::protobuf::internal::PrefetchToLocalCache(&PlanRel_globals_);
  ::google::protobuf::internal::PrefetchToLocalCache(
      ::google::protobuf::internal::MessageGlobalsBase::ToParseTableBase(&PlanRel_globals_));
  return PlanRel_globals_.GetClassData();
}
#endif  // !PROTOBUF_MESSAGE_GLOBALS
#ifndef PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const PlanRel::ParseTableT_
    PlanRel::_table_ =
        PlanRel::InternalGenerateParseTable_(PlanRel_class_data_.base());
#endif  // !PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_NOINLINE void PlanRel::Clear() {
// @@protoc_insertion_point(message_clear_start:substrait.PlanRel)
  ::google::protobuf::internal::TSanWrite(&_impl_);
  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  clear_rel_type();
  _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
}

#if defined(PROTOBUF_CUSTOM_VTABLE)
::uint8_t* PROTOBUF_NONNULL PlanRel::_InternalSerialize(
    const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target,
    ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) {
  const PlanRel& this_ = static_cast<const PlanRel&>(base);
#else   // PROTOBUF_CUSTOM_VTABLE
::uint8_t* PROTOBUF_NONNULL PlanRel::_InternalSerialize(
    ::uint8_t* PROTOBUF_NONNULL target,
    ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const {
  const PlanRel& this_ = *this;
#endif  // PROTOBUF_CUSTOM_VTABLE
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    this_.CheckHasBitConsistency();
  }
  // @@protoc_insertion_point(serialize_to_array_start:substrait.PlanRel)
  ::uint32_t cached_has_bits = 0;
  (void)cached_has_bits;

  switch (this_.rel_type_case()) {
    case kRel: {
      target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
          1, *this_._impl_.rel_type_.rel_, this_._impl_.rel_type_.rel_->GetCachedSize(), target,
          stream);
      break;
    }
    case kRoot: {
      target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
          2, *this_._impl_.rel_type_.root_, this_._impl_.rel_type_.root_->GetCachedSize(), target,
          stream);
      break;
    }
    default:
      break;
  }
  if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
    target =
        ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
            this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:substrait.PlanRel)
  return target;
}

#if defined(PROTOBUF_CUSTOM_VTABLE)
::size_t PlanRel::ByteSizeLong(const MessageLite& base) {
  const PlanRel& this_ = static_cast<const PlanRel&>(base);
#else   // PROTOBUF_CUSTOM_VTABLE
::size_t PlanRel::ByteSizeLong() const {
  const PlanRel& this_ = *this;
#endif  // PROTOBUF_CUSTOM_VTABLE
  // @@protoc_insertion_point(message_byte_size_start:substrait.PlanRel)
  ::size_t total_size = 0;

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

  switch (this_.rel_type_case()) {
    // .substrait.Rel rel = 1;
    case kRel: {
      total_size += 1 +
                    ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.rel_type_.rel_);
      break;
    }
    // .substrait.RelRoot root = 2;
    case kRoot: {
      total_size += 1 +
                    ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.rel_type_.root_);
      break;
    }
    case REL_TYPE_NOT_SET: {
      break;
    }
  }
  return this_.MaybeComputeUnknownFieldsSize(total_size,
                                             &this_._impl_._cached_size_);
}

void PlanRel::MergeImpl(::google::protobuf::MessageLite& to_msg,
                      const ::google::protobuf::MessageLite& from_msg) {
   auto* const _this = static_cast<PlanRel*>(&to_msg);
  auto& from = static_cast<const PlanRel&>(from_msg);
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    from.CheckHasBitConsistency();
  }
  ::google::protobuf::Arena* arena = _this->GetArena();
  // @@protoc_insertion_point(class_specific_merge_from_start:substrait.PlanRel)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void)cached_has_bits;

  if (const uint32_t oneof_from_case =
          from._impl_._oneof_case_[0]) {
    const uint32_t oneof_to_case = _this->_impl_._oneof_case_[0];
    const bool oneof_needs_init = oneof_to_case != oneof_from_case;
    if (oneof_needs_init) {
      if (oneof_to_case != 0) {
        _this->clear_rel_type();
      }
      _this->_impl_._oneof_case_[0] = oneof_from_case;
    }

    switch (oneof_from_case) {
      case kRel: {
        if (oneof_needs_init) {
          _this->_impl_.rel_type_.rel_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.rel_type_.rel_);
        } else {
          _this->_impl_.rel_type_.rel_->MergeFrom(*from._impl_.rel_type_.rel_);
        }
        break;
      }
      case kRoot: {
        if (oneof_needs_init) {
          _this->_impl_.rel_type_.root_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.rel_type_.root_);
        } else {
          _this->_impl_.rel_type_.root_->MergeFrom(*from._impl_.rel_type_.root_);
        }
        break;
      }
      case REL_TYPE_NOT_SET:
        break;
    }
  }
  _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
      from._internal_metadata_);
}

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


void PlanRel::InternalSwap(PlanRel* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) {
  using ::std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_.rel_type_, other->_impl_.rel_type_);
  swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]);
}

::google::protobuf::Metadata PlanRel::GetMetadata() const {
  return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full());
}
// ===================================================================

void Plan::clear_extension_uris() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  _impl_.extension_uris_.Clear();
  ClearHasBit(_impl_._has_bits_[0], 0x00000001U);
}
void Plan::clear_extensions() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  _impl_.extensions_.Clear();
  ClearHasBit(_impl_._has_bits_[0], 0x00000002U);
}
void Plan::clear_advanced_extensions() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  if (_impl_.advanced_extensions_ != nullptr) _impl_.advanced_extensions_->Clear();
  ClearHasBit(_impl_._has_bits_[0], 0x00000010U);
}
Plan::Plan(::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::Message(arena, Plan_get_class_data()) {
#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::Message(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:substrait.Plan)
}
PROTOBUF_NDEBUG_INLINE Plan::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from,
    [[maybe_unused]] const ::substrait::Plan& from_msg)
      : _has_bits_{from._has_bits_},
        _cached_size_{0},
        extension_uris_ {
          visibility, ::_pbi::InternalMetadataOffset::Build<
              ::substrait::Plan,
              PROTOBUF_FIELD_OFFSET(::substrait::Plan, _impl_.extension_uris_)>()
          , from.extension_uris_
        }
        ,
        extensions_ {
          visibility, ::_pbi::InternalMetadataOffset::Build<
              ::substrait::Plan,
              PROTOBUF_FIELD_OFFSET(::substrait::Plan, _impl_.extensions_)>()
          , from.extensions_
        }
        ,
        relations_ {
          visibility, ::_pbi::InternalMetadataOffset::Build<
              ::substrait::Plan,
              PROTOBUF_FIELD_OFFSET(::substrait::Plan, _impl_.relations_)>()
          , from.relations_
        }
        ,
        expected_type_urls_ {
          visibility, ::_pbi::InternalMetadataOffset::Build<
              ::substrait::Plan,
              PROTOBUF_FIELD_OFFSET(::substrait::Plan, _impl_.expected_type_urls_)>()
          , from.expected_type_urls_
        }
     {}

Plan::Plan(
    ::google::protobuf::Arena* PROTOBUF_NULLABLE arena,
    const Plan& from)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::Message(arena, Plan_get_class_data()) {

#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::Message(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  Plan* const _this = this;
  (void)_this;
  _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
      from._internal_metadata_);
  new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from);
  ::uint32_t cached_has_bits = _impl_._has_bits_[0];
  _impl_.advanced_extensions_ = (CheckHasBit(cached_has_bits, 0x00000010U))
                ? ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.advanced_extensions_)
                : nullptr;
  _impl_.version_ = (CheckHasBit(cached_has_bits, 0x00000020U))
                ? ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.version_)
                : nullptr;

  // @@protoc_insertion_point(copy_constructor:substrait.Plan)
}
PROTOBUF_NDEBUG_INLINE Plan::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
      : _cached_size_{0},
        extension_uris_ { visibility, ::_pbi::InternalMetadataOffset::Build<
            ::substrait::Plan,
            PROTOBUF_FIELD_OFFSET(::substrait::Plan, _impl_.extension_uris_)>()
         }
        ,
        extensions_ { visibility, ::_pbi::InternalMetadataOffset::Build<
            ::substrait::Plan,
            PROTOBUF_FIELD_OFFSET(::substrait::Plan, _impl_.extensions_)>()
         }
        ,
        relations_ { visibility, ::_pbi::InternalMetadataOffset::Build<
            ::substrait::Plan,
            PROTOBUF_FIELD_OFFSET(::substrait::Plan, _impl_.relations_)>()
         }
        ,
        expected_type_urls_ { visibility, ::_pbi::InternalMetadataOffset::Build<
            ::substrait::Plan,
            PROTOBUF_FIELD_OFFSET(::substrait::Plan, _impl_.expected_type_urls_)>()
         }
     {}

inline void Plan::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) {
  new (&_impl_) Impl_(internal_visibility(), arena);
  ::memset(reinterpret_cast<char*>(&_impl_) +
               offsetof(Impl_, advanced_extensions_),
           0,
           offsetof(Impl_, version_) -
               offsetof(Impl_, advanced_extensions_) +
               sizeof(Impl_::version_));
}
Plan::~Plan() {
  // @@protoc_insertion_point(destructor:substrait.Plan)
  SharedDtor(*this);
}
inline void Plan::SharedDtor(MessageLite& self) {
  Plan& this_ = static_cast<Plan&>(self);
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    this_.CheckHasBitConsistency();
  }
  this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
  ABSL_DCHECK(this_.GetArena() == nullptr);
  delete this_._impl_.advanced_extensions_;
  delete this_._impl_.version_;
  this_._impl_.~Impl_();
}

#ifndef PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const
    ::google::protobuf::internal::ClassDataFull Plan_class_data_ =
        Plan::InternalGenerateClassData_(Plan_globals_._default);

PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
Plan::GetClassData() const {
  ::google::protobuf::internal::PrefetchToLocalCache(&Plan_class_data_);
  ::google::protobuf::internal::PrefetchToLocalCache(Plan_class_data_.tc_table);
  return Plan_class_data_.base();
}
#else
PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
Plan::GetClassData() const {
  ::google::protobuf::internal::PrefetchToLocalCache(&Plan_globals_);
  ::google::protobuf::internal::PrefetchToLocalCache(
      ::google::protobuf::internal::MessageGlobalsBase::ToParseTableBase(&Plan_globals_));
  return Plan_globals_.GetClassData();
}
#endif  // !PROTOBUF_MESSAGE_GLOBALS
#ifndef PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const Plan::ParseTableT_
    Plan::_table_ =
        Plan::InternalGenerateParseTable_(Plan_class_data_.base());
#endif  // !PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_NOINLINE void Plan::Clear() {
// @@protoc_insertion_point(message_clear_start:substrait.Plan)
  ::google::protobuf::internal::TSanWrite(&_impl_);
  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  if (BatchCheckHasBit(cached_has_bits, 0x0000003fU)) {
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      _impl_.extension_uris_.Clear();
    }
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      _impl_.extensions_.Clear();
    }
    if (CheckHasBit(cached_has_bits, 0x00000004U)) {
      _impl_.relations_.Clear();
    }
    if (CheckHasBit(cached_has_bits, 0x00000008U)) {
      _impl_.expected_type_urls_.Clear();
    }
    if (CheckHasBit(cached_has_bits, 0x00000010U)) {
      ABSL_DCHECK(_impl_.advanced_extensions_ != nullptr);
      _impl_.advanced_extensions_->Clear();
    }
    if (CheckHasBit(cached_has_bits, 0x00000020U)) {
      ABSL_DCHECK(_impl_.version_ != nullptr);
      _impl_.version_->Clear();
    }
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
}

#if defined(PROTOBUF_CUSTOM_VTABLE)
::uint8_t* PROTOBUF_NONNULL Plan::_InternalSerialize(
    const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target,
    ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) {
  const Plan& this_ = static_cast<const Plan&>(base);
#else   // PROTOBUF_CUSTOM_VTABLE
::uint8_t* PROTOBUF_NONNULL Plan::_InternalSerialize(
    ::uint8_t* PROTOBUF_NONNULL target,
    ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const {
  const Plan& this_ = *this;
#endif  // PROTOBUF_CUSTOM_VTABLE
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    this_.CheckHasBitConsistency();
  }
  // @@protoc_insertion_point(serialize_to_array_start:substrait.Plan)
  ::uint32_t cached_has_bits = 0;
  (void)cached_has_bits;

  cached_has_bits = this_._impl_._has_bits_[0];
  // repeated .substrait.extensions.SimpleExtensionURI extension_uris = 1;
  if (CheckHasBit(cached_has_bits, 0x00000001U)) {
    for (unsigned i = 0, n = static_cast<unsigned>(
                             this_._internal_extension_uris_size());
         i < n; i++) {
      const auto& repfield = this_._internal_extension_uris().Get(i);
      target =
          ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
              1, repfield, repfield.GetCachedSize(),
              target, stream);
    }
  }

  // repeated .substrait.extensions.SimpleExtensionDeclaration extensions = 2;
  if (CheckHasBit(cached_has_bits, 0x00000002U)) {
    for (unsigned i = 0, n = static_cast<unsigned>(
                             this_._internal_extensions_size());
         i < n; i++) {
      const auto& repfield = this_._internal_extensions().Get(i);
      target =
          ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
              2, repfield, repfield.GetCachedSize(),
              target, stream);
    }
  }

  // repeated .substrait.PlanRel relations = 3;
  if (CheckHasBit(cached_has_bits, 0x00000004U)) {
    for (unsigned i = 0, n = static_cast<unsigned>(
                             this_._internal_relations_size());
         i < n; i++) {
      const auto& repfield = this_._internal_relations().Get(i);
      target =
          ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
              3, repfield, repfield.GetCachedSize(),
              target, stream);
    }
  }

  // .substrait.extensions.AdvancedExtension advanced_extensions = 4;
  if (CheckHasBit(cached_has_bits, 0x00000010U)) {
    target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
        4, *this_._impl_.advanced_extensions_, this_._impl_.advanced_extensions_->GetCachedSize(), target,
        stream);
  }

  // repeated string expected_type_urls = 5;
  if (CheckHasBit(cached_has_bits, 0x00000008U)) {
    for (int i = 0, n = this_._internal_expected_type_urls_size(); i < n; ++i) {
      const auto& s = this_._internal_expected_type_urls().Get(i);
      ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
          s.data(), static_cast<int>(s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "substrait.Plan.expected_type_urls");
      target = stream->WriteString(5, s, target);
    }
  }

  // .substrait.Version version = 6;
  if (CheckHasBit(cached_has_bits, 0x00000020U)) {
    target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
        6, *this_._impl_.version_, this_._impl_.version_->GetCachedSize(), target,
        stream);
  }

  if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
    target =
        ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
            this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:substrait.Plan)
  return target;
}

#if defined(PROTOBUF_CUSTOM_VTABLE)
::size_t Plan::ByteSizeLong(const MessageLite& base) {
  const Plan& this_ = static_cast<const Plan&>(base);
#else   // PROTOBUF_CUSTOM_VTABLE
::size_t Plan::ByteSizeLong() const {
  const Plan& this_ = *this;
#endif  // PROTOBUF_CUSTOM_VTABLE
  // @@protoc_insertion_point(message_byte_size_start:substrait.Plan)
  ::size_t total_size = 0;

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

  ::_pbi::Prefetch5LinesFrom7Lines(&this_);
  cached_has_bits = this_._impl_._has_bits_[0];
  if (BatchCheckHasBit(cached_has_bits, 0x0000003fU)) {
    // repeated .substrait.extensions.SimpleExtensionURI extension_uris = 1;
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      total_size += 1UL * this_._internal_extension_uris_size();
      for (const auto& msg : this_._internal_extension_uris()) {
        total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg);
      }
    }
    // repeated .substrait.extensions.SimpleExtensionDeclaration extensions = 2;
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      total_size += 1UL * this_._internal_extensions_size();
      for (const auto& msg : this_._internal_extensions()) {
        total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg);
      }
    }
    // repeated .substrait.PlanRel relations = 3;
    if (CheckHasBit(cached_has_bits, 0x00000004U)) {
      total_size += 1UL * this_._internal_relations_size();
      for (const auto& msg : this_._internal_relations()) {
        total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg);
      }
    }
    // repeated string expected_type_urls = 5;
    if (CheckHasBit(cached_has_bits, 0x00000008U)) {
      total_size +=
          1 * ::google::protobuf::internal::FromIntSize(this_._internal_expected_type_urls().size());
      for (int i = 0, n = this_._internal_expected_type_urls().size(); i < n; ++i) {
        total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
            this_._internal_expected_type_urls().Get(i));
      }
    }
    // .substrait.extensions.AdvancedExtension advanced_extensions = 4;
    if (CheckHasBit(cached_has_bits, 0x00000010U)) {
      total_size += 1 +
                    ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.advanced_extensions_);
    }
    // .substrait.Version version = 6;
    if (CheckHasBit(cached_has_bits, 0x00000020U)) {
      total_size += 1 +
                    ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.version_);
    }
  }
  return this_.MaybeComputeUnknownFieldsSize(total_size,
                                             &this_._impl_._cached_size_);
}

void Plan::MergeImpl(::google::protobuf::MessageLite& to_msg,
                      const ::google::protobuf::MessageLite& from_msg) {
   auto* const _this = static_cast<Plan*>(&to_msg);
  auto& from = static_cast<const Plan&>(from_msg);
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    from.CheckHasBitConsistency();
  }
  ::google::protobuf::Arena* arena = _this->GetArena();
  // @@protoc_insertion_point(class_specific_merge_from_start:substrait.Plan)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void)cached_has_bits;

  cached_has_bits = from._impl_._has_bits_[0];
  if (BatchCheckHasBit(cached_has_bits, 0x0000003fU)) {
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      _this->_internal_mutable_extension_uris()->InternalMergeFromWithArena(
          ::google::protobuf::MessageLite::internal_visibility(), arena,
          from._internal_extension_uris());
    }
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      _this->_internal_mutable_extensions()->InternalMergeFromWithArena(
          ::google::protobuf::MessageLite::internal_visibility(), arena,
          from._internal_extensions());
    }
    if (CheckHasBit(cached_has_bits, 0x00000004U)) {
      _this->_internal_mutable_relations()->InternalMergeFromWithArena(
          ::google::protobuf::MessageLite::internal_visibility(), arena,
          from._internal_relations());
    }
    if (CheckHasBit(cached_has_bits, 0x00000008U)) {
      _this->_internal_mutable_expected_type_urls()->InternalMergeFromWithArena(
          ::google::protobuf::MessageLite::internal_visibility(), arena,
          from._internal_expected_type_urls());
    }
    if (CheckHasBit(cached_has_bits, 0x00000010U)) {
      ABSL_DCHECK(from._impl_.advanced_extensions_ != nullptr);
      if (_this->_impl_.advanced_extensions_ == nullptr) {
        _this->_impl_.advanced_extensions_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.advanced_extensions_);
      } else {
        _this->_impl_.advanced_extensions_->MergeFrom(*from._impl_.advanced_extensions_);
      }
    }
    if (CheckHasBit(cached_has_bits, 0x00000020U)) {
      ABSL_DCHECK(from._impl_.version_ != nullptr);
      if (_this->_impl_.version_ == nullptr) {
        _this->_impl_.version_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.version_);
      } else {
        _this->_impl_.version_->MergeFrom(*from._impl_.version_);
      }
    }
  }
  _this->_impl_._has_bits_[0] |= cached_has_bits;
  _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
      from._internal_metadata_);
}

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


void Plan::InternalSwap(Plan* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) {
  using ::std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  _impl_.extension_uris_.InternalSwap(&other->_impl_.extension_uris_);
  _impl_.extensions_.InternalSwap(&other->_impl_.extensions_);
  _impl_.relations_.InternalSwap(&other->_impl_.relations_);
  _impl_.expected_type_urls_.InternalSwap(&other->_impl_.expected_type_urls_);
  ::google::protobuf::internal::memswap<
      PROTOBUF_FIELD_OFFSET(Plan, _impl_.version_)
      + sizeof(Plan::_impl_.version_)
      - PROTOBUF_FIELD_OFFSET(Plan, _impl_.advanced_extensions_)>(
          reinterpret_cast<char*>(&_impl_.advanced_extensions_),
          reinterpret_cast<char*>(&other->_impl_.advanced_extensions_));
}

::google::protobuf::Metadata Plan::GetMetadata() const {
  return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full());
}
// ===================================================================

PlanVersion::PlanVersion(::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::Message(arena, PlanVersion_get_class_data()) {
#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::Message(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:substrait.PlanVersion)
}
PROTOBUF_NDEBUG_INLINE PlanVersion::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from,
    [[maybe_unused]] const ::substrait::PlanVersion& from_msg)
      : _has_bits_{from._has_bits_},
        _cached_size_{0} {}

PlanVersion::PlanVersion(
    ::google::protobuf::Arena* PROTOBUF_NULLABLE arena,
    const PlanVersion& from)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::Message(arena, PlanVersion_get_class_data()) {

#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::Message(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  PlanVersion* const _this = this;
  (void)_this;
  _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
      from._internal_metadata_);
  new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from);
  ::uint32_t cached_has_bits = _impl_._has_bits_[0];
  _impl_.version_ = (CheckHasBit(cached_has_bits, 0x00000001U))
                ? ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.version_)
                : nullptr;

  // @@protoc_insertion_point(copy_constructor:substrait.PlanVersion)
}
PROTOBUF_NDEBUG_INLINE PlanVersion::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
      : _cached_size_{0} {}

inline void PlanVersion::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) {
  new (&_impl_) Impl_(internal_visibility(), arena);
  _impl_.version_ = {};
}
PlanVersion::~PlanVersion() {
  // @@protoc_insertion_point(destructor:substrait.PlanVersion)
  SharedDtor(*this);
}
inline void PlanVersion::SharedDtor(MessageLite& self) {
  PlanVersion& this_ = static_cast<PlanVersion&>(self);
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    this_.CheckHasBitConsistency();
  }
  this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
  ABSL_DCHECK(this_.GetArena() == nullptr);
  delete this_._impl_.version_;
  this_._impl_.~Impl_();
}

#ifndef PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const
    ::google::protobuf::internal::ClassDataFull PlanVersion_class_data_ =
        PlanVersion::InternalGenerateClassData_(PlanVersion_globals_._default);

PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
PlanVersion::GetClassData() const {
  ::google::protobuf::internal::PrefetchToLocalCache(&PlanVersion_class_data_);
  ::google::protobuf::internal::PrefetchToLocalCache(PlanVersion_class_data_.tc_table);
  return PlanVersion_class_data_.base();
}
#else
PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
PlanVersion::GetClassData() const {
  ::google::protobuf::internal::PrefetchToLocalCache(&PlanVersion_globals_);
  ::google::protobuf::internal::PrefetchToLocalCache(
      ::google::protobuf::internal::MessageGlobalsBase::ToParseTableBase(&PlanVersion_globals_));
  return PlanVersion_globals_.GetClassData();
}
#endif  // !PROTOBUF_MESSAGE_GLOBALS
#ifndef PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const PlanVersion::ParseTableT_
    PlanVersion::_table_ =
        PlanVersion::InternalGenerateParseTable_(PlanVersion_class_data_.base());
#endif  // !PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_NOINLINE void PlanVersion::Clear() {
// @@protoc_insertion_point(message_clear_start:substrait.PlanVersion)
  ::google::protobuf::internal::TSanWrite(&_impl_);
  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  if (CheckHasBit(cached_has_bits, 0x00000001U)) {
    ABSL_DCHECK(_impl_.version_ != nullptr);
    _impl_.version_->Clear();
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
}

#if defined(PROTOBUF_CUSTOM_VTABLE)
::uint8_t* PROTOBUF_NONNULL PlanVersion::_InternalSerialize(
    const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target,
    ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) {
  const PlanVersion& this_ = static_cast<const PlanVersion&>(base);
#else   // PROTOBUF_CUSTOM_VTABLE
::uint8_t* PROTOBUF_NONNULL PlanVersion::_InternalSerialize(
    ::uint8_t* PROTOBUF_NONNULL target,
    ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const {
  const PlanVersion& this_ = *this;
#endif  // PROTOBUF_CUSTOM_VTABLE
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    this_.CheckHasBitConsistency();
  }
  // @@protoc_insertion_point(serialize_to_array_start:substrait.PlanVersion)
  ::uint32_t cached_has_bits = 0;
  (void)cached_has_bits;

  cached_has_bits = this_._impl_._has_bits_[0];
  // .substrait.Version version = 6;
  if (CheckHasBit(cached_has_bits, 0x00000001U)) {
    target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
        6, *this_._impl_.version_, this_._impl_.version_->GetCachedSize(), target,
        stream);
  }

  if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
    target =
        ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
            this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:substrait.PlanVersion)
  return target;
}

#if defined(PROTOBUF_CUSTOM_VTABLE)
::size_t PlanVersion::ByteSizeLong(const MessageLite& base) {
  const PlanVersion& this_ = static_cast<const PlanVersion&>(base);
#else   // PROTOBUF_CUSTOM_VTABLE
::size_t PlanVersion::ByteSizeLong() const {
  const PlanVersion& this_ = *this;
#endif  // PROTOBUF_CUSTOM_VTABLE
  // @@protoc_insertion_point(message_byte_size_start:substrait.PlanVersion)
  ::size_t total_size = 0;

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

   {
    // .substrait.Version version = 6;
    cached_has_bits = this_._impl_._has_bits_[0];
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      total_size += 1 +
                    ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.version_);
    }
  }
  return this_.MaybeComputeUnknownFieldsSize(total_size,
                                             &this_._impl_._cached_size_);
}

void PlanVersion::MergeImpl(::google::protobuf::MessageLite& to_msg,
                      const ::google::protobuf::MessageLite& from_msg) {
   auto* const _this = static_cast<PlanVersion*>(&to_msg);
  auto& from = static_cast<const PlanVersion&>(from_msg);
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    from.CheckHasBitConsistency();
  }
  ::google::protobuf::Arena* arena = _this->GetArena();
  // @@protoc_insertion_point(class_specific_merge_from_start:substrait.PlanVersion)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void)cached_has_bits;

  cached_has_bits = from._impl_._has_bits_[0];
  if (CheckHasBit(cached_has_bits, 0x00000001U)) {
    ABSL_DCHECK(from._impl_.version_ != nullptr);
    if (_this->_impl_.version_ == nullptr) {
      _this->_impl_.version_ = ::google::protobuf::Message::CopyConstruct(arena, *from._impl_.version_);
    } else {
      _this->_impl_.version_->MergeFrom(*from._impl_.version_);
    }
  }
  _this->_impl_._has_bits_[0] |= cached_has_bits;
  _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
      from._internal_metadata_);
}

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


void PlanVersion::InternalSwap(PlanVersion* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) {
  using ::std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  swap(_impl_.version_, other->_impl_.version_);
}

::google::protobuf::Metadata PlanVersion::GetMetadata() const {
  return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full());
}
// ===================================================================

Version::Version(::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::Message(arena, Version_get_class_data()) {
#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::Message(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  SharedCtor(arena);
  // @@protoc_insertion_point(arena_constructor:substrait.Version)
}
PROTOBUF_NDEBUG_INLINE Version::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from,
    [[maybe_unused]] const ::substrait::Version& from_msg)
      : _has_bits_{from._has_bits_},
        _cached_size_{0},
        git_hash_(arena, from.git_hash_),
        producer_(arena, from.producer_) {}

Version::Version(
    ::google::protobuf::Arena* PROTOBUF_NULLABLE arena,
    const Version& from)
#if defined(PROTOBUF_CUSTOM_VTABLE)
    : ::google::protobuf::Message(arena, Version_get_class_data()) {

#else   // PROTOBUF_CUSTOM_VTABLE
    : ::google::protobuf::Message(arena) {
#endif  // PROTOBUF_CUSTOM_VTABLE
  Version* const _this = this;
  (void)_this;
  _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
      from._internal_metadata_);
  new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from);
  ::memcpy(reinterpret_cast<char*>(&_impl_) +
               offsetof(Impl_, major_number_),
           reinterpret_cast<const char*>(&from._impl_) +
               offsetof(Impl_, major_number_),
           offsetof(Impl_, patch_number_) -
               offsetof(Impl_, major_number_) +
               sizeof(Impl_::patch_number_));

  // @@protoc_insertion_point(copy_constructor:substrait.Version)
}
PROTOBUF_NDEBUG_INLINE Version::Impl_::Impl_(
    [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
    [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
      : _cached_size_{0},
        git_hash_(arena),
        producer_(arena) {}

inline void Version::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) {
  new (&_impl_) Impl_(internal_visibility(), arena);
  ::memset(reinterpret_cast<char*>(&_impl_) +
               offsetof(Impl_, major_number_),
           0,
           offsetof(Impl_, patch_number_) -
               offsetof(Impl_, major_number_) +
               sizeof(Impl_::patch_number_));
}
Version::~Version() {
  // @@protoc_insertion_point(destructor:substrait.Version)
  SharedDtor(*this);
}
inline void Version::SharedDtor(MessageLite& self) {
  Version& this_ = static_cast<Version&>(self);
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    this_.CheckHasBitConsistency();
  }
  this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
  ABSL_DCHECK(this_.GetArena() == nullptr);
  this_._impl_.git_hash_.Destroy();
  this_._impl_.producer_.Destroy();
  this_._impl_.~Impl_();
}

#ifndef PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const
    ::google::protobuf::internal::ClassDataFull Version_class_data_ =
        Version::InternalGenerateClassData_(Version_globals_._default);

PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
Version::GetClassData() const {
  ::google::protobuf::internal::PrefetchToLocalCache(&Version_class_data_);
  ::google::protobuf::internal::PrefetchToLocalCache(Version_class_data_.tc_table);
  return Version_class_data_.base();
}
#else
PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
Version::GetClassData() const {
  ::google::protobuf::internal::PrefetchToLocalCache(&Version_globals_);
  ::google::protobuf::internal::PrefetchToLocalCache(
      ::google::protobuf::internal::MessageGlobalsBase::ToParseTableBase(&Version_globals_));
  return Version_globals_.GetClassData();
}
#endif  // !PROTOBUF_MESSAGE_GLOBALS
#ifndef PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const Version::ParseTableT_
    Version::_table_ =
        Version::InternalGenerateParseTable_(Version_class_data_.base());
#endif  // !PROTOBUF_MESSAGE_GLOBALS
PROTOBUF_NOINLINE void Version::Clear() {
// @@protoc_insertion_point(message_clear_start:substrait.Version)
  ::google::protobuf::internal::TSanWrite(&_impl_);
  ::uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) {
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      _impl_.git_hash_.ClearNonDefaultToEmpty();
    }
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      _impl_.producer_.ClearNonDefaultToEmpty();
    }
  }
  if (BatchCheckHasBit(cached_has_bits, 0x0000001cU)) {
    ::memset(&_impl_.major_number_, 0, static_cast<::size_t>(
        reinterpret_cast<char*>(&_impl_.patch_number_) -
        reinterpret_cast<char*>(&_impl_.major_number_)) + sizeof(_impl_.patch_number_));
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
}

#if defined(PROTOBUF_CUSTOM_VTABLE)
::uint8_t* PROTOBUF_NONNULL Version::_InternalSerialize(
    const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target,
    ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) {
  const Version& this_ = static_cast<const Version&>(base);
#else   // PROTOBUF_CUSTOM_VTABLE
::uint8_t* PROTOBUF_NONNULL Version::_InternalSerialize(
    ::uint8_t* PROTOBUF_NONNULL target,
    ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const {
  const Version& this_ = *this;
#endif  // PROTOBUF_CUSTOM_VTABLE
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    this_.CheckHasBitConsistency();
  }
  // @@protoc_insertion_point(serialize_to_array_start:substrait.Version)
  ::uint32_t cached_has_bits = 0;
  (void)cached_has_bits;

  cached_has_bits = this_._impl_._has_bits_[0];
  // uint32 major_number = 1;
  if (CheckHasBit(cached_has_bits, 0x00000004U)) {
    if (this_._internal_major_number() != 0) {
      target = stream->EnsureSpace(target);
      target = ::_pbi::WireFormatLite::WriteUInt32ToArray(
          1, this_._internal_major_number(), target);
    }
  }

  // uint32 minor_number = 2;
  if (CheckHasBit(cached_has_bits, 0x00000008U)) {
    if (this_._internal_minor_number() != 0) {
      target = stream->EnsureSpace(target);
      target = ::_pbi::WireFormatLite::WriteUInt32ToArray(
          2, this_._internal_minor_number(), target);
    }
  }

  // uint32 patch_number = 3;
  if (CheckHasBit(cached_has_bits, 0x00000010U)) {
    if (this_._internal_patch_number() != 0) {
      target = stream->EnsureSpace(target);
      target = ::_pbi::WireFormatLite::WriteUInt32ToArray(
          3, this_._internal_patch_number(), target);
    }
  }

  // string git_hash = 4;
  if (CheckHasBit(cached_has_bits, 0x00000001U)) {
    if (!this_._internal_git_hash().empty()) {
      const ::std::string& _s = this_._internal_git_hash();
      ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
          _s.data(), static_cast<int>(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "substrait.Version.git_hash");
      target = stream->WriteStringMaybeAliased(4, _s, target);
    }
  }

  // string producer = 5;
  if (CheckHasBit(cached_has_bits, 0x00000002U)) {
    if (!this_._internal_producer().empty()) {
      const ::std::string& _s = this_._internal_producer();
      ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
          _s.data(), static_cast<int>(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "substrait.Version.producer");
      target = stream->WriteStringMaybeAliased(5, _s, target);
    }
  }

  if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
    target =
        ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
            this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:substrait.Version)
  return target;
}

#if defined(PROTOBUF_CUSTOM_VTABLE)
::size_t Version::ByteSizeLong(const MessageLite& base) {
  const Version& this_ = static_cast<const Version&>(base);
#else   // PROTOBUF_CUSTOM_VTABLE
::size_t Version::ByteSizeLong() const {
  const Version& this_ = *this;
#endif  // PROTOBUF_CUSTOM_VTABLE
  // @@protoc_insertion_point(message_byte_size_start:substrait.Version)
  ::size_t total_size = 0;

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

  ::_pbi::Prefetch5LinesFrom7Lines(&this_);
  cached_has_bits = this_._impl_._has_bits_[0];
  if (BatchCheckHasBit(cached_has_bits, 0x0000001fU)) {
    // string git_hash = 4;
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      if (!this_._internal_git_hash().empty()) {
        total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
                                        this_._internal_git_hash());
      }
    }
    // string producer = 5;
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      if (!this_._internal_producer().empty()) {
        total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
                                        this_._internal_producer());
      }
    }
    // uint32 major_number = 1;
    if (CheckHasBit(cached_has_bits, 0x00000004U)) {
      if (this_._internal_major_number() != 0) {
        total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(
            this_._internal_major_number());
      }
    }
    // uint32 minor_number = 2;
    if (CheckHasBit(cached_has_bits, 0x00000008U)) {
      if (this_._internal_minor_number() != 0) {
        total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(
            this_._internal_minor_number());
      }
    }
    // uint32 patch_number = 3;
    if (CheckHasBit(cached_has_bits, 0x00000010U)) {
      if (this_._internal_patch_number() != 0) {
        total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(
            this_._internal_patch_number());
      }
    }
  }
  return this_.MaybeComputeUnknownFieldsSize(total_size,
                                             &this_._impl_._cached_size_);
}

void Version::MergeImpl(::google::protobuf::MessageLite& to_msg,
                      const ::google::protobuf::MessageLite& from_msg) {
   auto* const _this = static_cast<Version*>(&to_msg);
  auto& from = static_cast<const Version&>(from_msg);
  if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
    from.CheckHasBitConsistency();
  }
  // @@protoc_insertion_point(class_specific_merge_from_start:substrait.Version)
  ABSL_DCHECK_NE(&from, _this);
  ::uint32_t cached_has_bits = 0;
  (void)cached_has_bits;

  cached_has_bits = from._impl_._has_bits_[0];
  if (BatchCheckHasBit(cached_has_bits, 0x0000001fU)) {
    if (CheckHasBit(cached_has_bits, 0x00000001U)) {
      if (!from._internal_git_hash().empty()) {
        _this->_internal_set_git_hash(from._internal_git_hash());
      } else {
        if (_this->_impl_.git_hash_.IsDefault()) {
          _this->_internal_set_git_hash("");
        }
      }
    }
    if (CheckHasBit(cached_has_bits, 0x00000002U)) {
      if (!from._internal_producer().empty()) {
        _this->_internal_set_producer(from._internal_producer());
      } else {
        if (_this->_impl_.producer_.IsDefault()) {
          _this->_internal_set_producer("");
        }
      }
    }
    if (CheckHasBit(cached_has_bits, 0x00000004U)) {
      if (from._internal_major_number() != 0) {
        _this->_impl_.major_number_ = from._impl_.major_number_;
      }
    }
    if (CheckHasBit(cached_has_bits, 0x00000008U)) {
      if (from._internal_minor_number() != 0) {
        _this->_impl_.minor_number_ = from._impl_.minor_number_;
      }
    }
    if (CheckHasBit(cached_has_bits, 0x00000010U)) {
      if (from._internal_patch_number() != 0) {
        _this->_impl_.patch_number_ = from._impl_.patch_number_;
      }
    }
  }
  _this->_impl_._has_bits_[0] |= cached_has_bits;
  _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
      from._internal_metadata_);
}

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


void Version::InternalSwap(Version* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) {
  using ::std::swap;
  auto* arena = GetArena();
  ABSL_DCHECK_EQ(arena, other->GetArena());
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.git_hash_, &other->_impl_.git_hash_, arena);
  ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.producer_, &other->_impl_.producer_, arena);
  ::google::protobuf::internal::memswap<
      PROTOBUF_FIELD_OFFSET(Version, _impl_.patch_number_)
      + sizeof(Version::_impl_.patch_number_)
      - PROTOBUF_FIELD_OFFSET(Version, _impl_.major_number_)>(
          reinterpret_cast<char*>(&_impl_.major_number_),
          reinterpret_cast<char*>(&other->_impl_.major_number_));
}

::google::protobuf::Metadata Version::GetMetadata() const {
  return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full());
}
// @@protoc_insertion_point(namespace_scope)
}  // namespace substrait
namespace google {
namespace protobuf {
}  // namespace protobuf
}  // namespace google
// @@protoc_insertion_point(global_scope)
PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::std::false_type
    _static_init2_ [[maybe_unused]] =
        (::_pbi::AddDescriptors(&descriptor_table_substrait_2fplan_2eproto),
         ::std::false_type{});
#include "google/protobuf/port_undef.inc"
