twuebi commented on code in PR #575:
URL: https://github.com/apache/iceberg-go/pull/575#discussion_r2375139658
##########
table/metadata.go:
##########
@@ -1313,6 +1366,14 @@ func (c *commonMetadata) validate() error {
c.constructRefs()
+ if err := c.checkMainRefMatchesCurrentSnapshot(); err != nil {
+ return err
+ }
Review Comment:
Just checked pyiceberg, that may be a bug? Setting `main` to some snapshot
and omitting `current-snapshot-id` is accepted but calling
`metadata.current_snapshot()` gives `None` in that case, that'd be in violation
of:
> long ID of the current table snapshot; must be the same as the current ID
of the main branch in refs.
I read that as, if the main branch in refs exist, the current-snapshot-id
must match, if the main branch in refs does not exist, the current-snapshot-id
may be omitted.
--
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]