Gap
FFI_GroupsAccumulator in datafusion/ffi/src/udaf/groups_accumulator.rs does not plumb GroupsAccumulator::size. The consumer side cannot ask the producer how much memory the accumulator currently holds.
Missing method
Why it matters
Severity: minor. Memory accounting on the consumer side (spill / memory-pool tracking) reports whatever the trait default returns rather than the producer's real footprint. Wrong answers may cause unnecessary spills or, worse, OOMs that go uncaught by the pool.
Implementation notes
- Plumb as
unsafe extern \"C\" fn(this: &Self) -> usize; wrapper body calls inner.size().
- Layout change →
api change label, target main only, no back-port to branch-<major>.
- Add a unit test (forced-foreign via
mock_foreign_marker_id) asserting the consumer-side size() matches the producer's response. Integration test under datafusion/ffi/tests/ if the producer side is exercised cross-library.
Generated from an audit performed for PR #22327 (datafusion-ffi agent skill). If a PR addressing this finds the omission to be a false positive, please also propose an update to the datafusion-ffi skill so future audits do not re-flag it.
Gap
FFI_GroupsAccumulatorindatafusion/ffi/src/udaf/groups_accumulator.rsdoes not plumbGroupsAccumulator::size. The consumer side cannot ask the producer how much memory the accumulator currently holds.Missing method
sizeWhy it matters
Severity: minor. Memory accounting on the consumer side (spill / memory-pool tracking) reports whatever the trait default returns rather than the producer's real footprint. Wrong answers may cause unnecessary spills or, worse, OOMs that go uncaught by the pool.
Implementation notes
unsafe extern \"C\" fn(this: &Self) -> usize; wrapper body callsinner.size().api changelabel, targetmainonly, no back-port tobranch-<major>.mock_foreign_marker_id) asserting the consumer-sidesize()matches the producer's response. Integration test underdatafusion/ffi/tests/if the producer side is exercised cross-library.Generated from an audit performed for PR #22327 (datafusion-ffi agent skill). If a PR addressing this finds the omission to be a false positive, please also propose an update to the
datafusion-ffiskill so future audits do not re-flag it.