15 #ifndef IMPALA_SERVICE_CHILD_QUERY_H
16 #define IMPALA_SERVICE_CHILD_QUERY_H
19 #include <boost/thread.hpp>
23 #include "gen-cpp/TCLIService_types.h"
92 const apache::hive::service::cli::thrift::TTableSchema&
result_schema() {
96 const apache::hive::service::cli::thrift::TRowSet&
result_data() {
108 apache::hive::service::cli::thrift::TExecuteStatementReq* exec_stmt_req);
125 apache::hive::service::cli::thrift::TGetResultSetMetadataResp
meta_resp_;
126 apache::hive::service::cli::thrift::TFetchResultsResp
fetch_resp_;
ImpalaServer::QueryExecState * parent_exec_state_
apache::hive::service::cli::thrift::TOperationHandle hs2_handle_
HS2 query handle. Set in ExecChildQuery().
apache::hive::service::cli::thrift::TGetResultSetMetadataResp meta_resp_
Result metadata and result rows of query.
const apache::hive::service::cli::thrift::TRowSet & result_data()
ImpalaServer * parent_server_
Parent Impala server used for executing this child query. Not owned.
std::string query_
SQL string to be executed.
void SetQueryOptions(const TQueryOptions &parent_options, apache::hive::service::cli::thrift::TExecuteStatementReq *exec_stmt_req)
ChildQuery(const ChildQuery &other)
const apache::hive::service::cli::thrift::TTableSchema & result_schema()
Status ExecAndFetch()
Executes this child query through HiveServer2 and fetches all its results.
apache::hive::service::cli::thrift::TFetchResultsResp fetch_resp_
ChildQuery & operator=(const ChildQuery &other)
boost::mutex lock_
Protects is_running_ and is_cancelled_ to ensure idempotent cancellations.
ChildQuery(const std::string &query, ImpalaServer::QueryExecState *parent_exec_state, ImpalaServer *parent_server)
bool is_cancelled_
Indicates whether this child query has been cancelled. Set in Cancel().
static const string PARENT_QUERY_OPT