grundprinzip commented on code in PR #42377:
URL: https://github.com/apache/spark/pull/42377#discussion_r1329219527


##########
connector/connect/common/src/main/protobuf/spark/connect/base.proto:
##########
@@ -778,6 +778,67 @@ message ReleaseExecuteResponse {
   optional string operation_id = 2;
 }
 
+message FetchErrorDetailsRequest {
+
+  // (Required)
+  // The session_id specifies a Spark session for a user identified by 
user_context.user_id.
+  // The id should be a UUID string of the format 
`00112233-4455-6677-8899-aabbccddeeff`.
+  string session_id = 1;
+
+  // User context
+  UserContext user_context = 2;
+
+  // (Required)
+  // The id of the error.
+  string error_id = 3;
+
+  // Specifies whether to include the stacktrace in the error message when
+  // the SQLConf spark.sql.connect.serverStacktrace.enabled is set to true.
+  optional bool stacktrace_in_message = 4;
+}
+
+message FetchErrorDetailsResponse {
+
+  message StackTraceElement {
+
+    // The fully qualified name of the class containing the execution point.
+    string declaring_class = 1;
+
+    // The name of the method containing the execution point.
+    string method_name = 2;
+
+    // The name of the file containing the execution point.
+    string file_name = 3;
+
+    // The line number of the source line containing the execution point.
+    int32 line_number = 4;
+  }
+
+  // ExceptionInfo defines the schema for representing exceptions. This choice
+  // employs a recursive schema rather than an iterative one, as recursive 
schemas
+  // tend to be more straightforward to work with, and exceptions typically do 
not
+  // exhibit deep nesting.

Review Comment:
   This comes with a couple of disadvantages: 
   
   Recursive nesting is bad for protobuf and we have explicit nesting depths. 
If we can we should consider avoiding that.
   
   Why is this not a problem? 
   
   Nested exceptions do not form a a tree but rather just a "stack". This means 
the easiest way to represent a list of exceptions is using a list. The first 
element in this list would be the top most exception, whereas the last one is 
the one that actually triggered the first one.



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