hsiang-c commented on code in PR #18205:
URL: https://github.com/apache/datafusion/pull/18205#discussion_r2507648767


##########
datafusion/functions/src/math/abs.rs:
##########
@@ -49,14 +50,15 @@ macro_rules! make_abs_function {
     }};
 }
 
+#[macro_export]
 macro_rules! make_try_abs_function {
     ($ARRAY_TYPE:ident) => {{
         |input: &ArrayRef| {
             let array = downcast_named_arg!(&input, "abs arg", $ARRAY_TYPE);
             let res: $ARRAY_TYPE = array.try_unary(|x| {
                 x.checked_abs().ok_or_else(|| {
                     ArrowError::ComputeError(format!(
-                        "{} overflow on abs({})",
+                        "{} overflow on abs({:?})",

Review Comment:
   Need to use `:?` formatting specifier b/c `IntervalDayTimeArray` and 
`IntervalYearMonthArray` only support it. Otherwise, I got
   
   ```shell
   let abs_fun = make_try_abs_function!(IntervalDayTimeArray);
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
             |
             `arrow::datatypes::IntervalDayTime` cannot be formatted with the 
default formatter
             required by this formatting parameter
   ```



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to