| 1669 | } |
| 1670 | |
| 1671 | static bool GetCardinalityIfComplete(const TPlanNodeExecSummary& node_summary, |
| 1672 | const TPlanNode& plan_node, int64_t* cardinality) { |
| 1673 | int64_t sum = 0; |
| 1674 | for (const TExecStats& stat : node_summary.exec_stats) { |
| 1675 | sum += stat.cardinality; |
| 1676 | if (stat.__isset.last_batch_returned && !stat.last_batch_returned) { |
| 1677 | LOG(INFO) << "Skip execution stats of " << plan_node.node_id << ":" |
| 1678 | << plan_node.label << " - not all instances finished (Last Batch Returned)"; |
| 1679 | return false; |
| 1680 | } |
| 1681 | } |
| 1682 | *cardinality = sum; |
| 1683 | return true; |
| 1684 | } |
| 1685 | |
| 1686 | static void AppendHboPlanNodeRuns(const TUniqueId& query_id, const TPlanNode& node, |
| 1687 | int64_t cardinality, THistoricalStatsUpdate* history_stats) { |