-
Notifications
You must be signed in to change notification settings - Fork 147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FEATURE REQUEST] Support for creating nested namespaces recursively #543
Comments
You are using Spark with the Iceberg REST client I guess right ? So, I guess you are referencing using |
@jbonofre yes , I'm using Spark with Polaris REST catalog. Yes , this should happen in one call. |
If this cannot be done or not in Polaris's scope of nested catalogs , I would like to know the reason behind. The one of reason I'm concerned about is, Say i have my application writing iceberg tables to a REST based catalog. here with Polaris's way of handling nested namespaces , I cannot migrate my application code to an another rest catalog implementation. The migration use case of iceberg catalogs actually fails here. |
@jbonofre - im happy to contribute a PR incase of feature approval. |
Hi @Karthilearns, would you mind sharing the error message? |
Hi @flyrain ,
Error :
|
It failed at when Polaris is trying to check the parent namespace's privilege, https://github.com/polaris-catalog/polaris/blob/main/service/common/src/main/java/org/apache/polaris/service/catalog/PolarisCatalogHandlerWrapper.java#L248-L248. Basically, the behavior you want here is to create the parent namespace if it doesn't exist, then create the sub namespace. If Polaris allows this behavior, it actually breaks the assumption that one REST API call only creates one namespace. Checking this spec for details, https://github.com/polaris-catalog/polaris/blob/main/spec/rest-catalog-open-api.yaml#L4080-L4080. I think it's more suitable as a client side change, like this pseudo code shows:
|
Is your feature request related to a problem? Please describe.
Currently , Polaris doesn't support creating namespaces which do not exists recursively . for spark.sql('create namespace n1.n2.n3') to work , n1 and n2 should already be there in place , or else the SQL would fail.
To bring in compatibility with other catalog's SQL, would it make sense to support creating nested namespaces recursively? Or is there any reason behind not doing this?
Describe the solution you'd like
allow users to create nested namespaces with a single SQL command,
Describe alternatives you've considered
The only alternative we have is constructing multiple SQL queries which is difficult compared to what other catalog offers.
Additional context
No response
The text was updated successfully, but these errors were encountered: