From 80340e7e5c2b65554101ec70ed1b9a493dc6f9b0 Mon Sep 17 00:00:00 2001 From: Anton Ivashkin Date: Thu, 7 May 2026 15:14:00 +0200 Subject: [PATCH] Do not read empty namespaces from catalog --- src/Databases/DataLake/RestCatalog.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Databases/DataLake/RestCatalog.cpp b/src/Databases/DataLake/RestCatalog.cpp index 1abbf67bc58f..d7bf5ff9dd3c 100644 --- a/src/Databases/DataLake/RestCatalog.cpp +++ b/src/Databases/DataLake/RestCatalog.cpp @@ -646,6 +646,13 @@ void RestCatalog::getNamespacesRecursive( { chassert(current_namespace.starts_with(base_namespace)); + /// Protection from subnamepsaces with empty names + if (current_namespace == base_namespace) + { + LOG_WARNING(log, "Namespace {} has a subnamespace with empty name. This is an error in catalog implementation.", base_namespace); + continue; + } + if (stop_condition && stop_condition(current_namespace)) break;