You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "bowenliang123 (via GitHub)" <gi...@apache.org> on 2023/03/24 04:22:13 UTC

[GitHub] [iceberg] bowenliang123 commented on a diff in pull request #7153: Spark: Support loading function as FunctionCatalog in SparkSessionCatalog

bowenliang123 commented on code in PR #7153:
URL: https://github.com/apache/iceberg/pull/7153#discussion_r1147103378


##########
spark/v3.2/spark/src/main/java/org/apache/iceberg/spark/SparkSessionCatalog.java:
##########
@@ -352,4 +355,16 @@ public Catalog icebergCatalog() {
         "Cannot return underlying Iceberg Catalog, wrapped catalog does not contain an Iceberg Catalog");
     return ((HasIcebergCatalog) icebergCatalog).icebergCatalog();
   }
+
+  @Override
+  public UnboundFunction loadFunction(Identifier ident) throws NoSuchFunctionException {
+    try {
+      return super.loadFunction(ident);
+    } catch (NoSuchFunctionException e) {
+      if (getSessionCatalog() instanceof FunctionCatalog) {

Review Comment:
   I keep the cheek for Spark 3.2, but skipped in Spark 3.3 as V2SessionCatalog extends `FunctionCatalog `.
   Thanks for the hints from @pan3793 .



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