· 7 years ago · Sep 14, 2018, 01:08 PM
1my.select(
2 ...,
3 unix_timestamp() as "myts"
4 .write
5 .parquet(dir)
6
7CREATE EXTERNAL TABLE IF NOT EXISTS mytable (
8 ...
9 myts TIMESTAMP
10)
11
12HiveException: java.lang.ClassCastException: org.apache.hadoop.io.LongWritable cannot be cast to org.apache.hadoop.hive.serde2.io.TimestampWritable
13
14to_utc_timestamp(lit("2018-05-06 20:30:00"), "UTC")
15
16Column type: TIMESTAMP, Parquet schema: optional int64