liukun4515 commented on code in PR #2233:
URL: https://github.com/apache/arrow-datafusion/pull/2233#discussion_r851859744


##########
datafusion/physical-expr/src/expressions/binary.rs:
##########
@@ -280,25 +280,64 @@ where
         .collect()
 }
 
+fn arith_decimal_scalar<F>(

Review Comment:
   But now I find a bug in the arithmetic operation. 
https://github.com/apache/arrow-datafusion/blob/c91efc27658e58264c4f346a5cfdec8810179e90/datafusion/physical-expr/src/expressions/binary.rs#L302
 and 
https://github.com/apache/arrow-datafusion/blob/c91efc27658e58264c4f346a5cfdec8810179e90/datafusion/physical-expr/src/expressions/binary.rs#L307
   
   In the divide method, we may lose of precision by converting the `i128` to 
`f64`.
   We use the `f64` to store the larger range of data, but we lose the 
precision.
   
   I will try to figure out this issue and resolve this.



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

Reply via email to