Hyukjin Kwon created SPARK-61135:
------------------------------------

             Summary: Parse the JSON of GeometryType and GeographyType, such as 
bare geometry and geography(SPHERICAL), 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


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.




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