File tree Expand file tree Collapse file tree 1 file changed +2
-9
lines changed
Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Original file line number Diff line number Diff line change 2424
2525import pyarrow as pa
2626
27- from datafusion import EXPECTED_PROVIDER_MSG
28-
2927try :
3028 from warnings import deprecated # Python 3.13+
3129except ImportError :
@@ -769,13 +767,8 @@ def register_table(
769767 implementing ``__datafusion_table_provider__`` to add to the session
770768 context.
771769 """
772- if isinstance (table , DataFrame ):
773- raise TypeError (EXPECTED_PROVIDER_MSG )
774-
775- if isinstance (table , Table ):
776- self .ctx .register_table (name , table .table )
777- else :
778- self .ctx .register_table (name , table )
770+ provider = _normalize_table_provider (table )
771+ self .ctx .register_table (name , provider )
779772
780773 def deregister_table (self , name : str ) -> None :
781774 """Remove a table from the session."""
You can’t perform that action at this time.
0 commit comments