dongjoon-hyun commented on code in PR #36852:
URL: https://github.com/apache/spark/pull/36852#discussion_r895260558
##########
core/src/main/scala/org/apache/spark/ErrorInfo.scala:
##########
@@ -28,14 +28,30 @@ import com.fasterxml.jackson.module.scala.DefaultScalaModule
import org.apache.spark.util.Utils
+/**
+ * Information associated with an error subclass.
+ *
+ * @param subClass SubClass associated with this class.
+ * @param message C-style message format compatible with printf.
+ * The error message is constructed by concatenating the lines
with newlines.
+ */
+private[spark] case class ErrorSubInfo(message: Seq[String]) {
+ // For compatibility with multi-line error messages
+ @JsonIgnore
+ val messageFormat: String = message.mkString("\n")
+}
+
/**
* Information associated with an error class.
*
* @param sqlState SQLSTATE associated with this class.
+ * @param subClass A sequence of subclasses
* @param message C-style message format compatible with printf.
* The error message is constructed by concatenating the lines
with newlines.
*/
-private[spark] case class ErrorInfo(message: Seq[String], sqlState:
Option[String]) {
+private[spark] case class ErrorInfo(message: Seq[String],
+ subClass: Option[Map[String,
ErrorSubInfo]],
Review Comment:
Apache Spark uses 4-space indentation in this case, @panbingkun .
- https://github.com/databricks/scala-style-guide#indent
--
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]