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 2020/07/31 22:05:05 UTC

[GitHub] [iceberg] rdblue commented on a change in pull request #1276: Spark: Provide better error message on using SparkSessionCatalog without replacing default spark catalog

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



##########
File path: spark3/src/main/java/org/apache/iceberg/spark/SparkSessionCatalog.java
##########
@@ -280,4 +282,10 @@ private boolean useIceberg(String provider) {
 
     return false;
   }
+
+  private T getSessionCatalog() {
+    Preconditions.checkNotNull(sessionCatalog, "Delegated SessionCatalog is not provided by Spark. " +
+        "Please make sure you are replacing Spark's default catalog.");

Review comment:
       How about adding the name of the session catalog, like this: "Please make sure your are replacing Spark's default catalog, named 'spark_catalog'".
   
   Also, the first line makes it sound like Spark did something wrong when this is probably a misconfiguration. For that, what about changing it to "Delegated SessionCatalog is missing" rather that "not provided by Spark"?




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

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