Skip to content

Commit 142e4ed

Browse files
committed
remove clone
1 parent 21013a7 commit 142e4ed

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/dataset.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ use crate::dataset_exec::DatasetExec;
3939
use crate::pyarrow_filter_expression::PyArrowFilterExpression;
4040

4141
// Wraps a pyarrow.dataset.Dataset class and implements a Datafusion TableProvider around it
42-
#[derive(Debug, Clone)]
42+
#[derive(Debug)]
4343
pub(crate) struct Dataset {
4444
dataset: PyObject,
4545
}

src/dataset_exec.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ impl Iterator for PyArrowBatchesAdapter {
5353

5454
fn next(&mut self) -> Option<Self::Item> {
5555
Python::with_gil(|py| {
56-
let mut batches = self.batches.clone().into_bound(py);
56+
let mut batches = self.batches.clone_ref(py).into_bound(py);
5757
Some(
5858
batches
5959
.next()?
@@ -65,7 +65,7 @@ impl Iterator for PyArrowBatchesAdapter {
6565
}
6666

6767
// Wraps a pyarrow.dataset.Dataset class and implements a Datafusion ExecutionPlan around it
68-
#[derive(Debug, Clone)]
68+
#[derive(Debug)]
6969
pub(crate) struct DatasetExec {
7070
dataset: PyObject,
7171
schema: SchemaRef,

0 commit comments

Comments
 (0)