Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Drill >> mail # dev >> Review Request 21985: Drill-708: trunc(num) bugfix

Copy link to this message
Re: Review Request 21985: Drill-708: trunc(num) bugfix

This is an automatically generated e-mail. To reply, visit:


    Wouldn't this cause a loss of data? Double can represent approximately 1.8 * (10 ^ 308), simply casting it to long (which can represent only 19 digits) will cause loss of integer digits. Your change specifically isn't introducing this problem, seems like this issue always existed.
    Might be better to use a java function to truncate the fractional digits but still return double / float depending on the input.
- Mehant Baid
On May 28, 2014, 7:05 p.m., Yash Sharma wrote: