Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing array functions #551

Merged
merged 7 commits into from
Dec 28, 2023
Merged
Next Next commit
Add array_append, array_concat and array_cat
ongchi committed Dec 21, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit a487d83a9da33ac43002669f5fad08fefd6678c6
11 changes: 11 additions & 0 deletions src/functions.rs
Original file line number Diff line number Diff line change
@@ -350,6 +350,11 @@ scalar_function!(random, Random);
scalar_function!(encode, Encode);
scalar_function!(decode, Decode);

// Array Functions
scalar_function!(array_append, ArrayAppend);
scalar_function!(array_concat, ArrayConcat);
scalar_function!(array_cat, ArrayConcat);

aggregate_function!(approx_distinct, ApproxDistinct);
aggregate_function!(approx_median, ApproxMedian);
aggregate_function!(approx_percentile_cont, ApproxPercentileCont);
@@ -539,5 +544,11 @@ pub(crate) fn init_module(m: &PyModule) -> PyResult<()> {
//Binary String Functions
m.add_wrapped(wrap_pyfunction!(encode))?;
m.add_wrapped(wrap_pyfunction!(decode))?;

// Array Functions
m.add_wrapped(wrap_pyfunction!(array_append))?;
m.add_wrapped(wrap_pyfunction!(array_concat))?;
m.add_wrapped(wrap_pyfunction!(array_cat))?;

Ok(())
}