[ 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: Optimized Logical Plan (receive_time<>'') 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 > > > 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-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org