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 2022/05/13 00:38: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=17536388#comment-17536388 ]
Hyukjin Kwon commented on SPARK-39142:
--------------------------------------
[~tigerhawkvok], Are you interested in submitting a PR?
cc [~zero323] FYI
> 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.7#820007)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org