-
Notifications
You must be signed in to change notification settings - Fork 139
Prepare for DF52 release #1337
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Prepare for DF52 release #1337
Conversation
|
@nuno-faria @kosiew In my attempt to upgrade to DataFusion 52 (release candidate) I'm running into problems again with the I'm also fairly confident that in the CI test we are not triggering the datafusion interrupt code in I'm leaning towards marking this test as skip and opening an issue on it since manual testing shows that the stream is getting interrupted. It would be nice to deep dive into figuring out exactly what is happening in this code and to figure out how important it is to keep this test. |
|
@timsaucer I did a quick check and it appears now that the query does not block as it once did. So batches are continuously generated, meaning the One way to solve this would be to put the |
79d71eb to
b80cdf5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR upgrades the DataFusion dependency from version 51 to 52 and implements required FFI extensions to support the new TaskContextProvider and LogicalExtensionCodec interfaces. The upgrade introduces breaking changes to FFI signatures that now require session context access for catalog, schema, table providers, and table functions.
Changes:
- Updated all DataFusion-related crate dependencies from version 51 to 52
- Added FFI extensions for
TaskContextProviderandLogicalExtensionCodectoSessionContext - Modified FFI provider signatures to remove intermediate wrapper types and use direct trait conversions
- Added
ResetVariablestatement support in logical plan handling - Updated documentation with upgrade guide and FFI reference
Reviewed changes
Copilot reviewed 32 out of 34 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| Cargo.toml | Updated DataFusion dependencies from v51 to v52 |
| src/context.rs | Added FFI extension methods and changed SessionContext to Arc-based storage |
| src/utils.rs | Updated global context to return Arc and simplified table provider conversion |
| src/udaf.rs, src/udf.rs, src/udwf.rs, src/udtf.rs | Removed Foreign* wrapper types in favor of direct trait conversions |
| src/expr/statement.rs | Added PyResetVariable struct for new SQL statement support |
| src/expr/scalar_variable.rs | Changed from storing DataType to FieldRef |
| src/dataframe.rs | Modified ParquetWriterOptions to validate writer_version parameter |
| examples/datafusion-ffi-example/* | Updated examples to pass SessionContext and use new FFI codec interfaces |
| python/tests/test_dataframe.py | Updated test expectations for DataFusion 52 query plan output |
| docs/* | Added upgrade guide documentation |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| .. code-block: rust | ||
|
|
||
| use datafusion::catalog::MemTable; | ||
|
|
||
| Instead you can now write: | ||
|
|
||
| .. code-block: rust |
Copilot
AI
Jan 16, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Corrected spelling of 'code-block' directive. The correct reStructuredText syntax uses a double colon (::) not a single colon.
| .. code-block: rust | |
| use datafusion::catalog::MemTable; | |
| Instead you can now write: | |
| .. code-block: rust | |
| .. code-block:: rust | |
| use datafusion::catalog::MemTable; | |
| Instead you can now write: | |
| .. code-block:: rust |
| This version includes a major update to the :ref:`ffi` due to upgrades | ||
| to the `Foreign Function Interface <https://doc.rust-lang.org/nomicon/ffi.html>`_. | ||
| Users who contribute their own ``CatalogProvider``, ``SchemaProvider``, | ||
| ``TableProvider`` or ``TableFunction``` via FFI must now provide access to a |
Copilot
AI
Jan 16, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extra backtick at the end of 'TableFunction```'. Should be 'TableFunction``'.
| ``TableProvider`` or ``TableFunction``` via FFI must now provide access to a | |
| ``TableProvider`` or ``TableFunction`` via FFI must now provide access to a |
| .. code-block: rust | ||
|
|
||
| use datafusion::catalog::MemTable; | ||
|
|
||
| Instead you can now write: | ||
|
|
||
| .. code-block: rust |
Copilot
AI
Jan 16, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Corrected spelling of 'code-block' directive. The correct reStructuredText syntax uses a double colon (::) not a single colon.
| .. code-block: rust | |
| use datafusion::catalog::MemTable; | |
| Instead you can now write: | |
| .. code-block: rust | |
| .. code-block:: rust | |
| use datafusion::catalog::MemTable; | |
| Instead you can now write: | |
| .. code-block:: rust |
| ``FFI_LogicalExtensionCodec``, which can satisfy this new requirement. | ||
|
|
||
| A complete example can be found in the `FFI example <https://github.com/apache/datafusion-python/tree/main/examples/datafusion-ffi-example>`_. | ||
| The constructor for your provider needs to take an an input the ``SessionContext`` |
Copilot
AI
Jan 16, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Corrected duplicate article 'an an' to 'as an'.
| The constructor for your provider needs to take an an input the ``SessionContext`` | |
| The constructor for your provider needs to take as an input the ``SessionContext`` |
Which issue does this PR close?
None
Rationale for this change
Prepare for next release
What changes are included in this PR?
TaskContextProviderandLogicalExtensionCodecto theSessionContextAre there any user-facing changes?
Yes, the FFI signatures for catalog, schema, table providers and table functions all now require access to the session context. There is an upgrade guide instructions included in the online documentation as part of this PR. Examples have been updated to reflect the changes.