You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@drill.apache.org by pa...@apache.org on 2016/11/01 20:29:54 UTC
[09/15] drill git commit: DRILL-4853: Update C++ protobuf source files
DRILL-4853: Update C++ protobuf source files
Add support for prepared statements and metadata querying
Project: http://git-wip-us.apache.org/repos/asf/drill/repo
Commit: http://git-wip-us.apache.org/repos/asf/drill/commit/2558803e
Tree: http://git-wip-us.apache.org/repos/asf/drill/tree/2558803e
Diff: http://git-wip-us.apache.org/repos/asf/drill/diff/2558803e
Branch: refs/heads/master
Commit: 2558803ecdfc961bb630e9e2372255c44f986d06
Parents: 7e7214b
Author: Laurent Goujon <la...@dremio.com>
Authored: Thu Aug 18 09:55:59 2016 -0700
Committer: Parth Chandra <pa...@apache.org>
Committed: Tue Nov 1 11:29:58 2016 -0700
----------------------------------------------------------------------
contrib/native/client/readme.linux | 10 +
contrib/native/client/scripts/fixProtodefs.sh | 20 +-
.../native/client/src/protobuf/CMakeLists.txt | 2 +-
.../client/src/protobuf/ExecutionProtos.pb.cc | 310 +-
.../client/src/protobuf/ExecutionProtos.pb.h | 214 +-
contrib/native/client/src/protobuf/User.pb.cc | 10122 ++++++++++++++++-
contrib/native/client/src/protobuf/User.pb.h | 8099 ++++++++++++-
.../client/src/protobuf/UserBitShared.pb.cc | 583 +-
.../client/src/protobuf/UserBitShared.pb.h | 344 +-
9 files changed, 18543 insertions(+), 1161 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/drill/blob/2558803e/contrib/native/client/readme.linux
----------------------------------------------------------------------
diff --git a/contrib/native/client/readme.linux b/contrib/native/client/readme.linux
index 3e2336e..4eaeea5 100644
--- a/contrib/native/client/readme.linux
+++ b/contrib/native/client/readme.linux
@@ -84,6 +84,16 @@ OR
ln -svf libboost_filesystem.a libboost_filesystem-mt.a
ln -svf libboost_date_time.a libboost_date_time-mt.a
+(Optional) Refresh protobuf source files
+----------------------------------------
+When changes have been introduced to the protocol module, you might need to refresh the protobuf C++ source files too.
+ $> cd DRILL_DIR/contrib/native/client
+ $> mkdir build
+ $> cd build && cmake3 -G "Unix Makefiles" ..
+ $> make cpProtobufs
+
+Open a pull request with the changes to DRILL_DIR/contrib/native/client/src/protobuf
+
Build drill client
-------------------
$> cd DRILL_DIR/contrib/native/client
http://git-wip-us.apache.org/repos/asf/drill/blob/2558803e/contrib/native/client/scripts/fixProtodefs.sh
----------------------------------------------------------------------
diff --git a/contrib/native/client/scripts/fixProtodefs.sh b/contrib/native/client/scripts/fixProtodefs.sh
index f3ce781..d882ca6 100755
--- a/contrib/native/client/scripts/fixProtodefs.sh
+++ b/contrib/native/client/scripts/fixProtodefs.sh
@@ -36,21 +36,15 @@ main() {
then
echo "Creating Protobuf directory"
mkdir -p ${TARGDIR}
- cp -r ${SRCDIR}/* ${TARGDIR}
+ fi
+ cp -r ${SRCDIR}/* ${TARGDIR}
+
+ if [ -e ${TARGDIR}/${FNAME} ]
+ then
fixFile ${FNAME}
else
- cp -r ${SRCDIR}/* ${TARGDIR}
-
- if [ -e ${TARGDIR}/${FNAME} ]
- then
- if [ ${SRCDIR}/${FNAME} -nt ${TARGDIR}/${FNAME} ]
- then
- fixFile ${FNAME}
- fi
- else
- echo "$FNAME not found"
- exit 1
- fi
+ echo "$FNAME not found"
+ exit 1
fi
}
http://git-wip-us.apache.org/repos/asf/drill/blob/2558803e/contrib/native/client/src/protobuf/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/contrib/native/client/src/protobuf/CMakeLists.txt b/contrib/native/client/src/protobuf/CMakeLists.txt
index 474d2f6..edae72f 100644
--- a/contrib/native/client/src/protobuf/CMakeLists.txt
+++ b/contrib/native/client/src/protobuf/CMakeLists.txt
@@ -92,7 +92,7 @@ add_custom_target(fixProtobufs
COMMAND ${PROJECT_SOURCE_DIR}/scripts/fixProtodefs.sh ${SRCDIR} ${TARGDIR} ${FNAME}
)
-add_custom_target(genProtobufs DEPENDS ${GenProtoSources})
+add_custom_target(genProtobufs DEPENDS ${GenProtoSources} fixProtobufs)
# copy protobuf CPP files to destinations in the source tree
add_custom_target(cpProtobufs
http://git-wip-us.apache.org/repos/asf/drill/blob/2558803e/contrib/native/client/src/protobuf/ExecutionProtos.pb.cc
----------------------------------------------------------------------
diff --git a/contrib/native/client/src/protobuf/ExecutionProtos.pb.cc b/contrib/native/client/src/protobuf/ExecutionProtos.pb.cc
index a36bd9f..26690f3 100644
--- a/contrib/native/client/src/protobuf/ExecutionProtos.pb.cc
+++ b/contrib/native/client/src/protobuf/ExecutionProtos.pb.cc
@@ -24,6 +24,9 @@ namespace {
const ::google::protobuf::Descriptor* FragmentHandle_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
FragmentHandle_reflection_ = NULL;
+const ::google::protobuf::Descriptor* ServerPreparedStatementState_descriptor_ = NULL;
+const ::google::protobuf::internal::GeneratedMessageReflection*
+ ServerPreparedStatementState_reflection_ = NULL;
} // namespace
@@ -35,10 +38,11 @@ void protobuf_AssignDesc_ExecutionProtos_2eproto() {
"ExecutionProtos.proto");
GOOGLE_CHECK(file != NULL);
FragmentHandle_descriptor_ = file->message_type(0);
- static const int FragmentHandle_offsets_[3] = {
+ static const int FragmentHandle_offsets_[4] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FragmentHandle, query_id_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FragmentHandle, major_fragment_id_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FragmentHandle, minor_fragment_id_),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FragmentHandle, parent_query_id_),
};
FragmentHandle_reflection_ =
new ::google::protobuf::internal::GeneratedMessageReflection(
@@ -51,6 +55,21 @@ void protobuf_AssignDesc_ExecutionProtos_2eproto() {
::google::protobuf::DescriptorPool::generated_pool(),
::google::protobuf::MessageFactory::generated_factory(),
sizeof(FragmentHandle));
+ ServerPreparedStatementState_descriptor_ = file->message_type(1);
+ static const int ServerPreparedStatementState_offsets_[1] = {
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServerPreparedStatementState, sql_query_),
+ };
+ ServerPreparedStatementState_reflection_ =
+ new ::google::protobuf::internal::GeneratedMessageReflection(
+ ServerPreparedStatementState_descriptor_,
+ ServerPreparedStatementState::default_instance_,
+ ServerPreparedStatementState_offsets_,
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServerPreparedStatementState, _has_bits_[0]),
+ GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServerPreparedStatementState, _unknown_fields_),
+ -1,
+ ::google::protobuf::DescriptorPool::generated_pool(),
+ ::google::protobuf::MessageFactory::generated_factory(),
+ sizeof(ServerPreparedStatementState));
}
namespace {
@@ -65,6 +84,8 @@ void protobuf_RegisterTypes(const ::std::string&) {
protobuf_AssignDescriptorsOnce();
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
FragmentHandle_descriptor_, &FragmentHandle::default_instance());
+ ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
+ ServerPreparedStatementState_descriptor_, &ServerPreparedStatementState::default_instance());
}
} // namespace
@@ -72,6 +93,8 @@ void protobuf_RegisterTypes(const ::std::string&) {
void protobuf_ShutdownFile_ExecutionProtos_2eproto() {
delete FragmentHandle::default_instance_;
delete FragmentHandle_reflection_;
+ delete ServerPreparedStatementState::default_instance_;
+ delete ServerPreparedStatementState_reflection_;
}
void protobuf_AddDesc_ExecutionProtos_2eproto() {
@@ -84,15 +107,20 @@ void protobuf_AddDesc_ExecutionProtos_2eproto() {
::exec::shared::protobuf_AddDesc_UserBitShared_2eproto();
::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
"\n\025ExecutionProtos.proto\022\010exec.bit\032\022Coord"
- "ination.proto\032\023UserBitShared.proto\"n\n\016Fr"
- "agmentHandle\022&\n\010query_id\030\001 \001(\0132\024.exec.sh"
- "ared.QueryId\022\031\n\021major_fragment_id\030\002 \001(\005\022"
- "\031\n\021minor_fragment_id\030\003 \001(\005B+\n\033org.apache"
- ".drill.exec.protoB\nExecProtosH\001", 231);
+ "ination.proto\032\023UserBitShared.proto\"\235\001\n\016F"
+ "ragmentHandle\022&\n\010query_id\030\001 \001(\0132\024.exec.s"
+ "hared.QueryId\022\031\n\021major_fragment_id\030\002 \001(\005"
+ "\022\031\n\021minor_fragment_id\030\003 \001(\005\022-\n\017parent_qu"
+ "ery_id\030\004 \001(\0132\024.exec.shared.QueryId\"1\n\034Se"
+ "rverPreparedStatementState\022\021\n\tsql_query\030"
+ "\001 \001(\tB+\n\033org.apache.drill.exec.protoB\nEx"
+ "ecProtosH\001", 330);
::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
"ExecutionProtos.proto", &protobuf_RegisterTypes);
FragmentHandle::default_instance_ = new FragmentHandle();
+ ServerPreparedStatementState::default_instance_ = new ServerPreparedStatementState();
FragmentHandle::default_instance_->InitAsDefaultInstance();
+ ServerPreparedStatementState::default_instance_->InitAsDefaultInstance();
::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_ExecutionProtos_2eproto);
}
@@ -109,6 +137,7 @@ struct StaticDescriptorInitializer_ExecutionProtos_2eproto {
const int FragmentHandle::kQueryIdFieldNumber;
const int FragmentHandle::kMajorFragmentIdFieldNumber;
const int FragmentHandle::kMinorFragmentIdFieldNumber;
+const int FragmentHandle::kParentQueryIdFieldNumber;
#endif // !_MSC_VER
FragmentHandle::FragmentHandle()
@@ -118,6 +147,7 @@ FragmentHandle::FragmentHandle()
void FragmentHandle::InitAsDefaultInstance() {
query_id_ = const_cast< ::exec::shared::QueryId*>(&::exec::shared::QueryId::default_instance());
+ parent_query_id_ = const_cast< ::exec::shared::QueryId*>(&::exec::shared::QueryId::default_instance());
}
FragmentHandle::FragmentHandle(const FragmentHandle& from)
@@ -131,6 +161,7 @@ void FragmentHandle::SharedCtor() {
query_id_ = NULL;
major_fragment_id_ = 0;
minor_fragment_id_ = 0;
+ parent_query_id_ = NULL;
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
@@ -141,6 +172,7 @@ FragmentHandle::~FragmentHandle() {
void FragmentHandle::SharedDtor() {
if (this != default_instance_) {
delete query_id_;
+ delete parent_query_id_;
}
}
@@ -172,6 +204,9 @@ void FragmentHandle::Clear() {
}
major_fragment_id_ = 0;
minor_fragment_id_ = 0;
+ if (has_parent_query_id()) {
+ if (parent_query_id_ != NULL) parent_query_id_->::exec::shared::QueryId::Clear();
+ }
}
::memset(_has_bits_, 0, sizeof(_has_bits_));
mutable_unknown_fields()->Clear();
@@ -224,6 +259,20 @@ bool FragmentHandle::MergePartialFromCodedStream(
} else {
goto handle_uninterpreted;
}
+ if (input->ExpectTag(34)) goto parse_parent_query_id;
+ break;
+ }
+
+ // optional .exec.shared.QueryId parent_query_id = 4;
+ case 4: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
+ parse_parent_query_id:
+ DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
+ input, mutable_parent_query_id()));
+ } else {
+ goto handle_uninterpreted;
+ }
if (input->ExpectAtEnd()) return true;
break;
}
@@ -262,6 +311,12 @@ void FragmentHandle::SerializeWithCachedSizes(
::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->minor_fragment_id(), output);
}
+ // optional .exec.shared.QueryId parent_query_id = 4;
+ if (has_parent_query_id()) {
+ ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
+ 4, this->parent_query_id(), output);
+ }
+
if (!unknown_fields().empty()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
unknown_fields(), output);
@@ -287,6 +342,13 @@ void FragmentHandle::SerializeWithCachedSizes(
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->minor_fragment_id(), target);
}
+ // optional .exec.shared.QueryId parent_query_id = 4;
+ if (has_parent_query_id()) {
+ target = ::google::protobuf::internal::WireFormatLite::
+ WriteMessageNoVirtualToArray(
+ 4, this->parent_query_id(), target);
+ }
+
if (!unknown_fields().empty()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
unknown_fields(), target);
@@ -319,6 +381,13 @@ int FragmentHandle::ByteSize() const {
this->minor_fragment_id());
}
+ // optional .exec.shared.QueryId parent_query_id = 4;
+ if (has_parent_query_id()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
+ this->parent_query_id());
+ }
+
}
if (!unknown_fields().empty()) {
total_size +=
@@ -355,6 +424,9 @@ void FragmentHandle::MergeFrom(const FragmentHandle& from) {
if (from.has_minor_fragment_id()) {
set_minor_fragment_id(from.minor_fragment_id());
}
+ if (from.has_parent_query_id()) {
+ mutable_parent_query_id()->::exec::shared::QueryId::MergeFrom(from.parent_query_id());
+ }
}
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}
@@ -381,6 +453,7 @@ void FragmentHandle::Swap(FragmentHandle* other) {
std::swap(query_id_, other->query_id_);
std::swap(major_fragment_id_, other->major_fragment_id_);
std::swap(minor_fragment_id_, other->minor_fragment_id_);
+ std::swap(parent_query_id_, other->parent_query_id_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_unknown_fields_.Swap(&other->_unknown_fields_);
std::swap(_cached_size_, other->_cached_size_);
@@ -396,6 +469,231 @@ void FragmentHandle::Swap(FragmentHandle* other) {
}
+// ===================================================================
+
+#ifndef _MSC_VER
+const int ServerPreparedStatementState::kSqlQueryFieldNumber;
+#endif // !_MSC_VER
+
+ServerPreparedStatementState::ServerPreparedStatementState()
+ : ::google::protobuf::Message() {
+ SharedCtor();
+}
+
+void ServerPreparedStatementState::InitAsDefaultInstance() {
+}
+
+ServerPreparedStatementState::ServerPreparedStatementState(const ServerPreparedStatementState& from)
+ : ::google::protobuf::Message() {
+ SharedCtor();
+ MergeFrom(from);
+}
+
+void ServerPreparedStatementState::SharedCtor() {
+ _cached_size_ = 0;
+ sql_query_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
+ ::memset(_has_bits_, 0, sizeof(_has_bits_));
+}
+
+ServerPreparedStatementState::~ServerPreparedStatementState() {
+ SharedDtor();
+}
+
+void ServerPreparedStatementState::SharedDtor() {
+ if (sql_query_ != &::google::protobuf::internal::kEmptyString) {
+ delete sql_query_;
+ }
+ if (this != default_instance_) {
+ }
+}
+
+void ServerPreparedStatementState::SetCachedSize(int size) const {
+ GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+ _cached_size_ = size;
+ GOOGLE_SAFE_CONCURRENT_WRITES_END();
+}
+const ::google::protobuf::Descriptor* ServerPreparedStatementState::descriptor() {
+ protobuf_AssignDescriptorsOnce();
+ return ServerPreparedStatementState_descriptor_;
+}
+
+const ServerPreparedStatementState& ServerPreparedStatementState::default_instance() {
+ if (default_instance_ == NULL) protobuf_AddDesc_ExecutionProtos_2eproto();
+ return *default_instance_;
+}
+
+ServerPreparedStatementState* ServerPreparedStatementState::default_instance_ = NULL;
+
+ServerPreparedStatementState* ServerPreparedStatementState::New() const {
+ return new ServerPreparedStatementState;
+}
+
+void ServerPreparedStatementState::Clear() {
+ if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ if (has_sql_query()) {
+ if (sql_query_ != &::google::protobuf::internal::kEmptyString) {
+ sql_query_->clear();
+ }
+ }
+ }
+ ::memset(_has_bits_, 0, sizeof(_has_bits_));
+ mutable_unknown_fields()->Clear();
+}
+
+bool ServerPreparedStatementState::MergePartialFromCodedStream(
+ ::google::protobuf::io::CodedInputStream* input) {
+#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
+ ::google::protobuf::uint32 tag;
+ while ((tag = input->ReadTag()) != 0) {
+ switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
+ // optional string sql_query = 1;
+ case 1: {
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
+ DO_(::google::protobuf::internal::WireFormatLite::ReadString(
+ input, this->mutable_sql_query()));
+ ::google::protobuf::internal::WireFormat::VerifyUTF8String(
+ this->sql_query().data(), this->sql_query().length(),
+ ::google::protobuf::internal::WireFormat::PARSE);
+ } else {
+ goto handle_uninterpreted;
+ }
+ if (input->ExpectAtEnd()) return true;
+ break;
+ }
+
+ default: {
+ handle_uninterpreted:
+ if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
+ ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
+ return true;
+ }
+ DO_(::google::protobuf::internal::WireFormat::SkipField(
+ input, tag, mutable_unknown_fields()));
+ break;
+ }
+ }
+ }
+ return true;
+#undef DO_
+}
+
+void ServerPreparedStatementState::SerializeWithCachedSizes(
+ ::google::protobuf::io::CodedOutputStream* output) const {
+ // optional string sql_query = 1;
+ if (has_sql_query()) {
+ ::google::protobuf::internal::WireFormat::VerifyUTF8String(
+ this->sql_query().data(), this->sql_query().length(),
+ ::google::protobuf::internal::WireFormat::SERIALIZE);
+ ::google::protobuf::internal::WireFormatLite::WriteString(
+ 1, this->sql_query(), output);
+ }
+
+ if (!unknown_fields().empty()) {
+ ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
+ unknown_fields(), output);
+ }
+}
+
+::google::protobuf::uint8* ServerPreparedStatementState::SerializeWithCachedSizesToArray(
+ ::google::protobuf::uint8* target) const {
+ // optional string sql_query = 1;
+ if (has_sql_query()) {
+ ::google::protobuf::internal::WireFormat::VerifyUTF8String(
+ this->sql_query().data(), this->sql_query().length(),
+ ::google::protobuf::internal::WireFormat::SERIALIZE);
+ target =
+ ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
+ 1, this->sql_query(), target);
+ }
+
+ if (!unknown_fields().empty()) {
+ target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
+ unknown_fields(), target);
+ }
+ return target;
+}
+
+int ServerPreparedStatementState::ByteSize() const {
+ int total_size = 0;
+
+ if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ // optional string sql_query = 1;
+ if (has_sql_query()) {
+ total_size += 1 +
+ ::google::protobuf::internal::WireFormatLite::StringSize(
+ this->sql_query());
+ }
+
+ }
+ if (!unknown_fields().empty()) {
+ total_size +=
+ ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
+ unknown_fields());
+ }
+ GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+ _cached_size_ = total_size;
+ GOOGLE_SAFE_CONCURRENT_WRITES_END();
+ return total_size;
+}
+
+void ServerPreparedStatementState::MergeFrom(const ::google::protobuf::Message& from) {
+ GOOGLE_CHECK_NE(&from, this);
+ const ServerPreparedStatementState* source =
+ ::google::protobuf::internal::dynamic_cast_if_available<const ServerPreparedStatementState*>(
+ &from);
+ if (source == NULL) {
+ ::google::protobuf::internal::ReflectionOps::Merge(from, this);
+ } else {
+ MergeFrom(*source);
+ }
+}
+
+void ServerPreparedStatementState::MergeFrom(const ServerPreparedStatementState& from) {
+ GOOGLE_CHECK_NE(&from, this);
+ if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+ if (from.has_sql_query()) {
+ set_sql_query(from.sql_query());
+ }
+ }
+ mutable_unknown_fields()->MergeFrom(from.unknown_fields());
+}
+
+void ServerPreparedStatementState::CopyFrom(const ::google::protobuf::Message& from) {
+ if (&from == this) return;
+ Clear();
+ MergeFrom(from);
+}
+
+void ServerPreparedStatementState::CopyFrom(const ServerPreparedStatementState& from) {
+ if (&from == this) return;
+ Clear();
+ MergeFrom(from);
+}
+
+bool ServerPreparedStatementState::IsInitialized() const {
+
+ return true;
+}
+
+void ServerPreparedStatementState::Swap(ServerPreparedStatementState* other) {
+ if (other != this) {
+ std::swap(sql_query_, other->sql_query_);
+ std::swap(_has_bits_[0], other->_has_bits_[0]);
+ _unknown_fields_.Swap(&other->_unknown_fields_);
+ std::swap(_cached_size_, other->_cached_size_);
+ }
+}
+
+::google::protobuf::Metadata ServerPreparedStatementState::GetMetadata() const {
+ protobuf_AssignDescriptorsOnce();
+ ::google::protobuf::Metadata metadata;
+ metadata.descriptor = ServerPreparedStatementState_descriptor_;
+ metadata.reflection = ServerPreparedStatementState_reflection_;
+ return metadata;
+}
+
+
// @@protoc_insertion_point(namespace_scope)
} // namespace bit
http://git-wip-us.apache.org/repos/asf/drill/blob/2558803e/contrib/native/client/src/protobuf/ExecutionProtos.pb.h
----------------------------------------------------------------------
diff --git a/contrib/native/client/src/protobuf/ExecutionProtos.pb.h b/contrib/native/client/src/protobuf/ExecutionProtos.pb.h
index a602c1f..86cddb9 100644
--- a/contrib/native/client/src/protobuf/ExecutionProtos.pb.h
+++ b/contrib/native/client/src/protobuf/ExecutionProtos.pb.h
@@ -37,6 +37,7 @@ void protobuf_AssignDesc_ExecutionProtos_2eproto();
void protobuf_ShutdownFile_ExecutionProtos_2eproto();
class FragmentHandle;
+class ServerPreparedStatementState;
// ===================================================================
@@ -117,6 +118,15 @@ class FragmentHandle : public ::google::protobuf::Message {
inline ::google::protobuf::int32 minor_fragment_id() const;
inline void set_minor_fragment_id(::google::protobuf::int32 value);
+ // optional .exec.shared.QueryId parent_query_id = 4;
+ inline bool has_parent_query_id() const;
+ inline void clear_parent_query_id();
+ static const int kParentQueryIdFieldNumber = 4;
+ inline const ::exec::shared::QueryId& parent_query_id() const;
+ inline ::exec::shared::QueryId* mutable_parent_query_id();
+ inline ::exec::shared::QueryId* release_parent_query_id();
+ inline void set_allocated_parent_query_id(::exec::shared::QueryId* parent_query_id);
+
// @@protoc_insertion_point(class_scope:exec.bit.FragmentHandle)
private:
inline void set_has_query_id();
@@ -125,15 +135,18 @@ class FragmentHandle : public ::google::protobuf::Message {
inline void clear_has_major_fragment_id();
inline void set_has_minor_fragment_id();
inline void clear_has_minor_fragment_id();
+ inline void set_has_parent_query_id();
+ inline void clear_has_parent_query_id();
::google::protobuf::UnknownFieldSet _unknown_fields_;
::exec::shared::QueryId* query_id_;
::google::protobuf::int32 major_fragment_id_;
::google::protobuf::int32 minor_fragment_id_;
+ ::exec::shared::QueryId* parent_query_id_;
mutable int _cached_size_;
- ::google::protobuf::uint32 _has_bits_[(3 + 31) / 32];
+ ::google::protobuf::uint32 _has_bits_[(4 + 31) / 32];
friend void protobuf_AddDesc_ExecutionProtos_2eproto();
friend void protobuf_AssignDesc_ExecutionProtos_2eproto();
@@ -142,6 +155,93 @@ class FragmentHandle : public ::google::protobuf::Message {
void InitAsDefaultInstance();
static FragmentHandle* default_instance_;
};
+// -------------------------------------------------------------------
+
+class ServerPreparedStatementState : public ::google::protobuf::Message {
+ public:
+ ServerPreparedStatementState();
+ virtual ~ServerPreparedStatementState();
+
+ ServerPreparedStatementState(const ServerPreparedStatementState& from);
+
+ inline ServerPreparedStatementState& operator=(const ServerPreparedStatementState& from) {
+ CopyFrom(from);
+ return *this;
+ }
+
+ inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const {
+ return _unknown_fields_;
+ }
+
+ inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() {
+ return &_unknown_fields_;
+ }
+
+ static const ::google::protobuf::Descriptor* descriptor();
+ static const ServerPreparedStatementState& default_instance();
+
+ void Swap(ServerPreparedStatementState* other);
+
+ // implements Message ----------------------------------------------
+
+ ServerPreparedStatementState* New() const;
+ void CopyFrom(const ::google::protobuf::Message& from);
+ void MergeFrom(const ::google::protobuf::Message& from);
+ void CopyFrom(const ServerPreparedStatementState& from);
+ void MergeFrom(const ServerPreparedStatementState& from);
+ void Clear();
+ bool IsInitialized() const;
+
+ int ByteSize() const;
+ bool MergePartialFromCodedStream(
+ ::google::protobuf::io::CodedInputStream* input);
+ void SerializeWithCachedSizes(
+ ::google::protobuf::io::CodedOutputStream* output) const;
+ ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
+ int GetCachedSize() const { return _cached_size_; }
+ private:
+ void SharedCtor();
+ void SharedDtor();
+ void SetCachedSize(int size) const;
+ public:
+
+ ::google::protobuf::Metadata GetMetadata() const;
+
+ // nested types ----------------------------------------------------
+
+ // accessors -------------------------------------------------------
+
+ // optional string sql_query = 1;
+ inline bool has_sql_query() const;
+ inline void clear_sql_query();
+ static const int kSqlQueryFieldNumber = 1;
+ inline const ::std::string& sql_query() const;
+ inline void set_sql_query(const ::std::string& value);
+ inline void set_sql_query(const char* value);
+ inline void set_sql_query(const char* value, size_t size);
+ inline ::std::string* mutable_sql_query();
+ inline ::std::string* release_sql_query();
+ inline void set_allocated_sql_query(::std::string* sql_query);
+
+ // @@protoc_insertion_point(class_scope:exec.bit.ServerPreparedStatementState)
+ private:
+ inline void set_has_sql_query();
+ inline void clear_has_sql_query();
+
+ ::google::protobuf::UnknownFieldSet _unknown_fields_;
+
+ ::std::string* sql_query_;
+
+ mutable int _cached_size_;
+ ::google::protobuf::uint32 _has_bits_[(1 + 31) / 32];
+
+ friend void protobuf_AddDesc_ExecutionProtos_2eproto();
+ friend void protobuf_AssignDesc_ExecutionProtos_2eproto();
+ friend void protobuf_ShutdownFile_ExecutionProtos_2eproto();
+
+ void InitAsDefaultInstance();
+ static ServerPreparedStatementState* default_instance_;
+};
// ===================================================================
@@ -231,6 +331,118 @@ inline void FragmentHandle::set_minor_fragment_id(::google::protobuf::int32 valu
minor_fragment_id_ = value;
}
+// optional .exec.shared.QueryId parent_query_id = 4;
+inline bool FragmentHandle::has_parent_query_id() const {
+ return (_has_bits_[0] & 0x00000008u) != 0;
+}
+inline void FragmentHandle::set_has_parent_query_id() {
+ _has_bits_[0] |= 0x00000008u;
+}
+inline void FragmentHandle::clear_has_parent_query_id() {
+ _has_bits_[0] &= ~0x00000008u;
+}
+inline void FragmentHandle::clear_parent_query_id() {
+ if (parent_query_id_ != NULL) parent_query_id_->::exec::shared::QueryId::Clear();
+ clear_has_parent_query_id();
+}
+inline const ::exec::shared::QueryId& FragmentHandle::parent_query_id() const {
+ return parent_query_id_ != NULL ? *parent_query_id_ : *default_instance_->parent_query_id_;
+}
+inline ::exec::shared::QueryId* FragmentHandle::mutable_parent_query_id() {
+ set_has_parent_query_id();
+ if (parent_query_id_ == NULL) parent_query_id_ = new ::exec::shared::QueryId;
+ return parent_query_id_;
+}
+inline ::exec::shared::QueryId* FragmentHandle::release_parent_query_id() {
+ clear_has_parent_query_id();
+ ::exec::shared::QueryId* temp = parent_query_id_;
+ parent_query_id_ = NULL;
+ return temp;
+}
+inline void FragmentHandle::set_allocated_parent_query_id(::exec::shared::QueryId* parent_query_id) {
+ delete parent_query_id_;
+ parent_query_id_ = parent_query_id;
+ if (parent_query_id) {
+ set_has_parent_query_id();
+ } else {
+ clear_has_parent_query_id();
+ }
+}
+
+// -------------------------------------------------------------------
+
+// ServerPreparedStatementState
+
+// optional string sql_query = 1;
+inline bool ServerPreparedStatementState::has_sql_query() const {
+ return (_has_bits_[0] & 0x00000001u) != 0;
+}
+inline void ServerPreparedStatementState::set_has_sql_query() {
+ _has_bits_[0] |= 0x00000001u;
+}
+inline void ServerPreparedStatementState::clear_has_sql_query() {
+ _has_bits_[0] &= ~0x00000001u;
+}
+inline void ServerPreparedStatementState::clear_sql_query() {
+ if (sql_query_ != &::google::protobuf::internal::kEmptyString) {
+ sql_query_->clear();
+ }
+ clear_has_sql_query();
+}
+inline const ::std::string& ServerPreparedStatementState::sql_query() const {
+ return *sql_query_;
+}
+inline void ServerPreparedStatementState::set_sql_query(const ::std::string& value) {
+ set_has_sql_query();
+ if (sql_query_ == &::google::protobuf::internal::kEmptyString) {
+ sql_query_ = new ::std::string;
+ }
+ sql_query_->assign(value);
+}
+inline void ServerPreparedStatementState::set_sql_query(const char* value) {
+ set_has_sql_query();
+ if (sql_query_ == &::google::protobuf::internal::kEmptyString) {
+ sql_query_ = new ::std::string;
+ }
+ sql_query_->assign(value);
+}
+inline void ServerPreparedStatementState::set_sql_query(const char* value, size_t size) {
+ set_has_sql_query();
+ if (sql_query_ == &::google::protobuf::internal::kEmptyString) {
+ sql_query_ = new ::std::string;
+ }
+ sql_query_->assign(reinterpret_cast<const char*>(value), size);
+}
+inline ::std::string* ServerPreparedStatementState::mutable_sql_query() {
+ set_has_sql_query();
+ if (sql_query_ == &::google::protobuf::internal::kEmptyString) {
+ sql_query_ = new ::std::string;
+ }
+ return sql_query_;
+}
+inline ::std::string* ServerPreparedStatementState::release_sql_query() {
+ clear_has_sql_query();
+ if (sql_query_ == &::google::protobuf::internal::kEmptyString) {
+ return NULL;
+ } else {
+ ::std::string* temp = sql_query_;
+ sql_query_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
+ return temp;
+ }
+}
+inline void ServerPreparedStatementState::set_allocated_sql_query(::std::string* sql_query) {
+ if (sql_query_ != &::google::protobuf::internal::kEmptyString) {
+ delete sql_query_;
+ }
+ if (sql_query) {
+ set_has_sql_query();
+ sql_query_ = sql_query;
+ } else {
+ clear_has_sql_query();
+ sql_query_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
+ }
+}
+
// @@protoc_insertion_point(namespace_scope)