cryeo opened a new pull request #24335: [SPARK-27425] Add count_if functions URL: https://github.com/apache/spark/pull/24335 ## What changes were proposed in this pull request? Add `count_if` function which is equivalent to `count_if` function of Presto. There is no aggregation function which returns the number of records satisfying a given condition in Spark, so 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. ## How was this patch tested? This patch is tested by unit test.
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
