Commit 5e6e8f1
[SPARK-52023][SQL] Fix data corruption/segfault returning Option[Product] from udaf
### What changes were proposed in this pull request?
This fixes so defining a udaf returning a `Option[Product]` produces correct results instead of the current behavior. Where it throws an exception, segfaults or produces incorrect results.
### Why are the changes needed?
Fix correctness issue.
### Does this PR introduce _any_ user-facing change?
Fixes a correctness issue.
### How was this patch tested?
Existing and new unittest.
### Was this patch authored or co-authored using generative AI tooling?
No
Closes #50827 from eejbyfeldt/SPARK-52023.
Authored-by: Emil Ejbyfeldt <emil.ejbyfeldt@choreograph.com>
Signed-off-by: Herman van Hovell <herman@databricks.com>1 parent 646d96e commit 5e6e8f1
File tree
2 files changed
+28
-1
lines changed- sql
- core/src/main/scala/org/apache/spark/sql/execution/aggregate
- hive/src/test/scala/org/apache/spark/sql/hive/execution
2 files changed
+28
-1
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
530 | 530 | | |
531 | 531 | | |
532 | 532 | | |
533 | | - | |
| 533 | + | |
534 | 534 | | |
535 | 535 | | |
536 | 536 | | |
| |||
Lines changed: 27 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
63 | 79 | | |
64 | 80 | | |
65 | 81 | | |
| |||
180 | 196 | | |
181 | 197 | | |
182 | 198 | | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
183 | 202 | | |
184 | 203 | | |
185 | 204 | | |
| |||
190 | 209 | | |
191 | 210 | | |
192 | 211 | | |
| 212 | + | |
| 213 | + | |
193 | 214 | | |
194 | 215 | | |
195 | 216 | | |
| |||
371 | 392 | | |
372 | 393 | | |
373 | 394 | | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
374 | 401 | | |
375 | 402 | | |
376 | 403 | | |
| |||
0 commit comments