alamb commented on code in PR #9869: URL: https://github.com/apache/arrow-datafusion/pull/9869#discussion_r1545495710
########## datafusion/functions/src/math/mod.rs: ########## @@ -24,10 +24,14 @@ mod nans; make_udf_function!(nans::IsNanFunc, ISNAN, isnan); make_udf_function!(abs::AbsFunc, ABS, abs); -make_math_unary_udf!(TanhFunc, TANH, tanh, tanh); -make_math_unary_udf!(AcosFunc, ACOS, acos, acos); -make_math_unary_udf!(AsinFunc, ASIN, asin, asin); -make_math_unary_udf!(TanFunc, TAN, tan, tan); +make_math_unary_udf!(Log2Func, LOG2, log2, log2, Some(vec![Some(true)])); Review Comment: > We use `once_cell` in the `physical_plan` crate but introducing it to datafusion functions just for this doesn't seem right to me. That makes sense to me. We would probably have to throw in a `clone()` or something I thought about this and wrote up another API that would be much nicer https://github.com/apache/arrow-datafusion/issues/9879 (both for this callsite and montonicity in general) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
