FFI: `FFI_WindowUDF` silently drops producer overrides of defaulted trait methods
- Dominant language
- Rust
- Stars
- 9.3k
- Forks
- 2.4k
- Avg merge
- 3d 7h
- Merged PRs (30d)
- 344
Description
## Gap
`FFI_WindowUDF` in `datafusion/ffi/src/udwf/mod.rs` does not plumb several defaulted methods of `WindowUDFImpl`. Producer overrides are silently lost on the consumer side.
## Missing methods
- `simplify`
- `expressions`
- `reverse_expr`
- `documentation`
## Why it matters
**Severity: important.** `expressions()` selects which physical expressions reach the `PartitionEvaluator` — silent fallback can change window-function semantics. `simplify` and `reverse_expr` are planner hooks. `documentation` is cosmetic but cheap to add.
## Implementation notes
- Plumb each as a plain `unsafe extern \"C\" fn`; wrapper body calls the trait method on inner `Arc` and dispatch handles override-or-default.
- `expressions` returns `Vec>` — relies on the existing `FFI_PhysicalExpr` plumbing.
- `simplify` / `reverse_expr` ship `Expr` — require the embedded `FFI_LogicalExtensionCodec`.
- Layout change → `api change` label, target `main` only, no back-port to `branch-`.
- Add unit tests (local-bypass + `mock_foreign_marker_id` forced-foreign) **and** integration tests under `datafusion/ffi/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.
Contributor guide
Assessment
This issue has not been assessed yet.