| 288 | |
| 289 | |
| 290 | static const ASTTableExpression * getFirstTableExpression(const ASTSelectQuery & select) |
| 291 | { |
| 292 | if (!select.tables()) |
| 293 | return {}; |
| 294 | |
| 295 | const auto & tables_in_select_query = select.tables()->as<ASTTablesInSelectQuery &>(); |
| 296 | if (tables_in_select_query.children.empty()) |
| 297 | return {}; |
| 298 | |
| 299 | const auto & tables_element = tables_in_select_query.children[0]->as<ASTTablesInSelectQueryElement &>(); |
| 300 | if (!tables_element.table_expression) |
| 301 | return {}; |
| 302 | |
| 303 | return tables_element.table_expression->as<ASTTableExpression>(); |
| 304 | } |
| 305 | |
| 306 | static ASTTableExpression * getFirstTableExpression(ASTSelectQuery & select) |
| 307 | { |
no test coverage detected