File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -318,7 +318,17 @@ def into_view(self) -> TableProvider:
318318 """Convert ``DataFrame`` into a ``TableProvider`` view for registration.
319319
320320 This is the preferred way to obtain a view for
321- :py:meth:`~datafusion.context.SessionContext.register_table`.
321+ :py:meth:`~datafusion.context.SessionContext.register_table` for several reasons:
322+
323+ 1. **Direct API**: Most efficient path - directly calls the underlying Rust
324+ ``DataFrame.into_view()`` method without intermediate delegations.
325+ 2. **Clear semantics**: The ``into_`` prefix follows Rust conventions,
326+ indicating conversion from one type to another.
327+ 3. **Canonical method**: Other approaches like ``TableProvider.from_dataframe``
328+ delegate to this method internally, making this the single source of truth.
329+ 4. **Deprecated alternatives**: The older ``TableProvider.from_view`` helper
330+ is deprecated and issues warnings when used.
331+
322332 ``datafusion.TableProvider.from_dataframe`` calls this method under the hood,
323333 and the older ``TableProvider.from_view`` helper is deprecated.
324334
You can’t perform that action at this time.
0 commit comments