AngersZhuuuu commented on a change in pull request #25878: 
[SPARK-29162][SQL]Simplify NOT(IsNull(x)) and NOT(IsNotNull(x))
URL: https://github.com/apache/spark/pull/25878#discussion_r326878243
 
 

 ##########
 File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/expressions.scala
 ##########
 @@ -461,6 +461,9 @@ object SimplifyConditionals extends Rule[LogicalPlan] with 
PredicateHelper {
         } else {
           e.copy(branches = branches.take(i).map(branch => (branch._1, 
elseValue)))
         }
+
+      case n @ Not(expr: IsNull) => IsNotNull(expr.child)
 
 Review comment:
   > conditional
   
   Reasonable, I focus too much on `isnull/isnotnull`  expression。

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to