spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cloud-fan <...@git.apache.org>
Subject [GitHub] spark pull request #22702: [SPARK-25714] Fix Null Handling in the Optimizer ...
Date Sat, 13 Oct 2018 05:48:26 GMT
Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/22702#discussion_r224950588
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/expressions.scala
---
    @@ -276,15 +276,31 @@ object BooleanSimplification extends Rule[LogicalPlan] with PredicateHelper
{
           case a And b if a.semanticEquals(b) => a
           case a Or b if a.semanticEquals(b) => a
     
    -      case a And (b Or c) if Not(a).semanticEquals(b) => And(a, c)
    -      case a And (b Or c) if Not(a).semanticEquals(c) => And(a, b)
    -      case (a Or b) And c if a.semanticEquals(Not(c)) => And(b, c)
    -      case (a Or b) And c if b.semanticEquals(Not(c)) => And(a, c)
    -
    -      case a Or (b And c) if Not(a).semanticEquals(b) => Or(a, c)
    -      case a Or (b And c) if Not(a).semanticEquals(c) => Or(a, b)
    -      case (a And b) Or c if a.semanticEquals(Not(c)) => Or(b, c)
    -      case (a And b) Or c if b.semanticEquals(Not(c)) => Or(a, c)
    +      // The following optimization is applicable only when the operands are nullable,
    --- End diff --
    
    typo: `only when the operands are not nullable`


---

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


Mime
View raw message