Skip to content

Commit

Permalink
docs: Readability improvements in polars-lazy
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Russell <[email protected]>
  • Loading branch information
ryanrussell committed Jun 15, 2022
1 parent d796bbf commit 604da7b
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion polars/polars-lazy/src/physical_plan/executors/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion polars/polars-lazy/src/physical_plan/expressions/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,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.
Expand Down
2 changes: 1 addition & 1 deletion polars/polars-lazy/src/tests/queries.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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![
Expand Down
2 changes: 1 addition & 1 deletion polars/polars-lazy/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ pub(crate) fn rename_aexpr_root_names(node: Node, arena: &mut Arena<AExpr>, 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<AExpr>,
Expand Down

0 comments on commit 604da7b

Please sign in to comment.