GitHub user cloud-fan opened a pull request:
https://github.com/apache/spark/pull/20141
[SPARK-22945][SQL] add java UDF APIs in the functions object
## What changes were proposed in this pull request?
Currently Scala users can use UDF like
```
val foo = udf((i: Int) => Math.random() + i).asNondeterministic
df.select(foo('a))
```
Python users can also do it with similar APIs. However Java users can't do
it, we should add Java UDF APIs in the functions object.
## How was this patch tested?
new tests
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/cloud-fan/spark udf
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/20141.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 #20141
----
commit 160cb61af5be56ae16b92e8fea860821e60f0293
Author: Wenchen Fan <wenchen@...>
Date: 2018-01-03T12:27:57Z
add java UDF APIs in the functions object
----
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]