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

Wenchen Fan resolved SPARK-27986.
---------------------------------
    Fix Version/s: 3.0.0
       Resolution: Fixed

Issue resolved by pull request 26656
[https://github.com/apache/spark/pull/26656]

> Support Aggregate Expressions with filter
> -----------------------------------------
>
>                 Key: SPARK-27986
>                 URL: https://issues.apache.org/jira/browse/SPARK-27986
>             Project: Spark
>          Issue Type: Sub-task
>          Components: SQL
>    Affects Versions: 3.0.0
>            Reporter: Yuming Wang
>            Assignee: jiaan.geng
>            Priority: Major
>             Fix For: 3.0.0
>
>
> An aggregate expression represents the application of an aggregate function 
> across the rows selected by a query. An aggregate function reduces multiple 
> inputs to a single output value, such as the sum or average of the inputs. 
> The syntax of an aggregate expression is one of the following:
> {noformat}
> aggregate_name (expression [ , ... ] [ order_by_clause ] ) [ FILTER ( WHERE 
> filter_clause ) ]
> aggregate_name (ALL expression [ , ... ] [ order_by_clause ] ) [ FILTER ( 
> WHERE filter_clause ) ]
> aggregate_name (DISTINCT expression [ , ... ] [ order_by_clause ] ) [ FILTER 
> ( WHERE filter_clause ) ]
> aggregate_name ( * ) [ FILTER ( WHERE filter_clause ) ]
> aggregate_name ( [ expression [ , ... ] ] ) WITHIN GROUP ( order_by_clause ) 
> [ FILTER ( WHERE filter_clause ) ]{noformat}
> [https://www.postgresql.org/docs/current/sql-expressions.html#SYNTAX-AGGREGATES]
>  
> I find this feature is also an ANSI SQL standard. 
> {code:java}
> <aggregate function> ::=
> COUNT <left paren> <asterisk> <right paren> [ <filter clause> ]
> | <general set function> [ <filter clause> ]
> | <binary set function> [ <filter clause> ]
> | <ordered set function> [ <filter clause> ]
> | <array aggregate function> [ <filter clause> ]
> | <row pattern count function> [ <filter clause> ]{code}



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