Yicong-Huang opened a new pull request, #59775: URL: https://github.com/apache/spark/pull/59775
### What changes were proposed in this pull request? Remove the `@fail_on_stopiteration` decorator on `_evaluate_elementwise_udf` in `ArrowElementwiseUDFHandler.run` (`SQL_ARROW_ELEMENTWISE_UDF`), and the now-unused import. ### Why are the changes needed? The handler keeps the default `_fail_on_stopiteration = True`, so `EvalTypeHandler.__init__` already wraps each UDF in `fail_on_stopiteration`. A `StopIteration` from the UDF becomes `STOP_ITERATION_OCCURRED` at that inner layer, on both the sequential path and inside the `ThreadPoolExecutor` path, so the outer decorator never sees a `StopIteration`. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Extended `test_stop_iteration_raises_runtime_error` in `test_elementwise_eval_type_handlers.py` to cover both the sequential and the thread-pool (`arrow.concurrency.level > 0`) paths and assert the `STOP_ITERATION_OCCURRED` condition. ### Was this patch authored or co-authored using generative AI tooling? Generated-by: Claude Opus 5.5 This pull request and its description were written by Isaac. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
