hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anandha L Ranganathan (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HIVE-5810) create a function add_date as exists in mysql
Date Thu, 21 Nov 2013 08:10:35 GMT

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

Anandha L Ranganathan updated HIVE-5810:
----------------------------------------

    Description: 
MySQL has ADDDATE(date,INTERVAL expr unit).

Similarly in Hive we can have  (date,unit,expr). 
Here Unit is DAY/Month/Year
For example,
add_date('2013-11-09','DAY',2) will return 2013-11-11.
add_date('2013-11-09','Month',2) will return 2014-01-09.
add_date('2013-11-09','Year',2) will return 2014-11-11.





  was:
MySQL has ADDDATE(date,INTERVAL expr unit).

Similarly in Hive we can have  (date,unit,expr). 
For example,
ADDDATE('2013-11-09','DAY',2) will return 2013-11-11.
ADDDATE('2013-11-09','Month',2) will return 2014-01-09.
ADDDATE('2013-11-09','Year',2) will return 2014-11-09.

Here Unit is DAY/Month/Year




> create a function add_date   as exists in mysql 
> ------------------------------------------------
>
>                 Key: HIVE-5810
>                 URL: https://issues.apache.org/jira/browse/HIVE-5810
>             Project: Hive
>          Issue Type: Improvement
>            Reporter: Anandha L Ranganathan
>            Assignee: Anandha L Ranganathan
>   Original Estimate: 40h
>  Remaining Estimate: 40h
>
> MySQL has ADDDATE(date,INTERVAL expr unit).
> Similarly in Hive we can have  (date,unit,expr). 
> Here Unit is DAY/Month/Year
> For example,
> add_date('2013-11-09','DAY',2) will return 2013-11-11.
> add_date('2013-11-09','Month',2) will return 2014-01-09.
> add_date('2013-11-09','Year',2) will return 2014-11-11.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Mime
View raw message