ulysses-you commented on code in PR #40446:
URL: https://github.com/apache/spark/pull/40446#discussion_r1138066754
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/EquivalentExpressions.scala:
##########
@@ -130,7 +133,19 @@ class EquivalentExpressions {
// 2. ConditionalExpression: use its children that will always be
evaluated.
private def childrenToRecurse(expr: Expression): Seq[Expression] = expr
match {
case _: CodegenFallback => Nil
- case c: ConditionalExpression => c.alwaysEvaluatedInputs
+ case c: ConditionalExpression =>
+ if (shortcut) {
+ // The subexpression in conditional expression may not need to eval
even if it appears
Review Comment:
make sense, addressed !
--
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]