Hive 3.1 "timestamp with local time zone" problem

Viewed 848

we try to use Hive 3.1.1 "timestamp with local time zone" feature, but when we try to create table like this:

create table t3
(ts timestamp with local time zone)
stored as parquet
location '/data/t3';

we get the error: java.lang.UnsupportedOperationException: Unknown field type: timestamp with local time zone('Europe/Moscow') i.e. Hive determine time zone correctly, but can not create table with such type of field.

How can we solve this problem?

1 Answers

Normalize timestamp (convert to UTC) using to_utc_timestamp

to_utc_timestamp(timestamp_column,'Europe/Moscow')

And store it as timestamp

Related