Github user dongjoon-hyun commented on a diff in the pull request:
https://github.com/apache/spark/pull/22029#discussion_r208714268
--- 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 --
@mgaido91 . Ur, this `asInstanceOf[StructType]` looks unsafe for
non-nullable primitive type. Could you add an additional test case for the
nested `StructType` to provide the coverage for this line?
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]