You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Follow-up of #36289 (comment). I am in favor of removing integer compatibility for trunc, floor and ceil for the following reasons:
Mathematically they are no-ops for integers, so it doesn't make much sense to support them as a function.
The current implementation casts ints to floats, which may yield unexpected results due to float precision issues.
It's very simple to remove it, by just deleting several lines of code, as @jorisvandenbossche mentioned here, along with some small changes in tests and docs.
The support for integers was probably unintentional, just like the case for round.
The downside is, all the SQL engines, along with Numpy and R, support floor(int), and the result type is double, which means our current implementation is consistent with them.
Describe the enhancement requested
Follow-up of #36289 (comment). I am in favor of removing integer compatibility for
trunc
,floor
andceil
for the following reasons:round
.The downside is, all the SQL engines, along with Numpy and R, support floor(int), and the result type is double, which means our current implementation is consistent with them.
cc @pitrou @jorisvandenbossche @westonpace
Component(s)
C++
The text was updated successfully, but these errors were encountered: