tomighita opened a new issue, #3505:
URL: https://github.com/apache/iceberg-rust/issues/3505
### Is your feature request related to a problem or challenge?
`UpdateSchemaAction` always assigns fresh field IDs at commit time, so
callers can't choose the IDs of the columns they add. Systems that allocate IDs
themselves, e.g. ones that replay an external schema history and write Parquet
`field_id`s from it, end up with catalog IDs that don't match their data files.
There's no workaround outside the crate: the transaction action traits and
`TableCommit::build()` are `pub(crate)`, so callers can't emit their own
`AddSchema`.
### Describe the solution you'd like
An optional explicit ID on `AddColumn`:
```rust
tx.update_schema().add_column(
AddColumn::builder()
.name("email")
.field_type(Type::Primitive(PrimitiveType::String))
.id(20)
.build(),
);
```
- When `id` is set, the column and its nested fields keep their IDs;
otherwise IDs are assigned as today.
- Fresh IDs in the same update start above the highest explicit ID.
- Explicit IDs at or below `last_column_id` are rejected, so dropped
columns' IDs aren't reused.
### Willingness to contribute
I can contribute to this feature independently. Draft PR: #3504
--
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]