This is an automated email from the ASF dual-hosted git repository.

zeroshade pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/iceberg-go.git


The following commit(s) were added to refs/heads/main by this push:
     new a090405f fix(metadata): typo in schema-ids (#568)
a090405f is described below

commit a090405f9a6dc502a8b826339e73da4091c2b9ac
Author: Tobias Pütz <[email protected]>
AuthorDate: Thu Sep 18 21:31:23 2025 +0200

    fix(metadata): typo in schema-ids (#568)
---
 table/updates.go      |  2 +-
 table/updates_test.go | 16 +++++++++++++++-
 2 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/table/updates.go b/table/updates.go
index 996e1db4..ca780ec1 100644
--- a/table/updates.go
+++ b/table/updates.go
@@ -541,7 +541,7 @@ func (u *removeSpecUpdate) Apply(builder *MetadataBuilder) 
error {
 
 type removeSchemasUpdate struct {
        baseUpdate
-       SchemaIDs []int `json:"schema-i-ds"`
+       SchemaIDs []int `json:"schema-ids"`
 }
 
 // NewRemoveSchemasUpdate creates a new Update that removes a list of schemas 
from
diff --git a/table/updates_test.go b/table/updates_test.go
index ade8a4da..1f103cc2 100644
--- a/table/updates_test.go
+++ b/table/updates_test.go
@@ -60,7 +60,14 @@ func TestUnmarshalUpdates(t *testing.T) {
                                {"action": "upgrade-format-version", 
"format-version": 2},
                                {"action": "set-location", "location": 
"s3://bucket/new-location"},
                                {"action": "set-properties", "updates": 
{"key1": "value1"}},
-                               {"action": "remove-properties", "removals": 
["key2"]}
+                               {"action": "remove-properties", "removals": 
["key2"]},
+                               {"action": "remove-schemas", "schema-ids": 
[1,2,3,4]},
+                               {"action": "remove-partition-specs", 
"schema-ids": [1,2,3]},
+                               {"action": "remove-snapshots", "snapshot-ids": 
[1,2]},
+                               {"action": "remove-snapshot-ref", "ref-name": 
"main"},
+                               {"action": "set-default-sort-order", 
"order-id": 1},
+                               {"action": "set-default-spec", "spec-id": 1},
+                               {"action": "set-snapshot-ref", "ref-name": 
"main", "type": "branch", "snapshot-id": 1}
                        ]`),
                        expected: Updates{
                                
NewAssignUUIDUpdate(uuid.MustParse("550e8400-e29b-41d4-a716-446655440000")),
@@ -68,6 +75,13 @@ func TestUnmarshalUpdates(t *testing.T) {
                                
NewSetLocationUpdate("s3://bucket/new-location"),
                                
NewSetPropertiesUpdate(iceberg.Properties{"key1": "value1"}),
                                NewRemovePropertiesUpdate([]string{"key2"}),
+                               NewRemoveSchemasUpdate([]int{1, 2, 3, 4}),
+                               NewRemoveSpecUpdate([]int{1, 2, 3}),
+                               NewRemoveSnapshotsUpdate([]int64{1, 2}),
+                               NewRemoveSnapshotRefUpdate("main"),
+                               NewSetDefaultSortOrderUpdate(1),
+                               NewSetDefaultSpecUpdate(1),
+                               NewSetSnapshotRefUpdate("main", 1, "branch", 0, 
0, 0),
                        },
                        expectedErr: false,
                },

Reply via email to