Jesse Petre created HIVE-28117:
----------------------------------

             Summary: add_months() with output_date_format returning wrong year 
on leap day
                 Key: HIVE-28117
                 URL: https://issues.apache.org/jira/browse/HIVE-28117
             Project: Hive
          Issue Type: Bug
          Components: Hive
    Affects Versions: 3.1.3
            Reporter: Jesse Petre
         Attachments: 2024-03-11_12-11-11.png

I use an output_date_format option on the add_months() function like so:

{{select add_months(dt, -2, 'YYYY-MM')}}

On leap day, 2024-02-29, this incorrectly returned 2024-12.  I expected 
2023-12.  All other days it works fine, only leap day it gave the wrong result.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to