You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "Hisoka-X (via GitHub)" <gi...@apache.org> on 2023/07/02 01:17:23 UTC

[GitHub] [spark] Hisoka-X commented on a diff in pull request #41804: [SPARK-43851][SQL] Support LCA in grouping expressions

Hisoka-X commented on code in PR #41804:
URL: https://github.com/apache/spark/pull/41804#discussion_r1249064475


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/ResolveReferencesInAggregate.scala:
##########
@@ -112,9 +105,11 @@ object ResolveReferencesInAggregate extends SQLConfHelper
     assert(selectList.forall(_.resolved))
     if (conf.groupByAliases) {
       groupExprs.map { g =>
-        g.transformWithPruning(_.containsPattern(UNRESOLVED_ATTRIBUTE)) {
-          case u: UnresolvedAttribute =>
-            selectList.find(ne => conf.resolver(ne.name, u.name)).getOrElse(u)
+        g.transformWithPruning(_.containsAnyPattern(UNRESOLVED_ATTRIBUTE,
+          LATERAL_COLUMN_ALIAS_REFERENCE)) {
+          case u @ (_: UnresolvedAttribute | _: LateralColumnAliasReference) =>

Review Comment:
   Thanks @cloud-fan , I'll try to implement it in followup PR, please help to see if it meets the requirements when it ready.



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