You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/06/03 00:13:21 UTC

[GitHub] [spark] HyukjinKwon commented on a diff in pull request #36693: [SPARK-39349] Add a centralized CheckError method for QA of error path

HyukjinKwon commented on code in PR #36693:
URL: https://github.com/apache/spark/pull/36693#discussion_r888508847


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/AnalysisException.scala:
##########
@@ -54,10 +72,34 @@ class AnalysisException protected[sql] (
       messageParameters: Array[String],
       origin: Origin) =
     this(
-      SparkThrowableHelper.getMessage(errorClass, messageParameters),
+      SparkThrowableHelper.getMessage(errorClass, None, messageParameters),
+      line = origin.line,
+      startPosition = origin.startPosition,
+      errorClass = Some(errorClass),
+      errorSubClass = None,
+      messageParameters = messageParameters)
+
+  def this(
+            errorClass: String,
+            errorSubClass: String,
+            messageParameters: Array[String]) =

Review Comment:
   Just dropping a comment for a nit. maybe would have to be four spaces per https://github.com/databricks/scala-style-guide#spacing-and-indentation:
   
   ```scala
     def this(
         errorClass: String,
         errorSubClass: String,
         messageParameters: Array[String]) =
   ```



-- 
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-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org