itholic commented on code in PR #42594:
URL: https://github.com/apache/spark/pull/42594#discussion_r1302374470
##########
python/pyspark/sql/connect/streaming/query.py:
##########
@@ -237,7 +239,13 @@ def addListener(self, listener: StreamingQueryListener) ->
None:
listener._init_listener_id()
cmd = pb2.StreamingQueryManagerCommand()
expr = proto.PythonUDF()
- expr.command = CloudPickleSerializer().dumps(listener)
+ try:
+ expr.command = CloudPickleSerializer().dumps(listener)
+ except pickle.PicklingError:
+ raise PySparkRuntimeError(
Review Comment:
> define a new PySparkPicklingError and replace this PySparkRuntimeError
with that right?
Correct :-)
--
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]