Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-32276

Remove redundant sorts before repartition nodes

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.1.0
    • Fix Version/s: 3.1.0
    • Component/s: SQL
    • Labels:
      None

      Description

      I think ourĀ EliminateSorts rule can be extended further to remove sorts before repartition, repartitionByExpression and coalesce nodes. Independently of whether we do a shuffle or not, each repartition operation will change the ordering and distribution of data.

      That's why we should be able to rewrite Repartition -> Sort -> Scan as Repartition -> Scan.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                aokolnychyi Anton Okolnychyi
                Reporter:
                aokolnychyi Anton Okolnychyi
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: