[
https://issues.apache.org/jira/browse/IMPALA-5237?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16659686#comment-16659686
]
Alex Rodoni commented on IMPALA-5237:
-------------------------------------
[~jinchul] Will this make it to 3.1?
> from_unixtime cannot include literal H - incompatible with hive
> ---------------------------------------------------------------
>
> Key: IMPALA-5237
> URL: https://issues.apache.org/jira/browse/IMPALA-5237
> Project: IMPALA
> Issue Type: Bug
> Components: Backend
> Environment: Impala Shell v2.6.0-cdh5.8.3 (9872875) built on Fri Dec
> 9 14:31:00 PST 2016
> Reporter: Lou Bershad
> Assignee: Jinchul Kim
> Priority: Major
> Labels: newbie
>
> I need to format a date as 2017-04-20H18. No amount of backslashes or ticks
> will get this done.
> In hive, it looks like:
> {code}
> hive> select from_unixtime(1492677561,'yyyy-MM-dd\'H\'HH');
> OK
> _c0
> 2017-04-20H08
> {code}
> In impala, the same query returns the wrong thing. Instead of a literal H,
> it gives me '8' (because the hour happens to be 8).
> {code}
> [atl1c1mgr-vip.vldb-bo.secureworks.net:21001] > select
> from_unixtime(1492677561,'yyyy-MM-dd\'H\'HH');
> Query: select from_unixtime(1492677561,'yyyy-MM-dd\'H\'HH')
> +------------------------------------------------+
> | from_unixtime(1492677561, 'yyyy-mm-dd\'h\'hh') |
> +------------------------------------------------+
> | 2017-04-20'8'08 |
> +------------------------------------------------+
> Fetched 1 row(s) in 0.05s
> {code}
> from_unixtime should support literals. My preference would be that it uses
> the same syntax as hive to achieve this.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]