[ 
https://issues.apache.org/jira/browse/SPARK-20924?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Wenchen Fan resolved SPARK-20924.
---------------------------------
       Resolution: Fixed
    Fix Version/s: 2.2.0

Issue resolved by pull request 18146
[https://github.com/apache/spark/pull/18146]

> Unable to call the function registered in the not-current database
> ------------------------------------------------------------------
>
>                 Key: SPARK-20924
>                 URL: https://issues.apache.org/jira/browse/SPARK-20924
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 2.0.2, 2.1.1, 2.2.0
>            Reporter: Xiao Li
>            Assignee: Xiao Li
>            Priority: Critical
>             Fix For: 2.2.0
>
>
> We are unable to call the function registered in the not-current database. 
> {noformat}
> sql("CREATE DATABASE dAtABaSe1")
> sql(s"CREATE FUNCTION dAtABaSe1.test_avg AS 
> '${classOf[GenericUDAFAverage].getName}'")
> sql("SELECT dAtABaSe1.test_avg(1)")
> {noformat}
> The above code returns an error:
> {noformat}
> Undefined function: 'dAtABaSe1.test_avg'. This function is neither a 
> registered temporary function nor a permanent function registered in the 
> database 'default'.; line 1 pos 7
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to