cloud-fan commented on a change in pull request #34823:
URL: https://github.com/apache/spark/pull/34823#discussion_r763291895
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/expressions.scala
##########
@@ -47,6 +47,7 @@ object ConstantFolding extends Rule[LogicalPlan] {
private def hasNoSideEffect(e: Expression): Boolean = e match {
case _: Attribute => true
case _: Literal => true
+ case c: Cast if !conf.ansiEnabled => hasNoSideEffect(c.child)
Review comment:
Either this change or the change in `InferFiltersFromGenerate` can fix
the perf issue. But I keep both fixes to be super safe.
--
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]