JoshRosen commented on code in PR #46908:
URL: https://github.com/apache/spark/pull/46908#discussion_r1630821788
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/QueryPlan.scala:
##########
@@ -343,8 +343,14 @@ abstract class QueryPlan[PlanType <: QueryPlan[PlanType]]
}
}
- val (planAfterRule, newAttrMapping) = CurrentOrigin.withOrigin(origin)
{
- rule.applyOrElse(newPlan, (plan: PlanType) => plan -> Nil)
+ val (planAfterRule, newAttrMapping) = {
+ if (rule.isDefinedAt(newPlan)) {
+ CurrentOrigin.withOrigin(origin) {
+ rule.apply(newPlan)
+ }
+ } else {
+ plan -> Nil
Review Comment:
This should be `newPlan -> Nil`; fixed in
2cd4d9deaa1b08c89a513ab6ba9b61481884e754
--
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]