petern48 commented on PR #2387: URL: https://github.com/apache/sedona/pull/2387#issuecomment-3393631624
But look at that. Glad I caught it in https://github.com/apache/sedona/pull/2386#discussion_r2422367836 ``` FAILED tests/geopandas/test_match_geopandas_series.py::TestMatchGeopandasSeries::test_is_closed - AssertionError: Series are different Series values are different (100.0 %) [index]: [0, 1, 2] [left]: [True, True, True] [right]: [False, False, False] ``` We can fix this using a SQL CASE statement. ``` SELECT CASE WHEN GeometryType(column) = 'LINESTRING` THEN ST_Closed(column) ELSE false END ``` `GeometryType()` should return 'LINESTRING` instead of `LINEARRING`, so there's no need to specify `LINEARRING`. Could you try translating this fix to Spark @yunchipang? You can look at `boundary` as an example of how to implement a similar case statement. Feel free to ping if you get stuck. https://github.com/apache/sedona/blob/6dc39e753b9d2087d27d2a6072b95d3eda91c53f/python/sedona/spark/geopandas/geoseries.py#L1024-L1033 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
