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


##########
spark/v3.2/spark/src/test/java/org/apache/iceberg/spark/TestSparkSessionCatalog.java:
##########
@@ -86,4 +97,23 @@ public void testValidateHmsUri() {
             .defaultNamespace()[0]
             .equals("default"));
   }
+
+  @Test
+  public void testLoadFunction() {
+    spark.sessionState().catalogManager().reset();
+    spark.conf().set(envHmsUriKey, hmsUri);
+    spark.conf().set(catalogHmsUriKey, hmsUri);
+
+    String functionClass = 
"org.apache.hadoop.hive.ql.udf.generic.GenericUDFUpper";
+
+    // load permanent UDF in Hive via FunctionCatalog
+    spark.sql(String.format("CREATE FUNCTION upper AS '%s'", functionClass));

Review Comment:
   Spark has a build-in function also named `upper`. I think creating a 
existing function will not invoke `SparkSessionCatalog#loadFunction`, can you 
confirm that? 



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