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

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

> Parse the JSON of GeometryType and GeographyType, such as bare geometry and 
> geography(SPHERICAL), and add their _from_crs, in the Python client as 
> PySpark does
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: SPARK-61135
>                 URL: https://issues.apache.org/jira/browse/SPARK-61135
>             Project: Spark
>          Issue Type: Bug
>          Components: Connect
>    Affects Versions: connect-rust-4.3.0
>            Reporter: Hyukjin Kwon
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: connect-rust-4.3.0
>
>
> PySpark parses the JSON of GeometryType and GeographyType 
> (_parse_datatype_json_value) by its patterns:
> - bare "geometry" and "geography" are of SRID 4326
> - "geography(SPHERICAL)" and "geography(OGC:CRS84, SPHERICAL)" are of SRID 
> 4326
> - a CRS is OGC:CRS84 or SRID:ANY, case-insensitively
> - other forms, such as "geography(4326)", "geography(ANY)", 
> "geometry(SRID:1)" and "geography(SRID:0,)", raise an error
> The client rejects "geometry", "geography" and "geography(SPHERICAL)" with 
> CANNOT_PARSE_DATATYPE. It also accepts 21 of the forms that PySpark rejects, 
> such as "geography(4326)" as GeographyType(4326).
> Apache Spark's test_geometry_json_serde and test_geography_json_serde fail on 
> this client. The client should parse these forms as PySpark does.
> PySpark's GeometryType and GeographyType also have the classmethods 
> _from_crs(crs) and _from_crs(crs, alg) of this parsing, which Apache Spark's 
> test_parity_geometrytype.py and test_parity_geographytype.py call; the 
> client's types lack them.



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