miland-db opened a new pull request, #53271:
URL: https://github.com/apache/spark/pull/53271
### What changes were proposed in this pull request?
When Exception Handlers which don't have BEGIN-END body are triggered,
internal exception `java.util.NoSuchElementException` was thrown instead of
executing properly or propagating/raising the new error if it happens in
handler.
```
BEGIN
DECLARE EXIT HANDLER FOR SQLEXCEPTION
SELECT 1;
SELECT 1/0;
END
```
### Why are the changes needed?
Code was encountering a bug which throws internal error for what should be
valid user code.
### Does this PR introduce _any_ user-facing change?
No.
### How was this patch tested?
New unit tests in `SqlScriptingExecutionSuite`.
### Was this patch authored or co-authored using generative AI tooling?
No.
--
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]