Skip to content
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

Serde Issue TableMetadata + default values for partition_specs and sort_orders #271

Closed
marvinlanhenke opened this issue Mar 15, 2024 · 0 comments · Fixed by #272
Closed

Comments

@marvinlanhenke
Copy link
Contributor

...while working on the HMS catalog, I noticed missing fields (properties & snapshots) in the metadata.json when serialized.

Currently we check if e.g. properties is_empty() and return None - due to the serde option flag None will be skipped.
This causes downstream errors, since we need at least an empty object - for example "properties":{}
https://github.com/apache/iceberg-rust/blob/main/crates/iceberg/src/spec/table_metadata.rs#L730-L737

Another issue I had are the default values for partition_specs and sort_orders.
The new TableMetadataBuilder does not handle them for now, however we need different default values - for example:
"partition_specs: [{spec-id: 0, fields []}]" otherwise I get downstream errors as well.
https://github.com/apache/iceberg-rust/blob/main/crates/iceberg/src/spec/table_metadata.rs#L328-L335

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant