You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Hyukjin Kwon (JIRA)" <ji...@apache.org> on 2019/06/10 10:54:00 UTC

[jira] [Resolved] (SPARK-27425) Add count_if functions

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

Hyukjin Kwon resolved SPARK-27425.
----------------------------------
       Resolution: Fixed
    Fix Version/s: 3.0.0

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

> Add count_if functions
> ----------------------
>
>                 Key: SPARK-27425
>                 URL: https://issues.apache.org/jira/browse/SPARK-27425
>             Project: Spark
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 2.4.1
>            Reporter: Chaerim Yeo
>            Assignee: Chaerim Yeo
>            Priority: Minor
>             Fix For: 3.0.0
>
>
> Add aggregation function which returns the number of records satisfying a given condition.
> For Presto, [{{count_if}}|https://prestodb.github.io/docs/current/functions/aggregate.html] function is supported, we can write concisely.
> However, Spark does not support yet, we need to write like {{COUNT(CASE WHEN some_condition THEN 1 END)}} or {{SUM(CASE WHEN some_condition THEN 1 END)}}, which looks painful.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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