You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Apache Spark (Jira)" <ji...@apache.org> on 2023/02/11 13:46:00 UTC
[jira] [Commented] (SPARK-39142) Type overloads in `pandas_udf`
[ https://issues.apache.org/jira/browse/SPARK-39142?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17687445#comment-17687445 ]
Apache Spark commented on SPARK-39142:
--------------------------------------
User 'wayneguow' has created a pull request for this issue:
https://github.com/apache/spark/pull/39974
> Type overloads in `pandas_udf`
> -------------------------------
>
> Key: SPARK-39142
> URL: https://issues.apache.org/jira/browse/SPARK-39142
> Project: Spark
> Issue Type: Bug
> Components: PySpark
> Affects Versions: 3.2.1
> Reporter: Philip Kahn
> Priority: Minor
> Original Estimate: 1h
> Remaining Estimate: 1h
>
> It seems that the `returnType` in the type overloads for `pandas_udf` never specify a generic for PySpark SQL types or explicitly list those types:
>
> [https://github.com/apache/spark/blob/f84018a4810867afa84658fec76494aaae6d57fc/python/pyspark/sql/pandas/functions.pyi]
>
> This results in static type checkers flagging the type of the decorated functions (and their parameters) as incorrect, see [https://github.com/microsoft/pylance-release/issues/2789] as an example.
>
> For someone familiar with the code base, this should be a very fast patch.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org