-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Open
Labels
enhancementNew feature or requestNew feature or request
Description
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
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request