ulysses-you commented on code in PR #36468:
URL: https://github.com/apache/spark/pull/36468#discussion_r866809228
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/expressions.scala:
##########
@@ -52,22 +52,28 @@ object ConstantFolding extends Rule[LogicalPlan] {
case _ => false
}
+ private def constantFolding(e: Expression): Expression = e match {
+ // do not partially fold children inside ConditionalExpression
+ case c: ConditionalExpression if !c.foldable => c
Review Comment:
Acutally it affects many code place if we do not partially foldable the
children. One option is add a try catch to suppress the exception during
compile so we can do partially foldable the children inside
`ConditionalExpression`.
--
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]