You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "jiangzhx (via GitHub)" <gi...@apache.org> on 2023/06/09 12:43:20 UTC
[GitHub] [arrow-datafusion] jiangzhx commented on a diff in pull request #6608: Port remaining tests in functions.rs to sqllogictest
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org