diegoQuinas commented on code in PR #21710:
URL: https://github.com/apache/datafusion/pull/21710#discussion_r3198010830
##########
datafusion/spark/src/function/math/ceil.rs:
##########
@@ -153,7 +287,41 @@ fn spark_ceil_array(input: &Arc<dyn arrow::array::Array>)
-> Result<ColumnarValu
.as_primitive::<Float64Type>()
.unary::<_, Int64Type>(|x| x.ceil() as i64),
) as _,
+ // 2-arg integer: widen to Int64 and apply scale-aware ceiling.
+ DataType::Int8 if has_scale => impl_integer_array_ceil!(input,
Int8Type, scale),
+ DataType::Int16 if has_scale => impl_integer_array_ceil!(input,
Int16Type, scale),
+ DataType::Int32 if has_scale => impl_integer_array_ceil!(input,
Int32Type, scale),
+ DataType::Int64 if has_scale => impl_integer_array_ceil!(input,
Int64Type, scale),
+ DataType::UInt8 if has_scale => impl_integer_array_ceil!(input,
UInt8Type, scale),
+ DataType::UInt16 if has_scale => {
+ impl_integer_array_ceil!(input, UInt16Type, scale)
+ }
+ DataType::UInt32 if has_scale => {
+ impl_integer_array_ceil!(input, UInt32Type, scale)
+ }
+ DataType::UInt64 if has_scale => {
+ let array = input.as_primitive::<UInt64Type>();
Review Comment:
Okay, I fixed it
--
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]