Skip to content

Commit

Permalink
python arrow2 version updated
Browse files Browse the repository at this point in the history
  • Loading branch information
AnatolyBuga committed Aug 19, 2023
1 parent 4487d95 commit d544e32
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions connectorx-python/src/arrow2.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::errors::ConnectorXPythonError;
use arrow2::{
array::ArrayRef,
array::Array,
chunk::Chunk,
datatypes::{Field, Schema},
ffi,
Expand Down Expand Up @@ -28,7 +28,7 @@ pub fn write_arrow<'a>(
}

fn to_ptrs(
rbs: Vec<Chunk<ArrayRef>>,
rbs: Vec<Chunk<Box<dyn Array>>>,
schema: Arc<Schema>,
) -> (Vec<String>, Vec<Vec<(uintptr_t, uintptr_t)>>) {
if rbs.is_empty() {
Expand All @@ -49,9 +49,8 @@ fn to_ptrs(
unsafe {
ffi::export_field_to_c(
&Field::new("", array.data_type().clone(), true),
schema_ptr,
);
ffi::export_array_to_c(array.clone(), array_ptr);
ffi::export_array_to_c(array.clone());
};
cols.push((array_ptr as uintptr_t, schema_ptr as uintptr_t));
}
Expand Down

0 comments on commit d544e32

Please sign in to comment.