Extra aggregate functions for Apache DataFusion. This is not an official Apache Software Foundation release.
Version 0.5.5 supports DataFusion 55.0 and Rust edition 2024.
cargo add datafusion-extra-functionsFrom Python (datafusion-python 55), install the FFI wheel and register aggregates via the PyCapsule protocol. See python/README.md.
pip install datafusion-extra-functionsRegister all functions with your session context:
datafusion_extra_functions::register_all_extra_functions(&mut ctx)?;| Function | Description |
|---|---|
mode(expression) |
Returns most frequent value. |
max_by(value, key) |
Returns value at maximum key. |
min_by(value, key) |
Returns value at minimum key. |
skewness(expression) |
Computes skewness. |
kurtosis_pop(expression) |
Computes population excess kurtosis. |
kurtosis(expression) |
Computes sample excess kurtosis. |
SELECT mode(city) FROM visits;
SELECT max_by(user_id, score) FROM results;
SELECT min_by(user_id, score) FROM results;
SELECT skewness(measurement) FROM readings;
SELECT kurtosis_pop(measurement) FROM readings;
SELECT kurtosis(measurement) FROM readings;cargo testPython bindings (from python/):
pip install maturin pytest
maturin develop --release
pytest