93.35% (295/316) Uncovered changed code (with context): ================================================================================ src/Common/EquivalenceClasses.h ================================================================================ --- uncovered block 63-63 --- 61 | /// Merge class of smaller size into bigger one 62 | if (class_a->size() < class_b->size()) >> 63 | mergeFromTo(class_a, class_b); 64 | else 65 | mergeFromTo(class_b, class_a); --- uncovered block 81-88 --- 79 | { 80 | for (const auto & [member, class_ptr] : other.member_to_class) >> 81 | { >> 82 | if (class_ptr && class_ptr->size() >= 2) >> 83 | { >> 84 | auto first = class_ptr->front(); >> 85 | for (auto it = std::next(class_ptr->begin()); it != class_ptr->end(); ++it) >> 86 | add(first, *it); >> 87 | } >> 88 | } 89 | } 90 | ================================================================================ src/Interpreters/JoinExpressionActions.cpp ================================================================================ --- uncovered block 443-443 --- 441 | const auto * node = getNode(); 442 | while (node->type == ActionsDAG::ActionType::ALIAS) >> 443 | node = node->children.at(0); 444 | return JoinActionRef(node, getData()); 445 | } ================================================================================ src/Processors/QueryPlan/Optimizations/QueryPlanOptimizationSettings.cpp ================================================================================ --- uncovered block 144-146 --- 142 | query_plan_optimize_join_order_limit = use_parallel_replicas ? 0 : from[Setting::query_plan_optimize_join_order_limit]; 143 | if (query_plan_optimize_join_order_limit > 64) >> 144 | throw Exception(ErrorCodes::INVALID_SETTING_VALUE, >> 145 | "The value of the setting `query_plan_optimize_join_order_limit` is too large: {}, " >> 146 | "maximum allowed value is 64", query_plan_optimize_join_order_limit); 147 | enable_join_transitive_predicates = from[Setting::enable_join_transitive_predicates]; 148 | ================================================================================ src/Processors/QueryPlan/Optimizations/joinOrder.cpp ================================================================================ --- uncovered block 110-110 --- 108 | return std::nullopt; 109 | if (!resolved.getSourceRelations().getSingleBit()) >> 110 | return std::nullopt; 111 | return resolved; 112 | } --- uncovered block 119-119 --- 117 | { 118 | if (!edge) >> 119 | continue; 120 | 121 | auto [op, lhs, rhs] = edge.asBinaryPredicate(); --- uncovered block 123-123 --- 121 | auto [op, lhs, rhs] = edge.asBinaryPredicate(); 122 | if (op != JoinConditionOperator::Equals) >> 123 | continue; 124 | 125 | auto lhs_resolved = resolveInput(lhs); --- uncovered block 160-160 --- 158 | auto equiv_class = column_equivalences.getClass(member); 159 | if (!equiv_class) >> 160 | continue; 161 | 162 | for (const auto & other : *equiv_class) --- uncovered block 205-205 --- 203 | auto [op, lhs, rhs] = predicate.asBinaryPredicate(); 204 | if (op != JoinConditionOperator::Equals) >> 205 | return false; 206 | 207 | auto lhs_resolved = resolveInput(lhs); --- uncovered block 250-250 --- 248 | auto equiv_class = column_equivalences.getClass(member); 249 | if (!equiv_class || !visited.insert(equiv_class).second) >> 250 | continue; 251 | 252 | for (const auto & other : *equiv_class) --- uncovered block 425-425 --- 423 | auto relation = equiv_member.getSourceRelations().getSingleBit(); 424 | if (!relation) >> 425 | continue; 426 | if (left.test(*relation)) 427 | { --- uncovered block 766-766 --- 764 | { 765 | if (connected && join_kind == JoinKind::Cross) >> 766 | join_kind = JoinKind::Inner; 767 | auto cardinality = estimateJoinCardinality(left, right, selectivity, join_kind.value()); 768 | JoinOperator join_operator( === Lost Baseline Coverage: 48 lines === ================================================================================ src/Interpreters/JoinExpressionActions.cpp ================================================================================ --- lost coverage block 144-144 --- 142 | else if (right_column_names.contains(column_name)) 143 | rels.set(1); >> 144 | else 145 | throw Exception(ErrorCodes::LOGICAL_ERROR, "Input node {} from is not in headers: [{}] [{}], dag: {}", 146 | column_name, actions_dag_.dumpDAG(), left_header.dumpNames(), right_header.dumpNames()); --- lost coverage block 146-146 --- 144 | else 145 | throw Exception(ErrorCodes::LOGICAL_ERROR, "Input node {} from is not in headers: [{}] [{}], dag: {}", >> 146 | column_name, actions_dag_.dumpDAG(), left_header.dumpNames(), right_header.dumpNames()); 147 | expression_sources[input_nodes[i]] = rels; 148 | } ================================================================================ src/Planner/PlannerCorrelatedSubqueries.cpp ================================================================================ --- lost coverage block 124-124 --- 122 | struct DecorrelationContext 123 | { >> 124 | const CorrelatedSubquery & correlated_subquery; 125 | const PlannerContextPtr & planner_context; 126 | QueryPlan query_plan; // LHS plan ================================================================================ src/Processors/QueryPlan/Optimizations/joinOrder.cpp ================================================================================ --- lost coverage block 752-752 --- 750 | bool connected = !edge.empty() 751 | || query_graph.areTransitivelyConnected(left->relations, right->relations); >> 752 | 753 | LOG_TEST(log, "Considering join between {} and {}, predicates count: {}, connected: {}", 754 | left->dump(), right->dump(), edge.size(), connected); --- lost coverage block 755-755 --- 753 | LOG_TEST(log, "Considering join between {} and {}, predicates count: {}, connected: {}", 754 | left->dump(), right->dump(), edge.size(), connected); >> 755 | 756 | if (!connected) 757 | continue; --- lost coverage block 761-761 --- 759 | auto selectivity = computeSelectivity(edge, left->relations, right->relations); 760 | auto new_cost = computeJoinCost(left, right, selectivity); >> 761 | 762 | auto current_best = dp_table.find(combined_relations); 763 | if (current_best == dp_table.end() || new_cost < current_best->second->cost) WARNING: Failed to get start time for [Print Uncovered Code] - start time and duration won't be set