Skip to content

Commit e0eb643

Browse files
Fokkokevinjqliu
authored andcommitted
Remove deprecated datafusion APIs
1 parent 0f356cc commit e0eb643

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

mkdocs/docs/api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1967,7 +1967,7 @@ iceberg_table.append(data)
19671967

19681968
# Register the table with DataFusion
19691969
ctx = SessionContext()
1970-
ctx.register_table_provider("test", iceberg_table)
1970+
ctx.register_table("test", iceberg_table)
19711971

19721972
# Query the table using DataFusion SQL
19731973
ctx.table("test").show()

pyiceberg/table/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1601,7 +1601,7 @@ def __datafusion_table_provider__(self) -> IcebergDataFusionTable:
16011601
16021602
To support DataFusion features such as push down filtering, this function will return a PyCapsule
16031603
interface that conforms to the FFI Table Provider required by DataFusion. From an end user perspective
1604-
you should not need to call this function directly. Instead you can use ``register_table_provider`` in
1604+
you should not need to call this function directly. Instead you can use ``register_table`` in
16051605
the DataFusion SessionContext.
16061606
16071607
Returns:
@@ -1618,7 +1618,7 @@ def __datafusion_table_provider__(self) -> IcebergDataFusionTable:
16181618
iceberg_table = catalog.create_table("default.test", schema=data.schema)
16191619
iceberg_table.append(data)
16201620
ctx = SessionContext()
1621-
ctx.register_table_provider("test", iceberg_table)
1621+
ctx.register_table("test", iceberg_table)
16221622
ctx.table("test").show()
16231623
```
16241624
Results in

tests/table/test_datafusion.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def test_datafusion_register_pyiceberg_table(catalog: Catalog, arrow_table_with_
4949
iceberg_table.append(arrow_table_with_null)
5050

5151
ctx = SessionContext()
52-
ctx.register_table_provider("test", iceberg_table)
52+
ctx.register_table("test", iceberg_table)
5353

5454
datafusion_table = ctx.table("test")
5555
assert datafusion_table is not None

0 commit comments

Comments
 (0)