| 278 | |
| 279 | |
| 280 | static const ASTTableExpression * getFirstTableExpression(const ASTSelectQuery & select) |
| 281 | { |
| 282 | if (!select.tables()) |
| 283 | return {}; |
| 284 | |
| 285 | const auto & tables_in_select_query = select.tables()->as<ASTTablesInSelectQuery &>(); |
| 286 | if (tables_in_select_query.children.empty()) |
| 287 | return {}; |
| 288 | |
| 289 | const auto & tables_element = tables_in_select_query.children[0]->as<ASTTablesInSelectQueryElement &>(); |
| 290 | if (!tables_element.table_expression) |
| 291 | return {}; |
| 292 | |
| 293 | return tables_element.table_expression->as<ASTTableExpression>(); |
| 294 | } |
| 295 | |
| 296 | static ASTTableExpression * getFirstTableExpression(ASTSelectQuery & select) |
| 297 | { |
no test coverage detected