beliefer opened a new pull request, #36714: URL: https://github.com/apache/spark/pull/36714
### What changes were proposed in this pull request? Many mainstream database supports aggregate function `MEDIAN`. **Syntax:** Aggregate function `MEDIAN( <expr> )` Window function `MEDIAN( <expr> ) OVER ( [ PARTITION BY <expr2> ] )` **Arguments:** expr: The expression must evaluate to a numeric data type (INTEGER, FLOAT, DECIMAL, or equivalent). **Examples**: ``` select k, median(v) from aggr group by k order by k; +---+-----------+ | K | MEDIAN(V) | |---+-----------| | 1 | 20.00000 | | 2 | 22.50000 | | 3 | NULL | +---+-----------+ ``` ### Why are the changes needed? The mainstream database supports `MEDIAN` show below: Snowflake ### Does this PR introduce _any_ user-facing change? 'No'. New feature. ### How was this patch tested? New tests. -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
