UNIX_TIMESTAMP conversion of TIMESTAMPLOCALTZ

CDP corrects an issue in CDH related to the UNIX_TIMESTAMP conversion of a local time zone.

Before Upgrade to CDP

Attempting to convert a timestamp of data type TIMESTAMPLOCALTZ using UNIX_TIMESTAMP, as shown in the following example causes an exception.

set hive.local.time.zone=Asia/Bangkok;

SELECT FROM_UNIXTIME(UNIX_TIMESTAMP('2000-01-07 00:00:00 GMT','yyyy-MM-dd HH:mm:ss z'));

The error looks something like this:

org.apache.hadoop.hive.ql.parse.SemanticException: Line 3:456 Wrong arguments ''yyyy-MM-dd HH:mm:ss'': The function UNIX_TIMESTAMP takes only string/date/timestamp types

After Upgrade to CDP

HIVE-18595 fixed the issue described above.

Action Required

Before upgrading from CDH to CDP, remove any conversions of the local time zone timestamp using UNIX_TIMESTAMP.