[ https://issues.apache.org/jira/browse/HIVE-23752?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Rajkumar Singh updated HIVE-23752: ---------------------------------- Labels: hive (was: ) > Cast as Date for invalid date produce the valid output > ------------------------------------------------------ > > Key: HIVE-23752 > URL: https://issues.apache.org/jira/browse/HIVE-23752 > Project: Hive > Issue Type: Bug > Components: Hive > Affects Versions: 4.0.0 > Reporter: Rajkumar Singh > Priority: Major > Labels: hive > > Hive-3: > {code:java} > select cast("0000-00-00" as date) > 0002-11-30 > select cast("2010-27-54" as date) > 2012-04-23 > select cast("1992-00-74" as date) ; > 1992-02-12 > {code} > The reason Hive allowing is because Parser formatted is set to LENIENT > https://github.com/apache/hive/blob/ae008b79b5d52ed6a38875b73025a505725828eb/common/src/java/org/apache/hadoop/hive/common/type/Date.java#L50, > this seems to be an intentional change as changing the ResolverStyle to > STRICT start failing the tests. -- This message was sent by Atlassian Jira (v8.3.4#803005)