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

#include "BitData.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 exec {
namespace bit {
namespace data {
constexpr BitClientHandshake::BitClientHandshake(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : rpc_version_(0)
  , channel_(1)
{}
struct BitClientHandshakeDefaultTypeInternal {
  constexpr BitClientHandshakeDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~BitClientHandshakeDefaultTypeInternal() {}
  union {
    BitClientHandshake _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT BitClientHandshakeDefaultTypeInternal _BitClientHandshake_default_instance_;
constexpr BitServerHandshake::BitServerHandshake(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : authenticationmechanisms_()
  , rpc_version_(0){}
struct BitServerHandshakeDefaultTypeInternal {
  constexpr BitServerHandshakeDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~BitServerHandshakeDefaultTypeInternal() {}
  union {
    BitServerHandshake _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT BitServerHandshakeDefaultTypeInternal _BitServerHandshake_default_instance_;
constexpr FragmentRecordBatch::FragmentRecordBatch(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : receiving_minor_fragment_id_()
  , query_id_(nullptr)
  , def_(nullptr)
  , receiving_major_fragment_id_(0)
  , sending_major_fragment_id_(0)
  , sending_minor_fragment_id_(0)
  , islastbatch_(false){}
struct FragmentRecordBatchDefaultTypeInternal {
  constexpr FragmentRecordBatchDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~FragmentRecordBatchDefaultTypeInternal() {}
  union {
    FragmentRecordBatch _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT FragmentRecordBatchDefaultTypeInternal _FragmentRecordBatch_default_instance_;
constexpr RuntimeFilterBDef::RuntimeFilterBDef(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : bloom_filter_size_in_bytes_()
  , probe_fields_()
  , query_id_(nullptr)
  , major_fragment_id_(0)
  , minor_fragment_id_(0)
  , to_foreman_(false)
  , hj_op_id_(0)
  , rf_identifier_(PROTOBUF_LONGLONG(0)){}
struct RuntimeFilterBDefDefaultTypeInternal {
  constexpr RuntimeFilterBDefDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~RuntimeFilterBDefDefaultTypeInternal() {}
  union {
    RuntimeFilterBDef _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT RuntimeFilterBDefDefaultTypeInternal _RuntimeFilterBDef_default_instance_;
constexpr AckWithCredit::AckWithCredit(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : allowed_credit_(0){}
struct AckWithCreditDefaultTypeInternal {
  constexpr AckWithCreditDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~AckWithCreditDefaultTypeInternal() {}
  union {
    AckWithCredit _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT AckWithCreditDefaultTypeInternal _AckWithCredit_default_instance_;
}  // namespace data
}  // namespace bit
}  // namespace exec
static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_BitData_2eproto[5];
static const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* file_level_enum_descriptors_BitData_2eproto[1];
static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_BitData_2eproto = nullptr;

const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_BitData_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  PROTOBUF_FIELD_OFFSET(::exec::bit::data::BitClientHandshake, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::exec::bit::data::BitClientHandshake, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  PROTOBUF_FIELD_OFFSET(::exec::bit::data::BitClientHandshake, rpc_version_),
  PROTOBUF_FIELD_OFFSET(::exec::bit::data::BitClientHandshake, channel_),
  0,
  1,
  PROTOBUF_FIELD_OFFSET(::exec::bit::data::BitServerHandshake, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::exec::bit::data::BitServerHandshake, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  PROTOBUF_FIELD_OFFSET(::exec::bit::data::BitServerHandshake, rpc_version_),
  PROTOBUF_FIELD_OFFSET(::exec::bit::data::BitServerHandshake, authenticationmechanisms_),
  0,
  ~0u,
  PROTOBUF_FIELD_OFFSET(::exec::bit::data::FragmentRecordBatch, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::exec::bit::data::FragmentRecordBatch, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  PROTOBUF_FIELD_OFFSET(::exec::bit::data::FragmentRecordBatch, query_id_),
  PROTOBUF_FIELD_OFFSET(::exec::bit::data::FragmentRecordBatch, receiving_major_fragment_id_),
  PROTOBUF_FIELD_OFFSET(::exec::bit::data::FragmentRecordBatch, receiving_minor_fragment_id_),
  PROTOBUF_FIELD_OFFSET(::exec::bit::data::FragmentRecordBatch, sending_major_fragment_id_),
  PROTOBUF_FIELD_OFFSET(::exec::bit::data::FragmentRecordBatch, sending_minor_fragment_id_),
  PROTOBUF_FIELD_OFFSET(::exec::bit::data::FragmentRecordBatch, def_),
  PROTOBUF_FIELD_OFFSET(::exec::bit::data::FragmentRecordBatch, islastbatch_),
  0,
  2,
  ~0u,
  3,
  4,
  1,
  5,
  PROTOBUF_FIELD_OFFSET(::exec::bit::data::RuntimeFilterBDef, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::exec::bit::data::RuntimeFilterBDef, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  PROTOBUF_FIELD_OFFSET(::exec::bit::data::RuntimeFilterBDef, query_id_),
  PROTOBUF_FIELD_OFFSET(::exec::bit::data::RuntimeFilterBDef, major_fragment_id_),
  PROTOBUF_FIELD_OFFSET(::exec::bit::data::RuntimeFilterBDef, minor_fragment_id_),
  PROTOBUF_FIELD_OFFSET(::exec::bit::data::RuntimeFilterBDef, to_foreman_),
  PROTOBUF_FIELD_OFFSET(::exec::bit::data::RuntimeFilterBDef, bloom_filter_size_in_bytes_),
  PROTOBUF_FIELD_OFFSET(::exec::bit::data::RuntimeFilterBDef, probe_fields_),
  PROTOBUF_FIELD_OFFSET(::exec::bit::data::RuntimeFilterBDef, hj_op_id_),
  PROTOBUF_FIELD_OFFSET(::exec::bit::data::RuntimeFilterBDef, rf_identifier_),
  0,
  1,
  2,
  3,
  ~0u,
  ~0u,
  4,
  5,
  PROTOBUF_FIELD_OFFSET(::exec::bit::data::AckWithCredit, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::exec::bit::data::AckWithCredit, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  PROTOBUF_FIELD_OFFSET(::exec::bit::data::AckWithCredit, allowed_credit_),
  0,
};
static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  { 0, 7, sizeof(::exec::bit::data::BitClientHandshake)},
  { 9, 16, sizeof(::exec::bit::data::BitServerHandshake)},
  { 18, 30, sizeof(::exec::bit::data::FragmentRecordBatch)},
  { 37, 50, sizeof(::exec::bit::data::RuntimeFilterBDef)},
  { 58, 64, sizeof(::exec::bit::data::AckWithCredit)},
};

static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::exec::bit::data::_BitClientHandshake_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::exec::bit::data::_BitServerHandshake_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::exec::bit::data::_FragmentRecordBatch_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::exec::bit::data::_RuntimeFilterBDef_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::exec::bit::data::_AckWithCredit_default_instance_),
};

const char descriptor_table_protodef_BitData_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
  "\n\rBitData.proto\022\rexec.bit.data\032\025Executio"
  "nProtos.proto\032\022Coordination.proto\032\023UserB"
  "itShared.proto\"]\n\022BitClientHandshake\022\023\n\013"
  "rpc_version\030\001 \001(\005\0222\n\007channel\030\002 \001(\0162\027.exe"
  "c.shared.RpcChannel:\010BIT_DATA\"K\n\022BitServ"
  "erHandshake\022\023\n\013rpc_version\030\001 \001(\005\022 \n\030auth"
  "enticationMechanisms\030\002 \003(\t\"\214\002\n\023FragmentR"
  "ecordBatch\022&\n\010query_id\030\001 \001(\0132\024.exec.shar"
  "ed.QueryId\022#\n\033receiving_major_fragment_i"
  "d\030\002 \001(\005\022#\n\033receiving_minor_fragment_id\030\003"
  " \003(\005\022!\n\031sending_major_fragment_id\030\004 \001(\005\022"
  "!\n\031sending_minor_fragment_id\030\005 \001(\005\022(\n\003de"
  "f\030\006 \001(\0132\033.exec.shared.RecordBatchDef\022\023\n\013"
  "isLastBatch\030\007 \001(\010\"\350\001\n\021RuntimeFilterBDef\022"
  "&\n\010query_id\030\001 \001(\0132\024.exec.shared.QueryId\022"
  "\031\n\021major_fragment_id\030\002 \001(\005\022\031\n\021minor_frag"
  "ment_id\030\003 \001(\005\022\022\n\nto_foreman\030\004 \001(\010\022\"\n\032blo"
  "om_filter_size_in_bytes\030\005 \003(\005\022\024\n\014probe_f"
  "ields\030\006 \003(\t\022\020\n\010hj_op_id\030\007 \001(\005\022\025\n\rrf_iden"
  "tifier\030\010 \001(\003\"\'\n\rAckWithCredit\022\026\n\016allowed"
  "_credit\030\001 \001(\005*\210\001\n\007RpcType\022\r\n\tHANDSHAKE\020\000"
  "\022\007\n\003ACK\020\001\022\013\n\007GOODBYE\020\002\022\024\n\020REQ_RECORD_BAT"
  "CH\020\003\022\020\n\014SASL_MESSAGE\020\004\022\026\n\022REQ_RUNTIME_FI"
  "LTER\020\005\022\030\n\024DATA_ACK_WITH_CREDIT\020\006B(\n\033org."
  "apache.drill.exec.protoB\007BitDataH\001"
  ;
static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_BitData_2eproto_deps[3] = {
  &::descriptor_table_Coordination_2eproto,
  &::descriptor_table_ExecutionProtos_2eproto,
  &::descriptor_table_UserBitShared_2eproto,
};
static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_BitData_2eproto_once;
const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_BitData_2eproto = {
  false, false, 994, descriptor_table_protodef_BitData_2eproto, "BitData.proto", 
  &descriptor_table_BitData_2eproto_once, descriptor_table_BitData_2eproto_deps, 3, 5,
  schemas, file_default_instances, TableStruct_BitData_2eproto::offsets,
  file_level_metadata_BitData_2eproto, file_level_enum_descriptors_BitData_2eproto, file_level_service_descriptors_BitData_2eproto,
};
PROTOBUF_ATTRIBUTE_WEAK const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable* descriptor_table_BitData_2eproto_getter() {
  return &descriptor_table_BitData_2eproto;
}

// Force running AddDescriptors() at dynamic initialization time.
PROTOBUF_ATTRIBUTE_INIT_PRIORITY static ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptorsRunner dynamic_init_dummy_BitData_2eproto(&descriptor_table_BitData_2eproto);
namespace exec {
namespace bit {
namespace data {
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* RpcType_descriptor() {
  ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_BitData_2eproto);
  return file_level_enum_descriptors_BitData_2eproto[0];
}
bool RpcType_IsValid(int value) {
  switch (value) {
    case 0:
    case 1:
    case 2:
    case 3:
    case 4:
    case 5:
    case 6:
      return true;
    default:
      return false;
  }
}


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

class BitClientHandshake::_Internal {
 public:
  using HasBits = decltype(std::declval<BitClientHandshake>()._has_bits_);
  static void set_has_rpc_version(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static void set_has_channel(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
};

BitClientHandshake::BitClientHandshake(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena) {
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:exec.bit.data.BitClientHandshake)
}
BitClientHandshake::BitClientHandshake(const BitClientHandshake& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::memcpy(&rpc_version_, &from.rpc_version_,
    static_cast<size_t>(reinterpret_cast<char*>(&channel_) -
    reinterpret_cast<char*>(&rpc_version_)) + sizeof(channel_));
  // @@protoc_insertion_point(copy_constructor:exec.bit.data.BitClientHandshake)
}

void BitClientHandshake::SharedCtor() {
rpc_version_ = 0;
channel_ = 1;
}

BitClientHandshake::~BitClientHandshake() {
  // @@protoc_insertion_point(destructor:exec.bit.data.BitClientHandshake)
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

void BitClientHandshake::SharedDtor() {
  GOOGLE_DCHECK(GetArena() == nullptr);
}

void BitClientHandshake::ArenaDtor(void* object) {
  BitClientHandshake* _this = reinterpret_cast< BitClientHandshake* >(object);
  (void)_this;
}
void BitClientHandshake::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void BitClientHandshake::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

void BitClientHandshake::Clear() {
// @@protoc_insertion_point(message_clear_start:exec.bit.data.BitClientHandshake)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    rpc_version_ = 0;
    channel_ = 1;
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* BitClientHandshake::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    ::PROTOBUF_NAMESPACE_ID::uint32 tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional int32 rpc_version = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) {
          _Internal::set_has_rpc_version(&has_bits);
          rpc_version_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // optional .exec.shared.RpcChannel channel = 2 [default = BIT_DATA];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) {
          ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
          if (PROTOBUF_PREDICT_TRUE(::exec::shared::RpcChannel_IsValid(val))) {
            _internal_set_channel(static_cast<::exec::shared::RpcChannel>(val));
          } else {
            ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(2, val, mutable_unknown_fields());
          }
        } else goto handle_unusual;
        continue;
      default: {
      handle_unusual:
        if ((tag == 0) || ((tag & 7) == 4)) {
          CHK_(ptr);
          ctx->SetLastTag(tag);
          goto success;
        }
        ptr = UnknownFieldParse(tag,
            _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
            ptr, ctx);
        CHK_(ptr != nullptr);
        continue;
      }
    }  // switch
  }  // while
success:
  _has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto success;
#undef CHK_
}

::PROTOBUF_NAMESPACE_ID::uint8* BitClientHandshake::_InternalSerialize(
    ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:exec.bit.data.BitClientHandshake)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional int32 rpc_version = 1;
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_rpc_version(), target);
  }

  // optional .exec.shared.RpcChannel channel = 2 [default = BIT_DATA];
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
      2, this->_internal_channel(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:exec.bit.data.BitClientHandshake)
  return target;
}

size_t BitClientHandshake::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:exec.bit.data.BitClientHandshake)
  size_t total_size = 0;

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

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    // optional int32 rpc_version = 1;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
          this->_internal_rpc_version());
    }

    // optional .exec.shared.RpcChannel channel = 2 [default = BIT_DATA];
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_channel());
    }

  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
        _internal_metadata_, total_size, &_cached_size_);
  }
  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void BitClientHandshake::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:exec.bit.data.BitClientHandshake)
  GOOGLE_DCHECK_NE(&from, this);
  const BitClientHandshake* source =
      ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<BitClientHandshake>(
          &from);
  if (source == nullptr) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:exec.bit.data.BitClientHandshake)
    ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:exec.bit.data.BitClientHandshake)
    MergeFrom(*source);
  }
}

void BitClientHandshake::MergeFrom(const BitClientHandshake& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:exec.bit.data.BitClientHandshake)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    if (cached_has_bits & 0x00000001u) {
      rpc_version_ = from.rpc_version_;
    }
    if (cached_has_bits & 0x00000002u) {
      channel_ = from.channel_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
}

void BitClientHandshake::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:exec.bit.data.BitClientHandshake)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void BitClientHandshake::CopyFrom(const BitClientHandshake& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:exec.bit.data.BitClientHandshake)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void BitClientHandshake::InternalSwap(BitClientHandshake* other) {
  using std::swap;
  _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  swap(rpc_version_, other->rpc_version_);
  swap(channel_, other->channel_);
}

::PROTOBUF_NAMESPACE_ID::Metadata BitClientHandshake::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_BitData_2eproto_getter, &descriptor_table_BitData_2eproto_once,
      file_level_metadata_BitData_2eproto[0]);
}

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

class BitServerHandshake::_Internal {
 public:
  using HasBits = decltype(std::declval<BitServerHandshake>()._has_bits_);
  static void set_has_rpc_version(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
};

BitServerHandshake::BitServerHandshake(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena),
  authenticationmechanisms_(arena) {
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:exec.bit.data.BitServerHandshake)
}
BitServerHandshake::BitServerHandshake(const BitServerHandshake& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_),
      authenticationmechanisms_(from.authenticationmechanisms_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  rpc_version_ = from.rpc_version_;
  // @@protoc_insertion_point(copy_constructor:exec.bit.data.BitServerHandshake)
}

void BitServerHandshake::SharedCtor() {
rpc_version_ = 0;
}

BitServerHandshake::~BitServerHandshake() {
  // @@protoc_insertion_point(destructor:exec.bit.data.BitServerHandshake)
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

void BitServerHandshake::SharedDtor() {
  GOOGLE_DCHECK(GetArena() == nullptr);
}

void BitServerHandshake::ArenaDtor(void* object) {
  BitServerHandshake* _this = reinterpret_cast< BitServerHandshake* >(object);
  (void)_this;
}
void BitServerHandshake::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void BitServerHandshake::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

void BitServerHandshake::Clear() {
// @@protoc_insertion_point(message_clear_start:exec.bit.data.BitServerHandshake)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  authenticationmechanisms_.Clear();
  rpc_version_ = 0;
  _has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* BitServerHandshake::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    ::PROTOBUF_NAMESPACE_ID::uint32 tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional int32 rpc_version = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) {
          _Internal::set_has_rpc_version(&has_bits);
          rpc_version_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // repeated string authenticationMechanisms = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
          ptr -= 1;
          do {
            ptr += 1;
            auto str = _internal_add_authenticationmechanisms();
            ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
            #ifndef NDEBUG
            ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "exec.bit.data.BitServerHandshake.authenticationMechanisms");
            #endif  // !NDEBUG
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr));
        } else goto handle_unusual;
        continue;
      default: {
      handle_unusual:
        if ((tag == 0) || ((tag & 7) == 4)) {
          CHK_(ptr);
          ctx->SetLastTag(tag);
          goto success;
        }
        ptr = UnknownFieldParse(tag,
            _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
            ptr, ctx);
        CHK_(ptr != nullptr);
        continue;
      }
    }  // switch
  }  // while
success:
  _has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto success;
#undef CHK_
}

::PROTOBUF_NAMESPACE_ID::uint8* BitServerHandshake::_InternalSerialize(
    ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:exec.bit.data.BitServerHandshake)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional int32 rpc_version = 1;
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_rpc_version(), target);
  }

  // repeated string authenticationMechanisms = 2;
  for (int i = 0, n = this->_internal_authenticationmechanisms_size(); i < n; i++) {
    const auto& s = this->_internal_authenticationmechanisms(i);
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
      s.data(), static_cast<int>(s.length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
      "exec.bit.data.BitServerHandshake.authenticationMechanisms");
    target = stream->WriteString(2, s, target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:exec.bit.data.BitServerHandshake)
  return target;
}

size_t BitServerHandshake::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:exec.bit.data.BitServerHandshake)
  size_t total_size = 0;

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

  // repeated string authenticationMechanisms = 2;
  total_size += 1 *
      ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(authenticationmechanisms_.size());
  for (int i = 0, n = authenticationmechanisms_.size(); i < n; i++) {
    total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
      authenticationmechanisms_.Get(i));
  }

  // optional int32 rpc_version = 1;
  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
        this->_internal_rpc_version());
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
        _internal_metadata_, total_size, &_cached_size_);
  }
  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void BitServerHandshake::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:exec.bit.data.BitServerHandshake)
  GOOGLE_DCHECK_NE(&from, this);
  const BitServerHandshake* source =
      ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<BitServerHandshake>(
          &from);
  if (source == nullptr) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:exec.bit.data.BitServerHandshake)
    ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:exec.bit.data.BitServerHandshake)
    MergeFrom(*source);
  }
}

void BitServerHandshake::MergeFrom(const BitServerHandshake& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:exec.bit.data.BitServerHandshake)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  authenticationmechanisms_.MergeFrom(from.authenticationmechanisms_);
  if (from._internal_has_rpc_version()) {
    _internal_set_rpc_version(from._internal_rpc_version());
  }
}

void BitServerHandshake::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:exec.bit.data.BitServerHandshake)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void BitServerHandshake::CopyFrom(const BitServerHandshake& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:exec.bit.data.BitServerHandshake)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void BitServerHandshake::InternalSwap(BitServerHandshake* other) {
  using std::swap;
  _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  authenticationmechanisms_.InternalSwap(&other->authenticationmechanisms_);
  swap(rpc_version_, other->rpc_version_);
}

::PROTOBUF_NAMESPACE_ID::Metadata BitServerHandshake::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_BitData_2eproto_getter, &descriptor_table_BitData_2eproto_once,
      file_level_metadata_BitData_2eproto[1]);
}

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

class FragmentRecordBatch::_Internal {
 public:
  using HasBits = decltype(std::declval<FragmentRecordBatch>()._has_bits_);
  static const ::exec::shared::QueryId& query_id(const FragmentRecordBatch* msg);
  static void set_has_query_id(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static void set_has_receiving_major_fragment_id(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
  static void set_has_sending_major_fragment_id(HasBits* has_bits) {
    (*has_bits)[0] |= 8u;
  }
  static void set_has_sending_minor_fragment_id(HasBits* has_bits) {
    (*has_bits)[0] |= 16u;
  }
  static const ::exec::shared::RecordBatchDef& def(const FragmentRecordBatch* msg);
  static void set_has_def(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static void set_has_islastbatch(HasBits* has_bits) {
    (*has_bits)[0] |= 32u;
  }
};

const ::exec::shared::QueryId&
FragmentRecordBatch::_Internal::query_id(const FragmentRecordBatch* msg) {
  return *msg->query_id_;
}
const ::exec::shared::RecordBatchDef&
FragmentRecordBatch::_Internal::def(const FragmentRecordBatch* msg) {
  return *msg->def_;
}
void FragmentRecordBatch::clear_query_id() {
  if (query_id_ != nullptr) query_id_->Clear();
  _has_bits_[0] &= ~0x00000001u;
}
void FragmentRecordBatch::clear_def() {
  if (def_ != nullptr) def_->Clear();
  _has_bits_[0] &= ~0x00000002u;
}
FragmentRecordBatch::FragmentRecordBatch(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena),
  receiving_minor_fragment_id_(arena) {
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:exec.bit.data.FragmentRecordBatch)
}
FragmentRecordBatch::FragmentRecordBatch(const FragmentRecordBatch& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_),
      receiving_minor_fragment_id_(from.receiving_minor_fragment_id_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  if (from._internal_has_query_id()) {
    query_id_ = new ::exec::shared::QueryId(*from.query_id_);
  } else {
    query_id_ = nullptr;
  }
  if (from._internal_has_def()) {
    def_ = new ::exec::shared::RecordBatchDef(*from.def_);
  } else {
    def_ = nullptr;
  }
  ::memcpy(&receiving_major_fragment_id_, &from.receiving_major_fragment_id_,
    static_cast<size_t>(reinterpret_cast<char*>(&islastbatch_) -
    reinterpret_cast<char*>(&receiving_major_fragment_id_)) + sizeof(islastbatch_));
  // @@protoc_insertion_point(copy_constructor:exec.bit.data.FragmentRecordBatch)
}

void FragmentRecordBatch::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&query_id_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&islastbatch_) -
    reinterpret_cast<char*>(&query_id_)) + sizeof(islastbatch_));
}

FragmentRecordBatch::~FragmentRecordBatch() {
  // @@protoc_insertion_point(destructor:exec.bit.data.FragmentRecordBatch)
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

void FragmentRecordBatch::SharedDtor() {
  GOOGLE_DCHECK(GetArena() == nullptr);
  if (this != internal_default_instance()) delete query_id_;
  if (this != internal_default_instance()) delete def_;
}

void FragmentRecordBatch::ArenaDtor(void* object) {
  FragmentRecordBatch* _this = reinterpret_cast< FragmentRecordBatch* >(object);
  (void)_this;
}
void FragmentRecordBatch::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void FragmentRecordBatch::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

void FragmentRecordBatch::Clear() {
// @@protoc_insertion_point(message_clear_start:exec.bit.data.FragmentRecordBatch)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  receiving_minor_fragment_id_.Clear();
  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    if (cached_has_bits & 0x00000001u) {
      GOOGLE_DCHECK(query_id_ != nullptr);
      query_id_->Clear();
    }
    if (cached_has_bits & 0x00000002u) {
      GOOGLE_DCHECK(def_ != nullptr);
      def_->Clear();
    }
  }
  if (cached_has_bits & 0x0000003cu) {
    ::memset(&receiving_major_fragment_id_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&islastbatch_) -
        reinterpret_cast<char*>(&receiving_major_fragment_id_)) + sizeof(islastbatch_));
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* FragmentRecordBatch::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    ::PROTOBUF_NAMESPACE_ID::uint32 tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional .exec.shared.QueryId query_id = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_query_id(), ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // optional int32 receiving_major_fragment_id = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) {
          _Internal::set_has_receiving_major_fragment_id(&has_bits);
          receiving_major_fragment_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // repeated int32 receiving_minor_fragment_id = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) {
          ptr -= 1;
          do {
            ptr += 1;
            _internal_add_receiving_minor_fragment_id(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr));
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<24>(ptr));
        } else if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_receiving_minor_fragment_id(), ptr, ctx);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // optional int32 sending_major_fragment_id = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) {
          _Internal::set_has_sending_major_fragment_id(&has_bits);
          sending_major_fragment_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // optional int32 sending_minor_fragment_id = 5;
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 40)) {
          _Internal::set_has_sending_minor_fragment_id(&has_bits);
          sending_minor_fragment_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // optional .exec.shared.RecordBatchDef def = 6;
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 50)) {
          ptr = ctx->ParseMessage(_internal_mutable_def(), ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // optional bool isLastBatch = 7;
      case 7:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 56)) {
          _Internal::set_has_islastbatch(&has_bits);
          islastbatch_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      default: {
      handle_unusual:
        if ((tag == 0) || ((tag & 7) == 4)) {
          CHK_(ptr);
          ctx->SetLastTag(tag);
          goto success;
        }
        ptr = UnknownFieldParse(tag,
            _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
            ptr, ctx);
        CHK_(ptr != nullptr);
        continue;
      }
    }  // switch
  }  // while
success:
  _has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto success;
#undef CHK_
}

::PROTOBUF_NAMESPACE_ID::uint8* FragmentRecordBatch::_InternalSerialize(
    ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:exec.bit.data.FragmentRecordBatch)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional .exec.shared.QueryId query_id = 1;
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        1, _Internal::query_id(this), target, stream);
  }

  // optional int32 receiving_major_fragment_id = 2;
  if (cached_has_bits & 0x00000004u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_receiving_major_fragment_id(), target);
  }

  // repeated int32 receiving_minor_fragment_id = 3;
  for (int i = 0, n = this->_internal_receiving_minor_fragment_id_size(); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(3, this->_internal_receiving_minor_fragment_id(i), target);
  }

  // optional int32 sending_major_fragment_id = 4;
  if (cached_has_bits & 0x00000008u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(4, this->_internal_sending_major_fragment_id(), target);
  }

  // optional int32 sending_minor_fragment_id = 5;
  if (cached_has_bits & 0x00000010u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(5, this->_internal_sending_minor_fragment_id(), target);
  }

  // optional .exec.shared.RecordBatchDef def = 6;
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        6, _Internal::def(this), target, stream);
  }

  // optional bool isLastBatch = 7;
  if (cached_has_bits & 0x00000020u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(7, this->_internal_islastbatch(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:exec.bit.data.FragmentRecordBatch)
  return target;
}

size_t FragmentRecordBatch::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:exec.bit.data.FragmentRecordBatch)
  size_t total_size = 0;

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

  // repeated int32 receiving_minor_fragment_id = 3;
  {
    size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      Int32Size(this->receiving_minor_fragment_id_);
    total_size += 1 *
                  ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_receiving_minor_fragment_id_size());
    total_size += data_size;
  }

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x0000003fu) {
    // optional .exec.shared.QueryId query_id = 1;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *query_id_);
    }

    // optional .exec.shared.RecordBatchDef def = 6;
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *def_);
    }

    // optional int32 receiving_major_fragment_id = 2;
    if (cached_has_bits & 0x00000004u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
          this->_internal_receiving_major_fragment_id());
    }

    // optional int32 sending_major_fragment_id = 4;
    if (cached_has_bits & 0x00000008u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
          this->_internal_sending_major_fragment_id());
    }

    // optional int32 sending_minor_fragment_id = 5;
    if (cached_has_bits & 0x00000010u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
          this->_internal_sending_minor_fragment_id());
    }

    // optional bool isLastBatch = 7;
    if (cached_has_bits & 0x00000020u) {
      total_size += 1 + 1;
    }

  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
        _internal_metadata_, total_size, &_cached_size_);
  }
  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void FragmentRecordBatch::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:exec.bit.data.FragmentRecordBatch)
  GOOGLE_DCHECK_NE(&from, this);
  const FragmentRecordBatch* source =
      ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<FragmentRecordBatch>(
          &from);
  if (source == nullptr) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:exec.bit.data.FragmentRecordBatch)
    ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:exec.bit.data.FragmentRecordBatch)
    MergeFrom(*source);
  }
}

void FragmentRecordBatch::MergeFrom(const FragmentRecordBatch& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:exec.bit.data.FragmentRecordBatch)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  receiving_minor_fragment_id_.MergeFrom(from.receiving_minor_fragment_id_);
  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x0000003fu) {
    if (cached_has_bits & 0x00000001u) {
      _internal_mutable_query_id()->::exec::shared::QueryId::MergeFrom(from._internal_query_id());
    }
    if (cached_has_bits & 0x00000002u) {
      _internal_mutable_def()->::exec::shared::RecordBatchDef::MergeFrom(from._internal_def());
    }
    if (cached_has_bits & 0x00000004u) {
      receiving_major_fragment_id_ = from.receiving_major_fragment_id_;
    }
    if (cached_has_bits & 0x00000008u) {
      sending_major_fragment_id_ = from.sending_major_fragment_id_;
    }
    if (cached_has_bits & 0x00000010u) {
      sending_minor_fragment_id_ = from.sending_minor_fragment_id_;
    }
    if (cached_has_bits & 0x00000020u) {
      islastbatch_ = from.islastbatch_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
}

void FragmentRecordBatch::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:exec.bit.data.FragmentRecordBatch)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void FragmentRecordBatch::CopyFrom(const FragmentRecordBatch& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:exec.bit.data.FragmentRecordBatch)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void FragmentRecordBatch::InternalSwap(FragmentRecordBatch* other) {
  using std::swap;
  _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  receiving_minor_fragment_id_.InternalSwap(&other->receiving_minor_fragment_id_);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(FragmentRecordBatch, islastbatch_)
      + sizeof(FragmentRecordBatch::islastbatch_)
      - PROTOBUF_FIELD_OFFSET(FragmentRecordBatch, query_id_)>(
          reinterpret_cast<char*>(&query_id_),
          reinterpret_cast<char*>(&other->query_id_));
}

::PROTOBUF_NAMESPACE_ID::Metadata FragmentRecordBatch::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_BitData_2eproto_getter, &descriptor_table_BitData_2eproto_once,
      file_level_metadata_BitData_2eproto[2]);
}

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

class RuntimeFilterBDef::_Internal {
 public:
  using HasBits = decltype(std::declval<RuntimeFilterBDef>()._has_bits_);
  static const ::exec::shared::QueryId& query_id(const RuntimeFilterBDef* msg);
  static void set_has_query_id(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static void set_has_major_fragment_id(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static void set_has_minor_fragment_id(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
  static void set_has_to_foreman(HasBits* has_bits) {
    (*has_bits)[0] |= 8u;
  }
  static void set_has_hj_op_id(HasBits* has_bits) {
    (*has_bits)[0] |= 16u;
  }
  static void set_has_rf_identifier(HasBits* has_bits) {
    (*has_bits)[0] |= 32u;
  }
};

const ::exec::shared::QueryId&
RuntimeFilterBDef::_Internal::query_id(const RuntimeFilterBDef* msg) {
  return *msg->query_id_;
}
void RuntimeFilterBDef::clear_query_id() {
  if (query_id_ != nullptr) query_id_->Clear();
  _has_bits_[0] &= ~0x00000001u;
}
RuntimeFilterBDef::RuntimeFilterBDef(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena),
  bloom_filter_size_in_bytes_(arena),
  probe_fields_(arena) {
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:exec.bit.data.RuntimeFilterBDef)
}
RuntimeFilterBDef::RuntimeFilterBDef(const RuntimeFilterBDef& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_),
      bloom_filter_size_in_bytes_(from.bloom_filter_size_in_bytes_),
      probe_fields_(from.probe_fields_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  if (from._internal_has_query_id()) {
    query_id_ = new ::exec::shared::QueryId(*from.query_id_);
  } else {
    query_id_ = nullptr;
  }
  ::memcpy(&major_fragment_id_, &from.major_fragment_id_,
    static_cast<size_t>(reinterpret_cast<char*>(&rf_identifier_) -
    reinterpret_cast<char*>(&major_fragment_id_)) + sizeof(rf_identifier_));
  // @@protoc_insertion_point(copy_constructor:exec.bit.data.RuntimeFilterBDef)
}

void RuntimeFilterBDef::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&query_id_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&rf_identifier_) -
    reinterpret_cast<char*>(&query_id_)) + sizeof(rf_identifier_));
}

RuntimeFilterBDef::~RuntimeFilterBDef() {
  // @@protoc_insertion_point(destructor:exec.bit.data.RuntimeFilterBDef)
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

void RuntimeFilterBDef::SharedDtor() {
  GOOGLE_DCHECK(GetArena() == nullptr);
  if (this != internal_default_instance()) delete query_id_;
}

void RuntimeFilterBDef::ArenaDtor(void* object) {
  RuntimeFilterBDef* _this = reinterpret_cast< RuntimeFilterBDef* >(object);
  (void)_this;
}
void RuntimeFilterBDef::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void RuntimeFilterBDef::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

void RuntimeFilterBDef::Clear() {
// @@protoc_insertion_point(message_clear_start:exec.bit.data.RuntimeFilterBDef)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  bloom_filter_size_in_bytes_.Clear();
  probe_fields_.Clear();
  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    GOOGLE_DCHECK(query_id_ != nullptr);
    query_id_->Clear();
  }
  if (cached_has_bits & 0x0000003eu) {
    ::memset(&major_fragment_id_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&rf_identifier_) -
        reinterpret_cast<char*>(&major_fragment_id_)) + sizeof(rf_identifier_));
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* RuntimeFilterBDef::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    ::PROTOBUF_NAMESPACE_ID::uint32 tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional .exec.shared.QueryId query_id = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_query_id(), ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // optional int32 major_fragment_id = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) {
          _Internal::set_has_major_fragment_id(&has_bits);
          major_fragment_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // optional int32 minor_fragment_id = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) {
          _Internal::set_has_minor_fragment_id(&has_bits);
          minor_fragment_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // optional bool to_foreman = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) {
          _Internal::set_has_to_foreman(&has_bits);
          to_foreman_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // repeated int32 bloom_filter_size_in_bytes = 5;
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 40)) {
          ptr -= 1;
          do {
            ptr += 1;
            _internal_add_bloom_filter_size_in_bytes(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr));
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<40>(ptr));
        } else if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_bloom_filter_size_in_bytes(), ptr, ctx);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // repeated string probe_fields = 6;
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 50)) {
          ptr -= 1;
          do {
            ptr += 1;
            auto str = _internal_add_probe_fields();
            ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
            #ifndef NDEBUG
            ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "exec.bit.data.RuntimeFilterBDef.probe_fields");
            #endif  // !NDEBUG
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<50>(ptr));
        } else goto handle_unusual;
        continue;
      // optional int32 hj_op_id = 7;
      case 7:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 56)) {
          _Internal::set_has_hj_op_id(&has_bits);
          hj_op_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // optional int64 rf_identifier = 8;
      case 8:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 64)) {
          _Internal::set_has_rf_identifier(&has_bits);
          rf_identifier_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      default: {
      handle_unusual:
        if ((tag == 0) || ((tag & 7) == 4)) {
          CHK_(ptr);
          ctx->SetLastTag(tag);
          goto success;
        }
        ptr = UnknownFieldParse(tag,
            _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
            ptr, ctx);
        CHK_(ptr != nullptr);
        continue;
      }
    }  // switch
  }  // while
success:
  _has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto success;
#undef CHK_
}

::PROTOBUF_NAMESPACE_ID::uint8* RuntimeFilterBDef::_InternalSerialize(
    ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:exec.bit.data.RuntimeFilterBDef)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional .exec.shared.QueryId query_id = 1;
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        1, _Internal::query_id(this), target, stream);
  }

  // optional int32 major_fragment_id = 2;
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_major_fragment_id(), target);
  }

  // optional int32 minor_fragment_id = 3;
  if (cached_has_bits & 0x00000004u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(3, this->_internal_minor_fragment_id(), target);
  }

  // optional bool to_foreman = 4;
  if (cached_has_bits & 0x00000008u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(4, this->_internal_to_foreman(), target);
  }

  // repeated int32 bloom_filter_size_in_bytes = 5;
  for (int i = 0, n = this->_internal_bloom_filter_size_in_bytes_size(); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(5, this->_internal_bloom_filter_size_in_bytes(i), target);
  }

  // repeated string probe_fields = 6;
  for (int i = 0, n = this->_internal_probe_fields_size(); i < n; i++) {
    const auto& s = this->_internal_probe_fields(i);
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
      s.data(), static_cast<int>(s.length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
      "exec.bit.data.RuntimeFilterBDef.probe_fields");
    target = stream->WriteString(6, s, target);
  }

  // optional int32 hj_op_id = 7;
  if (cached_has_bits & 0x00000010u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(7, this->_internal_hj_op_id(), target);
  }

  // optional int64 rf_identifier = 8;
  if (cached_has_bits & 0x00000020u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(8, this->_internal_rf_identifier(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:exec.bit.data.RuntimeFilterBDef)
  return target;
}

size_t RuntimeFilterBDef::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:exec.bit.data.RuntimeFilterBDef)
  size_t total_size = 0;

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

  // repeated int32 bloom_filter_size_in_bytes = 5;
  {
    size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      Int32Size(this->bloom_filter_size_in_bytes_);
    total_size += 1 *
                  ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_bloom_filter_size_in_bytes_size());
    total_size += data_size;
  }

  // repeated string probe_fields = 6;
  total_size += 1 *
      ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(probe_fields_.size());
  for (int i = 0, n = probe_fields_.size(); i < n; i++) {
    total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
      probe_fields_.Get(i));
  }

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x0000003fu) {
    // optional .exec.shared.QueryId query_id = 1;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *query_id_);
    }

    // optional int32 major_fragment_id = 2;
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
          this->_internal_major_fragment_id());
    }

    // optional int32 minor_fragment_id = 3;
    if (cached_has_bits & 0x00000004u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
          this->_internal_minor_fragment_id());
    }

    // optional bool to_foreman = 4;
    if (cached_has_bits & 0x00000008u) {
      total_size += 1 + 1;
    }

    // optional int32 hj_op_id = 7;
    if (cached_has_bits & 0x00000010u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
          this->_internal_hj_op_id());
    }

    // optional int64 rf_identifier = 8;
    if (cached_has_bits & 0x00000020u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size(
          this->_internal_rf_identifier());
    }

  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
        _internal_metadata_, total_size, &_cached_size_);
  }
  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void RuntimeFilterBDef::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:exec.bit.data.RuntimeFilterBDef)
  GOOGLE_DCHECK_NE(&from, this);
  const RuntimeFilterBDef* source =
      ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<RuntimeFilterBDef>(
          &from);
  if (source == nullptr) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:exec.bit.data.RuntimeFilterBDef)
    ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:exec.bit.data.RuntimeFilterBDef)
    MergeFrom(*source);
  }
}

void RuntimeFilterBDef::MergeFrom(const RuntimeFilterBDef& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:exec.bit.data.RuntimeFilterBDef)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  bloom_filter_size_in_bytes_.MergeFrom(from.bloom_filter_size_in_bytes_);
  probe_fields_.MergeFrom(from.probe_fields_);
  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x0000003fu) {
    if (cached_has_bits & 0x00000001u) {
      _internal_mutable_query_id()->::exec::shared::QueryId::MergeFrom(from._internal_query_id());
    }
    if (cached_has_bits & 0x00000002u) {
      major_fragment_id_ = from.major_fragment_id_;
    }
    if (cached_has_bits & 0x00000004u) {
      minor_fragment_id_ = from.minor_fragment_id_;
    }
    if (cached_has_bits & 0x00000008u) {
      to_foreman_ = from.to_foreman_;
    }
    if (cached_has_bits & 0x00000010u) {
      hj_op_id_ = from.hj_op_id_;
    }
    if (cached_has_bits & 0x00000020u) {
      rf_identifier_ = from.rf_identifier_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
}

void RuntimeFilterBDef::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:exec.bit.data.RuntimeFilterBDef)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void RuntimeFilterBDef::CopyFrom(const RuntimeFilterBDef& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:exec.bit.data.RuntimeFilterBDef)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void RuntimeFilterBDef::InternalSwap(RuntimeFilterBDef* other) {
  using std::swap;
  _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  bloom_filter_size_in_bytes_.InternalSwap(&other->bloom_filter_size_in_bytes_);
  probe_fields_.InternalSwap(&other->probe_fields_);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(RuntimeFilterBDef, rf_identifier_)
      + sizeof(RuntimeFilterBDef::rf_identifier_)
      - PROTOBUF_FIELD_OFFSET(RuntimeFilterBDef, query_id_)>(
          reinterpret_cast<char*>(&query_id_),
          reinterpret_cast<char*>(&other->query_id_));
}

::PROTOBUF_NAMESPACE_ID::Metadata RuntimeFilterBDef::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_BitData_2eproto_getter, &descriptor_table_BitData_2eproto_once,
      file_level_metadata_BitData_2eproto[3]);
}

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

class AckWithCredit::_Internal {
 public:
  using HasBits = decltype(std::declval<AckWithCredit>()._has_bits_);
  static void set_has_allowed_credit(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
};

AckWithCredit::AckWithCredit(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena) {
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:exec.bit.data.AckWithCredit)
}
AckWithCredit::AckWithCredit(const AckWithCredit& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  allowed_credit_ = from.allowed_credit_;
  // @@protoc_insertion_point(copy_constructor:exec.bit.data.AckWithCredit)
}

void AckWithCredit::SharedCtor() {
allowed_credit_ = 0;
}

AckWithCredit::~AckWithCredit() {
  // @@protoc_insertion_point(destructor:exec.bit.data.AckWithCredit)
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

void AckWithCredit::SharedDtor() {
  GOOGLE_DCHECK(GetArena() == nullptr);
}

void AckWithCredit::ArenaDtor(void* object) {
  AckWithCredit* _this = reinterpret_cast< AckWithCredit* >(object);
  (void)_this;
}
void AckWithCredit::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void AckWithCredit::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

void AckWithCredit::Clear() {
// @@protoc_insertion_point(message_clear_start:exec.bit.data.AckWithCredit)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  allowed_credit_ = 0;
  _has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* AckWithCredit::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    ::PROTOBUF_NAMESPACE_ID::uint32 tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional int32 allowed_credit = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) {
          _Internal::set_has_allowed_credit(&has_bits);
          allowed_credit_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      default: {
      handle_unusual:
        if ((tag == 0) || ((tag & 7) == 4)) {
          CHK_(ptr);
          ctx->SetLastTag(tag);
          goto success;
        }
        ptr = UnknownFieldParse(tag,
            _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
            ptr, ctx);
        CHK_(ptr != nullptr);
        continue;
      }
    }  // switch
  }  // while
success:
  _has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto success;
#undef CHK_
}

::PROTOBUF_NAMESPACE_ID::uint8* AckWithCredit::_InternalSerialize(
    ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:exec.bit.data.AckWithCredit)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional int32 allowed_credit = 1;
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_allowed_credit(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:exec.bit.data.AckWithCredit)
  return target;
}

size_t AckWithCredit::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:exec.bit.data.AckWithCredit)
  size_t total_size = 0;

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

  // optional int32 allowed_credit = 1;
  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
        this->_internal_allowed_credit());
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
        _internal_metadata_, total_size, &_cached_size_);
  }
  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void AckWithCredit::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:exec.bit.data.AckWithCredit)
  GOOGLE_DCHECK_NE(&from, this);
  const AckWithCredit* source =
      ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<AckWithCredit>(
          &from);
  if (source == nullptr) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:exec.bit.data.AckWithCredit)
    ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:exec.bit.data.AckWithCredit)
    MergeFrom(*source);
  }
}

void AckWithCredit::MergeFrom(const AckWithCredit& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:exec.bit.data.AckWithCredit)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  if (from._internal_has_allowed_credit()) {
    _internal_set_allowed_credit(from._internal_allowed_credit());
  }
}

void AckWithCredit::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:exec.bit.data.AckWithCredit)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void AckWithCredit::CopyFrom(const AckWithCredit& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:exec.bit.data.AckWithCredit)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

void AckWithCredit::InternalSwap(AckWithCredit* other) {
  using std::swap;
  _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  swap(allowed_credit_, other->allowed_credit_);
}

::PROTOBUF_NAMESPACE_ID::Metadata AckWithCredit::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_BitData_2eproto_getter, &descriptor_table_BitData_2eproto_once,
      file_level_metadata_BitData_2eproto[4]);
}

// @@protoc_insertion_point(namespace_scope)
}  // namespace data
}  // namespace bit
}  // namespace exec
PROTOBUF_NAMESPACE_OPEN
template<> PROTOBUF_NOINLINE ::exec::bit::data::BitClientHandshake* Arena::CreateMaybeMessage< ::exec::bit::data::BitClientHandshake >(Arena* arena) {
  return Arena::CreateMessageInternal< ::exec::bit::data::BitClientHandshake >(arena);
}
template<> PROTOBUF_NOINLINE ::exec::bit::data::BitServerHandshake* Arena::CreateMaybeMessage< ::exec::bit::data::BitServerHandshake >(Arena* arena) {
  return Arena::CreateMessageInternal< ::exec::bit::data::BitServerHandshake >(arena);
}
template<> PROTOBUF_NOINLINE ::exec::bit::data::FragmentRecordBatch* Arena::CreateMaybeMessage< ::exec::bit::data::FragmentRecordBatch >(Arena* arena) {
  return Arena::CreateMessageInternal< ::exec::bit::data::FragmentRecordBatch >(arena);
}
template<> PROTOBUF_NOINLINE ::exec::bit::data::RuntimeFilterBDef* Arena::CreateMaybeMessage< ::exec::bit::data::RuntimeFilterBDef >(Arena* arena) {
  return Arena::CreateMessageInternal< ::exec::bit::data::RuntimeFilterBDef >(arena);
}
template<> PROTOBUF_NOINLINE ::exec::bit::data::AckWithCredit* Arena::CreateMaybeMessage< ::exec::bit::data::AckWithCredit >(Arena* arena) {
  return Arena::CreateMessageInternal< ::exec::bit::data::AckWithCredit >(arena);
}
PROTOBUF_NAMESPACE_CLOSE

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