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


##########
python/pyspark/sql/connect/session.py:
##########
@@ -1034,6 +1034,20 @@ def profile(self) -> Profile:
 
     profile.__doc__ = PySparkSession.profile.__doc__
 
+    def __custom_reduce_handler__(self) -> Tuple:

Review Comment:
   Could we start with `__reduce__`? Even when how channel created is 
different, I feel like the same Spark Session with the same session ID / user 
name should work identically with the same API provided.
   
   If not, I would prefer to isolate those specialized logic into one place. 
For example, we can create something called `ConnectCloudPickleSerializer`, 
place `__custom_reduce_handler__`  around that file, handles 
`dispatch_handlers` within `ConnectCloudPickleSerializer`.
   
   Placing `dispatch_handlers` to other serializers, fixing `SparkSession`, and 
`cloudpickle` seems too much to handle the specialized case.



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