aokolnychyi commented on a change in pull request #1890:
URL: https://github.com/apache/iceberg/pull/1890#discussion_r538787421



##########
File path: spark3/src/main/java/org/apache/iceberg/spark/Spark3Util.java
##########
@@ -605,31 +605,41 @@ private static String 
sqlString(org.apache.iceberg.expressions.Literal<?> lit) {
   }
 
   public static CatalogAndIdentifier catalogAndIdentifier(SparkSession spark, 
String name) throws ParseException {
+    return catalogAndIdentifier(spark, name, 
spark.sessionState().catalogManager().currentCatalog());
+  }
+
+  public static CatalogAndIdentifier catalogAndIdentifier(SparkSession spark, 
String name,
+                                                          CatalogPlugin 
defaultCatalog) throws ParseException {
     ParserInterface parser = spark.sessionState().sqlParser();
     Seq<String> multiPartIdentifier = parser.parseMultipartIdentifier(name);
     List<String> javaMultiPartIdentifier = 
JavaConverters.seqAsJavaList(multiPartIdentifier);
-    return catalogAndIdentifier(spark, javaMultiPartIdentifier);
+    return catalogAndIdentifier(spark, javaMultiPartIdentifier, 
defaultCatalog);
+  }
+
+  public static CatalogAndIdentifier catalogAndIdentifier(SparkSession spark, 
List<String> nameParts) {
+    return catalogAndIdentifier(spark, nameParts, 
spark.sessionState().catalogManager().currentCatalog());
   }
 
   /**
    * A modified version of Spark's LookupCatalog.CatalogAndIdentifier.unapply
    * Attempts to find the catalog and identifier a multipart identifier 
represents
    * @param spark Spark session to use for resolution
    * @param nameParts Multipart identifier representing a table
+   * @param fallBackCatalog Catalog to use if none is specified

Review comment:
       nit: I think we call it `fallBackCatalog` here and `defaultCatalog` above




----------------------------------------------------------------
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:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to