andygrove commented on code in PR #2815:
URL: https://github.com/apache/datafusion-comet/pull/2815#discussion_r2590633702
##########
native/spark-expr/src/math_funcs/internal/make_decimal.rs:
##########
@@ -40,18 +40,21 @@ pub fn spark_make_decimal(
))),
sv => internal_err!("Expected Int64 but found {sv:?}"),
},
- ColumnarValue::Array(a) => {
- let arr = a.as_primitive::<Int64Type>();
- let mut result = Decimal128Builder::new();
- for v in arr.into_iter() {
- result.append_option(long_to_decimal(&v, precision))
- }
- let result_type = DataType::Decimal128(precision, scale);
+ ColumnarValue::Array(a) => match a.data_type() {
+ DataType::Int64 => {
Review Comment:
for this PR, I just wanted to fall back to avoid crashing. We could choose
to add support in the future though
--
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]