Skip to content

Commit 1102d7d

Browse files
committed
remove deprecated datafusion APIs apache#2749
Merge branch 'fd-datafusion' into kevinjqliu/iceberg-rust-rc
2 parents 81591d8 + 4bcf818 commit 1102d7d

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
@@ -1553,7 +1553,7 @@ def __datafusion_table_provider__(self) -> IcebergDataFusionTable:
15531553

15541554
To support DataFusion features such as push down filtering, this function will return a PyCapsule
15551555
interface that conforms to the FFI Table Provider required by DataFusion. From an end user perspective
1556-
you should not need to call this function directly. Instead you can use ``register_table_provider`` in
1556+
you should not need to call this function directly. Instead you can use ``register_table`` in
15571557
the DataFusion SessionContext.
15581558

15591559
Returns:
@@ -1570,7 +1570,7 @@ def __datafusion_table_provider__(self) -> IcebergDataFusionTable:
15701570
iceberg_table = catalog.create_table("default.test", schema=data.schema)
15711571
iceberg_table.append(data)
15721572
ctx = SessionContext()
1573-
ctx.register_table_provider("test", iceberg_table)
1573+
ctx.register_table("test", iceberg_table)
15741574
ctx.table("test").show()
15751575
```
15761576
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)