Skip to content

Commit

Permalink
feat(trino): implement bitwise agg support
Browse files Browse the repository at this point in the history
  • Loading branch information
cpcloud authored and kszucs committed Dec 21, 2022
1 parent 7c41566 commit 5288b35
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ibis/backends/tests/test_aggregation.py
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ def mean_and_std(v):
id='bit_and',
marks=[
pytest.mark.notimpl(
["dask", "snowflake", "polars", "datafusion", "mssql", "trino"]
["dask", "snowflake", "polars", "datafusion", "mssql"]
),
pytest.mark.notyet(["impala", "pyspark"]),
],
Expand All @@ -461,7 +461,7 @@ def mean_and_std(v):
id='bit_or',
marks=[
pytest.mark.notimpl(
["dask", "snowflake", "polars", "datafusion", "mssql", "trino"]
["dask", "snowflake", "polars", "datafusion", "mssql"]
),
pytest.mark.notyet(["impala", "pyspark"]),
],
Expand Down
2 changes: 2 additions & 0 deletions ibis/backends/trino/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ def _json_get_item(t, op):
ops.Covariance: _covar,
ops.ExtractMillisecond: unary(sa.func.millisecond),
ops.Arbitrary: _arbitrary,
ops.BitAnd: reduction(sa.func.bitwise_and_agg),
ops.BitOr: reduction(sa.func.bitwise_or_agg),
ops.JSONGetItem: _json_get_item,
}
)

0 comments on commit 5288b35

Please sign in to comment.