Skip to content

Commit 8224be4

Browse files
committed
PyTuple was called twice
1 parent 33efc4f commit 8224be4

File tree

1 file changed

+3
-12
lines changed

1 file changed

+3
-12
lines changed

src/udwf.rs

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,7 @@ impl PartitionEvaluator for RustPartitionEvaluator {
101101
.map(|arg| arg.into_data().to_pyarrow(py).unwrap()),
102102
)?;
103103
let py_num_rows = num_rows.into_pyobject(py)?;
104-
let py_args = PyTuple::new(
105-
py,
106-
PyTuple::new(py, vec![py_values.as_any(), &py_num_rows])?,
107-
)?;
104+
let py_args = PyTuple::new(py, vec![py_values.as_any(), &py_num_rows])?;
108105

109106
self.evaluator
110107
.bind(py)
@@ -125,14 +122,8 @@ impl PartitionEvaluator for RustPartitionEvaluator {
125122
.iter()
126123
.map(|arg| arg.into_data().to_pyarrow(py).unwrap()),
127124
)?;
128-
let range_tuple = PyTuple::new(
129-
py,
130-
vec![range.start.into_pyobject(py)?, range.end.into_pyobject(py)?],
131-
)?;
132-
let py_args = PyTuple::new(
133-
py,
134-
PyTuple::new(py, vec![py_values.as_any(), range_tuple.as_any()]),
135-
)?;
125+
let range_tuple = PyTuple::new(py, vec![range.start, range.end])?;
126+
let py_args = PyTuple::new(py, vec![py_values.as_any(), range_tuple.as_any()])?;
136127

137128
self.evaluator
138129
.bind(py)

0 commit comments

Comments
 (0)