Skip to content

Commit 93f0a31

Browse files
committed
Refactor test_table_loading to use Table instead of TableProvider
1 parent 918b1ce commit 93f0a31

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

examples/datafusion-ffi-example/python/tests/_test_table_provider.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,14 @@
1818
from __future__ import annotations
1919

2020
import pyarrow as pa
21-
from datafusion import SessionContext, TableProvider
21+
from datafusion import SessionContext, Table
2222
from datafusion_ffi_example import MyTableProvider
2323

2424

2525
def test_table_loading():
2626
ctx = SessionContext()
2727
table = MyTableProvider(3, 2, 4)
28-
ctx.register_table(
29-
"t", TableProvider.from_capsule(table.__datafusion_table_provider__())
30-
)
28+
ctx.register_table("t", Table.from_capsule(table.__datafusion_table_provider__()))
3129
result = ctx.table("t").collect()
3230

3331
assert len(result) == 4

0 commit comments

Comments
 (0)