cloud-fan commented on code in PR #41094:
URL: https://github.com/apache/spark/pull/41094#discussion_r1188669618
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/subquery.scala:
##########
@@ -367,7 +367,7 @@ case class ListQuery(
plan.output.head.dataType
}
override lazy val resolved: Boolean = childrenResolved && plan.resolved &&
numCols != -1
- override def nullable: Boolean = false
+ override def nullable: Boolean = childOutputs.exists(_.nullable)
Review Comment:
Yea this fixes the problem, but it confuses people about what
`ListQuery.nullable` means. If we can evaluate `ListQuery` alone, it should
return a non-nullable struct containing the query output columns. Since we
never evaluate `ListQuery` alone, its nullability is nonsense.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]