Commit 842d4dd
committed
[SPARK-56250][SQL] Remove confusing defensive code in SortExec.rowSorter and add warning comment
### What changes were proposed in this pull request?
[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.
### 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
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>1 parent 043df82 commit 842d4dd
1 file changed
Lines changed: 9 additions & 13 deletions
Lines changed: 9 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
72 | 69 | | |
73 | 70 | | |
74 | 71 | | |
| |||
101 | 98 | | |
102 | 99 | | |
103 | 100 | | |
104 | | - | |
| 101 | + | |
105 | 102 | | |
106 | 103 | | |
107 | 104 | | |
108 | | - | |
| 105 | + | |
109 | 106 | | |
110 | | - | |
111 | | - | |
| 107 | + | |
112 | 108 | | |
113 | 109 | | |
114 | 110 | | |
| |||
204 | 200 | | |
205 | 201 | | |
206 | 202 | | |
207 | | - | |
208 | | - | |
| 203 | + | |
| 204 | + | |
209 | 205 | | |
210 | 206 | | |
211 | 207 | | |
| |||
0 commit comments