twuebi commented on code in PR #495:
URL: https://github.com/apache/iceberg-go/pull/495#discussion_r2235979427


##########
table/metadata.go:
##########
@@ -610,7 +621,12 @@ func (b *MetadataBuilder) SetLastUpdatedMS() 
*MetadataBuilder {
        return b
 }
 
-func (b *MetadataBuilder) buildCommonMetadata() *commonMetadata {
+func (b *MetadataBuilder) buildCommonMetadata() (*commonMetadata, error) {
+       if b.defaultSpecID == nil {
+               return nil, errors.New("no default spec ID specified")
+       }

Review Comment:
   Thanks, good catch, just checked the java code and there's no requirement to 
set the default. It's however validated to exist & be compatible with the 
current schema in `build()`:
   
   `PartitionSpec.checkCompatibility(specsById.get(defaultSpecId), schema);`



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

Reply via email to