jiangzhx commented on code in PR #6608:
URL: https://github.com/apache/arrow-datafusion/pull/6608#discussion_r1224252890
##########
datafusion/core/tests/sqllogictests/src/engines/conversion.rs:
##########
@@ -87,5 +87,5 @@ pub fn decimal_to_str(value: Decimal) -> String {
}
pub fn big_decimal_to_str(value: BigDecimal) -> String {
- value.round(12).normalized().to_string()
+ value.round(16).normalized().to_string()
Review Comment:
`Sqrt(2)` returns a double value of `1.4142135623730951`.
the precision of `value.round(12)` is not sufficient, `1.414213562373` is
returned.
To improve accuracy, we could increase the rounding precision to
`value.round(16)`
--
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]