Github user yhuai commented on a diff in the pull request:
https://github.com/apache/spark/pull/12117#discussion_r58483084
--- Diff: sql/hive/src/test/scala/org/apache/spark/sql/hive/UDFSuite.scala
---
@@ -32,4 +68,122 @@ class UDFSuite extends QueryTest with TestHiveSingleton
{
assert(hiveContext.sql("SELECT RANDOm1() FROM src LIMIT
1").head().getDouble(0) >= 0.0)
assert(hiveContext.sql("SELECT strlenscala('test', 1) FROM src LIMIT
1").head().getInt(0) === 5)
}
+
+ test("temporary function: create and drop") {
+ withUserDefinedFunction(functionName -> true) {
+ intercept[AnalysisException] {
+ sql(s"CREATE TEMPORARY FUNCTION default.$functionName AS
'$functionClass'")
+ }
+ sql(s"CREATE TEMPORARY FUNCTION $functionName AS '$functionClass'")
+ checkAnswer(
+ sql(s"SELECT myupper(value) from $testTableName"),
--- End diff --
Updated
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]