Details
-
Bug
-
Status: Closed
-
Critical
-
Resolution: Won't Fix
-
1.0.0
-
None
Description
Ran the following queries in drill:
0: jdbc:drill:schema=dfs> select ceiling(55.8) from dfs.`student` where rownum=11;
------------
EXPR$0 |
------------
56.0 |
------------
0: jdbc:drill:schema=dfs> select floor(55.8) from dfs.`student` where rownum=11;
------------
EXPR$0 |
------------
55.0 |
------------
The same queries executed from oracle, postgres and mysql returned integer values of 56 and 55.
Found the following description of the two functions from http://users.atw.hu/sqlnut/sqlnut2-chp-4-sect-4.html :
Ceil/Ceiling:
Rounds a noninteger value upwards to the next greatest integer. Returns an integer value unchanged.
Floor:
Rounds a noninteger value downwards to the next least integer. Returns an integer value unchanged.
Attachments
Attachments
Issue Links
- is duplicated by
-
DRILL-709 FLOOR function should return an int instead of decimal
- Resolved