You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FFI_TableProvider in datafusion/ffi/src/table_provider.rs does not plumb several defaulted methods of TableProvider. When a producer overrides one of these, the consumer-side ForeignTableProvider falls back to the trait default, silently losing the override.
Missing methods
constraints
get_table_definition
get_logical_plan
get_column_default
scan_with_args
statistics
delete_from
update
truncate
Why it matters
Severity: critical. The three DML methods (delete_from, update, truncate) silently demote a writable foreign table to read-only. statistics and constraints break cost-based optimization. get_logical_plan / get_table_definition / get_column_default break view + DDL features.
Implementation notes
Per the FFI skill: plumb every defaulted method as a plain unsafe extern \"C\" fn. The wrapper body calls inner.method(...) and Arc<dyn TableProvider> dynamic dispatch picks override-or-default for free. Do not use Option<fn> unless there is a corresponding constructor capability flag.
This is an FFI_X struct layout change. PR must:
Carry the api change label.
Target main only — not back-portable to branch-<major>.
Add unit tests (local-bypass + forced-foreign via mock_foreign_marker_id).
Add integration tests under datafusion/ffi/tests/ exercising the new methods through the cdylib (cargo test -p datafusion-ffi --features integration-tests).
Generated from datafusion-ffi skill audit. See .ai/skills/datafusion-ffi/SKILL.md §"Method coverage" and §"Known gaps to close" (originated in PR #22327). If a PR addressing this finds any item to be a false positive (e.g., a method intentionally omitted for a documented reason), please also propose an update to the datafusion-ffi skill so future audits do not re-flag it.
Activity
docs(ffi-skill): link gap-tracking issues, drop stale completion list
Amogh-2404 commentedon Jun 22, 2026
take
fix(ffi): preserve TableProvider DML overrides (apache#23906)