Skip to content

Commit a934e24

Browse files
committed
mention new session arg
1 parent 85a3595 commit a934e24

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

docs/source/user-guide/upgrade-guides.rst

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,36 @@ A complete example can be found in the `FFI example <https://github.com/apache/d
5555
Your methods need to be updated to take an additional parameter like in this
5656
example.
5757

58+
For example, the ``__datafusion_catalog_provider__`` signature changed in
59+
DataFusion 52 from:
60+
61+
.. code-block:: rust
62+
63+
pub fn __datafusion_catalog_provider__<'py>(
64+
&self,
65+
py: Python<'py>,
66+
) -> PyResult<Bound<'py, PyCapsule>>
67+
68+
to:
69+
70+
.. code-block:: rust
71+
72+
pub fn __datafusion_catalog_provider__<'py>(
73+
&self,
74+
py: Python<'py>,
75+
session: Bound<PyAny>,
76+
) -> PyResult<Bound<'py, PyCapsule>>
77+
78+
The same additional ``session: Bound<PyAny>`` parameter is required for these
79+
FFI hook methods in DataFusion 52:
80+
81+
- ``__datafusion_table_provider__``
82+
- ``__datafusion_schema_provider__``
83+
- ``__datafusion_table_function__``
84+
85+
If your hook still uses the old no-``session`` signature, update it to accept
86+
``session``.
87+
5888
.. code-block:: rust
5989
6090
#[pymethods]

0 commit comments

Comments
 (0)