bharos opened a new issue, #9666:
URL: https://github.com/apache/gravitino/issues/9666
### Version
main branch
### Describe what's wrong
The Iceberg `system.migrate()` procedure fails when attempting to migrate
external tables to JDBC-backed catalogs (MySQL, PostgreSQL) with error "table
already exists in database".
### Error message and/or stacktrace
org.apache.iceberg.exceptions.AlreadyExistsException: Table already exists
in database: test_database.migrate_test_123
at org.apache.iceberg.jdbc.JdbcCatalog.createTable(JdbcCatalog.java:...)
at
org.apache.iceberg.rest.CatalogHandlers.stageTableCreate(CatalogHandlers.java:...)
### How to reproduce
1. Configure Gravitino with JDBC catalog (MySQL or PostgreSQL backend)
2. Create external Iceberg table in Hive or another catalog
3. Attempt to migrate using: `CALL system.migrate('source_catalog.db.table')`
4. Observe "table already exists" error
Expected: Migration should succeed using 3-phase staging protocol
Actual: Fails because JDBC catalog commits table prematurely
### Additional context
_No response_
--
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]