Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions datafusion/spark/src/function/math/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ pub mod hex;
pub mod modulus;
pub mod negative;
pub mod rint;
pub mod round;
pub mod trigonometry;
pub mod unhex;
pub mod width_bucket;
Expand All @@ -38,6 +39,7 @@ make_udf_function!(hex::SparkHex, hex);
make_udf_function!(modulus::SparkMod, modulus);
make_udf_function!(modulus::SparkPmod, pmod);
make_udf_function!(rint::SparkRint, rint);
make_udf_function!(round::SparkRound, round);
make_udf_function!(unhex::SparkUnhex, unhex);
make_udf_function!(width_bucket::SparkWidthBucket, width_bucket);
make_udf_function!(trigonometry::SparkCsc, csc);
Expand All @@ -63,6 +65,11 @@ pub mod expr_fn {
"Returns the double value that is closest in value to the argument and is equal to a mathematical integer.",
arg1
));
export_functions!((
round,
"Rounds the value of expr to scale decimal places using HALF_UP rounding mode.",
arg1 arg2
));
export_functions!((unhex, "Converts hexadecimal string to binary.", arg1));
export_functions!((width_bucket, "Returns the bucket number into which the value of this expression would fall after being evaluated.", arg1 arg2 arg3 arg4));
export_functions!((csc, "Returns the cosecant of expr.", arg1));
Expand All @@ -88,6 +95,7 @@ pub fn functions() -> Vec<Arc<ScalarUDF>> {
modulus(),
pmod(),
rint(),
round(),
unhex(),
width_bucket(),
csc(),
Expand Down
Loading
Loading