You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Julian Shalaby (Jira)" <ji...@apache.org> on 2021/05/26 02:11:00 UTC
[jira] [Created] (SPARK-35524) Pass objects as parameters to
SparkSQL UDFs
Julian Shalaby created SPARK-35524:
--------------------------------------
Summary: Pass objects as parameters to SparkSQL UDFs
Key: SPARK-35524
URL: https://issues.apache.org/jira/browse/SPARK-35524
Project: Spark
Issue Type: New Feature
Components: PySpark, Spark Core, SQL
Affects Versions: 3.1.1
Reporter: Julian Shalaby
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