timsaucer opened a new issue, #22335: URL: https://github.com/apache/datafusion/issues/22335
## 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 - `size` ## 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. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
