You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Apache Spark (Jira)" <ji...@apache.org> on 2020/12/08 03:52:00 UTC

[jira] [Assigned] (SPARK-33692) Permanent view shouldn't use current catalog and namespace to lookup function

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

Apache Spark reassigned SPARK-33692:
------------------------------------

    Assignee:     (was: Apache Spark)

> Permanent view shouldn't use current catalog and namespace to lookup function
> -----------------------------------------------------------------------------
>
>                 Key: SPARK-33692
>                 URL: https://issues.apache.org/jira/browse/SPARK-33692
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 3.0.1
>            Reporter: Linhong Liu
>            Priority: Major
>
> Reproduce steps:
> spark.sql("CREATE FUNCTION udf_plus AS 'udf.UdfPlus10' USING JAR '/home/linhong.liu/spark-udf_2.12-0.1.0-SNAPSHOT.jar'")
> spark.sql("create view v1 as select udf_plus(1)")
> spark.sql("select * from v1").show() // output 11
> spark.sql("CREATE TEMPORARY FUNCTION udf_plus AS 'udf.UdfPlus20' USING JAR '/home/linhong.liu/spark-udf_2.12-0.1.0-SNAPSHOT.jar'")
> spark.sql("select * from v1").show() // throw exception
> org.apache.spark.sql.AnalysisException: Attribute with name 'default.udf_plus(1)' is not found in '(udf_plus(1))';;
> Project [default.udf_plus(1)#60]
> +- SubqueryAlias spark_catalog.default.v1
>    +- View (`default`.`v1`, [default.udf_plus(1)#60])
>       +- Project [HiveSimpleUDF#udf.UdfPlus20(1) AS udf_plus(1)#61]
>          +- OneRowRelation



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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