LuciferYang opened a new issue, #14292: URL: https://github.com/apache/gravitino/issues/14292
### Version main branch ### Describe what's wrong With `spark.sql.gravitino.enableIcebergSupport=true`, the plugin registers `GravitinoIcebergSparkSessionExtensions` before Iceberg's own `IcebergSparkSessionExtensions`. Its planner strategy `IcebergExtendedDataSourceV2Strategy` throws `UnsupportedOperationException` for every catalog that is not a `GravitinoIcebergCatalog`. An Iceberg `SparkCatalog` or `SparkSessionCatalog` configured directly in the same session therefore cannot run the Iceberg DDL statements: `CREATE`/`REPLACE`/`DROP` `BRANCH` and `TAG`, `ADD`/`DROP`/`REPLACE PARTITION FIELD`, `SET`/`DROP IDENTIFIER FIELDS` and `WRITE ORDERED BY`/`DISTRIBUTED BY`. The same statements work without the Gravitino plugin. ### Error message and/or stacktrace ``` java.lang.UnsupportedOperationException: Unsupported catalog type: org.apache.iceberg.spark.SparkCatalog ``` ### How to reproduce Start Spark with the Gravitino plugin, `spark.sql.gravitino.enableIcebergSupport=true`, and an extra catalog `spark.sql.catalog.local=org.apache.iceberg.spark.SparkCatalog` with `type=hadoop`, then: ```sql CREATE TABLE local.db.t (id INT) USING iceberg; ALTER TABLE local.db.t CREATE TAG t1; ``` ### 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]
