rambleraptor commented on code in PR #85:
URL: 
https://github.com/apache/terraform-provider-iceberg/pull/85#discussion_r3723660994


##########
internal/provider/resource_table.go:
##########
@@ -448,6 +457,16 @@ func (r *icebergTableResource) calculateSchemaUpdates(ctx 
context.Context, plan,
                return nil
        }
 
+       // Reuse existing IDs by name (stable across inserts/reorders), then 
assign
+       // fresh IDs above last-column-id to new fields.
+       planSchema.resolveFieldIDs(&stateSchema)
+       planSchema.assignFieldIDs(int64(tbl.Metadata().LastColumnID()))

Review Comment:
   This is where we use the last-column-id as the last used value.



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