From 027f115dc2afaf5cabdacbd93bfa4aec69df5c05 Mon Sep 17 00:00:00 2001 From: Pavel Zwerschke Date: Tue, 8 Oct 2024 12:05:43 +0200 Subject: [PATCH] fix --- crates/polars-plan/src/plans/conversion/expr_expansion.rs | 2 +- py-polars/tests/unit/test_selectors.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/polars-plan/src/plans/conversion/expr_expansion.rs b/crates/polars-plan/src/plans/conversion/expr_expansion.rs index 72a04263268e..d04adcd932e8 100644 --- a/crates/polars-plan/src/plans/conversion/expr_expansion.rs +++ b/crates/polars-plan/src/plans/conversion/expr_expansion.rs @@ -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) diff --git a/py-polars/tests/unit/test_selectors.py b/py-polars/tests/unit/test_selectors.py index 72d3e91cc081..03fe83f0e3b0 100644 --- a/py-polars/tests/unit/test_selectors.py +++ b/py-polars/tests/unit/test_selectors.py @@ -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]