nastra commented on code in PR #17697:
URL: https://github.com/apache/iceberg/pull/17697#discussion_r3801357780
##########
core/src/test/java/org/apache/iceberg/rest/TestRESTUtil.java:
##########
@@ -108,16 +108,17 @@ public void testRoundTripUrlEncodeDecodeNamespace(String
namespaceSeparator) {
@Test
public void encodeAsOldClientAndDecodeAsNewServer() {
Namespace namespace = Namespace.of("first", "second", "third");
- // old client would call encodeNamespace without specifying a separator
- String encodedNamespace = RESTUtil.encodeNamespace(namespace);
+ // old client would call encodeNamespace with the legacy separator
+ String encodedNamespace =
+ RESTUtil.encodeNamespace(namespace,
RESTUtil.NAMESPACE_SEPARATOR_URLENCODED_UTF_8);
assertThat(encodedNamespace).contains(RESTUtil.NAMESPACE_SEPARATOR_URLENCODED_UTF_8);
// old client would also call namespaceToQueryParam without specifying a
separator
String namespaceAsUnicode = RESTUtil.namespaceToQueryParam(namespace);
assertThat(namespaceAsUnicode).contains("\u001f");
// newer server would try and decode the namespace with the separator it
communicates to clients
- String separator = "%2E";
+ String separator = RESTCatalogAdapter.NAMESPACE_SEPARATOR_URLENCODED_UTF_8;
Review Comment:
isn't this a behavioral change? the goal of the test was to encode the
namespace with the legacy separator and decode it with a different namespace
separator
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]