Skip to content

[SPARK-52741][SQL] RemoveFiles ShuffleCleanup mode doesnt work with non-adaptive execution #51432

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

karuppayya
Copy link
Contributor

What changes were proposed in this pull request?

Currently, shuffle cleanup only works for adaptive execution plans. Non-adaptive execution plans are not cleaned up. Thing change cleans it.

Why are the changes needed?

  • To cleanup shuffle files of non-adaptive query executions
  • Consistency in behavior between adaptive and non-adaptive shuffle cleanup based on the cleanup mode

Does this PR introduce any user-facing change?

No

How was this patch tested?

Modified existing unit tests to cover this case

Was this patch authored or co-authored using generative AI tooling?

No

@github-actions github-actions bot added the SQL label Jul 9, 2025
cleanupShuffles()
}
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indentations?

@dongjoon-hyun
Copy link
Member

cc @peter-toth

@@ -350,14 +350,19 @@ class QueryExecutionSuite extends SharedSparkSession {
}

test("SPARK-47764: Cleanup shuffle dependencies - RemoveShuffleFiles mode") {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just realized that the test has a jira number. Should i create a new test with the jira id used for this change? @dongjoon-hyun please advise

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO you can extend the existing tests when the new functionality can be easily covered by those. But why didn't you adjust all SPARK-47764: ... tests?

Copy link
Contributor Author

@karuppayya karuppayya Jul 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@peter-toth I modified only SPARK-47764: Cleanup shuffle dependencies - RemoveShuffleFiles mode, since my change was specific to org.apache.spark.sql.execution.RemoveShuffleFiles. I can add negatibve assertions to other and make them consistent . Let me know

Copy link
Contributor

@peter-toth peter-toth Jul 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, your PR affects other ShuffleCleanupModes too so the other 2 should work with both AQE enabled and disabled as well. All you need to do is to wrap those tests into an AQE on/off loop.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants