This is an automated email from the ASF dual-hosted git repository. maxgekk pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/master by this push: new 8c7a8466e8e [MINOR][SQL] Replace `new SparkException(errorClass = "INTERNAL_ERROR", ...)` by `SparkException.internalError` 8c7a8466e8e is described below commit 8c7a8466e8ecd99ffc517b8cacb17d10cbc763a2 Author: panbingkun <pbk1...@gmail.com> AuthorDate: Mon Nov 7 21:00:06 2022 +0300 [MINOR][SQL] Replace `new SparkException(errorClass = "INTERNAL_ERROR", ...)` by `SparkException.internalError` ### What changes were proposed in this pull request? The pr aims to replace `new SparkException(errorClass = "INTERNAL_ERROR", ...)` with `SparkException.internalError` ### Why are the changes needed? The changes improve the error framework. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Pass GA. Closes #38532 from panbingkun/minor_internal_error. Authored-by: panbingkun <pbk1...@gmail.com> Signed-off-by: Max Gekk <max.g...@gmail.com> --- .../scala/org/apache/spark/sql/execution/QueryExecution.scala | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/sql/core/src/main/scala/org/apache/spark/sql/execution/QueryExecution.scala b/sql/core/src/main/scala/org/apache/spark/sql/execution/QueryExecution.scala index 8bf5d3d317b..798a219d243 100644 --- a/sql/core/src/main/scala/org/apache/spark/sql/execution/QueryExecution.scala +++ b/sql/core/src/main/scala/org/apache/spark/sql/execution/QueryExecution.scala @@ -495,11 +495,9 @@ object QueryExecution { */ private[sql] def toInternalError(msg: String, e: Throwable): Throwable = e match { case e @ (_: java.lang.NullPointerException | _: java.lang.AssertionError) => - new SparkException( - errorClass = "INTERNAL_ERROR", - messageParameters = Map("message" -> (msg + - " Please, fill a bug report in, and provide the full stack trace.")), - cause = e) + SparkException.internalError( + msg + " Please, fill a bug report in, and provide the full stack trace.", + e) case e: Throwable => e } --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org For additional commands, e-mail: commits-h...@spark.apache.org