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

Maciej Szymkiewicz resolved SPARK-36617.
----------------------------------------
    Fix Version/s: 3.1.3
                   3.2.0
       Resolution: Resolved

Issue resolved by pull request 33880
https://github.com/apache/spark/pull/33880

> Inconsistencies in approxQuantile annotations
> ---------------------------------------------
>
>                 Key: SPARK-36617
>                 URL: https://issues.apache.org/jira/browse/SPARK-36617
>             Project: Spark
>          Issue Type: Improvement
>          Components: PySpark, SQL
>    Affects Versions: 3.1.0, 3.2.0, 3.3.0
>            Reporter: Maciej Szymkiewicz
>            Priority: Major
>             Fix For: 3.2.0, 3.1.3
>
>
> I've been reviewing PR in the legacy repo 
> (https://github.com/zero323/pyspark-stubs/pull/552) and it looks like we have 
> two problems with annotations for {{approxQuantile}}.
> First of all {{DataFrame.approxQuantile}} should overload definition to match 
> input arguments ‒ if col is a sequence then result should be a list of lists:
> {code:python}
>     @overload
>     def approxQuantile(
>         self,
>         col: str,
>         probabilities: Union[List[float], Tuple[float]],
>         relativeError: float
>     ) -> List[float]: ...
>     @overload
>     def approxQuantile(
>         self,
>         col: Union[List[str], Tuple[str]],
>         probabilities: Union[List[float], Tuple[float]],
>         relativeError: float
>     ) -> List[List[float]]: ...
> {code}
> Additionally {{DataFrameStatFunctions.approxQuantile}} should match whatever 
> we have in {{DataFrame}}.



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

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

Reply via email to