You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Dongjoon Hyun (JIRA)" <ji...@apache.org> on 2017/05/13 13:55:04 UTC
[jira] [Commented] (SPARK-19840) Disallow creating permanent
functions with invalid class names
[ https://issues.apache.org/jira/browse/SPARK-19840?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16009348#comment-16009348 ]
Dongjoon Hyun commented on SPARK-19840:
---------------------------------------
Hi, [~smilegator].
Is there any plan to fix this in 2.2.0?
Or, do you think it is possible to fix this with the first PR in 2.2.0 for now?
> Disallow creating permanent functions with invalid class names
> --------------------------------------------------------------
>
> Key: SPARK-19840
> URL: https://issues.apache.org/jira/browse/SPARK-19840
> Project: Spark
> Issue Type: Bug
> Components: SQL
> Affects Versions: 2.1.0
> Reporter: Dongjoon Hyun
>
> Currently, Spark raises exceptions on creating invalid **temporary** functions, but doesn't for **permanent** functions. This issue aims to disallow creating permanent functions with invalid class names.
> *BEFORE*
> {code}
> scala> sql("CREATE TEMPORARY FUNCTION function_with_invalid_classname AS 'org.invalid'").show
> java.lang.ClassNotFoundException: org.invalid at
> ...
> scala> sql("CREATE FUNCTION function_with_invalid_classname AS 'org.invalid'").show
> ++
> ||
> ++
> ++
> scala> sql("show functions like 'function_*'").show(false)
> +---------------------------------------+
> |function |
> +---------------------------------------+
> |default.function_with_invalid_classname|
> +---------------------------------------+
> scala> sql("select function_with_invalid_classname()").show
> org.apache.spark.sql.AnalysisException: Undefined function: 'function_with_invalid_classname'. This function is neither a registered temporary function nor a permanent function registered in the database 'default'.; line 1 pos 7
> {code}
> *AFTER*
> {code}
> scala> sql("CREATE FUNCTION function_with_invalid_classname AS 'org.invalid'").show
> java.lang.ClassNotFoundException: org.invalid
> {code}
--
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