Skip to content

Commit

Permalink
feat(bigquery): implement ops.RandomScalar
Browse files Browse the repository at this point in the history
  • Loading branch information
krzysztof-kwitt authored and cpcloud committed Jan 4, 2023
1 parent 5119b93 commit 5dc8482
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
1 change: 1 addition & 0 deletions ibis/backends/bigquery/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -654,6 +654,7 @@ def _clip(t, op):
ops.ArgMax: _arg_min_max("DESC"),
ops.Pi: lambda *_: "ACOS(-1)",
ops.E: lambda *_: "EXP(1)",
ops.RandomScalar: fixed_arity("RAND", 0),
}

_invalid_operations = {
Expand Down
4 changes: 1 addition & 3 deletions ibis/backends/tests/test_generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -472,9 +472,7 @@ def test_order_by(backend, alltypes, df, key, df_kwargs):
backend.assert_frame_equal(result, expected)


@pytest.mark.notimpl(
["bigquery", "dask", "datafusion", "impala", "pandas", "polars", "mssql"]
)
@pytest.mark.notimpl(["dask", "datafusion", "impala", "pandas", "polars", "mssql"])
@pytest.mark.notyet(
["clickhouse"],
reason="clickhouse doesn't have a [0.0, 1.0) random implementation",
Expand Down
4 changes: 1 addition & 3 deletions ibis/backends/tests/test_numeric.py
Original file line number Diff line number Diff line change
Expand Up @@ -548,9 +548,7 @@ def test_sa_default_numeric_precision_and_scale(
con.drop_table(table_name, force=True)


@pytest.mark.notimpl(
["bigquery", "dask", "datafusion", "impala", "pandas", "sqlite", "polars"]
)
@pytest.mark.notimpl(["dask", "datafusion", "impala", "pandas", "sqlite", "polars"])
@pytest.mark.notyet(
["clickhouse"],
reason="backend doesn't implement a [0.0, 1.0) or [0.0, 1.0] RANDOM() function",
Expand Down

0 comments on commit 5dc8482

Please sign in to comment.