Jefffrey commented on code in PR #20793:
URL: https://github.com/apache/datafusion/pull/20793#discussion_r3144826417


##########
datafusion/functions/src/math/decimal.rs:
##########
@@ -41,14 +41,15 @@ where
 
     let factor = decimal_scale_factor::<T>(scale, fn_name)?;
     let decimal = array.as_primitive::<T>();
-    let data_type = array.data_type().clone();
+    let data_type = T::TYPE_CONSTRUCTOR(precision, 0);

Review Comment:
   If we decide to go with this approach we should probably rename 
`apply_decimal_op` since it makes it very specific to floor/ceil (even though 
those are currently its only usages)



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