davidm-db commented on code in PR #47537: URL: https://github.com/apache/spark/pull/47537#discussion_r1697249446
########## sql/catalyst/src/main/scala/org/apache/spark/sql/errors/SqlScriptingException.scala: ########## @@ -17,40 +17,77 @@ package org.apache.spark.sql.errors -import org.apache.spark.SparkException +import org.apache.spark.{SparkException, SparkThrowableHelper} +import org.apache.spark.sql.catalyst.trees.Origin +import org.apache.spark.sql.errors.SqlScriptingException.errorMessageWithLineNumber + +class SqlScriptingException protected ( + origin: Origin, + errorClass: String, + cause: Throwable, + messageParameters: Map[String, String] = Map.empty) + extends SparkException( Review Comment: This is fine, but I think it can be further simplified, we can extend `Exception(message, cause)` the same way that `SparkException` does it, and implementing a few simple but required override functions. reasoning: there are properties in `SparkException` that we actually don't need. -- 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: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org