paleolimbot commented on code in PR #558:
URL: https://github.com/apache/sedona-db/pull/558#discussion_r2747920711
##########
python/sedonadb/python/sedonadb/dataframe.py:
##########
@@ -253,10 +253,9 @@ def to_arrow_table(self, schema: Any = None) ->
"pyarrow.Table":
import pyarrow as pa
import geoarrow.pyarrow # noqa: F401
- if schema is None:
- return pa.table(self)
- else:
- return pa.table(self, schema=pa.schema(schema))
+ # Collects all batches into an object that exposes __arrow_c_stream__()
+ batches = self._impl.to_batches(schema)
+ return pa.table(batches)
Review Comment:
Yes, passing it via `to_batches()` ensures it makes it to Rust!
--
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]