Uh oh!
There was an error while loading. Please reload this page.
[SPARK-56250][SQL] Remove confusing defensive code in SortExec.rowSorter and add warning comment - #55048
[SPARK-56250][SQL] Remove confusing defensive code in SortExec.rowSorter and add warning comment#55048viirya wants to merge 5 commits into
Conversation
peter-toth
commented
Mar 27, 2026
Let me doublecheck something today and get back to you @viirya . |
Yeah, using theadlocal there doesn't make much sense. I was actually investigating a very different issue when the theoretical problem in #55006 came up, but it had nothing to do with my root problem. Reverting both commits looks ok to me. |
Test failures seem real, but unrelated to this change. Maybe #54854 is causing them? cc @HeartSaVioR |
f26f367 to
4a721ceCompare
dongjoon-hyun
left a comment
There was a problem hiding this comment.
Got it. +1 for reverting.
dongjoon-hyun
left a comment
There was a problem hiding this comment.
BTW, @viirya , I believe we should remove some discussion part in the PR description because it never happens in the community.
After some discussion and rethinking about it, it might be better to revert it and add some warning comment.
In addition, the PR title is correct but very misleading because the code itself is Reverting instead of simply adding a comment. This PR includes a code change. It would be great if the PR title clarifies that we are chaining the code itself.
viirya
commented
Mar 27, 2026
Thank you @dongjoon-hyun. I updated the PR description and title. |
dongjoon-hyun
commented
Mar 27, 2026
Thank you so much. BTW, I saw that this is created |
viirya
commented
Mar 27, 2026
Hmm, yes, maybe bug is more proper as I want to backport this. |
viirya
commented
Mar 27, 2026
I updated the JIRA ticket's title and changed it to bug. |
dongjoon-hyun
commented
Mar 27, 2026
Thank you again~ |
Same failure again: |
4a721ce to
d3700dcCompareviirya
commented
Mar 27, 2026
If it is too flaky, maybe we should consider revert it first to unblock CI. |
HeartSaVioR
commented
Mar 28, 2026
I'm looking into this now. You can revert but we can probably fix forward if we can wait for a couple hours. |
HeartSaVioR
commented
Mar 28, 2026
#55071 waiting for CI |
viirya
commented
Mar 28, 2026
Thank you @HeartSaVioR |
d3700dc to
6e53a99CompareCo-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
6e53a99 to
323c4f6Compare…ter and add warning comment [SPARK-52609](https://issues.apache.org/jira/browse/SPARK-52609) added some defensive code to SortExec. The defensive has some issues and was fixed by [SPARK-56203](https://issues.apache.org/jira/browse/SPARK-56203). But actually the defensive code is not for Spark itself but to guard multithreading access to SortExec that isn't an issue to Spark itself. The defensive code could easily confuse others. After rethinking about it, it might be better to revert it and add some warning comment. To simplify the code and reduce confusion. No Existing tests Generated-by: Claude Sonnet 4.6 Closes#55048 from viirya/revert-sort-exec-defensive-code. Authored-by: Liang-Chi Hsieh <viirya@gmail.com> Signed-off-by: Liang-Chi Hsieh <viirya@gmail.com> (cherry picked from commit 842d4dd) Signed-off-by: Liang-Chi Hsieh <viirya@gmail.com>
Merged to master/4.1. Thank you. @cloud-fan@HyukjinKwon@peter-toth@dongjoon-hyun@HeartSaVioR |
It looks like the build for the 4.1 branch has failed. Do you have time to fix it? @viirya |
viirya
commented
Mar 30, 2026
Okay. I will fix it. |
viirya
commented
Mar 30, 2026
Fix it at #55098. |
…SortExec.rowSorter and add warning comment ### What changes were proposed in this pull request? #55048 was backported to 4.1 but there is an error when resolving the conflicts. This patch fixes it. ### Why are the changes needed? Restoring the build of 4.1. ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? Unit test ### Was this patch authored or co-authored using generative AI tooling? No Closes#55098 from viirya/revert-sort-exec-defensive-code-4.1. Authored-by: Liang-Chi Hsieh <viirya@gmail.com> Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
dongjoon-hyun
commented
Mar 30, 2026
The follow-up PR is merged. |
What changes were proposed in this pull request?
SPARK-52609 added some defensive code to SortExec. The defensive has some issues and was fixed by SPARK-56203.
But actually the defensive code is not for Spark itself but to guard multithreading access to SortExec that isn't an issue to Spark itself. The defensive code could easily confuse others. After rethinking about it, it might be better to revert it and add some warning comment.
Why are the changes needed?
To simplify the code and reduce confusion.
Does this PR introduce any user-facing change?
No
How was this patch tested?
Existing tests
Was this patch authored or co-authored using generative AI tooling?
Generated-by: Claude Sonnet 4.6