You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "badalprasadsingh (via GitHub)" <gi...@apache.org> on 2026/08/06 20:56:47 UTC

[I] UpdateSchema: SetIdentifierField mutates builder state eagerly, breaking chain-ordering semantics [iceberg-go]

badalprasadsingh opened a new issue, #1689:
URL: https://github.com/apache/iceberg-go/issues/1689

   ### Apache Iceberg version
   
   main (development)
   
   ### Please describe the bug 🐞
   
   Right now, `SetIdentifierField` mutates `u.identifierFieldNames` immediately when called, unlike all other builder methods (`AddColumn`, `RenameColumn`, `DeleteColumn`, `UpdateColumn`, `MoveColumn`) which defer their work into `u.ops` and are executed in call order during `Apply()`.
   
   As a result, `SetIdentifierField` always takes effect before any deferred operation regardless of where it appears in the chain, so chain order is not honored.
   
   For e.g., 
   ```go
   NewUpdateSchema(txn, true, true).RenameColumn([]string{"id"}, "new_id").SetIdentifierField([[]string{{"id"}}).Apply()
   ```
   should fail (as `id` is no longer existing after the rename). Instead it silently succeeds and rewrites the identifier field to `new_id`. Eager mutation also causes `initIdentifierFieldNames()` to skip seeding the current schema's existing identifier fields.
   
   #### What is expected?
   
   Let `SetIdentifierField` participate in the same deferred, ordered execution as every other builder method.
   
   ### Status
   
   Working on this fix, would be submitting a PR for this.


-- 
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-unsubscribe@iceberg.apache.org.apache.org

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


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


Re: [I] UpdateSchema: SetIdentifierField mutates builder state eagerly, breaking chain-ordering semantics [iceberg-go]

Posted by "zeroshade (via GitHub)" <gi...@apache.org>.
zeroshade closed issue #1689: UpdateSchema: SetIdentifierField mutates builder state eagerly, breaking chain-ordering semantics
URL: https://github.com/apache/iceberg-go/issues/1689


-- 
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-unsubscribe@iceberg.apache.org

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


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