linyanghao commented on code in PR #5693:
URL: https://github.com/apache/iceberg/pull/5693#discussion_r966673279


##########
spark/v3.2/spark/src/main/java/org/apache/iceberg/spark/SparkSessionCatalog.java:
##########
@@ -289,6 +292,19 @@ public final void initialize(String name, 
CaseInsensitiveStringMap options) {
     this.createOrcAsIceberg = options.getBoolean("orc-enabled", 
createOrcAsIceberg);
   }
 
+  private void checkHiveSupport() {
+    RuntimeConfig runtimeConfig = SparkSession.active().conf();
+    String sparkCatalogImpl = 
runtimeConfig.get(StaticSQLConf.CATALOG_IMPLEMENTATION().key());
+    if (sparkCatalogImpl != null) {
+      Preconditions.checkArgument(
+          sparkCatalogImpl.equals("hive"),
+          "Please enable hive support for Spark. "

Review Comment:
   > should the error msg mention how to enable it? `Please enable hive support 
for Spark by setting 'spark.sql.catalogImplementation=hive'` or something along 
those lines
   
   How about `Please enable hive support for Spark by calling 
enableHiveSupport() or setting 'spark.sql.catalogImplementation=hive'`



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