You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Maciej Szymkiewicz (Jira)" <ji...@apache.org> on 2021/09/02 15:54:00 UTC
[jira] [Assigned] (SPARK-36617) Inconsistencies in approxQuantile
annotations
[ https://issues.apache.org/jira/browse/SPARK-36617?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Maciej Szymkiewicz reassigned SPARK-36617:
------------------------------------------
Assignee: Cary Lee
> 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
> Assignee: Cary Lee
> 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-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org