Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-20924

Unable to call the function registered in the not-current database

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • 2.0.2, 2.1.1, 2.2.0
    • 2.2.0
    • SQL
    • None

    Description

      We are unable to call the function registered in the not-current database.

      sql("CREATE DATABASE dAtABaSe1")
      sql(s"CREATE FUNCTION dAtABaSe1.test_avg AS '${classOf[GenericUDAFAverage].getName}'")
      sql("SELECT dAtABaSe1.test_avg(1)")
      

      The above code returns an error:

      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
      

      Attachments

        Activity

          People

            smilegator Xiao Li
            smilegator Xiao Li
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: