[
https://issues.apache.org/jira/browse/HIVE-9459?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jason Dere resolved HIVE-9459.
------------------------------
Resolution: Duplicate
> Concat plus date functions appear to be broken in 0.14
> ------------------------------------------------------
>
> Key: HIVE-9459
> URL: https://issues.apache.org/jira/browse/HIVE-9459
> Project: Hive
> Issue Type: Bug
> Reporter: Nathan Lande
>
> In the below example I create year_month and month_year vars. These each
> should be yyyymm and mmyyyy integer strings but it appears as if hive is
> calling the first function twice such that it is returning mmmm and yyyyyyyy.
> hive> select
> > month(a.joined) month,
> > year(a.joined) year,
> > concat(cast(year(a.joined) as string),cast(month(a.joined) as string))
> year_month,
> > concat(cast(month(a.joined) as string),cast(year(a.joined) as string))
> month_year
> > from a limit 20;
> OK
> month year year_month month_year
> 7 2014 20142014 77
> 7 2014 20142014 77
> 7 2014 20142014 77
> 7 2014 20142014 77
> 7 2014 20142014 77
> 7 2014 20142014 77
> 7 2014 20142014 77
> 7 2014 20142014 77
> 7 2014 20142014 77
> 7 2014 20142014 77
> 7 2014 20142014 77
> 7 2014 20142014 77
> 7 2014 20142014 77
> 7 2014 20142014 77
> 7 2014 20142014 77
> 7 2014 20142014 77
> 7 2014 20142014 77
> 7 2014 20142014 77
> 7 2014 20142014 77
> 7 2014 20142014 77
> Time taken: 0.109 seconds, Fetched: 20 row(s)
> Other users appear to experience similar issues in this stack overflow:
> http://stackoverflow.com/questions/27740866/convert-date-to-decimal-format-in-hive
> .
> I tested this in 0.13 and 0.14 and it does not appear to be an issue in 0.13.
> I looked around and could not find a similar issue so hopefully this is not a
> duplicate.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)