| 79 | } |
| 80 | |
| 81 | StoragePtr TableFunctionMergeTreeProjection::executeImpl( |
| 82 | const ASTPtr & /*ast_function*/, |
| 83 | ContextPtr context, |
| 84 | const std::string & table_name, |
| 85 | ColumnsDescription /*cached_columns*/, |
| 86 | bool /* is_insert_query */) const |
| 87 | { |
| 88 | auto source_table = DatabaseCatalog::instance().getTable(source_table_id, context); |
| 89 | auto metadata_snapshot = source_table->getInMemoryMetadataPtr(context, false); |
| 90 | ProjectionDescriptionRawPtr projection = &metadata_snapshot->getProjections().get(projection_name); |
| 91 | |
| 92 | StorageID storage_id(getDatabaseName(), table_name); |
| 93 | auto res = std::make_shared<StorageFromMergeTreeProjection>( |
| 94 | std::move(storage_id), std::move(source_table), metadata_snapshot, projection); |
| 95 | |
| 96 | res->startup(); |
| 97 | return res; |
| 98 | } |
| 99 | |
| 100 | void registerTableFunctionMergeTreeProjection(TableFunctionFactory & factory); |
| 101 | void registerTableFunctionMergeTreeProjection(TableFunctionFactory & factory) |
nothing calls this directly
no test coverage detected