arnaudbriche commented on issue #367:
URL: https://github.com/apache/iceberg-go/issues/367#issuecomment-2784015833
Hi @zeroshade !
I'm working on implementing snapshot expiration.
Looking at how `MetadataBuilder` and `Update` works, I'm a bit confused
about how things are supposed to works.
For example:
```go
func (b *MetadataBuilder) SetDefaultSpecID(defaultSpecID int)
(*MetadataBuilder, error) {
...
b.updates = append(b.updates, NewSetDefaultSpecUpdate(defaultSpecID))
b.defaultSpecID = defaultSpecID
return b, nil
}
```
And
```go
func (u *setDefaultSpecUpdate) Apply(builder *MetadataBuilder) error {
_, err := builder.SetDefaultSpecID(u.SpecID)
return err
}
````
I looks like a circular pattern here, where calling
`MetadataBuilder.SetDefaultSpecID` will end up creating a
`setDefaultSpecUpdate` struct whose `Apply` method will call
`MetadataBuilder.SetDefaultSpecID`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]