peter-toth commented on a change in pull request #27119: [SPARK-30447][SQL] 
Constant propagation nullability issue
URL: https://github.com/apache/spark/pull/27119#discussion_r365106443
 
 

 ##########
 File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/expressions.scala
 ##########
 @@ -132,11 +142,14 @@ object ConstantPropagation extends Rule[LogicalPlan] 
with PredicateHelper {
         (newSelf, Seq.empty)
       case n: Not =>
         // Ignore the EqualityPredicates from children since they are only 
propagated through And.
-        val (newChild, _) = traverse(n.child, replaceChildren = true)
+        val (newChild, _) = traverse(n.child, replaceChildren = true, 
nullIsFalse = false)
         (newChild.map(Not), Seq.empty)
       case _ => (None, Seq.empty)
     }
 
+  private def safeToReplace(ar: AttributeReference, nullIsFalse: Boolean) =
 
 Review comment:
   Ok, added. Let me know if it needs rewording.

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