Skip to content

Commit

Permalink
feat(polars): add bitwise operations (bit_and, bit_or, bit_xor) (
Browse files Browse the repository at this point in the history
…#10634)

Co-authored-by: Phillip Cloud <[email protected]>
  • Loading branch information
IndexSeek and cpcloud authored Dec 31, 2024
1 parent 4583dee commit 56a66de
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions ibis/backends/polars/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -717,6 +717,9 @@ def struct_column(op, **kw):
ops.Median: "median",
ops.Min: "min",
ops.Sum: "sum",
ops.BitOr: "bitwise_or",
ops.BitAnd: "bitwise_and",
ops.BitXor: "bitwise_xor",
}


Expand Down
6 changes: 3 additions & 3 deletions ibis/backends/tests/test_aggregation.py
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ def mean_and_std(v):
id="bit_and",
marks=[
pytest.mark.notimpl(
["polars", "mssql", "exasol"],
["mssql", "exasol"],
raises=com.OperationNotDefinedError,
),
pytest.mark.notimpl(["druid"], strict=False, raises=AssertionError),
Expand All @@ -505,7 +505,7 @@ def mean_and_std(v):
id="bit_or",
marks=[
pytest.mark.notimpl(
["polars", "mssql", "exasol"],
["mssql", "exasol"],
raises=com.OperationNotDefinedError,
),
pytest.mark.notyet(
Expand All @@ -519,7 +519,7 @@ def mean_and_std(v):
id="bit_xor",
marks=[
pytest.mark.notimpl(
["polars", "mssql", "exasol"],
["mssql", "exasol"],
raises=com.OperationNotDefinedError,
),
pytest.mark.notyet(
Expand Down

0 comments on commit 56a66de

Please sign in to comment.