hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Dere <jd...@hortonworks.com>
Subject Re: Problem with decimal data type value search
Date Thu, 27 Aug 2015 00:51:18 GMT
If your numeric literal value is getting converted to double (and failing the equality test),
you can try using id = 1020140515022209000023580957BD. Adding "BD" to the end of the literal
value causes it to be parsed as a Decimal literal value rather than the default double value.

________________________________________
From: Selina Zhang <selinaz@yahoo-inc.com.INVALID>
Sent: Wednesday, August 26, 2015 12:03 PM
To: dev@hive.apache.org
Subject: Re: Problem with decimal data type value search

The root cause could be Double.toString() or FloatingDecimal.toJavaFormatString() uses scientific
notations if double is less than 10^-3 or greater than 10^7. It definitely is a bug. :)
Selina


     On Wednesday, August 26, 2015 8:24 AM, Mayur Saparia <mayur@whiteklay.in> wrote:




---- On Wed, 26 Aug 2015 13:45:42 +0530 &lt;mayur@whiteklay.in&gt; wrote ----


Hello Experts,I have been using Hive 0.13 , where I have a column of type decimal(30,0) e.g
Value: 1020140515022209000023580957 ,
The above value is stored properly and even displayed properly , the problem arises when I
try to search with this number.
When I query the table as follows:
select * from test where id=1020140515022209000023580957;


It returns zero rows, when I tried to trace the problem I found that it converts the number
to "ppd.OpProcFactory:  (id = 1.020140515022209E27)" (This is from logs while executing the
query from HUE). Also to specify that I am using MapR Hadoop Distribution.
Can somebody please let me know what is the issue.


Thanks &amp; regards,
Mayur Saparia.








Mime
View raw message