[
https://issues.apache.org/jira/browse/HIVE-3454?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Aihua Xu updated HIVE-3454:
---------------------------
Release Note:
The behaviors of converting from BOOLEAN/BYTE/SHORT/INT/BIGINT and converting
from FLOAT/DOUBLE to TIMESTAMP have been inconsistent. The value of a
BOOLEAN/BYTE/SHORT/INT/BIGINT is treated as the time in milliseconds while the
value of a FLOAT/DOUBLE is treated as the time in seconds.
With the change of HIVE-3454, we support an additional configuration
"hive.int.timestamp.conversion.in.seconds" to enable the interpretation the
BOOLEAN/BYTE/SHORT/INT/BIGINT value in seconds during the timestamp conversion
without breaking the existing customers. By default, the existing functionality
is kept.
was:
The behaviors of converting from BOOLEAN/BYTE/SHORT/INT/BIGINT and converting
from FLOAT/DOUBLE to TIMESTAMP have been inconsistent. The value of a
BOOLEAN/BYTE/SHORT/INT/BIGINT is treated as the time in milliseconds while the
value of a FLOAT/DOUBLE is treated as the time in seconds.
With the change of HIVE-3454, we support an additional configuration
"int.timestamp.conversion.in.seconds" to enable the interpretation the
BOOLEAN/BYTE/SHORT/INT/BIGINT value in seconds during the timestamp conversion
without breaking the existing customers. By default, the existing functionality
is kept.
> Problem with CAST(BIGINT as TIMESTAMP)
> --------------------------------------
>
> Key: HIVE-3454
> URL: https://issues.apache.org/jira/browse/HIVE-3454
> Project: Hive
> Issue Type: Bug
> Components: Types, UDF
> Affects Versions: 0.8.0, 0.8.1, 0.9.0, 0.10.0, 0.11.0, 0.12.0, 0.13.0,
> 0.13.1
> Reporter: Ryan Harris
> Assignee: Aihua Xu
> Labels: newbie, newdev, patch
> Attachments: HIVE-3454.1.patch.txt, HIVE-3454.2.patch,
> HIVE-3454.3.patch, HIVE-3454.3.patch, HIVE-3454.patch
>
>
> Ran into an issue while working with timestamp conversion.
> CAST(unix_timestamp() as TIMESTAMP) should create a timestamp for the current
> time from the BIGINT returned by unix_timestamp()
> Instead, however, a 1970-01-16 timestamp is returned.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)