Skip to content

Commit 3a7a768

Browse files
Backport ClickHouse#88330 to 25.8: Add missing checks for canContainMergeTreeTables() into system tables
1 parent 72e4f78 commit 3a7a768

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

src/Databases/DataLake/DatabaseDataLake.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,6 @@ DatabaseTablesIteratorPtr DatabaseDataLake::getTablesIterator(
500500
}
501501
catch (...)
502502
{
503-
tryLogCurrentException(log, fmt::format("Ignoring table {}", table_name));
504503
promise->set_exception(std::current_exception());
505504
}
506505
});
@@ -587,7 +586,7 @@ DatabaseTablesIteratorPtr DatabaseDataLake::getLightweightTablesIterator(
587586
}
588587
catch (...)
589588
{
590-
tryLogCurrentException(log, fmt::format("ignoring table {}", table_name));
589+
tryLogCurrentException(log, fmt::format("Ignoring table {}", table_name));
591590
}
592591
promise->set_value(storage);
593592
});

src/Storages/System/StorageSystemDataSkippingIndices.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,8 @@ void ReadFromSystemDataSkippingIndices::initializePipeline(QueryPipelineBuilder
266266
{
267267
if (database_name == DatabaseCatalog::TEMPORARY_DATABASE)
268268
continue;
269+
if (!database->canContainMergeTreeTables())
270+
continue;
269271

270272
/// Lazy database can contain only very primitive tables,
271273
/// it cannot contain tables with data skipping indices.

src/Storages/System/StorageSystemProjections.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,8 @@ void ReadFromSystemProjections::initializePipeline(QueryPipelineBuilder & pipeli
253253
{
254254
if (database_name == DatabaseCatalog::TEMPORARY_DATABASE)
255255
continue;
256+
if (!database->canContainMergeTreeTables())
257+
continue;
256258

257259
/// Lazy database can contain only very primitive tables, it cannot contain tables with projections.
258260
/// Skip it to avoid unnecessary tables loading in the Lazy database.

0 commit comments

Comments
 (0)