You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "DB Tsai (JIRA)" <ji...@apache.org> on 2018/10/31 18:37:00 UTC

[jira] [Resolved] (SPARK-25860) Replace Literal(null, _) with FalseLiteral whenever possible

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

DB Tsai resolved SPARK-25860.
-----------------------------
       Resolution: Fixed
    Fix Version/s: 3.0.0

Issue resolved by pull request 22857
[https://github.com/apache/spark/pull/22857]

> Replace Literal(null, _) with FalseLiteral whenever possible
> ------------------------------------------------------------
>
>                 Key: SPARK-25860
>                 URL: https://issues.apache.org/jira/browse/SPARK-25860
>             Project: Spark
>          Issue Type: Improvement
>          Components: Optimizer, SQL
>    Affects Versions: 3.0.0
>            Reporter: Anton Okolnychyi
>            Priority: Major
>             Fix For: 3.0.0
>
>
> We should have a new optimization rule that replaces {{Literal(null, _)}} with {{FalseLiteral}} in conditions in {{Join}} and {{Filter}}, predicates in {{If}}, conditions in {{CaseWhen}}.
> The underlying idea is that those expressions evaluate to {{false}} if the underlying expression is {{null}} (as an example see {{GeneratePredicate$create}} or {{doGenCode}} and {{eval}} methods in {{If}} and {{CaseWhen}}). Therefore, we can replace {{Literal(null, _)}} with {{FalseLiteral}}, which can lead to more optimizations later on.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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