[ 
https://issues.apache.org/jira/browse/SPARK-61859?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

ASF GitHub Bot updated SPARK-61859:
-----------------------------------
    Labels: pull-request-available  (was: )

> Make the base data type classes instantiable as PySpark's, and give the 
> methods of the types PySpark's parameter names
> ----------------------------------------------------------------------------------------------------------------------
>
>                 Key: SPARK-61859
>                 URL: https://issues.apache.org/jira/browse/SPARK-61859
>             Project: Spark
>          Issue Type: Bug
>          Components: Connect
>    Affects Versions: connect-rust-4.4.0
>            Reporter: Hyukjin Kwon
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: connect-rust-4.4.0
>
>
> The base classes of the data types of PySpark, DataType, AtomicType, 
> NumericType, IntegralType, FractionalType, DatetimeType, AnyTimeType, 
> SpatialType and AnsiIntervalType, can be instantiated in PySpark 4.3.0: 
> XType() has the repr XType(), typeName()/simpleString()/jsonValue() of its 
> stem ("atomic", ...), needConversion() False, identity 
> toInternal/fromInternal, equality by class, and pickles as itself; 
> IntegralType is a singleton. In the drop-in they raise "cannot create 
> 'pyspark.sql.types.FractionalType' instances" (and DataType() pickles to 
> NullType()), which fails the official pandas-on-Spark test 
> data_type_ops/test_parity_base.py::test_data_type_ops.
> Also, the parameters of some methods of the types have other names than 
> PySpark's: StringType.collationProvider(collationName), 
> DateType.toInternal(d)/fromInternal(v), 
> TimeType.toInternal(t)/fromInternal(nano), TimestampType and TimestampNTZType 
> toInternal(dt)/fromInternal(ts), 
> DayTimeIntervalType.toInternal(dt)/fromInternal(micros), 
> GeographyType.toInternal(geography), GeometryType.toInternal(geometry).



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