rishii-19-works commented on code in PR #3350:
URL: https://github.com/apache/polaris/pull/3350#discussion_r2662332835


##########
polaris-core/src/main/java/org/apache/polaris/core/entity/NamespaceEntity.java:
##########
@@ -75,8 +77,23 @@ public String getBaseLocation() {
   }
 
   public static class Builder extends 
PolarisEntity.BaseBuilder<NamespaceEntity, Builder> {
+
+    private static final int MAX_NAMESPACE_DEPTH = 10;
+
     public Builder(Namespace namespace) {
       super();
+      Preconditions.checkArgument(namespace != null, "Namespace must not be 
null");
+
+      int depth = namespace.length();
+      if (depth > MAX_NAMESPACE_DEPTH) {

Review Comment:
   Thanks for the detailed explanation, that makes sense.
   
   I see your point — namespace depth alone is only one contributor to the 
overall policy size, and enforcing a hard depth limit in the core entity layer 
is neither sufficient nor storage-agnostic.
   
   I agree that an acceptable fix for #3243 should focus on AWS-specific policy 
size handling rather than restricting namespace structure globally.
   
   I’ll step back on this approach and either close this PR or rework it based 
on a more appropriate AWS-scoped solution. Thanks again for the guidance.
   



-- 
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]

Reply via email to