title: Unable to retrieve date columns in hive
body: <p>I am finding difficulty when it comes to retrieving date values in hive. My query is</p>
  
  <pre><code>create external table test1(DISPLAYSCALE int, CREATED_DATE date, LAST_EDITED_DATE date)
  
  ROW FORMAT SERDE 'com.esri.hadoop.hive.serde.JsonSerde' STORED AS INPUTFORMAT 'com.esri.json.hadoop.UnenclosedJsonInputFormat' OUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat';
  </code></pre>
  
  <p>When I try to use the <code>select * from test1 limit5</code> I get this error; </p>
  
  <blockquote>
    <p>Failed with exception
    java.io.IOException:java.lang.ClassCastException:
    org.apache.hadoop.hive.serde2.io.DateWritable cannot be cast to
    org.apache.hadoop.io.Text</p>
  </blockquote>
  
  <p>As per the json the datatype for CREATED_DATE and CREATED_DATE are esriFieldTypeDate and the values are in this format say 2013-11-20 09:39:25.000001.
  So i used the date datatype while creating the table, copied it to HDFS using the unenclosed json and used the select * query to retrieve the columns, but I get the above error. To get the values we are creating the same table with string data type respectively instead of date and we are able to get the values .</p>
  
  <p>Can you suggest a solution for this problem. This question may seem silly but I am pretty new to programming.</p>