diff --git a/polars/polars-lazy/src/logical_plan/optimizer/aggregate_pushdown.rs b/polars/polars-lazy/src/logical_plan/optimizer/aggregate_pushdown.rs index 964a116895dc..a7f89c85b9ef 100644 --- a/polars/polars-lazy/src/logical_plan/optimizer/aggregate_pushdown.rs +++ b/polars/polars-lazy/src/logical_plan/optimizer/aggregate_pushdown.rs @@ -83,7 +83,7 @@ impl OptimizationRule for AggregatePushdown { input, schema, } => self.pushdown_projection(node, expr, input, schema, lp_arena, expr_arena), - // todo! hstack should pushown not dependent columns + // todo! hstack should pushdown not dependent columns Join { .. } | Aggregate { .. } | HStack { .. } | DataFrameScan { .. } => { if self.accumulated_projections.is_empty() { lp_arena.replace(node, lp); diff --git a/polars/polars-lazy/src/logical_plan/projection.rs b/polars/polars-lazy/src/logical_plan/projection.rs index ead4b8e4ebee..3fa079d6f1b7 100644 --- a/polars/polars-lazy/src/logical_plan/projection.rs +++ b/polars/polars-lazy/src/logical_plan/projection.rs @@ -3,7 +3,7 @@ use super::*; use crate::utils::has_nth; use polars_arrow::index::IndexToUsize; -/// This replace the wilcard Expr with a Column Expr. It also removes the Exclude Expr from the +/// This replace the wildcard Expr with a Column Expr. It also removes the Exclude Expr from the /// expression chain. pub(super) fn replace_wildcard_with_column(mut expr: Expr, column_name: Arc) -> Expr { expr.mutate().apply(|e| { @@ -51,9 +51,9 @@ fn rewrite_special_aliases(expr: Expr) -> Expr { /// Take an expression with a root: col("*") and copies that expression for all columns in the schema, /// with the exclusion of the `names` in the exclude expression. /// The resulting expressions are written to result. -fn replace_wilcard(expr: &Expr, result: &mut Vec, exclude: &[Arc], schema: &Schema) { +fn replace_wildcard(expr: &Expr, result: &mut Vec, exclude: &[Arc], schema: &Schema) { for name in schema.iter_names() { - if !exclude.iter().any(|exluded| &**exluded == name) { + if !exclude.iter().any(|excluded| &**excluded == name) { let new_expr = replace_wildcard_with_column(expr.clone(), Arc::from(name.as_str())); let new_expr = rewrite_special_aliases(new_expr); result.push(new_expr) @@ -306,7 +306,7 @@ fn function_wildcard_expansion(mut expr: Expr, schema: &Schema, exclude: &[Arc { if has_wildcard(e) { - replace_wilcard(e, &mut new_inputs, exclude, schema) + replace_wildcard(e, &mut new_inputs, exclude, schema) } else { #[cfg(feature = "regex")] { @@ -371,7 +371,7 @@ pub(crate) fn rewrite_projections(exprs: Vec, schema: &Schema, keys: &[Exp result.push(expr); continue; } - replace_wilcard(&expr, &mut result, &exclude, schema); + replace_wildcard(&expr, &mut result, &exclude, schema); } else { #[allow(clippy::collapsible_else_if)] #[cfg(feature = "regex")] diff --git a/polars/polars-lazy/src/physical_plan/executors/mod.rs b/polars/polars-lazy/src/physical_plan/executors/mod.rs index c1992d5f4e2f..731935a11ac1 100644 --- a/polars/polars-lazy/src/physical_plan/executors/mod.rs +++ b/polars/polars-lazy/src/physical_plan/executors/mod.rs @@ -55,7 +55,7 @@ fn execute_projection_cached_window_fns( // the partitioning messes with column order, so we also store the idx // and use those to restore the original projection order #[allow(clippy::type_complexity)] - // String: partion_name, + // String: partition_name, // u32: index, // bool: flatten (we must run those first because they need a sorted group tuples. // if we cache the group tuples we must ensure we cast the sorted onces. diff --git a/polars/polars-lazy/src/physical_plan/expressions/mod.rs b/polars/polars-lazy/src/physical_plan/expressions/mod.rs index 0b121d76d918..b35f6c5b2d10 100644 --- a/polars/polars-lazy/src/physical_plan/expressions/mod.rs +++ b/polars/polars-lazy/src/physical_plan/expressions/mod.rs @@ -318,7 +318,7 @@ impl<'a> AggregationContext<'a> { /// In a binary expression one state can be aggregated and the other not. /// If both would be flattened naively one would be sorted and the other not. - /// Calling this function will ensure both are sortened. This will be a no-op + /// Calling this function will ensure both are sorted. This will be a no-op /// if already aggregated. pub(crate) fn sort_by_groups(&mut self) { // make sure that the groups are updated before we use them to sort. diff --git a/polars/polars-lazy/src/tests/queries.rs b/polars/polars-lazy/src/tests/queries.rs index c8902d681bcf..b72f0e8581e5 100644 --- a/polars/polars-lazy/src/tests/queries.rs +++ b/polars/polars-lazy/src/tests/queries.rs @@ -1300,7 +1300,7 @@ fn test_regex_selection() -> Result<()> { #[test] fn test_filter_in_groupby_agg() -> Result<()> { - // This tests if the fitler is correctly handled by the binary expression. + // This tests if the filter is correctly handled by the binary expression. // This could lead to UB if it were not the case. The filter creates an empty column. // but the group tuples could still be untouched leading to out of bounds aggregation. let df = df![ diff --git a/polars/polars-lazy/src/utils.rs b/polars/polars-lazy/src/utils.rs index 995d067da0ec..ebd85726123d 100644 --- a/polars/polars-lazy/src/utils.rs +++ b/polars/polars-lazy/src/utils.rs @@ -193,7 +193,7 @@ pub(crate) fn rename_aexpr_root_names(node: Node, arena: &mut Arena, new_ } /// Rename the root of the expression from `current` to `new` and assign to new node in arena. -/// Returns `Node` on first sucessful rename. +/// Returns `Node` on first successful rename. pub(crate) fn aexpr_assign_renamed_root( node: Node, arena: &mut Arena,