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

Yuming Wang updated SPARK-27980:
--------------------------------
    Description: 
||Function||Direct Argument Type(s)||Aggregated Argument Type(s)||Return 
Type||Partial Mode||Description||
|{{mode() WITHIN GROUP (ORDER BY sort_expression)}}| |any sortable type|same as 
sort expression|No|returns the most frequent input value (arbitrarily choosing 
the first one if there are multiple equally-frequent results)|
|{{percentile_cont(_fraction_}}) WITHIN GROUP (ORDER BY 
{{sort_expression}})|{{double precision}}|{{double precision}} or 
{{interval}}|same as sort expression|No|continuous percentile: returns a value 
corresponding to the specified fraction in the ordering, interpolating between 
adjacent input items if needed|
|{{percentile_cont(_fractions_}}) WITHIN GROUP (ORDER BY 
{{sort_expression}})|{{double precision[]}}|{{double precision}} or 
{{interval}}|array of sort expression's type|No|multiple continuous percentile: 
returns an array of results matching the shape of the _{{fractions}}_ 
parameter, with each non-null element replaced by the value corresponding to 
that percentile|
|{{percentile_disc(_fraction_}}) WITHIN GROUP (ORDER BY 
{{sort_expression}})|{{double precision}}|any sortable type|same as sort 
expression|No|discrete percentile: returns the first input value whose position 
in the ordering equals or exceeds the specified fraction|
|{{percentile_disc(_fractions_}}) WITHIN GROUP (ORDER BY 
{{sort_expression}})|{{double precision[]}}|any sortable type|array of sort 
expression's type|No|multiple discrete percentile: returns an array of results 
matching the shape of the _{{fractions}}_ parameter, with each non-null element 
replaced by the input value corresponding to that percentile|

[https://www.postgresql.org/docs/11/functions-aggregate.html#FUNCTIONS-ORDEREDSET-TABLE]

  was:
||Function||Direct Argument Type(s)||Aggregated Argument Type(s)||Return 
Type||Partial Mode||Description||
|{{mode() WITHIN GROUP (ORDER BY_{{sort_expression}}_)}}| |any sortable 
type|same as sort expression|No|returns the most frequent input value 
(arbitrarily choosing the first one if there are multiple equally-frequent 
results)|
|{{percentile_cont(_{{fraction}}_) WITHIN GROUP (ORDER 
BY_{{sort_expression}}_)}}|{{double precision}}|{{double precision}} or 
{{interval}}|same as sort expression|No|continuous percentile: returns a value 
corresponding to the specified fraction in the ordering, interpolating between 
adjacent input items if needed|
|{{percentile_cont(_{{fractions}}_) WITHIN GROUP (ORDER 
BY_{{sort_expression}}_)}}|{{double precision[]}}|{{double precision}} or 
{{interval}}|array of sort expression's type|No|multiple continuous percentile: 
returns an array of results matching the shape of the _{{fractions}}_ 
parameter, with each non-null element replaced by the value corresponding to 
that percentile|
|{{percentile_disc(_{{fraction}}_) WITHIN GROUP (ORDER 
BY_{{sort_expression}}_)}}|{{double precision}}|any sortable type|same as sort 
expression|No|discrete percentile: returns the first input value whose position 
in the ordering equals or exceeds the specified fraction|
|{{percentile_disc(_{{fractions}}_) WITHIN GROUP (ORDER 
BY_{{sort_expression}}_)}}|{{double precision[]}}|any sortable type|array of 
sort expression's type|No|multiple discrete percentile: returns an array of 
results matching the shape of the _{{fractions}}_ parameter, with each non-null 
element replaced by the input value corresponding to that percentile|


https://www.postgresql.org/docs/11/functions-aggregate.html#FUNCTIONS-ORDEREDSET-TABLE


> Ordered-Set Aggregate Functions
> -------------------------------
>
>                 Key: SPARK-27980
>                 URL: https://issues.apache.org/jira/browse/SPARK-27980
>             Project: Spark
>          Issue Type: Sub-task
>          Components: SQL
>    Affects Versions: 3.0.0
>            Reporter: Yuming Wang
>            Priority: Major
>
> ||Function||Direct Argument Type(s)||Aggregated Argument Type(s)||Return 
> Type||Partial Mode||Description||
> |{{mode() WITHIN GROUP (ORDER BY sort_expression)}}| |any sortable type|same 
> as sort expression|No|returns the most frequent input value (arbitrarily 
> choosing the first one if there are multiple equally-frequent results)|
> |{{percentile_cont(_fraction_}}) WITHIN GROUP (ORDER BY 
> {{sort_expression}})|{{double precision}}|{{double precision}} or 
> {{interval}}|same as sort expression|No|continuous percentile: returns a 
> value corresponding to the specified fraction in the ordering, interpolating 
> between adjacent input items if needed|
> |{{percentile_cont(_fractions_}}) WITHIN GROUP (ORDER BY 
> {{sort_expression}})|{{double precision[]}}|{{double precision}} or 
> {{interval}}|array of sort expression's type|No|multiple continuous 
> percentile: returns an array of results matching the shape of the 
> _{{fractions}}_ parameter, with each non-null element replaced by the value 
> corresponding to that percentile|
> |{{percentile_disc(_fraction_}}) WITHIN GROUP (ORDER BY 
> {{sort_expression}})|{{double precision}}|any sortable type|same as sort 
> expression|No|discrete percentile: returns the first input value whose 
> position in the ordering equals or exceeds the specified fraction|
> |{{percentile_disc(_fractions_}}) WITHIN GROUP (ORDER BY 
> {{sort_expression}})|{{double precision[]}}|any sortable type|array of sort 
> expression's type|No|multiple discrete percentile: returns an array of 
> results matching the shape of the _{{fractions}}_ parameter, with each 
> non-null element replaced by the input value corresponding to that percentile|
> [https://www.postgresql.org/docs/11/functions-aggregate.html#FUNCTIONS-ORDEREDSET-TABLE]



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to