Skip to content

Commit 64521bc

Browse files
committed
refactor(api): remove the how parameter from Value.arbitrary
BREAKING CHANGE: The `how` parameter of the `Value.arbitrary` method is removed. call `Value.first` or `Value.last` explicitly
1 parent 0ba40da commit 64521bc

File tree

1 file changed

+2
-13
lines changed

1 file changed

+2
-13
lines changed

ibis/expr/types/generic.py

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
from ibis.common.grounds import Singleton
1515
from ibis.expr.rewrites import rewrite_window_input
1616
from ibis.expr.types.core import Expr, _binop, _FixedTextJupyterMixin, _is_null_literal
17-
from ibis.util import deprecated, promote_list, warn_deprecated
17+
from ibis.util import deprecated, promote_list
1818

1919
if TYPE_CHECKING:
2020
import pandas as pd
@@ -2142,9 +2142,7 @@ def topk(
21422142

21432143
return table.aggregate(metric, by=[self]).order_by(metric.desc()).limit(k)
21442144

2145-
def arbitrary(
2146-
self, where: ir.BooleanValue | None = None, how: Any = None
2147-
) -> Scalar:
2145+
def arbitrary(self, where: ir.BooleanValue | None = None) -> Scalar:
21482146
"""Select an arbitrary value in a column.
21492147
21502148
Returns an arbitrary (nondeterministic, backend-specific) value from
@@ -2155,8 +2153,6 @@ def arbitrary(
21552153
----------
21562154
where
21572155
A filter expression
2158-
how
2159-
DEPRECATED
21602156
21612157
Returns
21622158
-------
@@ -2188,13 +2184,6 @@ def arbitrary(
21882184
│ 2 │ a │ 8.3 │
21892185
└───────┴────────┴─────────┘
21902186
"""
2191-
if how is not None:
2192-
warn_deprecated(
2193-
name="how",
2194-
as_of="9.0",
2195-
removed_in="10.0",
2196-
instead="call `first` or `last` explicitly",
2197-
)
21982187
return ops.Arbitrary(self, where=self._bind_to_parent_table(where)).to_expr()
21992188

22002189
def count(self, where: ir.BooleanValue | None = None) -> ir.IntegerScalar:

0 commit comments

Comments
 (0)