[
https://issues.apache.org/jira/browse/HIVE-17038?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16215551#comment-16215551
]
Ashutosh Chauhan commented on HIVE-17038:
-----------------------------------------
Michael, can you please add your patch here so that we get a CI run on it
https://cwiki.apache.org/confluence/display/Hive/Hive+PreCommit+Patch+Testing
> invalid result when CAST-ing to DATE
> ------------------------------------
>
> Key: HIVE-17038
> URL: https://issues.apache.org/jira/browse/HIVE-17038
> Project: Hive
> Issue Type: Bug
> Components: CLI, Hive
> Affects Versions: 1.2.1
> Reporter: Jim Hopper
>
> when casting incorrect date literals to DATE data type hive returns wrong
> values instead of NULL.
> {code}
> SELECT CAST('2017-02-31' AS DATE);
> SELECT CAST('2017-04-31' AS DATE);
> {code}
> Some examples below where it really can produce weird results:
> {code}
> select *
> from (
> select cast('2017-07-01' as date) as dt
> ) as t
> where t.dt = '2017-06-31';
> select *
> from (
> select cast('2017-07-01' as date) as dt
> ) as t
> where t.dt = cast('2017-06-31' as date);
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)