You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "duyf (Jira)" <ji...@apache.org> on 2020/03/12 10:38:00 UTC

[jira] [Updated] (SPARK-31132) Optimized Logical Plan cast('' as timestamp) is null

     [ https://issues.apache.org/jira/browse/SPARK-31132?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

duyf updated SPARK-31132:
-------------------------
    Summary: Optimized Logical Plan  cast('' as timestamp) is null  (was: receive_time<>''  Optimized Logical Plan is null)

> Optimized Logical Plan  cast('' as timestamp) is null
> -----------------------------------------------------
>
>                 Key: SPARK-31132
>                 URL: https://issues.apache.org/jira/browse/SPARK-31132
>             Project: Spark
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 2.3.1
>            Reporter: duyf
>            Priority: Major
>         Attachments: image-2020-03-12-18-34-22-571.png
>
>
> receive_time='2020-02-10';
> SQL:
> select case when receive_time<>''
>  then 1 else 0 end as tt
>  from xxx.xxx
>  where order_id=1234;
> The output error is 0;
> Because cast( as timestamp) is null, receive_time<>'' is false;
>  
> !image-2020-03-12-18-34-22-571.png!



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org