diff --git a/py-polars/tests/unit/test_arity.py b/py-polars/tests/unit/test_arity.py index 3f8fb4299ca2..71730186d2e6 100644 --- a/py-polars/tests/unit/test_arity.py +++ b/py-polars/tests/unit/test_arity.py @@ -32,3 +32,11 @@ def test_nested_when_then_and_wildcard_expansion_6284() -> None: "2": ["c", "d"], "result": ["a", "d"], } + + +def test_expression_literal_series_order() -> None: + s = pl.Series([1, 2, 3]) + df = pl.DataFrame({"a": [1, 2, 3]}) + + assert df.select(pl.col("a") + s).to_dict(False) == {"a": [2, 4, 6]} + assert df.select(pl.lit(s) + pl.col("a")).to_dict(False) == {"": [2, 4, 6]}