[
https://issues.apache.org/jira/browse/SPARK-33758?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Wenchen Fan reassigned SPARK-33758:
-----------------------------------
Assignee: Prakhar Jain
> 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
>
> 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: [email protected]
For additional commands, e-mail: [email protected]