[
https://issues.apache.org/jira/browse/HIVE-3454?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14346184#comment-14346184
]
Jason Dere commented on HIVE-3454:
----------------------------------
{quote}
Actually we don't want it to be thread-local since we want all threads, e.g,
within Mapper to have the same settings. If we set to be thread-local, the
threads within the same mapper which don't set intToTimeStampInSeconds will
have incorrect behaviors. Of course, the original problem was that we can't
access hive properties from TimestampWritable class and we have to set from
outside.
{quote}
Asking around a bit about HIVE-7926, it sounds like LLAP will potentially have
multiple queries running at the same time in different threads, which would
make a single static variable problematic. It also sounds like each thread
should in theory have the equivalent of something like ExecMapper.configure()
where thread-local context is initialized, so I think that any threads running
map/reduce work should have an opportunity to set intToTimeStampInSeconds. I
would think that things would be similar for Spark as well, though someone with
more familiarity with Hive-Spark execution would be better suited to answer
that question.
> 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.4.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)