Skip to content

Conversation

@eejbyfeldt
Copy link
Contributor

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

@github-actions github-actions bot added the SQL label May 8, 2025
@hvanhovell
Copy link
Contributor

@eejbyfeldt this is a long standing correctness issue right?

Copy link
Contributor

@hvanhovell hvanhovell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

asf-gitbox-commits pushed a commit that referenced this pull request Jul 1, 2025
…uct] 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>
(cherry picked from commit 5e6e8f1)
Signed-off-by: Herman van Hovell <herman@databricks.com>
asf-gitbox-commits pushed a commit that referenced this pull request Jul 1, 2025
…uct] 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>
(cherry picked from commit 5e6e8f1)
Signed-off-by: Herman van Hovell <herman@databricks.com>
@hvanhovell
Copy link
Contributor

Merged to master/4.0/3.5

@dongjoon-hyun
Copy link
Member

Hi, @hvanhovell and @eejbyfeldt . Unfortunately, this broke branch-3.5 compilation and blocked other PRs.

Let me revert this.

@dongjoon-hyun
Copy link
Member

This is reverted from branch-3.5 via a56879e

Please make a backporting PR to branch-3.5 in order to make it passes the CI correctly at this time, @eejbyfeldt .

eejbyfeldt added a commit to eejbyfeldt/spark that referenced this pull request Jul 2, 2025
…uct] 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 apache#50827 from eejbyfeldt/SPARK-52023.

Authored-by: Emil Ejbyfeldt <emil.ejbyfeldt@choreograph.com>
Signed-off-by: Herman van Hovell <herman@databricks.com>
@eejbyfeldt
Copy link
Contributor Author

Thanks for taking care of the revert. Created this backport #51347

@eejbyfeldt
Copy link
Contributor Author

@eejbyfeldt this is a long standing correctness issue right?

Yes, as far as I can tell it been there for along time.

zifeif2 pushed a commit to zifeif2/spark that referenced this pull request Nov 14, 2025
…uct] 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 apache#50827 from eejbyfeldt/SPARK-52023.

Authored-by: Emil Ejbyfeldt <emil.ejbyfeldt@choreograph.com>
Signed-off-by: Herman van Hovell <herman@databricks.com>
(cherry picked from commit a08011b)
Signed-off-by: Herman van Hovell <herman@databricks.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants