Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 28 additions & 13 deletions src/Storages/System/StorageSystemTables.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -607,18 +607,25 @@ class TablesBlockSource : public ISource
if (columns_mask[src_index++])
{
bool inserted = false;
// Extract from specific DataLake metadata if suitable
if (auto * obj = dynamic_cast<StorageObjectStorageCluster *>(table.get()))
try
{
if (auto * dl_meta = obj->getExternalMetadata(context))
// Extract from specific DataLake metadata if suitable
if (auto * obj = dynamic_cast<StorageObjectStorageCluster *>(table.get()))
{
if (auto p = dl_meta->partitionKey(context); p.has_value())
if (auto * dl_meta = obj->getExternalMetadata(context))
{
res_columns[res_index++]->insert(*p);
inserted = true;
if (auto p = dl_meta->partitionKey(context); p.has_value())
{
res_columns[res_index++]->insert(*p);
inserted = true;
}
}
}

}
catch (const Exception &)
{
/// Failed to get info from Iceberg. It's not critical, just log it.
tryLogCurrentException("StorageSystemTables");
}

if (!inserted)
Expand All @@ -634,18 +641,26 @@ class TablesBlockSource : public ISource
{
bool inserted = false;

// Extract from specific DataLake metadata if suitable
if (auto * obj = dynamic_cast<StorageObjectStorageCluster *>(table.get()))
try
{
if (auto * dl_meta = obj->getExternalMetadata(context))
// Extract from specific DataLake metadata if suitable
if (auto * obj = dynamic_cast<StorageObjectStorageCluster *>(table.get()))
{
if (auto p = dl_meta->sortingKey(context); p.has_value())
if (auto * dl_meta = obj->getExternalMetadata(context))
{
res_columns[res_index++]->insert(*p);
inserted = true;
if (auto p = dl_meta->sortingKey(context); p.has_value())
{
res_columns[res_index++]->insert(*p);
inserted = true;
}
}
}
}
catch (const Exception &)
{
/// Failed to get info from Iceberg. It's not critical, just log it.
tryLogCurrentException("StorageSystemTables");
}

if (!inserted)
{
Expand Down
Loading