MCPcopy Create free account
hub / github.com/apache/impala / ExecDdlRequestImplSync

Method ExecDdlRequestImplSync

be/src/service/client-request-state.cc:786–827  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

784}
785
786Status ClientRequestState::ExecDdlRequestImplSync() {
787 if (catalog_op_type() != TCatalogOpType::DDL &&
788 catalog_op_type() != TCatalogOpType::RESET_METADATA) {
789 Status status = ExecLocalCatalogOp(exec_request().catalog_op_request);
790 lock_guard<mutex> l(lock_);
791 return UpdateQueryStatus(status);
792 }
793
794 if (ddl_type() == TDdlType::COMPUTE_STATS) {
795 const TComputeStatsParams& compute_stats_params =
796 exec_request().catalog_op_request.ddl_params.compute_stats_params;
797 RuntimeProfile* child_profile =
798 RuntimeProfile::Create(&profile_pool_, "Child Queries");
799 profile_->AddChild(child_profile);
800 // Add child queries for computing table and column stats.
801 vector<ChildQuery> child_queries;
802 if (compute_stats_params.__isset.tbl_stats_query) {
803 RuntimeProfile* profile =
804 RuntimeProfile::Create(&profile_pool_, "Table Stats Query");
805 child_profile->AddChild(profile);
806 child_queries.emplace_back(compute_stats_params.tbl_stats_query, this,
807 parent_server_, profile, &profile_pool_);
808 }
809 if (compute_stats_params.__isset.col_stats_query) {
810 RuntimeProfile* profile =
811 RuntimeProfile::Create(&profile_pool_, "Column Stats Query");
812 child_profile->AddChild(profile);
813 child_queries.emplace_back(compute_stats_params.col_stats_query, this,
814 parent_server_, profile, &profile_pool_);
815 }
816
817 if (child_queries.size() > 0) {
818 RETURN_IF_ERROR(child_query_executor_->ExecAsync(move(child_queries)));
819 } else {
820 SetResultSet({"No partitions selected for incremental stats update."});
821 }
822 return Status::OK();
823 }
824
825 DCHECK(false) << "Not handled sync exec ddl request.";
826 return Status::OK();
827}
828
829void ClientRequestState::ExecDdlRequestImpl(bool exec_in_worker_thread) {
830 bool is_CTAS = (catalog_op_type() == TCatalogOpType::DDL

Callers

nothing calls this directly

Calls 6

CreateClass · 0.85
moveFunction · 0.85
OKFunction · 0.85
AddChildMethod · 0.80
sizeMethod · 0.45
ExecAsyncMethod · 0.45

Tested by

no test coverage detected