Hyukjin Kwon created SPARK-60922:
------------------------------------

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


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]

Reply via email to