[jira] [Commented] (SPARK-19840) Disallow creating permanent functions with invalid class names

2017-05-13 Thread Dongjoon Hyun (JIRA)

[ 
https://issues.apache.org/jira/browse/SPARK-19840?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=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-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org



[jira] [Commented] (SPARK-19840) Disallow creating permanent functions with invalid class names

2017-03-06 Thread Apache Spark (JIRA)

[ 
https://issues.apache.org/jira/browse/SPARK-19840?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15898402#comment-15898402
 ] 

Apache Spark commented on SPARK-19840:
--

User 'dongjoon-hyun' has created a pull request for this issue:
https://github.com/apache/spark/pull/17182

> 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
> ++
> ||
> ++
> ++
> {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-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org