Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion crates/polars-plan/src/plans/aexpr/function_expr/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1017,7 +1017,7 @@ impl IRFunctionExpr {
F::FillNullWithStrategy(strategy) if strategy.is_elementwise() => {
FunctionOptions::elementwise()
},
F::FillNullWithStrategy(_) => FunctionOptions::groupwise(),
F::FillNullWithStrategy(_) => FunctionOptions::length_preserving(),
#[cfg(feature = "rolling_window")]
F::RollingExpr { .. } => FunctionOptions::length_preserving(),
#[cfg(feature = "rolling_window_by")]
Expand Down
7 changes: 7 additions & 0 deletions py-polars/tests/unit/operations/test_fill_null.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,3 +143,10 @@ def test_forward_fill_chunking_25273() -> None:
}
),
)


def test_forward_fill_is_length_preserving() -> None:
assert_series_equal(
pl.Series([[1]]).list.agg(pl.element().first().forward_fill()),
pl.Series([1]),
)
Loading