You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues-all@impala.apache.org by "Alex Rodoni (JIRA)" <ji...@apache.org> on 2018/10/10 01:32:00 UTC
[jira] [Commented] (IMPALA-5237) from_unixtime cannot include
literal H - incompatible with hive
[ https://issues.apache.org/jira/browse/IMPALA-5237?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16644326#comment-16644326 ]
Alex Rodoni commented on IMPALA-5237:
-------------------------------------
[~jinchul] Hi, do you have a target date/version for this?
> 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: issues-all-unsubscribe@impala.apache.org
For additional commands, e-mail: issues-all-help@impala.apache.org