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

Wenchen Fan resolved SPARK-33758.
---------------------------------
    Fix Version/s: 3.2.0
       Resolution: Fixed

Issue resolved by pull request 30762
[https://github.com/apache/spark/pull/30762]

> Prune unnecessary output partitioning when the attribute is not part of 
> output.
> -------------------------------------------------------------------------------
>
>                 Key: SPARK-33758
>                 URL: https://issues.apache.org/jira/browse/SPARK-33758
>             Project: Spark
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 3.0.1, 3.1.0
>            Reporter: Prakhar Jain
>            Assignee: Prakhar Jain
>            Priority: Major
>             Fix For: 3.2.0
>
>
> Consider the query:
> {noformat}
> val planned = sql(
>           """
>             | SELECT t1.id as t1id
>             | FROM t1, t2
>             | WHERE t1.id = t2.id
>           """.stripMargin).queryExecution.executedPlan
> println(planned.outputPartitioning)
> {noformat}
> The output of this will be:
> {noformat}
> res10: org.apache.spark.sql.catalyst.plans.physical.Partitioning = 
> (hashpartitioning(it1d#6L, 200) or hashpartitioning(t2id#7L, 200)) 
> {noformat}
>  
> This query will have top level Project node which will just project t1.id. So 
> outputPartitioning of this project node should be:
> hashpartitioning(it1d#6L, 200)
>  
> cc - [~maropu] [~cloud_fan]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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

Reply via email to