Copilot commented on code in PR #2270:
URL: https://github.com/apache/sedona/pull/2270#discussion_r2268227563
##########
python/sedona/spark/geopandas/geodataframe.py:
##########
@@ -810,12 +810,10 @@ def copy(self, deep=False):
geometry value1 value2
0 POINT (1 1) 2 3
"""
- if deep:
- return GeoDataFrame(
- self._anchor.copy(), dtype=self.dtypes, index=self._col_label
- )
- else:
- return self # GeoDataFrame(self._internal.spark_frame.copy())
"this parameter is not supported but just dummy parameter to match pandas."
+ # Note: The deep parameter is a dummy parameter just as it is in
PySpark pandas
Review Comment:
The code removes the conditional check for `deep` parameter but doesn't
handle the case where `deep=True` is explicitly passed. This could lead to
unexpected behavior since the function signature still accepts the parameter
but ignores it completely, potentially misleading users who expect deep copy
functionality.
```suggestion
# Note: The deep parameter is a dummy parameter just as it is in
PySpark pandas
if deep:
raise NotImplementedError("deep copy is not supported for
GeoDataFrame")
```
--
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]