You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2021/09/16 18:59:23 UTC

[GitHub] [iceberg] RussellSpitzer commented on a change in pull request #3126: Hive check

RussellSpitzer commented on a change in pull request #3126:
URL: https://github.com/apache/iceberg/pull/3126#discussion_r710395537



##########
File path: spark3/src/main/java/org/apache/iceberg/spark/SparkSessionCatalog.java
##########
@@ -242,6 +242,9 @@ public void renameTable(Identifier from, Identifier to) throws NoSuchTableExcept
 
   @Override
   public final void initialize(String name, CaseInsensitiveStringMap options) {
+    if (options.containsKey("type") && options.get("type").equalsIgnoreCase("hive") && options.containsKey("uri")) {
+      throw new UnsupportedOperationException("Passing hive catalog uri through spark.sql.catalog.<catalog_name>.uri is not allowed̉.");

Review comment:
       I would change this to be a bit more specific, "Cannot set an alternative uri when using the SparkSessionCatalog, make an alternative SparkCatalog if the Spark Session catalog and Iceberg catalog should contact different metastores."
   
   We also add in a test to check that this works as expected :)




-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org