WweiL commented on code in PR #42986:
URL: https://github.com/apache/spark/pull/42986#discussion_r1329337505


##########
python/pyspark/sql/connect/streaming/worker/listener_worker.py:
##########
@@ -83,7 +86,14 @@ def process(listener_event_str, listener_event_type):  # 
type: ignore[no-untyped
     while True:
         event = utf8_deserializer.loads(infile)
         event_type = read_int(infile)
-        process(event, int(event_type))  # TODO(SPARK-44463): Propagate error 
to the user.
+        # Handle errors inside Python worker. Write 0 to outfile if no errors 
and write -2 with
+        # traceback string if error occurs.
+        try:
+            process(event, int(event_type))
+            write_int(0, outfile)

Review Comment:
   Do you think it's possible that the `read_` and `write_` method could throw 
exceptions?



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