nathanb9 commented on code in PR #22584:
URL: https://github.com/apache/datafusion/pull/22584#discussion_r3356568094


##########
datafusion/ffi/src/physical_optimizer.rs:
##########
@@ -31,6 +32,99 @@ use crate::execution_plan::FFI_ExecutionPlan;
 use crate::util::FFI_Result;
 use crate::{df_result, sresult_return};
 
+/// A stable struct for sharing [`PhysicalOptimizerContext`] across FFI 
boundaries.
+///
+/// This provides access to configuration options and an optional statistics 
registry
+/// for optimizer rules that need extended context.
+#[repr(C)]
+#[derive(Debug)]
+pub struct FFI_PhysicalOptimizerContext {
+    pub config_options:
+        unsafe extern "C" fn(&FFI_PhysicalOptimizerContext) -> 
FFI_ConfigOptions,
+
+    /// Returns true if a statistics registry is available.
+    pub has_statistics_registry:
+        unsafe extern "C" fn(&FFI_PhysicalOptimizerContext) -> bool,
+

Review Comment:
   Removed `has_statistics_registry` fn pointer and backing function



-- 
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]

Reply via email to