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

Paul Wu updated SPARK-23617:
----------------------------
    Description: 
One can register a function using Scala:

spark.udf.register("uuid", ()=>java.util.UUID.randomUUID.toString) 

Now, if I use Java API:

spark.udf().register("uuid", ()=>java.util.UUID.randomUUID().toString()); 

The code does not compile. Define UDF0 for Java API?

  was:
One can register a function using Scala:

{{spark.udf.register("uuid", ()=>java.util.UUID.randomUUID.toString) }}

Now, if I use Java API:

{{spark.udf().register("uuid", ()=>java.util.UUID.randomUUID().toString()); }}

The code does not compile. Define UDF0 for Java API?


> Register a Function without params with Spark SQL Java API
> ----------------------------------------------------------
>
>                 Key: SPARK-23617
>                 URL: https://issues.apache.org/jira/browse/SPARK-23617
>             Project: Spark
>          Issue Type: Improvement
>          Components: Java API, SQL
>    Affects Versions: 2.2.1
>            Reporter: Paul Wu
>            Priority: Major
>
> One can register a function using Scala:
> spark.udf.register("uuid", ()=>java.util.UUID.randomUUID.toString) 
> Now, if I use Java API:
> spark.udf().register("uuid", ()=>java.util.UUID.randomUUID().toString()); 
> The code does not compile. Define UDF0 for Java API?



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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

Reply via email to