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

   Parent: #538
   
   PR #936 fixed #538 by changing `NewUpdateSchema` to seed its fresh-id 
counter from `metadata.LastColumnID` instead of 
`txn.meta.CurrentSchema().HighestFieldID()` — the spec mandates 
`last-column-id` as the monotonic counter. The fix is on main but no regression 
test pins the contract.
   
   Add a test to `table/update_schema_test.go` (or `transaction_test.go`): 
build a table whose `last-column-id` is greater than the current schema's 
`HighestFieldID()` (achievable by adding then dropping the highest-id column), 
then call `UpdateSchema` and add a new column. Assert the new column's id is 
`last-column-id + 1`, not `HighestFieldID() + 1`. Reverting #936 should make 
this test fail with the original `invalid_metadata` failure mode reported in 
the issue.


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