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


##########
table/metadata.go:
##########
@@ -1234,6 +1359,17 @@ type metadataV2 struct {
        commonMetadata
 }
 
+func initMetadataV2Deser() *metadataV2 {
+       return &metadataV2{
+               LastSeqNum:     -1,
+               commonMetadata: initCommonMetadataForDeserialization(),
+       }
+}
+
+func (m *metadataV2) FormatVersion() int {
+       return 2
+}

Review Comment:
   removed



##########
table/metadata.go:
##########
@@ -1156,6 +1255,18 @@ type metadataV1 struct {
        commonMetadata
 }
 
+func initMetadataV1Deser() *metadataV1 {
+       return &metadataV1{
+               Schema:         nil,
+               Partition:      nil,

Review Comment:
   removed



##########
table/metadata.go:
##########
@@ -890,6 +960,29 @@ type commonMetadata struct {
        SnapshotRefs       map[string]SnapshotRef  `json:"refs,omitempty"`
 }
 
+func initCommonMetadataForDeserialization() commonMetadata {
+       return commonMetadata{
+               FormatVersion:      0,
+               UUID:               uuid.UUID{},
+               Loc:                "",
+               LastUpdatedMS:      -1,
+               LastColumnId:       -1,
+               SchemaList:         nil,
+               CurrentSchemaID:    -1,
+               Specs:              nil,
+               DefaultSpecID:      -1,
+               LastPartitionID:    nil,
+               Props:              nil,
+               SnapshotList:       nil,
+               CurrentSnapshotID:  nil,
+               SnapshotLog:        nil,
+               MetadataLog:        nil,
+               SortOrderList:      nil,
+               DefaultSortOrderID: 0,
+               SnapshotRefs:       nil,
+       }

Review Comment:
   removed



-- 
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: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to