[
https://issues.apache.org/jira/browse/SPARK-60922?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Hyukjin Kwon resolved SPARK-60922.
----------------------------------
Resolution: Fixed
Issue resolved by pull request 160
[https://github.com/apache/spark-connect-rust/pull/160]
> Construct GeometryType and GeographyType in Spark Connect Rust as PySpark does
> ------------------------------------------------------------------------------
>
> Key: SPARK-60922
> URL: https://issues.apache.org/jira/browse/SPARK-60922
> Project: Spark
> Issue Type: Bug
> Components: Connect
> Affects Versions: connect-rust-4.3.0
> Reporter: Hyukjin Kwon
> Assignee: Hyukjin Kwon
> Priority: Major
> Labels: pull-request-available
> Fix For: connect-rust-4.3.0
>
>
> PySpark's {{GeometryType(srid)}} and {{GeographyType(srid)}} take an SRID
> that their spatial reference system mapper knows, or {{"ANY"}} for a mixed
> SRID, and raise {{ST_INVALID_SRID_VALUE}} for any other. The mapper of
> PySpark 4.3.0 knows 0, 3857 and 4326 for geometries, and only 4326 for
> geographies. The Rust-backed Python client's constructors take any integer
> and no string, so these PySpark 4.3.0 results differ:
> * {{GeometryType("ANY")}} and {{GeographyType("ANY")}} give the types of a
> mixed SRID. The client raises {{TypeError}}.
> * {{GeometryType(2000)}} and {{GeographyType(3857)}} raise
> {{IllegalArgumentException}} ({{ST_INVALID_SRID_VALUE}}, with the {{srid}}).
> The client accepts them.
> * {{GeometryType()}} raises {{TypeError}}, as the SRID is required. The
> client gives {{GeometryType(0)}}.
> Construct the spatial types as PySpark does.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]