nathanb9 opened a new pull request, #22584:
URL: https://github.com/apache/datafusion/pull/22584

   ## Which issue does this PR close?
   
   Closes #22334
   
   ## Rationale for this change
   
   `FFI_PhysicalOptimizerRule` only plumbed `optimize`, `name`, and 
`schema_check` — not `optimize_with_context`. Foreign rules that override the 
context-aware variant had their override silently discarded.
   
   ## What changes are included in this PR?
   
   - Added `FFI_PhysicalOptimizerContext` struct to pass optimizer context 
(config + statistics registry) across FFI
   - Added `optimize_with_context` function pointer to 
`FFI_PhysicalOptimizerRule`
   - `ForeignPhysicalOptimizerRule` now overrides `optimize_with_context` to 
route through FFI
   - Unit tests for context-aware round-trip (with and without statistics 
registry)
   
   ## Are these changes tested?
   
   Yes — two new tests (`test_optimize_with_context_round_trip`, 
`test_optimize_with_context_with_registry`) plus all existing tests continue to 
pass.
   
   ## Are there any user-facing changes?
   
   API change: `FFI_PhysicalOptimizerRule` gains a new field 
(`optimize_with_context`). This is a layout change for any external consumer of 
this struct.


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