apache / iceberg-rust

Apache Iceberg
https://rust.iceberg.apache.org/
Apache License 2.0
469 stars 95 forks source link

bug: SnapshotRetention::Tag max_ref_age_ms should be optional #392

Closed c-thiel closed 2 weeks ago

c-thiel commented 3 weeks ago

Currently the field max_ref_age_ms of the Tag Variant of SnapshotRetention is required: https://github.com/apache/iceberg-rust/blob/f1ea6e137eaabf22ff7d091bfafa0a05739a6516/crates/iceberg/src/spec/snapshot.rs#L354

I believe it should be optional. The comment correctly states that: 'Defaults to table property history.expire.max-ref-age-ms'. It can only default to something if its optional. In the Branch Variant it is optional.

Unfortunately this would be a breaking change.

In pyiceberg, its optional: https://github.com/apache/iceberg-python/blob/0155405d7da141efba60ba502f6c6c1cbc97bdf9/pyiceberg/table/refs.py#L47

liurenjie1024 commented 2 weeks ago

Close by #391