You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Pengcheng Xiong (JIRA)" <ji...@apache.org> on 2016/09/27 00:37:20 UTC

[jira] [Reopened] (HIVE-14751) Add support for date truncation

     [ https://issues.apache.org/jira/browse/HIVE-14751?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Pengcheng Xiong reopened HIVE-14751:
------------------------------------

Hi [~jcamachorodriguez], as reported by [~ekoifman] and tested by myself, your patch introduced ambiguity into the grammar.
{code}
warning(200): IdentifiersParser.g:327:5:
Decision can match input such as "KW_DAY KW_TO KW_SECOND" using multiple alternatives: 2, 5

As a result, alternative(s) 5 were disabled for that input
warning(200): IdentifiersParser.g:327:5:
Decision can match input such as "KW_YEAR KW_TO KW_MONTH" using multiple alternatives: 1, 3

As a result, alternative(s) 3 were disabled for that input
{code} 

Could you please take another look? Thanks.

> Add support for date truncation
> -------------------------------
>
>                 Key: HIVE-14751
>                 URL: https://issues.apache.org/jira/browse/HIVE-14751
>             Project: Hive
>          Issue Type: Bug
>          Components: Parser
>    Affects Versions: 2.2.0
>            Reporter: Jesus Camacho Rodriguez
>            Assignee: Jesus Camacho Rodriguez
>              Labels: TODOC2.2
>             Fix For: 2.2.0
>
>         Attachments: HIVE-14751.patch
>
>
> Add support for {{floor (<time> to <timeunit>)}}, which is equivalent to {{date_trunc(<timeunit>, <time>)}}.
> https://www.postgresql.org/docs/9.1/static/functions-datetime.html#FUNCTIONS-DATETIME-TRUNC



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