panbingkun commented on code in PR #48196:
URL: https://github.com/apache/spark/pull/48196#discussion_r1771218319


##########
common/utils/src/main/java/org/apache/spark/SparkThrowable.java:
##########
@@ -35,19 +35,29 @@
  */
 @Evolving
 public interface SparkThrowable {
-  // Succinct, human-readable, unique, and consistent representation of the 
error category
-  // If null, error class is not set
-  String getErrorClass();
+  /**
+   * Succinct, human-readable, unique, and consistent representation of the 
error condition.
+   * If null, error condition is not set.
+   */
+  String getCondition();
+
+  /**
+   * Succinct, human-readable, unique, and consistent representation of the 
error category.
+   * If null, error class is not set.
+   * @deprecated Use {@link #getCondition()} instead.
+   */
+  @Deprecated
+  default String getErrorClass() { return getCondition(); }

Review Comment:
   I'm curious if we need to add a rule in `scalastyle-config.xml` that 
prohibits `getErrorClass` calls? like:
   
   
https://github.com/apache/spark/blob/44ec70f5103fc5674497373ac5c23e8145ae5660/scalastyle-config.xml#L145-L151



-- 
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]

Reply via email to