Is your feature request related to a problem or challenge?
ExecutionPlan::partition_statistics() is not currently reachable through datafusion-ffi: FFI_ExecutionPlan exposes most of the trait (properties, children, with_new_children, name, execute, repartitioned, and soon metrics) but has no function pointer for partition_statistics(), so ForeignExecutionPlan::partition_statistics() falls through to the trait default implementation and always returns Statistics::new_unknown().
Describe the solution you'd like
Expose partition_statistics() across the FFI boundary by serializing the Statistics struct using protobuf, similar to how filters are currently handled. This avoids creating a parallel type system.
Describe alternatives you've considered
Create a mapping/conversion layer from the current Statistics type to FFI-safe types. Rejected: it requires defining many type variants and protobuf serialization results in much less code.
Additional context
I have a PR already authored.
This will be a breaking change requiring a major version bump.
Is your feature request related to a problem or challenge?
ExecutionPlan::partition_statistics()is not currently reachable through datafusion-ffi:FFI_ExecutionPlanexposes most of the trait (properties,children,with_new_children,name,execute,repartitioned, and soonmetrics) but has no function pointer forpartition_statistics(), soForeignExecutionPlan::partition_statistics()falls through to the trait default implementation and always returnsStatistics::new_unknown().Describe the solution you'd like
Expose
partition_statistics()across the FFI boundary by serializing the Statistics struct using protobuf, similar to how filters are currently handled. This avoids creating a parallel type system.Describe alternatives you've considered
Create a mapping/conversion layer from the current Statistics type to FFI-safe types. Rejected: it requires defining many type variants and protobuf serialization results in much less code.
Additional context
I have a PR already authored.
This will be a breaking change requiring a major version bump.