You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datafusion.apache.org by al...@apache.org on 2026/04/09 20:10:36 UTC

(datafusion) branch alamb/backport_21439 created (now c19d2e087d)

This is an automated email from the ASF dual-hosted git repository.

alamb pushed a change to branch alamb/backport_21439
in repository https://gitbox.apache.org/repos/asf/datafusion.git


      at c19d2e087d [BRANCH-52] fix: foreign inner ffi types (#21439)

This branch includes the following new commits:

     new c19d2e087d [BRANCH-52] fix: foreign inner ffi types (#21439)

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datafusion.apache.org
For additional commands, e-mail: commits-help@datafusion.apache.org


(datafusion) 01/01: [BRANCH-52] fix: foreign inner ffi types (#21439)

Posted by al...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

alamb pushed a commit to branch alamb/backport_21439
in repository https://gitbox.apache.org/repos/asf/datafusion.git

commit c19d2e087dacbf4e5055e79c27624de65c56ca86
Author: Tim Saucer <ti...@gmail.com>
AuthorDate: Tue Apr 7 16:18:01 2026 -0400

    [BRANCH-52] fix: foreign inner ffi types (#21439)
    
    ## Which issue does this PR close?
    
    - Closes #21155
    
    ## Rationale for this change
    
    This fixes a regression on using foreign schema + catalog + table
    providers.
    
    ## What changes are included in this PR?
    
    Check for existing Foreign types, and get their inner FFI type if
    available.
    
    ## Are these changes tested?
    
    Tested internally at rerun in production. Also code is backported from
    df-53
    
    ## Are there any user-facing changes?
    None
---
 datafusion/ffi/src/catalog_provider.rs | 5 +++++
 datafusion/ffi/src/schema_provider.rs  | 5 +++++
 datafusion/ffi/src/table_provider.rs   | 3 +++
 3 files changed, 13 insertions(+)

diff --git a/datafusion/ffi/src/catalog_provider.rs b/datafusion/ffi/src/catalog_provider.rs
index 61e26f1663..ff588a89a7 100644
--- a/datafusion/ffi/src/catalog_provider.rs
+++ b/datafusion/ffi/src/catalog_provider.rs
@@ -250,6 +250,11 @@ impl FFI_CatalogProvider {
         runtime: Option<Handle>,
         logical_codec: FFI_LogicalExtensionCodec,
     ) -> Self {
+        if let Some(provider) = provider.as_any().downcast_ref::<ForeignCatalogProvider>()
+        {
+            return provider.0.clone();
+        }
+
         let private_data = Box::new(ProviderPrivateData { provider, runtime });
 
         Self {
diff --git a/datafusion/ffi/src/schema_provider.rs b/datafusion/ffi/src/schema_provider.rs
index b8e44b134f..5d1348e232 100644
--- a/datafusion/ffi/src/schema_provider.rs
+++ b/datafusion/ffi/src/schema_provider.rs
@@ -259,6 +259,11 @@ impl FFI_SchemaProvider {
         runtime: Option<Handle>,
         logical_codec: FFI_LogicalExtensionCodec,
     ) -> Self {
+        if let Some(provider) = provider.as_any().downcast_ref::<ForeignSchemaProvider>()
+        {
+            return provider.0.clone();
+        }
+
         let owner_name = provider.owner_name().map(|s| s.into()).into();
         let private_data = Box::new(ProviderPrivateData { provider, runtime });
 
diff --git a/datafusion/ffi/src/table_provider.rs b/datafusion/ffi/src/table_provider.rs
index 1559549e63..4a89bb025a 100644
--- a/datafusion/ffi/src/table_provider.rs
+++ b/datafusion/ffi/src/table_provider.rs
@@ -391,6 +391,9 @@ impl FFI_TableProvider {
         runtime: Option<Handle>,
         logical_codec: FFI_LogicalExtensionCodec,
     ) -> Self {
+        if let Some(provider) = provider.as_any().downcast_ref::<ForeignTableProvider>() {
+            return provider.0.clone();
+        }
         let private_data = Box::new(ProviderPrivateData { provider, runtime });
 
         Self {


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datafusion.apache.org
For additional commands, e-mail: commits-help@datafusion.apache.org