srielau commented on code in PR #42985:
URL: https://github.com/apache/spark/pull/42985#discussion_r1334513626
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala:
##########
@@ -4432,6 +4432,17 @@ object SQLConf {
.booleanConf
.createWithDefault(false)
+ val LEGACY_RAISE_ERROR_WITHOUT_ERROR_CLASS =
+ buildConf("spark.sql.legacy.raiseErrorWithoutErrorClass")
+ .internal()
+ .doc("When set to true, restores the legacy behavior of `raise_error`
and `assert_true` to " +
+ "not return the `[USER_RAISED_EXCEPTION]` prefix." +
+ "For example, `raise_error('error!')` returns `error!` instead of " +
+ "`[[USER_RAISED_EXCEPTION] Error!`.")
Review Comment:
I spoke to @gatorsmile , and he also recommended a config. There are two
things at play here:
The exception changed away from RuntimeException, and we got the prefix.
It smells like we have a decent chance of breaking anyone who wants to
catch these exceptions.
--
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]