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

Greg Rahn commented on IMPALA-1871:
-----------------------------------

[~csringhofer] - the comment of "instant" in the Avro definition generally 
means time zone aware and would map to SQL timestamp with local time zone.  
Empirical tests would probably be best to confirm.

> Impala is unable to read timestamp field value in avro written by hive
> ----------------------------------------------------------------------
>
>                 Key: IMPALA-1871
>                 URL: https://issues.apache.org/jira/browse/IMPALA-1871
>             Project: IMPALA
>          Issue Type: Bug
>          Components: Backend
>    Affects Versions: Impala 2.1.1, Impala 2.3.0
>         Environment: CDH 5.4
>            Reporter: Syed A. Hashmi
>            Assignee: Csaba Ringhofer
>            Priority: Major
>         Attachments: tempfile.txt, tempfile.txt
>
>
> Hive recently added support for writing timestamp values in avro format. 
> Field description looks like this:
> {code}
> { "type": "long", "logicalType": "timestamp-millis" }
> {code}
> I have created an avro table with data using hive. When I am trying to read 
> this field from Impala, it reads as garbage, while from hive I can read it 
> fine. Here is the result from hive:
> {code}
> 0: jdbc:hive2://shashmi-test-1.vpc.cloudera.c> select timestamp_field from 
> hiveclient_hiveclient_uncompressed;
> +-------------------------+--+
> |     timestamp_field     |
> +-------------------------+--+
> | 2012-02-21 07:08:09.12  |
> | 1998-02-21 07:08:09.12  |
> | 1970-01-01 00:00:01.0   |
> | 2038-01-19 03:14:07.0   |
> | NULL                    |
> +-------------------------+--+
> {code}
> While the output from Impala is incorrect:
> {code}
> [shashmi-test-2.vpc.cloudera.com:21000] > select timestamp_field from 
> hiveclient_hiveclient_uncompressed;
> Query: select timestamp_field from hiveclient_hiveclient_uncompressed
> +-----------------+
> | timestamp_field |
> +-----------------+
> | 1329836889120   |
> | 888073689120    |
> | 28801000        |
> | 2147512447000   |
> | NULL            |
> +-----------------+
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to