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-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to