bowenliang123 commented on code in PR #7153:
URL: https://github.com/apache/iceberg/pull/7153#discussion_r1144197999
##########
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:
Changed the function name used here to `perm_upper`. And it's confirmed that
`SparkSessionCatalog#loadFunction` is called.
--
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]