You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "chakkk309 (via GitHub)" <gi...@apache.org> on 2026/06/01 11:12:04 UTC

[PR] fix: plumb SchemaProvider table_type through FFI [datafusion]

chakkk309 opened a new pull request, #22694:
URL: https://github.com/apache/datafusion/pull/22694

   ## Which issue does this PR close?
   
   Closes #22333.
   
   ## Rationale for this change
   
   FFI_SchemaProvider did not expose SchemaProvider::table_type, so foreign consumers fell back to table() just to read table types. This PR plumbs table_type through the FFI schema provider and keeps local-bypass behavior intact.
   
   ## What changes are included in this PR?
   
   - Add a table_type FFI callback to FFI_SchemaProvider.
   - Implement ForeignSchemaProvider::table_type via the new callback.
   - Add unit tests for forced-foreign and local-bypass paths.
   - Add ffi_catalog integration coverage for override and fallback table_type behavior.
   
   ## Are these changes tested?
   
   - cargo fmt --all --check
   - cargo test -p datafusion-ffi
   - cargo test -p datafusion-ffi --features integration-tests --test ffi_catalog
   - cargo clippy -p datafusion-ffi --all-targets --features integration-tests -- -D warnings


-- 
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] fix: plumb SchemaProvider table_type through FFI [datafusion]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #22694:
URL: https://github.com/apache/datafusion/pull/22694#issuecomment-4592052373

   <!-- semver-check-comment -->
   Thank you for opening this pull request!
   
   Reviewer note: [cargo-semver-checks](https://github.com/obi1kenobi/cargo-semver-checks) reported the current version number is not SemVer-compatible with the changes in this pull request (compared against the base branch).
   
   <details>
   <summary>Details</summary>
   
   ```
        Cloning apache/main
       Building datafusion-ffi v53.1.0 (current)
          Built [  65.593s] (current)
        Parsing datafusion-ffi v53.1.0 (current)
         Parsed [   0.063s] (current)
       Building datafusion-ffi v53.1.0 (baseline)
          Built [  58.868s] (baseline)
        Parsing datafusion-ffi v53.1.0 (baseline)
         Parsed [   0.074s] (baseline)
       Checking datafusion-ffi v53.1.0 -> v53.1.0 (no change; assume patch)
        Checked [   0.318s] 222 checks: 220 pass, 1 fail, 1 warn, 30 skip
   
   --- failure constructible_struct_adds_field: externally-constructible struct adds field ---
   
   Description:
   A pub struct constructible with a struct literal has a new pub field. Existing struct literals must be updated to include the new field.
           ref: https://doc.rust-lang.org/reference/expressions/struct-expr.html
          impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.47.0/src/lints/constructible_struct_adds_field.ron
   
   Failed in:
     field FFI_SchemaProvider.table_type in /home/runner/work/datafusion/datafusion/datafusion/ffi/src/schema_provider.rs:55
   
   --- warning repr_c_plain_struct_fields_reordered: struct fields reordered in repr(C) struct ---
   
   Description:
   A public repr(C) struct had its fields reordered. This can change the struct's memory layout, possibly breaking FFI use cases that depend on field position and order.
           ref: https://doc.rust-lang.org/reference/type-layout.html#reprc-structs
          impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.47.0/src/lints/repr_c_plain_struct_fields_reordered.ron
   
   Failed in:
     FFI_SchemaProvider.register_table moved from position 4 to 5, in /home/runner/work/datafusion/datafusion/datafusion/ffi/src/schema_provider.rs:61
     FFI_SchemaProvider.deregister_table moved from position 5 to 6, in /home/runner/work/datafusion/datafusion/datafusion/ffi/src/schema_provider.rs:68
     FFI_SchemaProvider.table_exist moved from position 6 to 7, in /home/runner/work/datafusion/datafusion/datafusion/ffi/src/schema_provider.rs:74
     FFI_SchemaProvider.logical_codec moved from position 7 to 8, in /home/runner/work/datafusion/datafusion/datafusion/ffi/src/schema_provider.rs:76
     FFI_SchemaProvider.clone moved from position 8 to 9, in /home/runner/work/datafusion/datafusion/datafusion/ffi/src/schema_provider.rs:80
     FFI_SchemaProvider.release moved from position 9 to 10, in /home/runner/work/datafusion/datafusion/datafusion/ffi/src/schema_provider.rs:83
     FFI_SchemaProvider.version moved from position 10 to 11, in /home/runner/work/datafusion/datafusion/datafusion/ffi/src/schema_provider.rs:86
     FFI_SchemaProvider.private_data moved from position 11 to 12, in /home/runner/work/datafusion/datafusion/datafusion/ffi/src/schema_provider.rs:90
     FFI_SchemaProvider.library_marker_id moved from position 12 to 13, in /home/runner/work/datafusion/datafusion/datafusion/ffi/src/schema_provider.rs:95
   
        Summary semver requires new major version: 1 major and 0 minor checks failed
        Warning produced 1 major and 0 minor level warnings
       Finished [ 126.990s] datafusion-ffi
   ```
   
   </details>


-- 
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] fix: plumb SchemaProvider table_type through FFI [datafusion]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #22694:
URL: https://github.com/apache/datafusion/pull/22694#issuecomment-5235155295

   Thank you for your contribution. Unfortunately, this pull request is stale because it has been open 60 days with no activity. Please remove the stale label or comment or this will be closed in 7 days.


-- 
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] fix: plumb SchemaProvider table_type through FFI [datafusion]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed pull request #22694: fix: plumb SchemaProvider table_type through FFI
URL: https://github.com/apache/datafusion/pull/22694


-- 
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