kumarUjjawal commented on issue #22269:
URL: https://github.com/apache/datafusion/issues/22269#issuecomment-4476548795

   duckdb
   
   ```
   memory D SELECT round(2.5::float8);
   ┌──────────────────────────────┐
   │ round(CAST(2.5 AS "DOUBLE")) │
   │            double            │
   ├──────────────────────────────┤
   │                          3.0 │
   └──────────────────────────────┘
   ```
   
   should match PG half-tie behavior, DuckDB uses half-away-from-zero uniformly 
across all numeric types. PG is split: round(numeric) = half-away-from-zero, 
round(double) = half-to-even (delegated to libc rint(), platform-dependent). 
DuckDB explicitly exposes the PG-style banker's rounding as the separate 
round_even() / roundbankers() functions, suggesting round() was deliberately 
chosen as non-banker's.


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

Reply via email to