title: Hive cast from decimal to string truncates the value
body: <p>Conversion of a <strong>decimal</strong> value to <strong>string</strong> using cast() function truncates resulting value, e.g.:</p>
  
  <pre><code>hive -e "select cast(cast('0.1629369395016511130907901977737025' as decimal(38,38)) as string)"
  </code></pre>
  
  <p>returns:</p>
  
  <pre><code>0.162936939501651113
  </code></pre>
  
  <p>If the <strong>decimal</strong> first converted into <strong>varchar</strong> and later to <strong>string</strong> then result is correct:</p>
  
  <pre><code>hive -e "select cast(cast(cast('0.1629369395016511130907901977737025' as decimal(38,38)) as varchar(38)) as string)"
  </code></pre>
  
  <p>returns:</p>
  
  <pre><code>0.1629369395016511130907901977737025
  </code></pre>
  
  <p><em>I'm using Hive version 1.1.0-cdh5.7.0</em></p>