GitHub user hvanhovell opened a pull request:

    [SPARK-17996][SQL] Fix unqualified catalog.getFunction(...)

    ## What changes were proposed in this pull request?
    Currently an unqualified `getFunction(..)`call returns a wrong result; the 
returned function is shown as temporary function without a database. For 
    scala> sql("create function fn1 as 
    res0: org.apache.spark.sql.DataFrame = []
    scala> spark.catalog.getFunction("fn1")
    res1: org.apache.spark.sql.catalog.Function = Function[name='fn1', 
    This PR fixes this by adding database information to ExpressionInfo (which 
is used to store the function information).
    ## How was this patch tested?
    Added more thorough tests to `CatalogSuite`.

You can merge this pull request into a Git repository by running:

    $ git pull SPARK-17996

Alternatively you can review and apply these changes as the patch at:

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #15542
commit 6068e44a0ca7128105f95bc438ed958b57c11f55
Author: Herman van Hovell <>
Date:   2016-10-19T02:16:33Z

    Fix unqualified catalog.getFunction


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 or file a JIRA ticket
with INFRA.

To unsubscribe, e-mail:
For additional commands, e-mail:

Reply via email to