Skip to content

Commit 56a66de

Browse files
IndexSeekcpcloud
andauthored
feat(polars): add bitwise operations (bit_and, bit_or, bit_xor) (#10634)
Co-authored-by: Phillip Cloud <[email protected]>
1 parent 4583dee commit 56a66de

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

ibis/backends/polars/compiler.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -717,6 +717,9 @@ def struct_column(op, **kw):
717717
ops.Median: "median",
718718
ops.Min: "min",
719719
ops.Sum: "sum",
720+
ops.BitOr: "bitwise_or",
721+
ops.BitAnd: "bitwise_and",
722+
ops.BitXor: "bitwise_xor",
720723
}
721724

722725

ibis/backends/tests/test_aggregation.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,7 @@ def mean_and_std(v):
490490
id="bit_and",
491491
marks=[
492492
pytest.mark.notimpl(
493-
["polars", "mssql", "exasol"],
493+
["mssql", "exasol"],
494494
raises=com.OperationNotDefinedError,
495495
),
496496
pytest.mark.notimpl(["druid"], strict=False, raises=AssertionError),
@@ -505,7 +505,7 @@ def mean_and_std(v):
505505
id="bit_or",
506506
marks=[
507507
pytest.mark.notimpl(
508-
["polars", "mssql", "exasol"],
508+
["mssql", "exasol"],
509509
raises=com.OperationNotDefinedError,
510510
),
511511
pytest.mark.notyet(
@@ -519,7 +519,7 @@ def mean_and_std(v):
519519
id="bit_xor",
520520
marks=[
521521
pytest.mark.notimpl(
522-
["polars", "mssql", "exasol"],
522+
["mssql", "exasol"],
523523
raises=com.OperationNotDefinedError,
524524
),
525525
pytest.mark.notyet(

0 commit comments

Comments
 (0)