| 1137 | } |
| 1138 | |
| 1139 | static std::shared_ptr<IJoin> chooseJoinAlgorithm( |
| 1140 | std::shared_ptr<TableJoin> analyzed_join, const ColumnsWithTypeAndName & left_sample_columns, std::unique_ptr<QueryPlan> & joined_plan, ContextPtr context) |
| 1141 | { |
| 1142 | auto right_sample_block = joined_plan->getCurrentHeader(); |
| 1143 | const auto & join_algorithms = analyzed_join->getEnabledJoinAlgorithms(); |
| 1144 | for (const auto alg : join_algorithms) |
| 1145 | { |
| 1146 | auto join = tryCreateJoin(alg, analyzed_join, left_sample_columns, right_sample_block, joined_plan, context); |
| 1147 | if (join) |
| 1148 | return join; |
| 1149 | } |
| 1150 | |
| 1151 | throw Exception(ErrorCodes::NOT_IMPLEMENTED, |
| 1152 | "Can't execute any of specified join algorithms for this strictness/kind and right storage type"); |
| 1153 | } |
| 1154 | |
| 1155 | static std::unique_ptr<QueryPlan> buildJoinedPlan( |
| 1156 | ContextPtr context, |
no test coverage detected