Commit 7c92351
[MINOR][CORE] Cleanup dead code and duplication in Mem. Management
## What changes were proposed in this pull request?
* Removed the method `org.apache.spark.sql.catalyst.expressions.codegen.UnsafeRowWriter#alignToWords`.
It became unused as a result of 85b0a15
(SPARK-15962) introducing word alignment for unsafe arrays.
* Cleaned up duplicate code in memory management and unsafe sorters
* The change extracting the exception paths is more than just cosmetics since it def. reduces the size the affected methods compile to
## How was this patch tested?
* Build still passes after removing the method, grepping the codebase for `alignToWords` shows no reference to it anywhere either.
* Dried up code is covered by existing tests.
Author: Armin <[email protected]>
Closes apache#19254 from original-brownbear/cleanup-mem-consumer.1 parent a11db94 commit 7c92351
File tree
4 files changed
+37
-61
lines changed- core/src/main/java/org/apache/spark
- memory
- unsafe/map
- util/collection/unsafe/sort
- sql/catalyst/src/main/java/org/apache/spark/sql/catalyst/expressions/codegen
4 files changed
+37
-61
lines changedLines changed: 12 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
| 92 | + | |
99 | 93 | | |
100 | 94 | | |
101 | 95 | | |
| |||
116 | 110 | | |
117 | 111 | | |
118 | 112 | | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
| 113 | + | |
126 | 114 | | |
127 | 115 | | |
128 | 116 | | |
| |||
152 | 140 | | |
153 | 141 | | |
154 | 142 | | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
155 | 153 | | |
Lines changed: 10 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
283 | 283 | | |
284 | 284 | | |
285 | 285 | | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | | - | |
290 | | - | |
291 | | - | |
292 | | - | |
| 286 | + | |
293 | 287 | | |
294 | 288 | | |
295 | 289 | | |
| |||
307 | 301 | | |
308 | 302 | | |
309 | 303 | | |
310 | | - | |
311 | | - | |
312 | | - | |
313 | | - | |
314 | | - | |
315 | | - | |
316 | | - | |
| 304 | + | |
317 | 305 | | |
318 | 306 | | |
319 | 307 | | |
| |||
403 | 391 | | |
404 | 392 | | |
405 | 393 | | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
406 | 402 | | |
407 | 403 | | |
408 | 404 | | |
| |||
Lines changed: 15 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
219 | 219 | | |
220 | 220 | | |
221 | 221 | | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | | - | |
| 222 | + | |
231 | 223 | | |
232 | 224 | | |
233 | 225 | | |
| |||
488 | 480 | | |
489 | 481 | | |
490 | 482 | | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
491 | 495 | | |
492 | 496 | | |
493 | 497 | | |
| |||
503 | 507 | | |
504 | 508 | | |
505 | 509 | | |
| 510 | + | |
506 | 511 | | |
507 | 512 | | |
508 | 513 | | |
| |||
521 | 526 | | |
522 | 527 | | |
523 | 528 | | |
524 | | - | |
525 | | - | |
526 | | - | |
527 | | - | |
528 | | - | |
529 | | - | |
530 | | - | |
531 | | - | |
| 529 | + | |
532 | 530 | | |
533 | 531 | | |
534 | 532 | | |
| |||
Lines changed: 0 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | 112 | | |
129 | 113 | | |
130 | 114 | | |
| |||
0 commit comments