[jira] [Assigned] (SPARK-27653) Add max_by() / min_by() SQL aggregate functions
[ https://issues.apache.org/jira/browse/SPARK-27653?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Wenchen Fan reassigned SPARK-27653: --- Assignee: Liang-Chi Hsieh > Add max_by() / min_by() SQL aggregate functions > --- > > Key: SPARK-27653 > URL: https://issues.apache.org/jira/browse/SPARK-27653 > Project: Spark > Issue Type: New Feature > Components: SQL >Affects Versions: 3.0.0 >Reporter: Josh Rosen >Assignee: Liang-Chi Hsieh >Priority: Major > Fix For: 3.0.0 > > > It would be useful if Spark SQL supported the {{max_by()}} SQL aggregate > function. Quoting from the [Presto > docs|https://prestodb.github.io/docs/current/functions/aggregate.html#max_by]: > {quote}max_by(x, y) → [same as x] > Returns the value of x associated with the maximum value of y over all input > values. > {quote} > {{min_by}} works similarly. > Technically I can emulate this behavior using window functions but the > resulting syntax is much more verbose and non-intuitive compared to > {{max_by}} / {{min_by}}. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org
[jira] [Assigned] (SPARK-27653) Add max_by() / min_by() SQL aggregate functions
[ https://issues.apache.org/jira/browse/SPARK-27653?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Apache Spark reassigned SPARK-27653: Assignee: (was: Apache Spark) > Add max_by() / min_by() SQL aggregate functions > --- > > Key: SPARK-27653 > URL: https://issues.apache.org/jira/browse/SPARK-27653 > Project: Spark > Issue Type: New Feature > Components: SQL >Affects Versions: 3.0.0 >Reporter: Josh Rosen >Priority: Major > > It would be useful if Spark SQL supported the {{max_by()}} SQL aggregate > function. Quoting from the [Presto > docs|https://prestodb.github.io/docs/current/functions/aggregate.html#max_by]: > {quote}max_by(x, y) → [same as x] > Returns the value of x associated with the maximum value of y over all input > values. > {quote} > {{min_by}} works similarly. > Technically I can emulate this behavior using window functions but the > resulting syntax is much more verbose and non-intuitive compared to > {{max_by}} / {{min_by}}. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org
[jira] [Assigned] (SPARK-27653) Add max_by() / min_by() SQL aggregate functions
[ https://issues.apache.org/jira/browse/SPARK-27653?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Apache Spark reassigned SPARK-27653: Assignee: Apache Spark > Add max_by() / min_by() SQL aggregate functions > --- > > Key: SPARK-27653 > URL: https://issues.apache.org/jira/browse/SPARK-27653 > Project: Spark > Issue Type: New Feature > Components: SQL >Affects Versions: 3.0.0 >Reporter: Josh Rosen >Assignee: Apache Spark >Priority: Major > > It would be useful if Spark SQL supported the {{max_by()}} SQL aggregate > function. Quoting from the [Presto > docs|https://prestodb.github.io/docs/current/functions/aggregate.html#max_by]: > {quote}max_by(x, y) → [same as x] > Returns the value of x associated with the maximum value of y over all input > values. > {quote} > {{min_by}} works similarly. > Technically I can emulate this behavior using window functions but the > resulting syntax is much more verbose and non-intuitive compared to > {{max_by}} / {{min_by}}. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org