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

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

Anton Okolnychyi created SPARK-25860:
----------------------------------------

             Summary: 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


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