alamb commented on code in PR #9869: URL: https://github.com/apache/arrow-datafusion/pull/9869#discussion_r1545348286
########## 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: I wonder if we could make a constant or something that would make this easier to read For example ```rust /// Single monotonic argument const MONOTONIC_ONE: Option<Vec<bool>> = Some(vec![Some(true)]) const NON_MONOTONIC: Option<Vec<bool>> = None; ``` And then ```suggestion make_math_unary_udf!(Log2Func, LOG2, log2, log2, MONOTONIC_ONE); ``` Perhaps as a follow on PR -- 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]
