Skip to content

Commit 4ec51cf

Browse files
committed
docs: document deprecations for register_table_provider in favor of register_table
1 parent a5b8337 commit 4ec51cf

3 files changed

Lines changed: 19 additions & 1 deletion

File tree

dev/changelog/49.0.0.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ This release consists of 16 commits from 7 contributors. See credits at the end
2525

2626
- fix(build): Include build.rs in published crates [#1199](https://github.com/apache/datafusion-python/pull/1199) (colinmarc)
2727

28+
**Deprecations:**
29+
30+
- Document that `SessionContext.register_table_provider` is deprecated in favor of `SessionContext.register_table`.
31+
2832
**Other:**
2933

3034
- 48.0.0 Release [#1175](https://github.com/apache/datafusion-python/pull/1175) (timsaucer)

docs/source/user-guide/data-sources.rst

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,14 @@ as Delta Lake. This will require a recent version of
160160
df = ctx.table("my_delta_table")
161161
df.show()
162162
163-
On older versions of ``deltalake`` (prior to 0.22) you can use the
163+
.. note::
164+
165+
:py:meth:`~datafusion.context.SessionContext.register_table_provider` is
166+
deprecated. Use
167+
:py:meth:`~datafusion.context.SessionContext.register_table` with a
168+
:py:class:`~datafusion.TableProvider` instead.
169+
170+
On older versions of ``deltalake`` (prior to 0.22) you can use the
164171
`Arrow DataSet <https://arrow.apache.org/docs/python/generated/pyarrow.dataset.Dataset.html>`_
165172
interface to import to DataFusion, but this does not support features such as filter push down
166173
which can lead to a significant performance difference.

docs/source/user-guide/io/table_provider.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,13 @@ Call the provider's ``__datafusion_table_provider__()`` method to obtain the cap
5454
before constructing a ``TableProvider``. The ``TableProvider.from_view()`` helper is
5555
deprecated; instead use ``TableProvider.from_dataframe()`` or ``DataFrame.into_view()``.
5656

57+
.. note::
58+
59+
:py:meth:`~datafusion.context.SessionContext.register_table_provider` is
60+
deprecated. Use
61+
:py:meth:`~datafusion.context.SessionContext.register_table` with the
62+
resulting :py:class:`~datafusion.TableProvider` instead.
63+
5764
.. code-block:: python
5865
5966
from datafusion import SessionContext, TableProvider

0 commit comments

Comments
 (0)