Github user mgaido91 commented on a diff in the pull request:

    https://github.com/apache/spark/pull/22029#discussion_r208835030
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/predicates.scala
 ---
    @@ -240,20 +242,25 @@ case class In(value: Expression, list: 
Seq[Expression]) extends Predicate {
       lazy val inSetConvertible = list.forall(_.isInstanceOf[Literal])
       private lazy val ordering = 
TypeUtils.getInterpretedOrdering(value.dataType)
     
    -  override def nullable: Boolean = children.exists(_.nullable)
    +  override def nullable: Boolean = value.dataType match {
    +    case _: StructType if !SQLConf.get.inFalseForNullField =>
    +      children.exists(_.nullable) ||
    +        
children.exists(_.dataType.asInstanceOf[StructType].exists(_.nullable))
    --- End diff --
    
    why do you think it is unsafe? We are doing it only if the `dataType` of 
`value` match `StructType` and according also to what is enforced in the 
`checkInputDataTypes`, therefore all the children must be `StructType`s.
    
    I will add anyway a test case for the  scenario you described, thanks.


---

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

Reply via email to