You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Hyukjin Kwon (Jira)" <ji...@apache.org> on 2021/05/26 06:34:00 UTC

[jira] [Commented] (SPARK-35524) Pass objects as parameters to SparkSQL UDFs

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

Hyukjin Kwon commented on SPARK-35524:
--------------------------------------

It wouldn't make much sense for SQL to support other languages in its syntax.

> Pass objects as parameters to SparkSQL UDFs
> -------------------------------------------
>
>                 Key: SPARK-35524
>                 URL: https://issues.apache.org/jira/browse/SPARK-35524
>             Project: Spark
>          Issue Type: Improvement
>          Components: PySpark, Spark Core, SQL
>    Affects Versions: 3.1.1
>            Reporter: Julian Shalaby
>            Priority: Major
>              Labels: UDF, UDT, spark, spark-sql
>
> You can pass class objects directly to UDFs using the UDF format:
> df.select("*").filter(myFunc(classObj)(col("colName")))
> but the format:
> """SELECT * FROM view WHERE myFunc(classObj, "colName")"""
> or
> """SELECT * FROM view WHERE myFunc(classObj)("colName")"""
> does not work. This would be a very useful feature to have, especially being that UDTs are being made public again in 3.2.0



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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