Skip to content

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

Closed

Description

@marvinlanhenke

...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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions