adutra commented on code in PR #4508:
URL: https://github.com/apache/polaris/pull/4508#discussion_r3274519799
##########
polaris-core/src/main/java/org/apache/polaris/core/rest/PolarisResourcePaths.java:
##########
@@ -43,27 +49,46 @@ public class PolarisResourcePaths {
public static final String V1_APPLICABLE_POLICIES =
"/polaris/v1/{prefix}/applicable-policies";
private final String prefix;
+ private final String namespaceSeparatorEncoded;
- public PolarisResourcePaths(String prefix) {
+ public PolarisResourcePaths(String prefix, String namespaceSeparatorEncoded)
{
this.prefix = prefix;
+ this.namespaceSeparatorEncoded = namespaceSeparatorEncoded;
}
public static PolarisResourcePaths forCatalogProperties(Map<String, String>
properties) {
- return new PolarisResourcePaths(properties.get(PREFIX));
+ String namespaceSeparatorEncoded =
+ properties.getOrDefault(
+ RESTCatalogProperties.NAMESPACE_SEPARATOR,
+ RESTCatalogProperties.NAMESPACE_SEPARATOR_DEFAULT);
+ if
(!namespaceSeparatorEncoded.equals(RESTCatalogProperties.NAMESPACE_SEPARATOR_DEFAULT))
{
+ LOGGER.warn("Using non-default namespace separator '{}'",
namespaceSeparatorEncoded);
+ }
+ return new PolarisResourcePaths(properties.get(PREFIX),
namespaceSeparatorEncoded);
Review Comment:
Indeed, but this code path is used by the Spark Plugin client as well. If
it's talking to a non-vanilla version of Polaris that uses a different
separator (or a future Polaris version that _does_ allow custom separators),
forcing the separator here would break the communication between the client and
that specific Polaris server.
--
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]