Gengliang Wang created SPARK-38176:
--------------------------------------

             Summary: ANSI mode: allow implicitly casting String to other 
simple types
                 Key: SPARK-38176
                 URL: https://issues.apache.org/jira/browse/SPARK-38176
             Project: Spark
          Issue Type: Sub-task
          Components: SQL
    Affects Versions: 3.3.0
            Reporter: Gengliang Wang
            Assignee: Gengliang Wang


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. 



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to