diff --git a/crates/polars-lazy/src/physical_plan/executors/projection.rs b/crates/polars-lazy/src/physical_plan/executors/projection.rs index e6e5f8799d7c..a2ea9350371f 100644 --- a/crates/polars-lazy/src/physical_plan/executors/projection.rs +++ b/crates/polars-lazy/src/physical_plan/executors/projection.rs @@ -106,7 +106,7 @@ impl Executor for ProjectionExec { ) }) .collect::>>()?; - let name = comma_delimited("projection".to_string(), &by); + let name = comma_delimited("select".to_string(), &by); Cow::Owned(name) } else { Cow::Borrowed("") diff --git a/crates/polars-lazy/src/physical_plan/executors/projection_simple.rs b/crates/polars-lazy/src/physical_plan/executors/projection_simple.rs index 8a979f306c87..74d5761ee9ab 100644 --- a/crates/polars-lazy/src/physical_plan/executors/projection_simple.rs +++ b/crates/polars-lazy/src/physical_plan/executors/projection_simple.rs @@ -9,12 +9,7 @@ pub struct ProjectionSimple { } impl ProjectionSimple { - fn execute_impl( - &mut self, - state: &mut ExecutionState, - columns: &[SmartString], - ) -> PolarsResult { - let df = self.input.execute(state)?; + fn execute_impl(&mut self, df: DataFrame, columns: &[SmartString]) -> PolarsResult { if self.duplicate_check { df._select_impl(columns.as_ref()) } else { @@ -29,17 +24,17 @@ impl Executor for ProjectionSimple { let columns = self.columns.iter_names().cloned().collect::>(); let profile_name = if state.has_node_timer() { - let name = comma_delimited("projection".to_string(), &columns); + let name = comma_delimited("simple-projection".to_string(), &columns); Cow::Owned(name) } else { Cow::Borrowed("") }; + let df = self.input.execute(state)?; if state.has_node_timer() { - let new_state = state.clone(); - new_state.record(|| self.execute_impl(state, &columns), profile_name) + state.record(|| self.execute_impl(df, &columns), profile_name) } else { - self.execute_impl(state, &columns) + self.execute_impl(df, &columns) } } }