| 126 | } |
| 127 | |
| 128 | std::optional<DatabaseAndTableWithAlias> getDatabaseAndTable(const ASTSelectQuery & select, size_t table_number) |
| 129 | { |
| 130 | const ASTTableExpression * table_expression = getTableExpression(select, table_number); |
| 131 | if (!table_expression) |
| 132 | return {}; |
| 133 | |
| 134 | ASTPtr database_and_table_name = table_expression->database_and_table_name; |
| 135 | if (!database_and_table_name || !database_and_table_name->as<ASTTableIdentifier>()) |
| 136 | return {}; |
| 137 | |
| 138 | return DatabaseAndTableWithAlias(database_and_table_name); |
| 139 | } |
| 140 | |
| 141 | bool TableWithColumnNamesAndTypes::hasColumn(const String & name) const |
| 142 | { |
no test coverage detected