cloud-fan commented on a change in pull request #25902: [SPARK-29213][SQL] Make 
it consistent when get notnull output and generate null checks in FilterExec
URL: https://github.com/apache/spark/pull/25902#discussion_r327512302
 
 

 ##########
 File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/basicPhysicalOperators.scala
 ##########
 @@ -110,6 +110,7 @@ case class FilterExec(condition: Expression, child: 
SparkPlan)
 
   // The columns that will filtered out by `IsNotNull` could be considered as 
not nullable.
   private val notNullAttributes = 
notNullPreds.flatMap(_.references).distinct.map(_.exprId)
+    .diff(otherPreds.flatMap(_.references).distinct.map(_.exprId))
 
 Review comment:
   This fix seems sub-optimal to me. If we have a `IsNotNull(a)`, then `a` 
should be a `notNullAttribute` even if `a` appears in `otherPreds` like 
`EqualTo(a, b)`.

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