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
We recently fixed an incompatibility with Postgres with the behavior of casting a FLOAT to an INT. The fix will be included in v24.1. See cockroachdb/cockroach#117798.
We should document the behavior of these casts. Specifically, a FLOAT to INT cast rounds the float to the nearest integer. If it is equidistant to two integers, it is rounded to the even integer. For example:
Marcus Gartner (mgartner) commented:
We recently fixed an incompatibility with Postgres with the behavior of casting a
FLOAT
to anINT
. The fix will be included in v24.1. See cockroachdb/cockroach#117798.We should document the behavior of these casts. Specifically, a
FLOAT
toINT
cast rounds the float to the nearest integer. If it is equidistant to two integers, it is rounded to the even integer. For example:Jira Issue: DOC-9622
The text was updated successfully, but these errors were encountered: