mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 15:42:02 +00:00
dbms: fix [#METR-13667]
This commit is contained in:
parent
14c231c055
commit
140b4545dd
@ -75,20 +75,20 @@ BlockInputStreams StorageSystemTables::read(
|
||||
|
||||
ColumnWithNameAndType StorageSystemTables::getFilteredDatabases(ASTPtr query)
|
||||
{
|
||||
ColumnWithNameAndType filtered_databases_column;
|
||||
filtered_databases_column.name = "database";
|
||||
filtered_databases_column.type = new DataTypeString;
|
||||
filtered_databases_column.column = new ColumnString;
|
||||
ColumnWithNameAndType column;
|
||||
column.name = "database";
|
||||
column.type = new DataTypeString;
|
||||
column.column = new ColumnString;
|
||||
|
||||
Block filtered_databases_block;
|
||||
filtered_databases_block.insert(filtered_databases_column);
|
||||
Block block;
|
||||
block.insert(column);
|
||||
for (auto database_it = context.getDatabases().begin(); database_it != context.getDatabases().end(); ++database_it)
|
||||
{
|
||||
filtered_databases_column.column->insert(database_it->first);
|
||||
column.column->insert(database_it->first);
|
||||
}
|
||||
VirtualColumnUtils::filterBlockWithQuery(query, filtered_databases_block, context);
|
||||
VirtualColumnUtils::filterBlockWithQuery(query, block, context);
|
||||
|
||||
return filtered_databases_column;
|
||||
return block.getByPosition(0);
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user