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


##########
connector/connect/client/jvm/src/main/scala/org/apache/spark/sql/connect/client/GrpcExceptionConverter.scala:
##########
@@ -53,11 +60,33 @@ private[client] object GrpcExceptionConverter {
     }
   }
 
-  private def toSparkThrowable(ex: StatusRuntimeException): SparkThrowable 
with Throwable = {
-    val status = StatusProto.fromThrowable(ex)
-    // TODO: Add finer grained error conversion
-    new SparkException(status.getMessage, ex.getCause)
+  private val errorFactory = new ErrorFactoryBuilder()
+    .registerConstructor((message, _) => new ParseException(None, message, 
Origin(), Origin()))
+    .registerConstructor((message, _) => new AnalysisException(message))

Review Comment:
   Can we set cause to `AnalysisException ` here then?



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

Reply via email to