You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@polaris.apache.org by "dimas-b (via GitHub)" <gi...@apache.org> on 2026/09/01 02:22:43 UTC
Re: [PR] Skip the default-location check when the namespace location was not requested [polaris]
dimas-b commented on code in PR #5422:
URL: https://github.com/apache/polaris/pull/5422#discussion_r3900199927
##########
runtime/service/src/main/java/org/apache/polaris/service/catalog/iceberg/LocalIcebergCatalog.java:
##########
@@ -702,7 +702,9 @@ private void createNamespaceInternal(
}
if (!realmConfig.getConfig(
BehaviorChangeConfiguration.ALLOW_NAMESPACE_CUSTOM_LOCATION, catalogEntity)) {
- validateNamespaceUsesDefaultLocation(entity, resolvedParent);
+ if (metadata.containsKey(PolarisEntityConstants.ENTITY_BASE_LOCATION)) {
+ validateNamespaceUsesDefaultLocation(entity, resolvedParent);
Review Comment:
This logic looks very confusing to me 🤔 The condition for validation is based on `metadata`, but `validateNamespaceUsesDefaultLocation()` operates on the `entity`, not on `metadata`... it is very obscure why we should only run validation if the base location key is present in `metadata` 🤔
Does it hurt to validate unconditionally?
--
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: issues-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org