This is an automated email from the ASF dual-hosted git repository.
laskoviymishka 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 6b528c328 refactor(table): remove dead initial fields from add-schema
and add-sort-order updates (#2700)
6b528c328 is described below
commit 6b528c3280c0915b40a492a2ed5029379be1c669
Author: Badal Prasad Singh <[email protected]>
AuthorDate: Wed Nov 25 13:33:18 2026 +0530
refactor(table): remove dead initial fields from add-schema and
add-sort-order updates (#2700)
minor
Signed-off-by: badalprasadsingh <[email protected]>
---
table/updates.go | 6 +-----
table/updates_test.go | 2 --
2 files changed, 1 insertion(+), 7 deletions(-)
diff --git a/table/updates.go b/table/updates.go
index 80a7a8fbc..5d930d484 100644
--- a/table/updates.go
+++ b/table/updates.go
@@ -354,8 +354,7 @@ func (u *upgradeFormatVersionUpdate) Apply(builder
*MetadataBuilder) error {
type addSchemaUpdate struct {
baseUpdate
- Schema *iceberg.Schema `json:"schema"`
- initial bool
+ Schema *iceberg.Schema `json:"schema"`
}
// NewAddSchemaUpdate creates a new update that adds the given schema and
updates the lastColumnID based on the schema.
@@ -445,12 +444,9 @@ type addSortOrderUpdate struct {
// above, none are exempt at Apply: CheckCompatibility still requires
every
// source ID to resolve in the current schema, so this only defers the
error.
SortOrder *UnboundSortOrder `json:"sort-order"`
- initial bool
}
// NewAddSortOrderUpdate creates a new update that adds the given sort order
to the table metadata.
-// If the initial flag is set to true, the sort order is considered the
initial sort order of the table,
-// and all previously added sort orders in the metadata builder are removed.
func NewAddSortOrderUpdate(sortOrder *SortOrder) *addSortOrderUpdate {
upd := &addSortOrderUpdate{
baseUpdate: baseUpdate{ActionName: UpdateAddSortOrder},
diff --git a/table/updates_test.go b/table/updates_test.go
index e50b63050..c813d5785 100644
--- a/table/updates_test.go
+++ b/table/updates_test.go
@@ -668,7 +668,6 @@ func TestUnmarshalUpdates(t *testing.T) {
expectedAddSchema :=
expected.(*addSchemaUpdate)
actualAddSchema :=
actual[idx].(*addSchemaUpdate)
assert.True(t,
expectedAddSchema.Schema.Equals(actualAddSchema.Schema))
- assert.Equal(t,
expectedAddSchema.initial, actualAddSchema.initial)
case UpdateAddSpec:
expectedAddPartitionSpec :=
expected.(*addPartitionSpecUpdate)
actualAddPartitionSpec :=
actual[idx].(*addPartitionSpecUpdate)
@@ -678,7 +677,6 @@ func TestUnmarshalUpdates(t *testing.T) {
expectedAddSortOrder :=
expected.(*addSortOrderUpdate)
actualAddSortOrder :=
actual[idx].(*addSortOrderUpdate)
assert.True(t,
expectedAddSortOrder.SortOrder.Equals(actualAddSortOrder.SortOrder.SortOrder))
- assert.Equal(t,
expectedAddSortOrder.initial, actualAddSortOrder.initial)
default:
assert.Equal(t, expected,
actual[idx])
}