davidm-db commented on code in PR #49726:
URL: https://github.com/apache/spark/pull/49726#discussion_r1946390264
##########
sql/core/src/main/scala/org/apache/spark/sql/scripting/SqlScriptingExecution.scala:
##########
@@ -100,13 +100,13 @@ class SqlScriptingExecution(
// While we don't have a result statement, execute the statements.
while (currentStatement.isDefined) {
Review Comment:
[Can be done in a follow-up PR]
In `handleException` we should add logic that converts all of the
`SparkThrowable` exceptions to the `SqlScriptingRuntimeException`.
This has a few consequences:
- We need to start propagating the exception to `findHandler` functions
instead of condition and SQL state.
- We need to start tracking the `currentStatementOrigin` for each statement
here.
- Propagate `currentStatementOrigin` to handle exception in order to
properly construct `SqlScriptingRuntimeException`.
- `withErrorHandling` has to have `Origin` as an input param as well.
I've sent you the example commit offline regarding this.
--
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]