beliefer commented on code in PR #42117: URL: https://github.com/apache/spark/pull/42117#discussion_r1273379892
########## sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/aggregate/First.scala: ########## @@ -60,7 +60,13 @@ case class First(child: Expression, ignoreNulls: Boolean) this(child, FirstLast.validateIgnoreNullExpr(ignoreNullsExpr, "first")) } - override def nullable: Boolean = true + override def nullable: Boolean = { + if (ignoreNulls) { + false Review Comment: All the input values are null is possible, e.g. `SELECT first(col) FILTER (col is null)`. -- 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: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org