cloud-fan commented on code in PR #44716: URL: https://github.com/apache/spark/pull/44716#discussion_r1454991761
########## sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/collectionOperations.scala: ########## @@ -2983,6 +2983,9 @@ case class Sequence( override def nullable: Boolean = children.exists(_.nullable) + // If step is defined, then an error will be thrown if the start and stop do not satisfy the step. + override lazy val throwable: Boolean = stepOpt.isDefined Review Comment: These two are similar but be conservative in two opposite directions. Filter pushdown is a very important feature and we don't want to suddenly disable it for many predicates. We only mark `sequence` as throwable for now. `NoThrow` was added for a new optimization and only a few expressions are marked as `NoThrow` that can be optimized. Since runtime error is rare, I think the current solution is better to produce more optimized plans for most cases. -- 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]
