Hyukjin Kwon created SPARK-62251:
------------------------------------

             Summary: Keep the parameters of the data types in their __dict__, 
as PySpark's types do, and raise PySpark's pickle error of a __slots__ subclass
                 Key: SPARK-62251
                 URL: https://issues.apache.org/jira/browse/SPARK-62251
             Project: Spark
          Issue Type: Improvement
          Components: Connect
    Affects Versions: 5.0.0
            Reporter: Hyukjin Kwon


PySpark 4.3.0's data types keep their parameters in their __dict__ (precision, 
scale, hasPrecisionInfo, collation, elementType, fields, names, _needConversion 
and the others), and a subclass with __slots__ raises PySpark's pickle error. 
The Python client keeps them in its native types. Keep them in the __dict__ of 
the types, from which the core type derives, as PySpark's types do, and raise 
PySpark's pickle error of a __slots__ subclass. The known-differences row of 
subclasses then documents exactly the parts that are inherent: a singleton's 
__init__ runs at each call, and a class with two native bases of different 
layouts conflicts. Related: SPARK-62229 (copy.copy of a StructType shares) and 
SPARK-62231 (the constructor of a StructType subclass).




--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

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

Reply via email to