hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric Hanson" <eh...@microsoft.com>
Subject Re: Review Request 18808: Casting from decimal to tinyint, smallint, int and bigint generates different result when vectorization is on
Date Wed, 05 Mar 2014 23:39:18 GMT

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



common/src/java/org/apache/hadoop/hive/common/type/Decimal128.java
<https://reviews.apache.org/r/18808/#comment67244>

    Nice idea to special-case signum==0 and scale==0 cases to speed it up.



common/src/java/org/apache/hadoop/hive/common/type/Decimal128.java
<https://reviews.apache.org/r/18808/#comment67243>

    Decimal128.divideDestructive had a bug that we worked around by just rewriting it to use
HiveDecimal divide.
    
    I am worried that UnsignedInt128.divideDestructive could have been the original source
of the bug.
    
    That makes me think it might be safer to just use the HiveDecimal code here to do the
divide by 10**scale.
    


- Eric Hanson


On March 5, 2014, 9:39 p.m., Jitendra Pandey wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/18808/
> -----------------------------------------------------------
> 
> (Updated March 5, 2014, 9:39 p.m.)
> 
> 
> Review request for hive and Eric Hanson.
> 
> 
> Bugs: HIVE-6511
>     https://issues.apache.org/jira/browse/HIVE-6511
> 
> 
> Repository: hive-git
> 
> 
> Description
> -------
> 
> Casting from decimal to tinyint,smallint, int and bigint generates different result when
vectorization is on.
> 
> 
> Diffs
> -----
> 
>   common/src/java/org/apache/hadoop/hive/common/type/Decimal128.java a5d7399 
>   common/src/test/org/apache/hadoop/hive/common/type/TestDecimal128.java 426c03d 
>   ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/CastDecimalToLong.java
d5f34d5 
>   ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/CastDecimalToTimestamp.java
df7e1ee 
> 
> Diff: https://reviews.apache.org/r/18808/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Jitendra Pandey
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message