mmooyyii opened a new issue, #17054:
URL: https://github.com/apache/datafusion/issues/17054
### Is your feature request related to a problem or challenge?
When using round(value::decimal) in datafusion, the decimal will implicit
cast to float64 and round returns float64.
It may lose decimal's precision.
I think round support decimal can make calculations safer
```
> select round('173975140545.855'::decimal(38,10),2);
+------------------------------------------+
| round(Utf8("173975140545.855"),Int64(2)) |
+------------------------------------------+
| 173975140545.85 |
+------------------------------------------+
1 row(s) fetched.
Elapsed 0.001 seconds.
```
same SQL in postgreSQL
```
postgres=# select round('173975140545.855'::decimal(38,10),2);
round
-----------------
173975140545.86
```
### Describe the solution you'd like
_No response_
### Describe alternatives you've considered
_No response_
### Additional context
_No response_
--
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]