Skip to content

Commit 18670ac

Browse files
committed
smaller change
1 parent 9a53391 commit 18670ac

File tree

1 file changed

+4
-32
lines changed

1 file changed

+4
-32
lines changed

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

Lines changed: 4 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@ parameter, which is a Python object that can be used to extract the
5252
``FFI_LogicalExtensionCodec`` that is necessary.
5353

5454
A complete example can be found in the `FFI example <https://github.com/apache/datafusion-python/tree/main/examples/datafusion-ffi-example>`_.
55+
Your FFI hook methods — ``__datafusion_catalog_provider__``,
56+
``__datafusion_schema_provider__``, ``__datafusion_table_provider__``, and
57+
``__datafusion_table_function__`` — need to be updated to accept an additional
58+
``session: Bound<PyAny>`` parameter, as shown in this example.
5559

5660
.. code-block:: rust
5761
@@ -97,38 +101,6 @@ can implement a helper method such as:
97101
}
98102
99103
100-
Your methods need to be updated to take an additional ``session`` parameter.
101-
For example, the ``__datafusion_catalog_provider__`` signature changed in
102-
DataFusion 52 from:
103-
104-
.. code-block:: rust
105-
106-
pub fn __datafusion_catalog_provider__<'py>(
107-
&self,
108-
py: Python<'py>,
109-
) -> PyResult<Bound<'py, PyCapsule>>
110-
111-
to:
112-
113-
.. code-block:: rust
114-
115-
pub fn __datafusion_catalog_provider__<'py>(
116-
&self,
117-
py: Python<'py>,
118-
session: Bound<PyAny>,
119-
) -> PyResult<Bound<'py, PyCapsule>>
120-
121-
The same additional ``session: Bound<PyAny>`` parameter is required for these
122-
FFI hook methods in DataFusion 52:
123-
124-
- ``__datafusion_table_provider__``
125-
- ``__datafusion_schema_provider__``
126-
- ``__datafusion_table_function__``
127-
128-
If your hook still uses the old no-``session`` signature, update it to accept
129-
``session``.
130-
131-
132104
The DataFusion FFI interface updates no longer depend directly on the
133105
``datafusion`` core crate. You can improve your build times and potentially
134106
reduce your library binary size by removing this dependency and instead

0 commit comments

Comments
 (0)