tengqm commented on code in PR #6040:
URL: https://github.com/apache/gravitino/pull/6040#discussion_r1899865040
##########
catalogs/catalog-hadoop/src/main/java/org/apache/gravitino/catalog/hadoop/HadoopCatalogCapability.java:
##########
@@ -31,4 +31,19 @@ public CapabilityResult managedStorage(Scope scope) {
return CapabilityResult.unsupported(
String.format("Hadoop catalog does not support managed storage for
%s.", scope));
}
+
+ @Override
+ public CapabilityResult specificationOnName(Scope scope, String name) {
+ CapabilityResult capabilityResult =
Capability.super.specificationOnName(scope, name);
+ if (!capabilityResult.supported()) {
+ return capabilityResult;
+ }
+
+ if (name.contains("/")) {
Review Comment:
Thanks for adding this check.
I'm thinking if we could promote things like this to project-wide naming
constraints.
In Kubernetes, for example, we always check if a given name is a valid DNS
subdomain name, sometimes we even require a DNS label. The rationale behind
this is that we don't want unexpected characters in names that appear in URIs.
They are simply too dangerous. And ... there is always a bound for name lengths.
--
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]