You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Sergio Peña (JIRA)" <ji...@apache.org> on 2016/07/14 16:20:20 UTC

[jira] [Commented] (HIVE-14231) timestamp support is limited to 4 digit year

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

Sergio Peña commented on HIVE-14231:
------------------------------------

Hi [~taksaito]

Isn't part of a standard to have 4 digit year? 

I was taking a look at time and dates standard regarding the expansion of year representation, and it states we should prefix it with + or - (YYYY or ±YYYYY).
https://en.wikipedia.org/wiki/ISO_8601

Should we stick to a standard by allowing + or -? is there a use case on Hive for having an expansion of the digit year?

> timestamp support is limited to 4 digit year
> --------------------------------------------
>
>                 Key: HIVE-14231
>                 URL: https://issues.apache.org/jira/browse/HIVE-14231
>             Project: Hive
>          Issue Type: Bug
>          Components: Types
>            Reporter: Takahiko Saito
>
> Hive doesn't handle timestamp type that have a year with more than 4 digits.
> This limitation seems to be primarily around string to timestamp conversion.
> {code}
> Following insert query would insert NULL record -
> create table ts_test (t timestamp);
> insert into ts_test values ('2015-01-01 1:1:1');
> insert into ts_test values ('20151-01-01 1:1:1');
> select CAST(t as String)  from ts_test;
> +----------------------+--+
> |          t           |
> +----------------------+--+
> | 2015-01-01 01:01:01  |
> | NULL                 |
> +----------------------+--+
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)