<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Hive float datatype issue !!! in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-float-datatype-issue/m-p/22782#M4153</link>
    <description>&lt;P&gt;Hello, i'm currently using CDH 5.2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've a sample data like this :&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;0&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;18.6&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;36.1&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;53.7&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;86.5&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;but when i'm upload to hive with float type, i got this :&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;0.0&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;18.6000003815&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;36.0999984741&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;53.7000007629&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;86.5&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I don't understand why &lt;STRONG&gt;18.6&lt;/STRONG&gt; become&lt;STRONG&gt;&amp;nbsp;18.6000003815&amp;nbsp;&lt;/STRONG&gt;, but &lt;STRONG&gt;86.5&lt;/STRONG&gt; is still the same, every other variable is change except the &lt;STRONG&gt;.0&lt;/STRONG&gt; and&lt;STRONG&gt; .5&lt;/STRONG&gt; varible.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can someone explain to me, really appreciate the help, thanks !&lt;/P&gt;</description>
    <pubDate>Fri, 16 Sep 2022 09:15:47 GMT</pubDate>
    <dc:creator>MabuXayda</dc:creator>
    <dc:date>2022-09-16T09:15:47Z</dc:date>
    <item>
      <title>Hive float datatype issue !!!</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-float-datatype-issue/m-p/22782#M4153</link>
      <description>&lt;P&gt;Hello, i'm currently using CDH 5.2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've a sample data like this :&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;0&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;18.6&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;36.1&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;53.7&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;86.5&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;but when i'm upload to hive with float type, i got this :&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;0.0&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;18.6000003815&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;36.0999984741&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;53.7000007629&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;86.5&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I don't understand why &lt;STRONG&gt;18.6&lt;/STRONG&gt; become&lt;STRONG&gt;&amp;nbsp;18.6000003815&amp;nbsp;&lt;/STRONG&gt;, but &lt;STRONG&gt;86.5&lt;/STRONG&gt; is still the same, every other variable is change except the &lt;STRONG&gt;.0&lt;/STRONG&gt; and&lt;STRONG&gt; .5&lt;/STRONG&gt; varible.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can someone explain to me, really appreciate the help, thanks !&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 09:15:47 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-float-datatype-issue/m-p/22782#M4153</guid>
      <dc:creator>MabuXayda</dc:creator>
      <dc:date>2022-09-16T09:15:47Z</dc:date>
    </item>
    <item>
      <title>Re: Hive float datatype issue !!!</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-float-datatype-issue/m-p/22902#M4154</link>
      <description>&lt;P&gt;This behavior is like&amp;nbsp;any system with float representation, float&amp;nbsp;bit representation does not allow exact representation of most values. &amp;nbsp;There is a lot of literature on the subject like &amp;nbsp;&lt;A target="_blank" href="http://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html"&gt;http://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you want exact values it's better to go with decimal, where you can specify scale&amp;nbsp;and precision.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Szehon&lt;/P&gt;</description>
      <pubDate>Fri, 19 Dec 2014 05:00:19 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-float-datatype-issue/m-p/22902#M4154</guid>
      <dc:creator>szehon</dc:creator>
      <dc:date>2014-12-19T05:00:19Z</dc:date>
    </item>
  </channel>
</rss>

