From 7bfa42d1b3ea8e0d06e536a9369ad8d736e7739a Mon Sep 17 00:00:00 2001 From: Prashant Singh Date: Fri, 15 Nov 2024 08:23:31 -0800 Subject: [PATCH] remove encode and then decode in rest util --- .../apache/polaris/service/catalog/IcebergCatalogAdapter.java | 2 +- .../polaris/service/PolarisApplicationIntegrationTest.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/polaris-service/src/main/java/org/apache/polaris/service/catalog/IcebergCatalogAdapter.java b/polaris-service/src/main/java/org/apache/polaris/service/catalog/IcebergCatalogAdapter.java index 8e29cdb25..a4c70e683 100644 --- a/polaris-service/src/main/java/org/apache/polaris/service/catalog/IcebergCatalogAdapter.java +++ b/polaris-service/src/main/java/org/apache/polaris/service/catalog/IcebergCatalogAdapter.java @@ -180,7 +180,7 @@ public Response loadNamespaceMetadata( } private static Namespace decodeNamespace(String namespace) { - return RESTUtil.decodeNamespace(URLEncoder.encode(namespace, Charset.defaultCharset())); + return RESTUtil.decodeNamespace(namespace); } @Override diff --git a/polaris-service/src/test/java/org/apache/polaris/service/PolarisApplicationIntegrationTest.java b/polaris-service/src/test/java/org/apache/polaris/service/PolarisApplicationIntegrationTest.java index fefbed196..e7f2828cb 100644 --- a/polaris-service/src/test/java/org/apache/polaris/service/PolarisApplicationIntegrationTest.java +++ b/polaris-service/src/test/java/org/apache/polaris/service/PolarisApplicationIntegrationTest.java @@ -341,7 +341,7 @@ public void testIcebergListNamespacesNestedNotFound() throws IOException { sessionCatalog.listNamespaces( sessionContext, Namespace.of("top_level", "whoops"))) .isInstanceOf(NoSuchNamespaceException.class) - .hasMessage("Namespace does not exist: top_level%1Fwhoops"); + .hasMessage("Namespace does not exist: top_level.whoops"); } }