[Fix](executor)Fix query runtime statistics report failed #31064

This commit is contained in:
wangbo
2024-02-19 09:57:11 +08:00
committed by yiguolei
parent e29d1ff59d
commit 2f960c49f5
3 changed files with 4 additions and 4 deletions

View File

@ -612,10 +612,9 @@ Status FragmentMgr::_get_query_ctx(const Params& params, TUniqueId query_id, boo
// This may be a first fragment request of the query.
// Create the query fragments context.
query_ctx = QueryContext::create_shared(query_id, params.fragment_num_on_host, _exec_env,
params.query_options);
params.query_options, params.coord);
RETURN_IF_ERROR(DescriptorTbl::create(&(query_ctx->obj_pool), params.desc_tbl,
&(query_ctx->desc_tbl)));
query_ctx->coord_addr = params.coord;
// set file scan range params
if (params.__isset.file_scan_params) {
query_ctx->file_scan_range_params_map = params.file_scan_params;

View File

@ -34,12 +34,13 @@ public:
};
QueryContext::QueryContext(TUniqueId query_id, int total_fragment_num, ExecEnv* exec_env,
const TQueryOptions& query_options)
const TQueryOptions& query_options, TNetworkAddress coord_addr)
: fragment_num(total_fragment_num),
timeout_second(-1),
_query_id(query_id),
_exec_env(exec_env),
_query_options(query_options) {
this->coord_addr = coord_addr;
_start_time = VecDateTimeValue::local_time();
_shared_hash_table_controller.reset(new vectorized::SharedHashTableController());
_shared_scanner_controller.reset(new vectorized::SharedScannerController());

View File

@ -70,7 +70,7 @@ class QueryContext {
public:
QueryContext(TUniqueId query_id, int total_fragment_num, ExecEnv* exec_env,
const TQueryOptions& query_options);
const TQueryOptions& query_options, TNetworkAddress coord_addr);
~QueryContext();