You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/12/29 00:39:48 UTC

[GitHub] [spark] anchovYu commented on a diff in pull request #39269: [WIP][SPARK-41631][FOLLOWUP][SQL] Fix two issues in implicit lateral column alias resolution on Aggregate

anchovYu commented on code in PR #39269:
URL: https://github.com/apache/spark/pull/39269#discussion_r1058669132


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/ResolveLateralColumnAliasReference.scala:
##########
@@ -210,14 +209,10 @@ object ResolveLateralColumnAliasReference extends Rule[LogicalPlan] {
                 ne.toAttribute
             }.asInstanceOf[NamedExpression]
           }
-          if (newAggExprs.isEmpty) {
-            agg
-          } else {
-            Project(
-              projectList = projectExprs,
-              child = agg.copy(aggregateExpressions = newAggExprs.toSeq)
-            )
-          }
+          Project(

Review Comment:
   One thing I'm not sure about is if the code path for empty Aggregate expressions e.g. `Aggregate [dept] []` exists.



-- 
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