| 1684 | } |
| 1685 | |
| 1686 | static void AppendHboPlanNodeRuns(const TUniqueId& query_id, const TPlanNode& node, |
| 1687 | int64_t cardinality, THistoricalStatsUpdate* history_stats) { |
| 1688 | if (!node.__isset.exec_stats) { |
| 1689 | LOG(ERROR) << "Query " << PrintId(query_id) |
| 1690 | << " is missing exec_stats from FE for node " |
| 1691 | << node.node_id << " " << node.label_detail; |
| 1692 | return; |
| 1693 | } |
| 1694 | // Update the pre-populated exec_stats from FE |
| 1695 | TPlanNodeRun stats = node.exec_stats; |
| 1696 | stats.__set_num_rows(cardinality); |
| 1697 | DCHECK(node.__isset.hbo_hash_keys && !node.hbo_hash_keys.empty()); |
| 1698 | // Store stats under all hash keys for all statistics types. Each THboHashKeys |
| 1699 | // corresponds to a stats type. |
| 1700 | for (const THboHashKeys& hbo_keys : node.hbo_hash_keys) { |
| 1701 | TPlanNodeRunWithKeys run_with_keys; |
| 1702 | run_with_keys.run = stats; |
| 1703 | run_with_keys.hash_keys = hbo_keys.hash_keys; |
| 1704 | run_with_keys.__set_stats_type(hbo_keys.stats_type); |
| 1705 | history_stats->plan_node_runs.push_back(run_with_keys); |
| 1706 | } |
| 1707 | } |
| 1708 | |
| 1709 | Status ImpalaServer::StoreExecutionStats(const QueryHandle& query_handle) { |
| 1710 | if (!query_handle->query_options().store_hbo_stats) { |
no test coverage detected