Describe the unexpected behaviour
Consider the following query:
SELECT * FROM iceberg_catalog.`namespace.my%2Ftable`
The requests sent to the Iceberg Catalog are percent-encoded before being sent, which means that the table name my%2Ftable will be transformed to my/table.
This behaviour is different from other Iceberg clients, which do not percent-encode table names (ex: PyIceberg).
Which ClickHouse versions are affected?
All versions that support REST Catalogs
Potential Patch:
diff --git a/src/Databases/DataLake/RestCatalog.cpp b/src/Databases/DataLake/RestCatalog.cpp
index de7f8a587c6..1b2abc5b4c2 100644
--- a/src/Databases/DataLake/RestCatalog.cpp
+++ b/src/Databases/DataLake/RestCatalog.cpp
@@ -272,7 +272,7 @@ DB::ReadWriteBufferFromHTTPPtr RestCatalog::createReadBuffer(
{
const auto & context = getContext();
- Poco::URI url(base_url / endpoint);
+ Poco::URI url(base_url / endpoint, false);
if (!params.empty())
url.setQueryParameters(params);
Describe the unexpected behaviour
Consider the following query:
The requests sent to the Iceberg Catalog are percent-encoded before being sent, which means that the table name
my%2Ftablewill be transformed tomy/table.This behaviour is different from other Iceberg clients, which do not percent-encode table names (ex: PyIceberg).
Which ClickHouse versions are affected?
All versions that support REST Catalogs
Potential Patch: