Skip to content

Commit

Permalink
No need to create local limit since global limit already applies it
Browse files Browse the repository at this point in the history
  • Loading branch information
Jay Chia committed Oct 17, 2023
1 parent 7fa05b0 commit 74cf83e
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/daft-plan/src/physical_plan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -309,12 +309,9 @@ impl PhysicalPlan {
let upstream_iter = input.to_partition_tasks(py, psets, is_ray_runner)?;
let py_physical_plan =
py.import(pyo3::intern!(py, "daft.execution.physical_plan"))?;
let local_limit_iter = py_physical_plan
.getattr(pyo3::intern!(py, "local_limit"))?
.call1((upstream_iter, *limit))?;
let global_limit_iter = py_physical_plan
.getattr(pyo3::intern!(py, "global_limit"))?
.call1((local_limit_iter, *limit, *eager, *num_partitions))?;
.call1((upstream_iter, *limit, *eager, *num_partitions))?;
Ok(global_limit_iter.into())
}
PhysicalPlan::Explode(Explode { input, to_explode }) => {
Expand Down

0 comments on commit 74cf83e

Please sign in to comment.