title: Hive Error: ORC does not support type conversion from DATE to TIMESTAMP
body: <p>I have a source table in Hive with DDL as:  </p>
  
  <pre><code>CREATE EXTERNAL TABLE JRNL.SOURCE_TAB(
    ticket_id varchar(11),
    ttr_start timestamp,
    ttr_stop timestamp
  )
  PARTITIONED BY (
    exp_dt string)
  ROW FORMAT DELIMITED
    FIELDS TERMINATED BY '\u0001'
  STORED AS INPUTFORMAT
    'org.apache.hadoop.hive.ql.io.orc.OrcInputFormat'
  OUTPUTFORMAT
    'org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat'
  LOCATION
    'hdfs://my.cluster.net:8020//db/data/SOURCE_TAB'
    TBLPROPERTIES (
    'last_modified_by'='edpintdatd',
    'last_modified_time'='1466093031',
    'serialization.null.format'='',
    'transient_lastDdlTime'='1466093031')
  </code></pre>
  
  <p>When I am querying the table:  </p>
  
  <pre><code>hive&gt; select exp_dt from JRNL.SOURCE_TAB limit 3;
  </code></pre>
  
  <p>It is giving me an Exception:   </p>
  
  <pre><code>Failed with exception java.io.IOException:java.io.IOException: ORC does not support type conversion from DATE to TIMESTAMP
  </code></pre>
  
  <p>Even when I tried to create a replica table like the above source, using:</p>
  
  <pre><code>CREATE TABLE JRNL.SOURCE_TAB_BKP(
    ticket_id varchar(11),
    ttr_start timestamp,
    ttr_stop timestamp
  )
  PARTITIONED BY (exp_dt string);
  </code></pre>
  
  <p>and then inserting data in this table using:</p>
  
  <pre><code>INSERT INTO TABLE JRNL.SOURCE_TAB_BKP PARTITION (exp_dt)
    SELECT
    ticket_id,
    ttr_start,
    ttr_stop,
    exp_dt string
  FROM JRNL.SOURCE_TAB;
  </code></pre>
  
  <p>it is still giving me the error <code>ORC does not support type conversion from DATE to TIMESTAMP</code><br>
  I tried using  </p>
  
  <pre><code>to_utc_timestamp(unix_timestamp(ttr_start),'UTC'),
  to_utc_timestamp(unix_timestamp(ttr_stop),'UTC'),
  </code></pre>
  
  <p>but this isn't helping either.<br>
  I have already set the <code>hive.exec.dynamic.partition.mode=nonstrict</code>.
  I even used <code>CAST(.... as DATE)</code>, <code>CAST(.... as TIMESTAMP)</code>. Didn't work either.</p>