File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
tests/integration/test_database_glue Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -232,10 +232,10 @@ BlockIO InterpreterShowTablesQuery::execute()
232232 }
233233 auto rewritten_query = getRewrittenQuery ();
234234 String database = getContext ()->resolveDatabase (query.getFrom ());
235- if (DatabaseCatalog::instance ().isDatalakeCatalog (database))
235+ if (query. databases || DatabaseCatalog::instance ().isDatalakeCatalog (database))
236236 {
237237 auto context_copy = Context::createCopy (getContext ());
238- // / HACK To always show them in explicit "SHOW TABLES" queries
238+ // / HACK To always show them in explicit "SHOW TABLES" and "SHOW DATABASES" queries
239239 context_copy->setSetting (" show_data_lake_catalogs_in_system_tables" , true );
240240 return executeQuery (rewritten_query, context_copy, QueryFlags{ .internal = true }).second ;
241241 }
Original file line number Diff line number Diff line change @@ -617,6 +617,8 @@ def test_system_tables(started_cluster):
617617 node .query (f"SELECT count() FROM { CATALOG_NAME } .`{ namespace } .{ table_name } `" )
618618 )
619619
620+ assert CATALOG_NAME in node .query ("SHOW DATABASES" )
621+ assert table_name in node .query (f"SHOW TABLES FROM { CATALOG_NAME } " )
620622 # system.tables
621623 assert int (node .query (f"SELECT count() FROM system.tables WHERE database = '{ CATALOG_NAME } ' and table ilike '%{ root_namespace } %' SETTINGS show_data_lake_catalogs_in_system_tables = true" ).strip ()) == 4
622624 assert int (node .query (f"SELECT count() FROM system.tables WHERE database = '{ CATALOG_NAME } ' and table ilike '%{ root_namespace } %'" ).strip ()) == 0
You can’t perform that action at this time.
0 commit comments