File tree Expand file tree Collapse file tree 2 files changed +1
-27
lines changed Expand file tree Collapse file tree 2 files changed +1
-27
lines changed Original file line number Diff line number Diff line change @@ -316,26 +316,7 @@ def __init__(self, df: DataFrameInternal) -> None:
316316 self .df = df
317317
318318 def into_view (self ) -> Table :
319- """Convert ``DataFrame`` into a :class:`~datafusion.Table` for registration.
320-
321- This is the preferred way to obtain a view for
322- :py:meth:`~datafusion.context.SessionContext.register_table` for several
323- reasons:
324-
325- 1. **Direct API**: Most efficient path - directly calls the underlying Rust
326- ``DataFrame.into_view()`` method without intermediate delegations.
327- 2. **Clear semantics**: The ``into_`` prefix follows Rust conventions,
328- indicating conversion from one type to another.
329- 3. **Canonical method**: Other approaches like ``Table.from_dataframe``
330- delegate to this method internally, making this the single source of truth.
331- 4. **Deprecated alternatives**: The older ``Table.from_view`` helper
332- is deprecated and issues warnings when used.
333-
334- ``datafusion.Table.from_dataframe`` calls this method under the hood,
335- and the older ``Table.from_view`` helper is deprecated.
336-
337- The ``DataFrame`` remains valid after conversion, so it can still be used for
338- additional queries alongside the returned view.
319+ """Convert ``DataFrame`` into a :class:`~datafusion.Table`.
339320
340321 Examples:
341322 >>> from datafusion import SessionContext
Original file line number Diff line number Diff line change 2121import datafusion .substrait
2222import pytest
2323
24- IGNORED_EXPORTS = {"TableProvider" }
25-
2624# EnumType introduced in 3.11. 3.10 and prior it was called EnumMeta.
2725try :
2826 from enum import EnumType
@@ -44,8 +42,6 @@ def _check_list_attribute(internal_attr, wrapped_attr) -> None:
4442 # We have cases like __all__ that are a list and we want to be certain that
4543 # every value in the list in the internal object is also in the wrapper list
4644 for val in internal_attr :
47- if isinstance (val , str ) and val in IGNORED_EXPORTS :
48- continue
4945 if isinstance (val , str ) and val .startswith ("Raw" ):
5046 assert val [3 :] in wrapped_attr
5147 else :
@@ -74,9 +70,6 @@ def missing_exports(internal_obj, wrapped_obj) -> None:
7470 for internal_attr_name in dir (internal_obj ):
7571 wrapped_attr_name = internal_attr_name .removeprefix ("Raw" )
7672
77- if wrapped_attr_name in IGNORED_EXPORTS :
78- continue
79-
8073 assert wrapped_attr_name in dir (wrapped_obj )
8174
8275 internal_attr = getattr (internal_obj , internal_attr_name )
You can’t perform that action at this time.
0 commit comments