title: Hive unable to read decimal value from hdfs
body: <p>My hive version is 0.13.</p>
  
  <p>I have a file that contain <strong>decimal value</strong> and few other data types.  This file is obtained after performing some Pig transformations. I created a Hive table on top of this HDFS file.  When I try to do a <code>select * from table_name</code>, I find that the decimal values in the file are truncated into integer values.  What could be the reason for this?</p>
  
  <p>Below is my table:</p>
  
  <pre><code>CREATE TABLE FSTUDENT(
      load_dte string COMMENT 'DATE/TIME OF FILE CREATION',
      xyz DECIMAL,
      student_id int
  )
  ROW FORMAT DELIMITED
  FIELDS TERMINATED BY '\u0001'
  LINES TERMINATED BY '\n'
  STORED AS INPUTFORMAT 'org.apache.hadoop.mapred.TextInputFormat'
  OUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
  LOCATION 'hdfs://clsuter1/tmp/neethu/part-m-00000';
  </code></pre>
  
  <p>The output for <code>select * from table_name</code> gives the decimal value for 1387.00000 as 1387.</p>
  
  <p>Any help?</p>
  
  <p>Thanks.</p>