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

Method parseQueryFromMetadataOnDisk

src/Databases/DatabaseReplicated.cpp:2036–2043  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2034 return parseQueryFromMetadata(context_, database_name_, node_name, query, description);
2035}
2036ASTPtr DatabaseReplicated::parseQueryFromMetadataOnDisk(const String & table_name) const
2037{
2038 auto file_path = getObjectMetadataPath(table_name);
2039 String description = fmt::format("in metadata {}", file_path);
2040 auto db_disk = getDisk();
2041 String query = DB::readMetadataFile(db_disk, file_path);
2042 return parseQueryFromMetadata(getContext(), getDatabaseName(), table_name, query, description);
2043}
2044
2045void DatabaseReplicated::dropReplica(
2046 DatabaseReplicated * database,

Callers

nothing calls this directly

Calls 3

readMetadataFileFunction · 0.85
formatFunction · 0.50
getContextFunction · 0.50

Tested by

no test coverage detected