hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Karen Coppage (Jira)" <>
Subject [jira] [Created] (HIVE-22762) Leap day is incorrectly parsed during cast in Hive
Date Thu, 23 Jan 2020 08:53:00 GMT
Karen Coppage created HIVE-22762:

             Summary: Leap day is incorrectly parsed during cast in Hive
                 Key: HIVE-22762
             Project: Hive
          Issue Type: Bug
          Components: HiveServer2
            Reporter: Karen Coppage
            Assignee: Karen Coppage
             Fix For: 4.0.0

While casting a string to a date with a custom date format having day token before year and
moth tokens, the date is parsed incorrectly for leap days.

h3. How to reproduce

Execute {code}select cast("29 02 0" as date format "dd mm rr"){code} with Hive. The query
 results in *2020-02-28*, incorrectly.


Executing the another cast with a slightly modified representation of the date (day is preceded
by year and moth) is however correctly parsed:
{code}select cast("0 02 29" as date format "rr mm dd"){code}
It returns *2020-02-29*.

This message was sent by Atlassian Jira

View raw message