You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "zml1206 (via GitHub)" <gi...@apache.org> on 2025/01/02 03:55:11 UTC
Re: [PR] [SPARK-50683][SQL] Inline the common expression in With if used once [spark]
zml1206 commented on code in PR #49310:
URL: https://github.com/apache/spark/pull/49310#discussion_r1900523989
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/RewriteWithExpression.scala:
##########
@@ -68,9 +68,15 @@ object RewriteWithExpression extends Rule[LogicalPlan] {
private def applyInternal(p: LogicalPlan): LogicalPlan = {
val inputPlans = p.children
+ val commonExprIdSet = p.expressions
+ .flatMap(_.collect { case r: CommonExpressionRef => r.id })
Review Comment:
ping gently @cloud-fan
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org