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

Function getCreateTableQueryClean

src/Interpreters/SystemLog.cpp:296–304  ·  view source on GitHub ↗

returns CREATE TABLE query, but with removed UUID That way it can be used to compare with the SystemLog::getCreateTableQuery()

Source from the content-addressed store, hash-verified

294/// returns CREATE TABLE query, but with removed UUID
295/// That way it can be used to compare with the SystemLog::getCreateTableQuery()
296ASTPtr getCreateTableQueryClean(const StorageID & table_id, ContextPtr context)
297{
298 DatabasePtr database = DatabaseCatalog::instance().getDatabase(table_id.database_name);
299 ASTPtr old_ast = database->getCreateTableQuery(table_id.table_name, context);
300 auto & old_create_query_ast = old_ast->as<ASTCreateQuery &>();
301 /// Reset UUID
302 old_create_query_ast.uuid = UUIDHelpers::Nil;
303 return old_ast;
304}
305
306}
307

Callers 1

prepareTableMethod · 0.85

Calls 2

getDatabaseMethod · 0.45
getCreateTableQueryMethod · 0.45

Tested by

no test coverage detected