Skip to content

Commit 322d835

Browse files
authored
Move kurtosis_pop to datafusion-functions-extra and out of core (#12647)
Co-authored-by: Dharan Aditya <[email protected]>
1 parent 689500f commit 322d835

File tree

5 files changed

+0
-269
lines changed

5 files changed

+0
-269
lines changed

datafusion/functions-aggregate/src/kurtosis_pop.rs

Lines changed: 0 additions & 190 deletions
This file was deleted.

datafusion/functions-aggregate/src/lib.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ pub mod average;
7878
pub mod bit_and_or_xor;
7979
pub mod bool_and_or;
8080
pub mod grouping;
81-
pub mod kurtosis_pop;
8281
pub mod nth_value;
8382
pub mod string_agg;
8483

@@ -171,7 +170,6 @@ pub fn all_default_aggregate_functions() -> Vec<Arc<AggregateUDF>> {
171170
average::avg_udaf(),
172171
grouping::grouping_udaf(),
173172
nth_value::nth_value_udaf(),
174-
kurtosis_pop::kurtosis_pop_udaf(),
175173
]
176174
}
177175

datafusion/proto/tests/cases/roundtrip_logical_plan.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ use datafusion_functions_aggregate::expr_fn::{
7373
approx_distinct, array_agg, avg, bit_and, bit_or, bit_xor, bool_and, bool_or, corr,
7474
nth_value,
7575
};
76-
use datafusion_functions_aggregate::kurtosis_pop::kurtosis_pop;
7776
use datafusion_functions_aggregate::string_agg::string_agg;
7877
use datafusion_functions_window_common::field::WindowUDFFieldArgs;
7978
use datafusion_proto::bytes::{
@@ -938,7 +937,6 @@ async fn roundtrip_expr_api() -> Result<()> {
938937
vec![lit(10), lit(20), lit(30)],
939938
),
940939
row_number(),
941-
kurtosis_pop(lit(1)),
942940
nth_value(col("b"), 1, vec![]),
943941
nth_value(
944942
col("b"),

datafusion/sqllogictest/test_files/aggregate.slt

Lines changed: 0 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -5862,64 +5862,3 @@ ORDER BY k;
58625862
----
58635863
1 1.8125 6.8007813 Float16 Float16
58645864
2 8.5 8.5 Float16 Float16
5865-
5866-
# The result is 0.19432323191699075 actually
5867-
query R
5868-
SELECT kurtosis_pop(col) FROM VALUES (1), (10), (100), (10), (1) as tab(col);
5869-
----
5870-
0.194323231917
5871-
5872-
# The result is -1.153061224489787 actually
5873-
query R
5874-
SELECT kurtosis_pop(col) FROM VALUES (1), (2), (3), (2), (1) as tab(col);
5875-
----
5876-
-1.15306122449
5877-
5878-
query R
5879-
SELECT kurtosis_pop(col) FROM VALUES (1.0), (10.0), (100.0), (10.0), (1.0) as tab(col);
5880-
----
5881-
0.194323231917
5882-
5883-
query R
5884-
SELECT kurtosis_pop(col) FROM VALUES ('1'), ('10'), ('100'), ('10'), ('1') as tab(col);
5885-
----
5886-
0.194323231917
5887-
5888-
query R
5889-
SELECT kurtosis_pop(col) FROM VALUES (1.0) as tab(col);
5890-
----
5891-
NULL
5892-
5893-
query R
5894-
SELECT kurtosis_pop(1)
5895-
----
5896-
NULL
5897-
5898-
query R
5899-
SELECT kurtosis_pop(1.0)
5900-
----
5901-
NULL
5902-
5903-
query R
5904-
SELECT kurtosis_pop(null)
5905-
----
5906-
NULL
5907-
5908-
statement ok
5909-
CREATE TABLE t1(c1 int);
5910-
5911-
query R
5912-
SELECT kurtosis_pop(c1) FROM t1;
5913-
----
5914-
NULL
5915-
5916-
statement ok
5917-
INSERT INTO t1 VALUES (1), (10), (100), (10), (1);
5918-
5919-
query R
5920-
SELECT kurtosis_pop(c1) FROM t1;
5921-
----
5922-
0.194323231917
5923-
5924-
statement ok
5925-
DROP TABLE t1;

docs/source/user-guide/sql/aggregate_functions.md

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,6 @@ last_value(expression [ORDER BY expression])
252252
- [regr_sxx](#regr_sxx)
253253
- [regr_syy](#regr_syy)
254254
- [regr_sxy](#regr_sxy)
255-
- [kurtosis_pop](#kurtosis_pop)
256255

257256
### `corr`
258257

@@ -528,19 +527,6 @@ regr_sxy(expression_y, expression_x)
528527
- **expression_x**: Independent variable.
529528
Can be a constant, column, or function, and any combination of arithmetic operators.
530529

531-
### `kurtosis_pop`
532-
533-
Computes the excess kurtosis (Fisher’s definition) without bias correction.
534-
535-
```
536-
kurtois_pop(expression)
537-
```
538-
539-
#### Arguments
540-
541-
- **expression**: Expression to operate on.
542-
Can be a constant, column, or function, and any combination of arithmetic operators.
543-
544530
## Approximate
545531

546532
- [approx_distinct](#approx_distinct)

0 commit comments

Comments
 (0)