You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Xiao Li (JIRA)" <ji...@apache.org> on 2017/05/30 17:41:04 UTC

[jira] [Created] (SPARK-20924) Unable to call the function registered in the not-current database

Xiao Li created SPARK-20924:
-------------------------------

             Summary: 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.1.1, 2.0.2, 2.2.0
            Reporter: Xiao Li
            Assignee: Xiao Li
            Priority: Critical


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-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org