Skip to content

Commit

Permalink
remove clone
Browse files Browse the repository at this point in the history
  • Loading branch information
emgeee committed Sep 10, 2024
1 parent c368bc1 commit 270d175
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/dataset.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ use crate::dataset_exec::DatasetExec;
use crate::pyarrow_filter_expression::PyArrowFilterExpression;

// Wraps a pyarrow.dataset.Dataset class and implements a Datafusion TableProvider around it
#[derive(Debug, Clone)]
#[derive(Debug)]
pub(crate) struct Dataset {
dataset: PyObject,
}
Expand Down
4 changes: 2 additions & 2 deletions src/dataset_exec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ impl Iterator for PyArrowBatchesAdapter {

fn next(&mut self) -> Option<Self::Item> {
Python::with_gil(|py| {
let mut batches = self.batches.clone().into_bound(py);
let mut batches = self.batches.clone_ref(py).into_bound(py);
Some(
batches
.next()?
Expand All @@ -65,7 +65,7 @@ impl Iterator for PyArrowBatchesAdapter {
}

// Wraps a pyarrow.dataset.Dataset class and implements a Datafusion ExecutionPlan around it
#[derive(Debug, Clone)]
#[derive(Debug)]
pub(crate) struct DatasetExec {
dataset: PyObject,
schema: SchemaRef,
Expand Down

0 comments on commit 270d175

Please sign in to comment.