Skip to content

Commit 59bade7

Browse files
committed
pass session
1 parent fb03c2f commit 59bade7

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

pyiceberg/table/__init__.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1559,7 +1559,7 @@ def to_polars(self) -> pl.LazyFrame:
15591559

15601560
return pl.scan_iceberg(self)
15611561

1562-
def __datafusion_table_provider__(self) -> IcebergDataFusionTable:
1562+
def __datafusion_table_provider__(self, session: Any | None = None) -> IcebergDataFusionTable:
15631563
"""Return the DataFusion table provider PyCapsule interface.
15641564
15651565
To support DataFusion features such as push down filtering, this function will return a PyCapsule
@@ -1598,11 +1598,12 @@ def __datafusion_table_provider__(self) -> IcebergDataFusionTable:
15981598
"""
15991599
from pyiceberg_core.datafusion import IcebergDataFusionTable
16001600

1601-
return IcebergDataFusionTable(
1601+
provider = IcebergDataFusionTable(
16021602
identifier=self.name(),
16031603
metadata_location=self.metadata_location,
16041604
file_io_properties=self.io.properties,
1605-
).__datafusion_table_provider__()
1605+
).__datafusion_table_provider__
1606+
return provider(session)
16061607

16071608

16081609
class StaticTable(Table):

0 commit comments

Comments
 (0)