-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/22607/#review47174
-----------------------------------------------------------



exec/java-exec/src/main/codegen/templates/MathFunctions.java
<https://reviews.apache.org/r/22607/#comment82799>

    We don't need to do anything if we are truncating a non fractional input 
(like int or long). Only in the case of float or double do we need to actually 
truncate. Could you make the change so we use BigDecimal only for double and 
float.
    
    Also could you add tests to TestFunctionsQuery.


- Mehant Baid


On June 18, 2014, 2:38 a.m., Yash Sharma wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/22607/
> -----------------------------------------------------------
> 
> (Updated June 18, 2014, 2:38 a.m.)
> 
> 
> Review request for drill and Mehant Baid.
> 
> 
> Repository: drill-git
> 
> 
> Description
> -------
> 
> Drill-988 - Trunc func injects a long cast which would cause loss of data
> Added BigDecimal for truncation and return type is same as passed params.
> 
> 
> Diffs
> -----
> 
>   exec/java-exec/src/main/codegen/data/MathFunc.tdd 8180141 
>   exec/java-exec/src/main/codegen/templates/MathFunctions.java d1ba6e8 
> 
> Diff: https://reviews.apache.org/r/22607/diff/
> 
> 
> Testing
> -------
> 
> Via Sqlline
> 
> 
> Thanks,
> 
> Yash Sharma
> 
>

Reply via email to