tustvold commented on code in PR #4806:
URL: https://github.com/apache/arrow-rs/pull/4806#discussion_r1322104747
##########
arrow/src/pyarrow.rs:
##########
@@ -270,25 +270,13 @@ impl FromPyArrow for RecordBatch {
impl ToPyArrow for RecordBatch {
fn to_pyarrow(&self, py: Python) -> PyResult<PyObject> {
- let mut py_arrays = vec![];
-
- let schema = self.schema();
- let columns = self.columns().iter();
-
- for array in columns {
- py_arrays.push(array.to_data().to_pyarrow(py)?);
- }
-
- let py_schema = schema.to_pyarrow(py)?;
-
- let module = py.import("pyarrow")?;
- let class = module.getattr("RecordBatch")?;
- let args = (py_arrays,);
- let kwargs = PyDict::new(py);
- kwargs.set_item("schema", py_schema)?;
Review Comment:
Why doesn't this work? Surely this should set the schema appropriately?
--
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]