GitHub user dongjoon-hyun opened a pull request:
https://github.com/apache/spark/pull/17182
[SPARK-19840][SQL] Disallow creating permanent functions with invalid class
names
## What changes were proposed in this pull request?
Currently, Spark raises exceptions on creating invalid **temporary**
functions, but doesn't for creating **permanent** functions. This PR aims to
disallow creating permanent functions with invalid class names.
**BEFORE**
```scala
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
++
||
++
++
```
**AFTER**
```scala
scala> sql("CREATE FUNCTION function_with_invalid_classname AS
'org.invalid'").show
java.lang.ClassNotFoundException: org.invalid
```
## How was this patch tested?
Pass Jenkins tests with a new test case.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/dongjoon-hyun/spark SPARK-19840
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/17182.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #17182
----
commit d6bfdaff2fc732d8d4b28983db1985226b3660f0
Author: Dongjoon Hyun <[email protected]>
Date: 2017-03-06T23:40:50Z
[SPARK-19840][SQL] Disallow creating permanent functions with invalid class
names
commit aed3826d53568c82c220f97bcdd5ba4d562f1701
Author: Dongjoon Hyun <[email protected]>
Date: 2017-03-06T23:45:13Z
Add JIRA number.
----
---
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 [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]