Skip to content

Commit

Permalink
refactor(duckdb): deprecate read_in_memory
Browse files Browse the repository at this point in the history
This functionality is available via `create_table` (and also available
across all backends instead of just DuckDB).
  • Loading branch information
gforsyth committed Jul 22, 2024
1 parent 310ad30 commit 158a771
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
6 changes: 5 additions & 1 deletion ibis/backends/duckdb/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -851,8 +851,12 @@ def _read_parquet_pyarrow_dataset(
# by the time we execute against this so we register it
# explicitly.

@util.deprecated(
instead="Pass in-memory data to `create_table` instead.",
as_of="9.1",
removed_in="10.0",
)
def read_in_memory(
# TODO: deprecate this in favor of `create_table`
self,
source: pd.DataFrame
| pa.Table
Expand Down
8 changes: 6 additions & 2 deletions ibis/backends/tests/test_register.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,9 @@ def test_register_iterator_parquet(
assert table.count().execute()


# TODO: modify test to use read_in_memory when implemented xref: 8858
# TODO: remove entirely when `register` is removed
# This same functionality is implemented across all backends
# via `create_table` and tested in `test_client.py`
@pytest.mark.notimpl(["datafusion"])
@pytest.mark.notyet(
[
Expand Down Expand Up @@ -311,7 +313,9 @@ def test_register_pandas(con):
assert t.x.sum().execute() == 6


# TODO: modify test to use read_in_memory when implemented xref: 8858
# TODO: remove entirely when `register` is removed
# This same functionality is implemented across all backends
# via `create_table` and tested in `test_client.py`
@pytest.mark.notimpl(["datafusion", "polars"])
@pytest.mark.notyet(
[
Expand Down

0 comments on commit 158a771

Please sign in to comment.