Skip to content

Commit 3487ef3

Browse files
committed
docs: update docstrings to clarify TableProvider references
1 parent 1cf9599 commit 3487ef3

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

python/datafusion/context.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -747,17 +747,18 @@ def register_view(self, name: str, df: DataFrame) -> None:
747747
def register_table(
748748
self, name: str, table: Table | TableProvider | TableProviderExportable
749749
) -> None:
750-
"""Register a :py:class:`~datafusion.catalog.Table` or ``TableProvider``.
750+
"""Register a :py:class:`~datafusion.catalog.Table` or
751+
:py:class:`~datafusion.TableProvider`.
751752
752753
The registered table can be referenced from SQL statements executed against
753754
this context.
754755
755756
Plain :py:class:`~datafusion.dataframe.DataFrame` objects are not supported;
756757
convert them first with :meth:`datafusion.dataframe.DataFrame.into_view` or
757-
:meth:`datafusion.catalog.TableProvider.from_dataframe`.
758+
:meth:`datafusion.TableProvider.from_dataframe`.
758759
759760
Objects implementing ``__datafusion_table_provider__`` are also supported
760-
and treated as :class:`~datafusion.catalog.TableProvider` instances.
761+
and treated as :py:class:`~datafusion.TableProvider` instances.
761762
762763
Args:
763764
name: Name of the resultant table.
@@ -795,7 +796,7 @@ def register_table_provider(
795796
Deprecated: use :meth:`register_table` instead.
796797
797798
Objects implementing ``__datafusion_table_provider__`` are also supported
798-
and treated as :class:`~datafusion.catalog.TableProvider` instances.
799+
and treated as :py:class:`~datafusion.TableProvider` instances.
799800
"""
800801
warnings.warn(
801802
"register_table_provider is deprecated; use register_table",

python/datafusion/dataframe.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ def into_view(self) -> TableProvider:
313313
314314
This is the preferred way to obtain a view for
315315
:py:meth:`~datafusion.context.SessionContext.register_table`.
316-
``TableProvider.from_dataframe`` calls this method under the hood,
316+
``datafusion.TableProvider.from_dataframe`` calls this method under the hood,
317317
and the older ``TableProvider.from_view`` helper is deprecated.
318318
"""
319319
from datafusion.table_provider import TableProvider as _TableProvider

0 commit comments

Comments
 (0)