Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.27.0
Description
According to the SQL Strandard about how to cast an approximate numeric to int in different database have different RoundingMode. for example:
In PostgreSQL、Mysql、Oracle(RoundingMode.HALF_UP):
select cast(5.1 as int) return 5 select cast(5.5 as int) return 6 select cast(-5.5 as int) return -6
In Calcite、Sql Server 2008(RoundingMode.DOWN):
select cast(5.1 as int) return 5 select cast(5.5 as int) return 5 select cast(-5.5 as int) return -5
Attachments
Issue Links
- relates to
-
CALCITE-4806 Lossy CAST is incorrectly simplified
- Closed
- links to