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/27 07:45:00 UTC
[jira] [Commented] (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:comment-tabpanel&focusedCommentId=17068386#comment-17068386 ]
duyf commented on SPARK-31132:
------------------------------
Ok, thank you
> 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
>
>
> The type of receive_time is timestamp,The value is '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