Rajkumar Singh created HIVE-23752:
-------------------------------------
Summary: 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
Reporter: Rajkumar Singh
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)