You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Takeshi Yamamuro (Jira)" <ji...@apache.org> on 2019/12/29 06:16:00 UTC

[jira] [Updated] (SPARK-28663) Aggregate Functions for Statistics

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

Takeshi Yamamuro updated SPARK-28663:
-------------------------------------
    Parent Issue: SPARK-30375  (was: SPARK-27764)

> Aggregate Functions for Statistics
> ----------------------------------
>
>                 Key: SPARK-28663
>                 URL: https://issues.apache.org/jira/browse/SPARK-28663
>             Project: Spark
>          Issue Type: Sub-task
>          Components: SQL
>    Affects Versions: 3.0.0
>            Reporter: Yuming Wang
>            Priority: Major
>
> ||Function||Argument Type||Return Type||Partial Mode||Description||
> |{{corr(_Y_}}, _{{X}}_)|{{double precision}}|{{double precision}}|Yes|correlation coefficient|
> |{{covar_pop(_Y_}}, _{{X}}_)|{{double precision}}|{{double precision}}|Yes|population covariance|
> |{{covar_samp(_Y_}}, _{{X}}_)|{{double precision}}|{{double precision}}|Yes|sample covariance|
> |{{regr_avgx(_Y_}}, _{{X}}_)|{{double precision}}|{{double precision}}|Yes|average of the independent variable ({{sum(_{{X_}})/_{{N}}_}})|
> |{{regr_avgy(_Y_}}, _{{X}}_)|{{double precision}}|{{double precision}}|Yes|average of the dependent variable ({{sum(_{{Y_}})/_{{N}}_}})|
> |{{regr_count(_Y_}}, _{{X}}_)|{{double precision}}|{{bigint}}|Yes|number of input rows in which both expressions are nonnull|
> |{{regr_intercept(_Y_}}, _{{X}}_)|{{double precision}}|{{double precision}}|Yes|y-intercept of the least-squares-fit linear equation determined by the (_{{X}}_, _{{Y}}_) pairs|
> |{{regr_r2(_Y_}}, _{{X}}_)|{{double precision}}|{{double precision}}|Yes|square of the correlation coefficient|
> |{{regr_slope(_Y_}}, _{{X}}_)|{{double precision}}|{{double precision}}|Yes|slope of the least-squares-fit linear equation determined by the (_{{X}}_, _{{Y}}_) pairs|
> |{{regr_sxx(_Y_}}, _{{X}}_)|{{double precision}}|{{double precision}}|Yes|{{sum(_{{X_}}^2) - sum(_{{X}}_)^2/_{{N}}_}} (“sum of squares” of the independent variable)|
> |{{regr_sxy(_Y_}}, _{{X}}_)|{{double precision}}|{{double precision}}|Yes|{{sum(_{{X_}}*_{{Y}}_) - sum(_{{X}}_) * sum(_{{Y}}_)/_{{N}}_}} (“sum of products”of independent times dependent variable)|
> |{{regr_syy(_Y_}}, _{{X}}_)|{{double precision}}|{{double precision}}|Yes|{{sum(_{{Y_}}^2) - sum(_{{Y}}_)^2/_{{N}}_}} (“sum of squares” of the dependent variable)|
> [https://www.postgresql.org/docs/11/functions-aggregate.html#FUNCTIONS-AGGREGATE-STATISTICS-TABLE]



--
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