[ 
https://issues.apache.org/jira/browse/HIVE-3454?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14326158#comment-14326158
 ] 

Brock Noland edited comment on HIVE-3454 at 2/18/15 4:40 PM:
-------------------------------------------------------------

Have we tested this as part of an MR job? I don't think that the hive-site.xml 
is shipped as part of MR jobs. If that is true, how about we do as follows:

1) Add method {{public static void initialize(Configuration)}} to 
{{TimestampWritable}}
2) Call this method from {{AbstractSerDe.initialize}} which should be called, 
with configuration, in all the right places.
3) In {{TimestampWritable.initialize}} you can use the static 
{{HiveCon.getBoolVar}}

a bit kludgy but it should work. This all assuming the current impl doesn't 
work.

bq. "timestamp conversion."

I think we need a space after this.


was (Author: brocknoland):
Have we tested this as part of an MR job? I don't think that the hive-site.xml 
is shipped as part of MR jobs. If that is true, how about we do as follows:

1) Add method {{public static void initialize(Configuration)}} to 
{{TimestampWritable}}
2) Call this method from {{AbstractSerDe.initialize}} which should be called, 
with configuration, in all the right places.
3) In {{TimestampWritable.Configuration}} you can use the static 
{{HiveCon.getBoolVar}}

a bit kludgy but it should work. This all assuming the current impl doesn't 
work.

bq. "timestamp conversion."

I think we need a space after this.

> 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)

Reply via email to