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



##########
File path: 
spark3/src/main/java/org/apache/iceberg/spark/SparkSessionCatalog.java
##########
@@ -240,8 +245,38 @@ public void renameTable(Identifier from, Identifier to) 
throws NoSuchTableExcept
     }
   }
 
+  public boolean isHiveCatalogConfigValid(CaseInsensitiveStringMap options, 
StringBuilder errorMsg) {
+    String hadoopConfUri = 
SparkSession.active().sparkContext().conf().contains("spark.hadoop.hive.metastore.uris")
 ?
+            
SparkSession.active().sparkContext().conf().get("spark.hadoop.hive.metastore.uris")
 : null;

Review comment:
       This isn't correct because it only checks for a Spark-configured value, 
but there could be a value from hive-site.xml. Instead, this should use a 
Hadoop conf:
   
   ```java
   Configuration conf = SparkSession.active().sessionState().newHadoopConf();
   String envHiveUri = conf.get("hive.metastore.uris", null);
   String catalogHiveUri = options.get("uri");
   ...
   ```




-- 
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]

Reply via email to