Merge pull request #48162 from ClickHouse/vdimir/remove_unused_from_gtest_transform_query

Remove unused mockSystemDatabase from gtest_transform_query_for_exter…
This commit is contained in:
Alexey Milovidov 2023-03-30 01:29:42 +03:00 committed by GitHub
commit a629fa3ed9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -106,22 +106,9 @@ private:
StorageID(db_name, table_name), ColumnsDescription{tab.columns}, ConstraintsDescription{}, String{}));
}
DatabaseCatalog::instance().attachDatabase(database->getDatabaseName(), database);
// DatabaseCatalog::instance().attachDatabase("system", mockSystemDatabase());
context->setCurrentDatabase("test");
}
DatabasePtr mockSystemDatabase()
{
DatabasePtr database = std::make_shared<DatabaseMemory>("system", context);
auto tab = TableWithColumnNamesAndTypes(createDBAndTable("one", "system"), { {"dummy", std::make_shared<DataTypeUInt8>()} });
database->attachTable(context, tab.table.table,
std::make_shared<StorageMemory>(
StorageID(tab.table.database, tab.table.table),
ColumnsDescription{tab.columns}, ConstraintsDescription{}, String{}));
return database;
}
};
static void checkOld(