adityaksolves opened a new pull request, #18325: URL: https://github.com/apache/iceberg/pull/18325
### What changes were proposed in this pull request? This PR allows promoting a column of `UnknownType` (mapped to `VOID` in Spark) to concrete primitive types (e.g., `STRING`, `INT`). Previously, attempting this threw an `IllegalArgumentException` in `TypeUtil.isPromotionAllowed`. ### Why are the changes needed? When creating a table with a `VOID` column via Spark SQL and later altering it to a concrete type, Iceberg correctly updates the metadata but fails during schema validation. Since `UnknownType` contains no data (only nulls), promoting it to any concrete primitive type is a safe and valid schema evolution. ### How was this patch tested? - Added unit test in `TestTypeUtil` to verify `UNKNOWN` promotion logic. - Added integration test in `TestSchemaUpdate` to ensure API-level schema evolution works. - Added Spark SQL integration tests across Spark 3.5, 4.0, 4.1, and 4.2 (`TestAlterTable`) to verify the end-to-end `ALTER TABLE` execution. (Note: Hive-based catalogs are skipped in these tests as Hive Metastore natively rejects `UnknownType` column creation). -- 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]
