Github user JoshRosen commented on a diff in the pull request:

    https://github.com/apache/spark/pull/7301#discussion_r34229136
  
    --- Diff: python/pyspark/sql/types.py ---
    @@ -71,6 +67,15 @@ def json(self):
                               separators=(',', ':'),
                               sort_keys=True)
     
    +    def needSerialization(self):
    +        return False
    +
    +    def serialize(self, obj):
    --- End diff --
    
    It might be nice to add docstrings or comments to these methods in order to 
explain their API contract.  For instance, it looks like `serialize` and 
`deserialize` aren't actually marshalling to/from bytes or into a format like 
Pickle but instead are performing type conversions 
    
    I wonder whether we should be a bit more explicit by adding some comments 
to explain that these methods are essentially converting Python objects to/from 
"internal" types before pickling them.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to