Commit 5024c4c
[SPARK-16432] Empty blocks fail to serialize due to assert in ChunkedByteBuffer
## What changes were proposed in this pull request?
It's possible to also change the callers to not pass in empty chunks, but it seems cleaner to just allow `ChunkedByteBuffer` to handle empty arrays. cc JoshRosen
## How was this patch tested?
Unit tests, also checked that the original reproduction case in #11748 (comment) is resolved.
Author: Eric Liang <[email protected]>
Closes #14099 from ericl/spark-16432.
(cherry picked from commit d8b06f1)
Signed-off-by: Reynold Xin <[email protected]>1 parent 16202ba commit 5024c4c
File tree
2 files changed
+8
-13
lines changed- core/src
- main/scala/org/apache/spark/util/io
- test/scala/org/apache/spark/io
2 files changed
+8
-13
lines changedLines changed: 4 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
42 | 41 | | |
43 | 42 | | |
44 | 43 | | |
| |||
Lines changed: 4 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | 41 | | |
48 | 42 | | |
49 | 43 | | |
| |||
63 | 57 | | |
64 | 58 | | |
65 | 59 | | |
| 60 | + | |
66 | 61 | | |
67 | | - | |
| 62 | + | |
68 | 63 | | |
69 | 64 | | |
70 | 65 | | |
| |||
79 | 74 | | |
80 | 75 | | |
81 | 76 | | |
| 77 | + | |
82 | 78 | | |
83 | 79 | | |
84 | | - | |
| 80 | + | |
85 | 81 | | |
86 | 82 | | |
87 | 83 | | |
| |||
0 commit comments