Skip to content

Commit bd002fa

Browse files
committed
try_arithmetic_impl
1 parent dc01c9f commit bd002fa

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

native/spark-expr/src/math_funcs/checked_arithmetic.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717

1818
use arrow::array::{Array, ArrowNativeTypeOp, PrimitiveArray, PrimitiveBuilder};
1919
use arrow::array::{ArrayRef, AsArray};
20-
use std::fmt::format;
2120

2221
use arrow::datatypes::{ArrowPrimitiveType, DataType, Int32Type, Int64Type};
2322
use datafusion::common::DataFusionError;
@@ -71,7 +70,12 @@ where
7170
}
7271
}
7372
}
74-
_ => Err(format!("Unsupported operation: {}", op)).unwrap(),
73+
_ => {
74+
return Err(DataFusionError::Internal(format!(
75+
"Unsupported operation: {:?}",
76+
op
77+
)))
78+
}
7579
}
7680

7781
Ok(Arc::new(builder.finish()) as ArrayRef)

0 commit comments

Comments
 (0)