> On Sept. 20, 2014, 12:36 a.m., John Pullokkaran wrote:
> > ql/src/java/org/apache/hadoop/hive/ql/optimizer/optiq/translator/RexNodeConverter.java,
> >  line 161
> > <https://reviews.apache.org/r/25754/diff/2/?file=698150#file698150line161>
> >
> >     Since DecimalUtility would give you widest type possible for numeric 
> > comparisons your tgtDT would always be func return type.
> >     
> >     am i wrong?

For compares, where we use tgtDT directly, it's ok because it causes no further 
widening of type later.
For numerics, we use tgtDT only as a guideline (i.e. if it's decimal we convert 
both arguments to decimal), prec/scale are not taken into account.
We'd need to take them into account if any functions were to narrow the type, 
probably. But that is never done.


- Sergey


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


On Sept. 19, 2014, 9:50 p.m., Sergey Shelukhin wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/25754/
> -----------------------------------------------------------
> 
> (Updated Sept. 19, 2014, 9:50 p.m.)
> 
> 
> Review request for hive, Ashutosh Chauhan and John Pullokkaran.
> 
> 
> Repository: hive-git
> 
> 
> Description
> -------
> 
> see jira
> 
> 
> Diffs
> -----
> 
>   ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java f17b93d 
>   
> ql/src/java/org/apache/hadoop/hive/ql/optimizer/optiq/translator/RexNodeConverter.java
>  006870c 
>   
> ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFBaseNumeric.java 
> 6131d3d 
>   ql/src/test/queries/clientpositive/decimal_udf.q 591c210 
>   ql/src/test/results/clientpositive/decimal_udf.q.out c5c2031 
>   serde/src/java/org/apache/hadoop/hive/serde2/typeinfo/HiveDecimalUtils.java 
> cc75491 
> 
> Diff: https://reviews.apache.org/r/25754/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Sergey Shelukhin
> 
>

Reply via email to