Skip to content

Conversation

@ueshin
Copy link
Member

@ueshin ueshin commented Sep 4, 2023

What changes were proposed in this pull request?

This is a backport of #42784.

Fixes Arrow-optimized Python UDF to delay wrapping the function with fail_on_stopiteration.

Also removed unnecessary verification verify_result_type.

Why are the changes needed?

For Arrow-optimized Python UDF, fail_on_stopiteration can be applied to only the wrapped function to avoid unnecessary overhead.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

Added the related test.

Was this patch authored or co-authored using generative AI tooling?

No.

zhengruifeng pushed a commit that referenced this pull request Sep 4, 2023
…o delay wrapping the function with fail_on_stopiteration

### What changes were proposed in this pull request?

This is a backport of #42784.

Fixes Arrow-optimized Python UDF to delay wrapping the function with `fail_on_stopiteration`.

Also removed unnecessary verification `verify_result_type`.

### Why are the changes needed?

For Arrow-optimized Python UDF, `fail_on_stopiteration` can be applied to only the wrapped function to avoid unnecessary overhead.

### Does this PR introduce _any_ user-facing change?

No.

### How was this patch tested?

Added the related test.

### Was this patch authored or co-authored using generative AI tooling?

No.

Closes #42785 from ueshin/issues/SPARK-44876/3.5/fail_on_stopiteration.

Authored-by: Takuya UESHIN <[email protected]>
Signed-off-by: Ruifeng Zheng <[email protected]>
@zhengruifeng
Copy link
Contributor

merged to branch-3.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants