Commit d8e24a9
authored
fix(java): Spark writer properly handles string and array data (#4335)
We need to use setSafe() as the initial allocation might not be large
enough to hold all of the string data in the InternalRow, and a realloc
might be required.
Also adds support for Spark `ArrayType`, and augments the existing
roundtrip writer unit test to include an `array<string>`
---------
Signed-off-by: Andrew Duffy <[email protected]>1 parent 642d4d8 commit d8e24a9
File tree
3 files changed
+67
-14
lines changed- java
- testfiles
- vortex-spark/src
- main/java/dev/vortex/spark/write
- test/java/dev/vortex/spark
3 files changed
+67
-14
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 18 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| 24 | + | |
| 25 | + | |
23 | 26 | | |
24 | 27 | | |
25 | 28 | | |
| |||
185 | 188 | | |
186 | 189 | | |
187 | 190 | | |
188 | | - | |
| 191 | + | |
| 192 | + | |
189 | 193 | | |
190 | 194 | | |
191 | 195 | | |
| |||
203 | 207 | | |
204 | 208 | | |
205 | 209 | | |
206 | | - | |
| 210 | + | |
207 | 211 | | |
208 | 212 | | |
209 | 213 | | |
210 | 214 | | |
211 | | - | |
| 215 | + | |
212 | 216 | | |
213 | 217 | | |
214 | 218 | | |
| |||
218 | 222 | | |
219 | 223 | | |
220 | 224 | | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
221 | 235 | | |
222 | 236 | | |
223 | | - | |
| 237 | + | |
224 | 238 | | |
225 | 239 | | |
226 | 240 | | |
| |||
Lines changed: 6 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | 18 | | |
20 | 19 | | |
21 | 20 | | |
22 | 21 | | |
23 | | - | |
24 | 22 | | |
25 | 23 | | |
26 | 24 | | |
| |||
68 | 66 | | |
69 | 67 | | |
70 | 68 | | |
71 | | - | |
| 69 | + | |
72 | 70 | | |
73 | 71 | | |
74 | 72 | | |
| |||
284 | 282 | | |
285 | 283 | | |
286 | 284 | | |
287 | | - | |
288 | | - | |
289 | | - | |
290 | 285 | | |
291 | | - | |
292 | | - | |
293 | | - | |
294 | | - | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
295 | 291 | | |
296 | 292 | | |
297 | 293 | | |
| |||
0 commit comments