fivetran-ashokborra opened a new issue, #17614: URL: https://github.com/apache/iceberg/issues/17614
**Problem** `TableMetadata.newTableMetadata()` unconditionally reassigns fresh, sequential field IDs via `TypeUtil.assignFreshIds(INITIAL_SCHEMA_ID, schema, lastColumnId::incrementAndGet)` ([TableMetadata.java#L121](https://github.com/apache/iceberg/blob/main/core/src/main/java/org/apache/iceberg/TableMetadata.java#L121)), regardless of whatever field IDs were already set on the `Schema` object passed in to `Catalog.createTable`/`TableBuilder.create()`. This means there is currently no way to create a table via the public `Catalog`/`TableBuilder` API while preserving specific, pre-existing field IDs on the schema — the IDs are always silently overwritten with a fresh sequential assignment starting from `INITIAL_SCHEMA_ID`. **Request** A supported, documented way to create/register a table while preserving an intended schema's field IDs exactly, instead of always reassigning fresh ones. Possible shapes: - A `TableBuilder` option, e.g. `.withSchema(schema, /* preserveFieldIds= */ true)`. - A distinct API method/contract for creating a table entry against a schema whose field IDs are already meaningful, as opposed to always treating the input as a brand-new schema. - At minimum, explicit documentation on `Catalog.createTable` / `TableBuilder.create()` stating that field IDs are never preserved from the input schema. Happy to discuss further or contribute a PR if there's agreement on the right shape 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: [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]
