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/11/19 20:20:28 UTC

[GitHub] [spark] grundprinzip commented on a diff in pull request #38720: [SPARK-41165][SPARK-41184][CONNECT] Fix arrow collect (again) and reenable tests.

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


##########
connector/connect/src/main/scala/org/apache/spark/sql/connect/service/SparkConnectStreamHandler.scala:
##########
@@ -196,13 +196,14 @@ class SparkConnectStreamHandler(responseObserver: StreamObserver[ExecutePlanResp
               signal.wait()
               result = partitions.remove(currentPartitionId)
             }
-            error match {
-              case NonFatal(e) =>
-                responseObserver.onError(error)
-                logError("Error while processing query.", e)
-                return
-              case fatal: Throwable => throw fatal
-              case null => result.get
+            if (error == null) {
+              result.get
+            } else if (NonFatal(error)) {
+              responseObserver.onError(error)
+              logError("Error while processing query.", error)

Review Comment:
   In theory, logging first then responding might be better in case something goes wrong and onError would throw.



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