Description
Compared to the default behavior, the current ANSI type coercion rules don't allow the following cases:
- comparing String with other simple types, e.g. date/timestamp/int ...
- arithmetic op with String and other simple types
- Union/Intersect/Except with String and other simple types
- SQL function expects non-string types but got string input
- other SQL operators..
The original purpose is to prevent potential String parsing errors under ANSI mode. However, after doing research among real-world Spark SQL queries, I find that many users are actually using String as Date/Timestamp/Numeric in their queries.
To make the migration to ANSI mode easier, I suggest removing this limitation.