jiayuasu opened a new pull request, #3294:
URL: https://github.com/apache/sedona/pull/3294

   ## Did you read the Contributor Guide?
   
   - Yes, I have read the [Contributor 
Rules](https://sedona.apache.org/latest/community/rule/) and [Contributor 
Development Guide](https://sedona.apache.org/latest/community/develop/)
   
   ## Is this PR related to a ticket?
   
   - Yes, and the PR name follows the format `[GH-XXX] my subject`. Closes #3293
   
   ## What changes were proposed in this PR?
   
   On pandas 1.5, constructing a pandas DataFrame with `copy=False` can share 
geometry blocks with a caller-owned GeoPandas frame. Sedona then casts those 
geometry columns to object dtype for Spark, which can mutate the source frame 
and remove its active geometry and CRS state.
   
   This PR:
   
   - Detaches the temporary pandas frame before dtype conversion when 
`copy=False` and geometry-typed columns are present.
   - Avoids the additional copy for geometry-free inputs and inputs already 
constructed with `copy=True`.
   - Adds a Spark 3-compatible regression covering MultiIndex columns, a tuple 
geometry label, CRS, row order, and result parity.
   
   This change is limited to caller mutation. Spark 3.4 null-first geometry 
schema inference in the direct constructor is a separate pre-existing 
limitation; the local conversion paths used by `from_dict` and `from_features` 
already handle it.
   
   ## How was this patch tested?
   
   - Verified the new regression fails with the reported CRS error before the 
fix on Spark 3.4, pandas 1.5.3, GeoPandas 0.13.2, and Shapely 1.8.5.
   - Spark 3.4 constructor classes: 11 tests passed.
   - Spark 4.1 focused constructor and CRS matrix: 6 tests passed.
   - Repository pre-commit hooks and `git diff --check` passed.
   
   ## Did this PR include necessary documentation updates?
   
   - Yes, I have updated the documentation.
   


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

Reply via email to