Changes

Summary

  1. [SPARK-16280][SPARK-37082][SQL] Implements histogram_numeric aggregation (details)
Commit de0d7fbb4f010bec8e457d0dc00b5618e7a43750 by wenchen
[SPARK-16280][SPARK-37082][SQL] Implements histogram_numeric aggregation function which supports partial aggregation

### What changes were proposed in this pull request?
This PR implements aggregation function `histogram_numeric`. Function `histogram_numeric` returns an approximate histogram of a numerical column using a user-specified number of bins. For example, the histogram of column `col` when split to 3 bins.

Syntax:
#### an approximate histogram of a numerical column using a user-specified number of bins.
histogram_numebric(col, nBins)

###### Returns an approximate histogram of a column `col` into 3 bins.
SELECT histogram_numebric(col, 3) FROM table

##### Returns an approximate histogram of a column `col` into 5 bins.
SELECT histogram_numebric(col, 5) FROM table

### Why are the changes needed?

### Does this PR introduce _any_ user-facing change?
No change from user side

### How was this patch tested?
Added UT

Closes #34380 from AngersZhuuuu/SPARK-37082.

Authored-by: Angerszhuuuu <angers.zhu@gmail.com>
Signed-off-by: Wenchen Fan <wenchen@databricks.com>
The file was addedsql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/aggregate/HistogramNumeric.scala
The file was modifiedsql/hive/src/main/scala/org/apache/spark/sql/hive/HiveSessionCatalog.scala (diff)
The file was addedsql/catalyst/src/main/java/org/apache/spark/sql/util/NumericHistogram.java
The file was modifiedsql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/FunctionRegistry.scala (diff)
The file was modifiedsql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/catalog/SessionCatalog.scala (diff)
The file was modifiedsql/core/src/test/resources/sql-tests/results/group-by.sql.out (diff)
The file was addedsql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/aggregate/HistogramNumericSuite.scala
The file was modifiedsql/core/src/test/resources/sql-functions/sql-expression-schema.md (diff)
The file was modifiedsql/core/src/test/resources/sql-tests/inputs/group-by.sql (diff)