-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Support nested namespaces for Iceberg REST catalog #22916
Comments
This is exactly a bug. For instance, creating a new schema with a dot result in unexpected results. trino:tpch> CREATE SCHEMA "a.test";
CREATE SCHEMA
trino:tpch> SHOW SCHEMAS;
Schema
--------------------
a
information_schema
tpch
(3 rows) |
Hi @ebyhr, I researched this issue and discovered that it is not the only problem. I've noticed that the string attribute representing the schema, which is passed to Iceberg catalog methods, is transformed into a Namespace object using the To address this issue, I propose adding a configurable delimiter that will be applied to each schema string attribute, like this: The second part of the issue relates to changes needed for the During my research, I only checked TrinoRestCatalog and TrinoNessieCatalog. If you're okay with this approach, I can prepare a PR with the changes I've described. If you have any questions or concerns, I'd be happy to discuss them. |
@sftwrdvlpr please feel free to create a PR at the earliest and let me know if there is anything I can help you with. |
Adding for context a way to test first hand the functionality of nested namespaces in Spark
Related issue #1135 |
Tested on Trino 450.
Iceberg Rest API is used.
In spark I created the namespace:
pyspark_sample
And a child namespace:
cool
full path would be
iceberg.pyspark_sample.cool
In Trino:
If I call
show schemas from iceberg;
it will return only the high level namespaces.Therefore, any child namespaces will not be returned.
Nice to have:
Support
show scehmas from iceberg.pyspark_sample
- this will returncool
.Trying to switch to a child schema in Trino isn't supported:
Nice to have:
Add support to it.
With that said, I had expected the following to work:
Root cause:
Trino is sending the following API request -
This in incorrect and does not follow the Iceberg rest API spec: https://github.com/apache/iceberg/blob/main/open-api/rest-catalog-open-api.yaml
The correct API request should be -
In other words, if a namespace value has a "." it should be sent as %1F.
I haven't reviewed the code, but this probably a simple fix.
The text was updated successfully, but these errors were encountered: