Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelzw committed Oct 8, 2024
1 parent 8ae6f94 commit 027f115
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion crates/polars-plan/src/plans/conversion/expr_expansion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -938,7 +938,7 @@ pub(super) fn expand_selector(
let selected = schema
.iter_fields()
.map(|field| field.name().clone())
.filter(|field_name| column_names.contains(&field_name))
.filter(|field_name| column_names.contains(field_name))
.collect();

Ok(selected)
Expand Down
4 changes: 2 additions & 2 deletions py-polars/tests/unit/test_selectors.py
Original file line number Diff line number Diff line change
Expand Up @@ -819,6 +819,6 @@ def test_selector_list_of_lists_18499() -> None:
def test_invalid_selector() -> None:
df = pl.DataFrame(data={"x": [1, 2], "z": ["a", "b"]})
with pytest.raises(InvalidOperationError, match="invalid selector expression"):
df.drop(pl.col("x", "z") + 2)
df.drop(pl.col("x", "z") + 2) # type: ignore[arg-type]
with pytest.raises(InvalidOperationError, match="invalid selector expression"):
df.drop(pl.col("x") + 2)
df.drop(pl.col("x") + 2) # type: ignore[arg-type]

0 comments on commit 027f115

Please sign in to comment.