| 720 | } |
| 721 | |
| 722 | ScopePtr QueryAnalyzerVisitor::analyzeTableFunction(ASTFunction & table_function, const QualifiedName & column_prefix) |
| 723 | { |
| 724 | // execute table function |
| 725 | StoragePtr storage = context->getQueryContext()->executeTableFunction(table_function.ptr()); |
| 726 | StorageID storage_id = storage->getStorageID(); |
| 727 | analysis.storage_results[&table_function] |
| 728 | = StorageAnalysis{.database = storage_id.getDatabaseName(), .table = storage_id.getTableName(), .storage = storage}; |
| 729 | |
| 730 | // get columns information |
| 731 | auto storage_metadata = storage->getInMemoryMetadataPtr(); |
| 732 | const auto & columns_description = storage_metadata->getColumns(); |
| 733 | FieldDescriptions field_descriptions; |
| 734 | |
| 735 | for (const auto & column : columns_description.getAllPhysical()) |
| 736 | { |
| 737 | field_descriptions.emplace_back( |
| 738 | column.name, |
| 739 | column.type, |
| 740 | column_prefix, |
| 741 | storage, |
| 742 | storage_metadata, |
| 743 | &table_function, |
| 744 | column.name, |
| 745 | field_descriptions.size(), |
| 746 | true); |
| 747 | } |
| 748 | |
| 749 | const auto * table_function_scope = createScope(field_descriptions); |
| 750 | analysis.setScope(table_function, table_function_scope); |
| 751 | return table_function_scope; |
| 752 | } |
| 753 | |
| 754 | ScopePtr QueryAnalyzerVisitor::analyzeJoin( |
| 755 | ASTTableJoin & table_join, |
nothing calls this directly
no test coverage detected