hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hive QA (Jira)" <j...@apache.org>
Subject [jira] [Commented] (HIVE-22762) Leap day is incorrectly parsed during cast in Hive
Date Fri, 06 Mar 2020 02:46:00 GMT

    [ https://issues.apache.org/jira/browse/HIVE-22762?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17052705#comment-17052705
] 

Hive QA commented on HIVE-22762:
--------------------------------



Here are the results of testing the latest attachment:
https://issues.apache.org/jira/secure/attachment/12995778/HIVE-22762.06.patch

{color:green}SUCCESS:{color} +1 due to 1 test(s) being added or modified.

{color:green}SUCCESS:{color} +1 due to 18102 tests passed

Test results: https://builds.apache.org/job/PreCommit-HIVE-Build/20971/testReport
Console output: https://builds.apache.org/job/PreCommit-HIVE-Build/20971/console
Test logs: http://104.198.109.242/logs/PreCommit-HIVE-Build-20971/

Messages:
{noformat}
Executing org.apache.hive.ptest.execution.TestCheckPhase
Executing org.apache.hive.ptest.execution.PrepPhase
Executing org.apache.hive.ptest.execution.YetusPhase
Executing org.apache.hive.ptest.execution.ExecutionPhase
Executing org.apache.hive.ptest.execution.ReportingPhase
{noformat}

This message is automatically generated.

ATTACHMENT ID: 12995778 - PreCommit-HIVE-Build

> Leap day is incorrectly parsed during cast in Hive
> --------------------------------------------------
>
>                 Key: HIVE-22762
>                 URL: https://issues.apache.org/jira/browse/HIVE-22762
>             Project: Hive
>          Issue Type: Bug
>          Components: HiveServer2
>            Reporter: Karen Coppage
>            Assignee: Karen Coppage
>            Priority: Minor
>             Fix For: 4.0.0
>
>         Attachments: HIVE-22762.01.patch, HIVE-22762.01.patch, HIVE-22762.01.patch, HIVE-22762.01.patch,
HIVE-22762.02.patch, HIVE-22762.03.patch, HIVE-22762.03.patch, HIVE-22762.04.patch, HIVE-22762.05.patch,
HIVE-22762.06.patch
>
>
> 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
(v8.3.4#803005)

Mime
View raw message