-
Notifications
You must be signed in to change notification settings - Fork 150
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
feat: Add iceberg-rest-catalog-client #16
Conversation
Signed-off-by: Xuanwo <[email protected]> Co-authored-by: Renjie Liu <[email protected]>
Signed-off-by: Xuanwo <[email protected]>
Another option is to use |
I don't want our users to install |
Yeah, that's a tradeoff. |
The issue we are facing is that
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, Thank you.
I guess eventually we need to define a catalog interface(trait) that this crate will then implement.
Yes, we will implement our own catalog trait based on this client. |
Shouldn't we first create a trait and then the implementation? I'm not sure if this is the right approach. There is a lot of stuff in here that will be duplicated. For example, Schema, Types, Metadata (it maps 1 to 1 with the Iceberg metadata), Snapshots, PartitionSpecs, SortFields. I don't think we want to have a Schema in the rest catalog package, and a general Schema, because then we would need to convert the objects vica versa. There is a working REST catalog available at: https://github.com/tabular-io/docker-spark-iceberg/tree/main/spark Would be awesome if we start testing if we can actually pull a table from there, including tests. |
I think eventually we will need this. From my experience, stuffs in this crate are used for ser/de, while those in spec crate are used for in memory and user-facing. Conversion between this stuff will simply ser/de codes, otherwise, we will need to maintain these by ourselves, which is cumbersome. But we should be careful that don't expose these things as public api to end user. |
If we want to avoid manually writing a client for the rest catalog, then this is necessary. Rust is unlike to java (which has runtime reflect) or python (which is dynamic), we must declare structs or types first before we can using them. The convertion could be simple and zero cost.
The client itself is a simple HTTP SDK like
Makes sense. But I'm afraid that it's not part of |
I'm afraid that we have to alter the code anyway. For example, the open-API spec does not define how to deserialize a |
Ok, I understand. It appears that we are unable to create a client based on the specifications provided. Therefore, we must develop and maintain our own implementation. Let's close this PR now. We can define the trait first and than implement it by hand. |
This PR will add iceberg-rest-catalog-client which generated from openapi specs.
Reviewer Notes
Please ignore all code under
src/apis
,src/models
anddocs
. They are all generated.Acknowledgment
This work is inspired by @liurenjie1024's work in icelake