Skip to content

Commit

Permalink
Update arrow/src/pyarrow.rs
Browse files Browse the repository at this point in the history
Co-authored-by: Raphael Taylor-Davies <[email protected]>
  • Loading branch information
kylebarron and tustvold authored Nov 13, 2023
1 parent 6460701 commit dfdcfae
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion arrow/src/pyarrow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,8 @@ impl FromPyArrow for ArrayData {
let schema_ptr = unsafe { schema_capsule.reference::<FFI_ArrowSchema>() };
let array_ptr = unsafe { array_capsule.reference::<FFI_ArrowArray>() };

return ffi::from_ffi(array_ptr.copy(), schema_ptr).map_err(to_py_err);
let array = std::mem::replace(array_ptr, FFI_ArrowArray::empty());
return ffi::from_ffi(array, schema_ptr).map_err(to_py_err);
}

validate_class("Array", value)?;
Expand Down

0 comments on commit dfdcfae

Please sign in to comment.