Skip to content

Commit bd592bd

Browse files
committed
test(pandas): memtable for pandas+dask backends supported
1 parent a04b8af commit bd592bd

File tree

5 files changed

+11
-19
lines changed

5 files changed

+11
-19
lines changed

ibis/backends/tests/test_array.py

+4-10
Original file line numberDiff line numberDiff line change
@@ -473,11 +473,8 @@ def test_array_slice(con, start, stop):
473473
)
474474
@pytest.mark.notimpl(
475475
["dask", "pandas"],
476-
raises=com.UnboundExpressionError,
477-
reason=(
478-
"Node of type 'InMemoryTable' has no data bound to it. "
479-
"You probably tried to execute an expression without a data source."
480-
),
476+
raises=com.OperationNotDefinedError,
477+
reason="Operation 'ArrayMap' is not implemented for this backend",
481478
)
482479
@pytest.mark.notimpl(
483480
["sqlite", "mysql"],
@@ -508,11 +505,8 @@ def test_array_map(backend, con):
508505
)
509506
@pytest.mark.notimpl(
510507
["dask", "pandas"],
511-
raises=com.UnboundExpressionError,
512-
reason=(
513-
"Node of type 'InMemoryTable' has no data bound to it. "
514-
"You probably tried to execute an expression without a data source."
515-
),
508+
raises=com.OperationNotDefinedError,
509+
reason="Operation 'ArrayMap' is not implemented for this backend'",
516510
)
517511
@pytest.mark.notimpl(
518512
["sqlite", "mysql"],

ibis/backends/tests/test_client.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -719,13 +719,13 @@ def test_deprecated_path_argument(backend_name, tmp_path):
719719
),
720720
],
721721
)
722-
@pytest.mark.notimpl(["dask", "datafusion", "pandas"])
722+
@pytest.mark.notimpl(["datafusion"])
723723
def test_in_memory_table(backend, con, expr, expected):
724724
result = con.execute(expr)
725725
backend.assert_frame_equal(result, expected)
726726

727727

728-
@pytest.mark.notimpl(["dask", "datafusion", "pandas"])
728+
@pytest.mark.notimpl(["datafusion"])
729729
def test_filter_memory_table(backend, con):
730730
t = ibis.memtable([(1, 2), (3, 4), (5, 6)], columns=["x", "y"])
731731
expr = t.filter(t.x > 1)
@@ -734,7 +734,7 @@ def test_filter_memory_table(backend, con):
734734
backend.assert_frame_equal(result, expected)
735735

736736

737-
@pytest.mark.notimpl(["dask", "datafusion", "pandas"])
737+
@pytest.mark.notimpl(["datafusion"])
738738
def test_agg_memory_table(con):
739739
t = ibis.memtable([(1, 2), (3, 4), (5, 6)], columns=["x", "y"])
740740
expr = t.x.count()

ibis/backends/tests/test_export.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -151,15 +151,15 @@ def test_to_pyarrow_batches_borked_types(batting):
151151
assert len(batch) == 42
152152

153153

154-
@pytest.mark.notimpl(["dask", "datafusion", "impala", "pandas", "pyspark"])
154+
@pytest.mark.notimpl(["dask", "datafusion", "impala", "pyspark"])
155155
def test_to_pyarrow_memtable(con):
156156
expr = ibis.memtable({"x": [1, 2, 3]})
157157
table = con.to_pyarrow(expr)
158158
assert isinstance(table, pa.Table)
159159
assert len(table) == 3
160160

161161

162-
@pytest.mark.notimpl(["dask", "datafusion", "impala", "pandas", "pyspark"])
162+
@pytest.mark.notimpl(["dask", "datafusion", "impala", "pyspark"])
163163
def test_to_pyarrow_batches_memtable(con):
164164
expr = ibis.memtable({"x": [1, 2, 3]})
165165
n = 0

ibis/backends/tests/test_generic.py

-2
Original file line numberDiff line numberDiff line change
@@ -916,7 +916,6 @@ def test_literal_na(con, dtype):
916916

917917

918918
@pytest.mark.notimpl(["datafusion"], raises=com.OperationNotDefinedError)
919-
@pytest.mark.notimpl(["dask"], raises=com.UnboundExpressionError)
920919
def test_memtable_bool_column(backend, con, monkeypatch):
921920
monkeypatch.setattr(ibis.options, "default_backend", con)
922921

@@ -925,7 +924,6 @@ def test_memtable_bool_column(backend, con, monkeypatch):
925924

926925

927926
@pytest.mark.notimpl(["datafusion"], raises=com.OperationNotDefinedError)
928-
@pytest.mark.notimpl(["dask"], raises=com.UnboundExpressionError)
929927
@pytest.mark.broken(
930928
["druid"],
931929
raises=AssertionError,

ibis/backends/tests/test_join.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ def test_semi_join_topk(batting, awards_players):
199199
assert not expr.limit(5).execute().empty
200200

201201

202-
@pytest.mark.notimpl(["dask", "datafusion", "druid", "pandas"])
202+
@pytest.mark.notimpl(["dask", "datafusion", "druid"])
203203
@pytest.mark.broken(
204204
["duckdb"],
205205
raises=exc.IbisTypeError,
@@ -214,7 +214,7 @@ def test_join_with_pandas(batting, awards_players):
214214
assert df.yearID.nunique() == 7
215215

216216

217-
@pytest.mark.notimpl(["dask", "datafusion", "pandas"])
217+
@pytest.mark.notimpl(["dask", "datafusion"])
218218
def test_join_with_pandas_non_null_typed_columns(batting, awards_players):
219219
batting_filt = batting[lambda t: t.yearID < 1900][["yearID"]]
220220
awards_players_filt = awards_players[lambda t: t.yearID < 1900][

0 commit comments

Comments
 (0)