You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Wenchen Fan (Jira)" <ji...@apache.org> on 2025/06/04 21:10:00 UTC

[jira] [Assigned] (SPARK-52385) Remove TempResolvedColumns from InheritAnalysisRules name

     [ https://issues.apache.org/jira/browse/SPARK-52385?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Wenchen Fan reassigned SPARK-52385:
-----------------------------------

    Assignee: Mihailo Aleksic

> Remove TempResolvedColumns from InheritAnalysisRules name
> ---------------------------------------------------------
>
>                 Key: SPARK-52385
>                 URL: https://issues.apache.org/jira/browse/SPARK-52385
>             Project: Spark
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 4.1.0
>            Reporter: Mihailo Aleksic
>            Assignee: Mihailo Aleksic
>            Priority: Major
>              Labels: pull-request-available
>
> In this issue I propose to remove the TempResolvedColumn nodes when computing the name for InheritAnalysisRules nodes (they are not removed during the ResolveAggregateFunctions rule). This is the right behavior as TempResolvedColumn is an internal node and shouldn't be exposed to the users.
> The following query:
> SELECT sum(col1) FROM VALUES(1) GROUP BY ALL HAVING sum(ifnull(col1, 1)) = 1
> Would have following analyzed plans:
> Before the change:
> Project [sum(col1)#2L]
> +- Filter (sum(ifnull(tempresolvedcolumn(col1), 1))#4L = cast(1 as bigint))
>    +- Aggregate [sum(col1#0) AS sum(col1)#2L, sum(ifnull(tempresolvedcolumn(col1#0, col1, false), 1)) AS 
>                             sum(ifnull(tempresolvedcolumn(col1), 1))#4L]
>       +- LocalRelation [col1#0]
> After the change:
> Project [sum(col1)#2L]
> +- Filter (sum(ifnull(col1, 1))#4L = cast(1 as bigint))
>    +- Aggregate [sum(col1#0) AS sum(col1)#2L, sum(ifnull(tempresolvedcolumn(col1#0, col1, false), 1)) AS sum(ifnull(col1, 1))#4L]
>       +- LocalRelation [col1#0]



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org