[
https://issues.apache.org/jira/browse/HIVE-21287?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Sukumaar Mane updated HIVE-21287:
---------------------------------
Summary: date_format() for week of year issue for weeks that overlap
between two years (was: date_format for week of year issue for weeks that
overlap between two years)
> date_format() for week of year issue for weeks that overlap between two years
> -----------------------------------------------------------------------------
>
> Key: HIVE-21287
> URL: https://issues.apache.org/jira/browse/HIVE-21287
> Project: Hive
> Issue Type: Improvement
> Reporter: Sukumaar Mane
> Priority: Minor
>
> date_format() provides 'week of year' as 1 for the first week of the year as
> well as last week of last year if it is overlapping. In an ideal situate,
> date_format() should check whether current date string has last month if it
> is so then it should return last week ordinal.
> example: In current hive,it returns
> {code:sql}
> hive> SELECT date_format('2019-12-31','w') as day1 ;
> OK
> 1
> hive> SELECT date_format('2020-01-1','w') as day1 ;
> OK
> 1
> Time taken: 0.208 seconds, Fetched: 1 row(s)
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)