-
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
Discussion: Design of TableMetadataBuilder
.
#232
Comments
When |
Yes, the
Similar things happens for Other methods such as |
I agree with @liurenjie1024. Looking at the Java implementation, it seems like there is too much going on here for a derived builder to be a good fit, and a hand-rolled builder would be more appropriate. |
TableMetadataBuilder
.TableMetadataBuilder
.
Implementing the builder manually looks good to me. |
Cool, seems we reached consensus on this, let's move on to create |
what about supporting FormatVersion V1 and V2? Will we simply model V2 and provide all optional fields as well for V1 in order to simplify the struct TableMetadata (like it is right now?) - or would there be any reason to change that? Also how would we handle the update or modifications to an existing |
Sorry, I don't get your point. I think currently our approach is just like what you say, and we don't have plan to change it. Oh, you mean further modification to
That's possible, but that means we need to implement the validation logic in two places, and I think we should avoid such duplication. |
Makes sense to me. thanks for clarifying. |
@liurenjie1024, @Fokko do you know if someone is working on a full implementation of the TableMetadataBuilder? The question is if we need it similar to java with all that's being implemented as part of transactions. If we need it, and nobody is working on it, I would prepare a PR a cleaned-up Version of what we have in the Iceberg-Catalog over to here. It's mostly about adding all modifications as addition of snapshots, schema evolution, partitioning, ordering, various validations, partition binding, etc. It would mainly contain the logic in this class: |
Hi, @c-thiel AFAIK, nobody is working on this. The plan was to add it one by one when we implement transaction api. It would be greate if you are interested in contributiong. |
@liurenjie1024 I would be interested to contribute. Let me maybe start with partition binding - i.e. binding an Do you have a strong feeling of where the code should go? As part of an |
Hi, @c-thiel Thanks for your interest. Typical I think small prs would be easier to review and test. That's to say, a prefered approach would be to implement apis for Minor nit, putting all actions in one transaction.rs file maybe too large to maintain, and spltting transaction module into files will be easier to maintain. |
Problem statement
TableMetadataBuilder
is useful in modifying/creatingTableMetadata
, and is a core data structure of transaction api. There are already some efforts to create one using derived builder, see #62 and #229. While it's easy to implement, I have some concerns about this approach. There are some problems with this approach:TableMetadata
.The reason I want to be careful with
TableMetadataBuilder
is that it's a core data structure in iceberg, and we should not expose apis which be misused to construct inconsistentTableMetadata
.Proposal
I want to propose to implement
TableMetadataBuilder
in a similar approach like java api, rather than using derived builder directly, such as following:The text was updated successfully, but these errors were encountered: