MCPcopy Create free account
hub / github.com/ClickHouse/ClickHouse / executeImpl

Method executeImpl

src/TableFunctions/TableFunctionProjection.cpp:81–98  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

79}
80
81StoragePtr 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
100void registerTableFunctionMergeTreeProjection(TableFunctionFactory & factory);
101void registerTableFunctionMergeTreeProjection(TableFunctionFactory & factory)

Callers

nothing calls this directly

Calls 4

getTableMethod · 0.45
getMethod · 0.45
startupMethod · 0.45

Tested by

no test coverage detected