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

Dongjoon Hyun resolved SPARK-59981.
-----------------------------------
    Fix Version/s: 4.4.0
       Resolution: Fixed

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

> Derive the partition-key ordering when a V2 scan's reported ordering keeps no 
> sort order
> ----------------------------------------------------------------------------------------
>
>                 Key: SPARK-59981
>                 URL: https://issues.apache.org/jira/browse/SPARK-59981
>             Project: Spark
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 4.4.0
>            Reporter: Peter Toth
>            Assignee: Peter Toth
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 4.4.0
>
>
> A V2 scan that reports a {{KeyedPartitioning}} gets an ordering over its 
> partition key expressions (SPARK-56241), since all rows of a partition have 
> the same key. It gets it when it reports no ordering, or when Spark ignores 
> its report (SPARK-59721). It does not get it when it reports an empty 
> ordering, or one Spark keeps nothing of:
> * a report that starts with a column pruned from the scan output 
> (SPARK-59899) and has no later sort order on a partition key other than a 
> transform;
> * a report that starts with a partition transform (SPARK-59995) and has no 
> later sort order on a partition key other than a transform.
> The ordering over the partition keys follows from the partitioning, not from 
> the report. So it can be derived in these cases too. A sort-merge join, a 
> window or a sort aggregate on the partition keys then needs no sort above the 
> scan.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to