You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "timsaucer (via GitHub)" <gi...@apache.org> on 2026/04/03 14:08:08 UTC
[PR] remove as_any from TableProvider [datafusion]
timsaucer opened a new pull request, #21346:
URL: https://github.com/apache/datafusion/pull/21346
## Which issue does this PR close?
This is a follow on to #20812 #21209 #21263 but treats `TableProvider`.
## Rationale for this change
This PR reduces the amount of boilerplate code that users need to write for table providers.
## What changes are included in this PR?
Now that we have [trait upcasting](https://blog.rust-lang.org/2025/04/03/Rust-1.86.0/) since rust 1.86, we no longer need every implementation of these functions to have the as_any function that returns &self. This PR makes Any an supertrait and makes the appropriate casts when necessary.
## Are these changes tested?
Existing unit tests.
## Are there any user-facing changes?
Yes, the users simply need to remove the `as_any` function. The upgrade guide is updated.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] remove as_any from TableProvider, SchemaProvider, CatalogProvider, and CatalogProviderList [datafusion]
Posted by "timsaucer (via GitHub)" <gi...@apache.org>.
timsaucer merged PR #21346:
URL: https://github.com/apache/datafusion/pull/21346
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] remove as_any from TableProvider, SchemaProvider, CatalogProvider, and CatalogProviderList [datafusion]
Posted by "timsaucer (via GitHub)" <gi...@apache.org>.
timsaucer commented on code in PR #21346:
URL: https://github.com/apache/datafusion/pull/21346#discussion_r3033809998
##########
datafusion/ffi/src/catalog_provider.rs:
##########
@@ -85,12 +84,12 @@ unsafe impl Send for FFI_CatalogProvider {}
unsafe impl Sync for FFI_CatalogProvider {}
struct ProviderPrivateData {
- provider: Arc<dyn CatalogProvider + Send>,
Review Comment:
CatalogProvider is already Send so this is unnecessary
##########
datafusion/ffi/src/catalog_provider_list.rs:
##########
@@ -75,12 +74,12 @@ unsafe impl Send for FFI_CatalogProviderList {}
unsafe impl Sync for FFI_CatalogProviderList {}
struct ProviderPrivateData {
- provider: Arc<dyn CatalogProviderList + Send>,
Review Comment:
CatalogProviderList is already Send so this is unnecessary
##########
datafusion/ffi/src/table_provider.rs:
##########
@@ -159,12 +158,12 @@ unsafe impl Send for FFI_TableProvider {}
unsafe impl Sync for FFI_TableProvider {}
struct ProviderPrivateData {
- provider: Arc<dyn TableProvider + Send>,
Review Comment:
TableProvider is already Send so this is unnecessary
##########
datafusion/ffi/src/schema_provider.rs:
##########
@@ -91,12 +90,12 @@ unsafe impl Send for FFI_SchemaProvider {}
unsafe impl Sync for FFI_SchemaProvider {}
struct ProviderPrivateData {
- provider: Arc<dyn SchemaProvider + Send>,
Review Comment:
SchemaProvider is already Send so this is unnecessary
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org