diff --git a/ibis/backends/clickhouse/tests/test_functions.py b/ibis/backends/clickhouse/tests/test_functions.py index ef2c3c39ff63..5efc3fc7531d 100644 --- a/ibis/backends/clickhouse/tests/test_functions.py +++ b/ibis/backends/clickhouse/tests/test_functions.py @@ -92,9 +92,8 @@ def test_timestamp_truncate(con, unit, snapshot): @pytest.mark.parametrize(("value", "expected"), [(0, None), (5.5, 5.5)]) -def test_nullifzero(con, value, expected): - with pytest.warns(FutureWarning): - result = con.execute(L(value).nullifzero()) +def test_nullif_zero(con, value, expected): + result = con.execute(L(value).nullif(0)) if expected is None: assert pd.isnull(result) else: diff --git a/ibis/backends/dask/tests/execution/test_operations.py b/ibis/backends/dask/tests/execution/test_operations.py index 79f5e7dcc8b4..0da077ceba4b 100644 --- a/ibis/backends/dask/tests/execution/test_operations.py +++ b/ibis/backends/dask/tests/execution/test_operations.py @@ -353,9 +353,8 @@ def test_boolean_aggregation(t, df, reduction): @pytest.mark.parametrize("column", ["float64_with_zeros", "int64_with_zeros"]) -def test_null_if_zero(t, df, column): - with pytest.warns(FutureWarning): - expr = t[column].nullifzero() +def test_nullif_zero(t, df, column): + expr = t[column].nullif(0) result = expr.compile() expected = df[column].replace(0, np.nan) tm.assert_series_equal(result.compute(), expected.compute(), check_index=False) diff --git a/ibis/backends/impala/tests/test_unary_builtins.py b/ibis/backends/impala/tests/test_unary_builtins.py index a9553950b8f0..b0b605d06060 100644 --- a/ibis/backends/impala/tests/test_unary_builtins.py +++ b/ibis/backends/impala/tests/test_unary_builtins.py @@ -28,10 +28,7 @@ def table(mockcon): param(lambda x: x.ln(), id="ln"), param(lambda x: x.log2(), id="log2"), param(lambda x: x.log10(), id="log10"), - param( - lambda x: pytest.warns(FutureWarning, lambda y: y.nullifzero(), x), - id="nullifzero", - ), + param(lambda x: x.nullif(0), id="nullif_zero"), param(lambda x: x.fillna(0), id="zero_ifnull"), ], ) diff --git a/ibis/backends/pandas/tests/execution/test_operations.py b/ibis/backends/pandas/tests/execution/test_operations.py index 964e331deffd..54877d1ce4d0 100644 --- a/ibis/backends/pandas/tests/execution/test_operations.py +++ b/ibis/backends/pandas/tests/execution/test_operations.py @@ -240,9 +240,8 @@ def test_boolean_aggregation(t, df, reduction): @pytest.mark.parametrize("column", ["float64_with_zeros", "int64_with_zeros"]) -def test_null_if_zero(t, df, column): - with pytest.warns(FutureWarning): - expr = t[column].nullifzero() +def test_nullif_zero(t, df, column): + expr = t[column].nullif(0) result = expr.execute() expected = df[column].replace(0, np.nan) tm.assert_series_equal(result, expected) diff --git a/ibis/backends/postgres/tests/test_functions.py b/ibis/backends/postgres/tests/test_functions.py index d4a5735519e2..5ade3026bd81 100644 --- a/ibis/backends/postgres/tests/test_functions.py +++ b/ibis/backends/postgres/tests/test_functions.py @@ -197,9 +197,8 @@ def test_typeof(con, value, expected): @pytest.mark.parametrize(("value", "expected"), [(0, None), (5.5, 5.5)]) -def test_nullifzero(con, value, expected): - with pytest.warns(FutureWarning): - assert con.execute(L(value).nullifzero()) == expected +def test_nullif_zero(con, value, expected): + assert con.execute(L(value).nullif(0)) == expected @pytest.mark.parametrize(("value", "expected"), [("foo_bar", 7), ("", 0)]) diff --git a/ibis/backends/sqlite/tests/test_functions.py b/ibis/backends/sqlite/tests/test_functions.py index 82706e4aead5..1962152d6a56 100644 --- a/ibis/backends/sqlite/tests/test_functions.py +++ b/ibis/backends/sqlite/tests/test_functions.py @@ -101,9 +101,8 @@ def test_div_floordiv(con, expr, expected): @pytest.mark.parametrize(("lit", "expected"), [(L(0), None), (L(5.5), 5.5)]) -def test_nullifzero(con, lit, expected): - with pytest.warns(FutureWarning): - expr = lit.nullifzero() +def test_nullif_zero(con, lit, expected): + expr = lit.nullif(0) assert con.execute(expr) == expected diff --git a/ibis/expr/types/numeric.py b/ibis/expr/types/numeric.py index a64f83eef109..479823649d4e 100644 --- a/ibis/expr/types/numeric.py +++ b/ibis/expr/types/numeric.py @@ -481,11 +481,6 @@ def sqrt(self) -> NumericValue: """ return ops.Sqrt(self).to_expr() - @util.deprecated(instead="use nullif(0)", as_of="7.0", removed_in="8.0") - def nullifzero(self) -> NumericValue: - """DEPRECATED: Use `nullif(0)` instead.""" - return self.nullif(0) - def acos(self) -> NumericValue: """Compute the arc cosine of `self`.