Skip to content

Commit 4bcf818

Browse files
committed
Remove deprecated datafusion APIs
1 parent ea8ade2 commit 4bcf818

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
@@ -1965,7 +1965,7 @@ iceberg_table.append(data)
19651965

19661966
# Register the table with DataFusion
19671967
ctx = SessionContext()
1968-
ctx.register_table_provider("test", iceberg_table)
1968+
ctx.register_table("test", iceberg_table)
19691969

19701970
# Query the table using DataFusion SQL
19711971
ctx.table("test").show()

pyiceberg/table/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1555,7 +1555,7 @@ def __datafusion_table_provider__(self) -> IcebergDataFusionTable:
15551555
15561556
To support DataFusion features such as push down filtering, this function will return a PyCapsule
15571557
interface that conforms to the FFI Table Provider required by DataFusion. From an end user perspective
1558-
you should not need to call this function directly. Instead you can use ``register_table_provider`` in
1558+
you should not need to call this function directly. Instead you can use ``register_table`` in
15591559
the DataFusion SessionContext.
15601560
15611561
Returns:
@@ -1572,7 +1572,7 @@ def __datafusion_table_provider__(self) -> IcebergDataFusionTable:
15721572
iceberg_table = catalog.create_table("default.test", schema=data.schema)
15731573
iceberg_table.append(data)
15741574
ctx = SessionContext()
1575-
ctx.register_table_provider("test", iceberg_table)
1575+
ctx.register_table("test", iceberg_table)
15761576
ctx.table("test").show()
15771577
```
15781578
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)