Copilot commented on code in PR #607:
URL: https://github.com/apache/sedona-db/pull/607#discussion_r2804724926


##########
python/sedonadb/python/sedonadb/dataframe.py:
##########
@@ -389,6 +402,23 @@ def to_parquet(
 
         path = Path(path)
 
+        if options is not None:
+            options = {k: str(v) for k, v in options.items()}
+        else:
+            options = {}
+
+        if max_row_group_size is not None:
+            options["max_row_group_size"] = str(max_row_group_size)
+
+        if compression is not None:
+            options["compression"] = str(compression)
+
+        if geoparquet_version is not None:
+            options["geoparquet_version"] = str(geoparquet_version)
+
+        if overwrite_bbox_columns is not None:
+            options["overwrite_bbox_columns"] = str(overwrite_bbox_columns)

Review Comment:
   The condition `if overwrite_bbox_columns is not None:` is redundant because 
`overwrite_bbox_columns` is typed as `bool` (not `Optional[bool]`), so it can 
never be None. This check will always evaluate to True. Consider removing the 
condition or changing the type to `Optional[bool]` if None should be a valid 
value.
   ```suggestion
           options["overwrite_bbox_columns"] = str(overwrite_bbox_columns)
   ```



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