You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Yuming Wang (Jira)" <ji...@apache.org> on 2022/05/17 02:27:00 UTC

[jira] [Resolved] (SPARK-39120) Prunes the duplicate columns from child of UnaryNode

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

Yuming Wang resolved SPARK-39120.
---------------------------------
    Resolution: Won't Do

> Prunes the duplicate columns from child of UnaryNode
> ----------------------------------------------------
>
>                 Key: SPARK-39120
>                 URL: https://issues.apache.org/jira/browse/SPARK-39120
>             Project: Spark
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 3.4.0
>            Reporter: Yuming Wang
>            Priority: Major
>
> {code:scala}
> sql("create table t1(a int, b int, c int) using parquet")
> sql("select a, max(b) from (select a, b, a, b, a from t1) group by a").explain(true)
> {code}
> Current:
> {noformat}
> == Optimized Logical Plan ==
> Aggregate [a#0], [a#0, max(b#1) AS max(b)#4]
> +- Project [a#0, b#1, a#0, b#1, a#0]
>    +- Relation default.t1[a#0,b#1,c#2] parquet
> {noformat}
> Expected:
> {noformat}
> == Optimized Logical Plan ==
> Aggregate [a#0], [a#0, max(b#1) AS max(b)#4]
> +- Project [a#0, b#1]
>    +- Relation default.t1[a#0,b#1,c#2] parquet
> {noformat}



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

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