Copilot commented on code in PR #25098:
URL: https://github.com/apache/datafusion/pull/25098#discussion_r3965132996


##########
datafusion/physical-optimizer/src/ensure_requirements/enforce_distribution.rs:
##########
@@ -1355,6 +1356,7 @@ fn enforce_distribution_relationships(
 pub fn ensure_distribution(
     dist_context: DistributionContext,
     config: &ConfigOptions,
+    stats_ctx: &StatisticsContext,
 ) -> Result<Transformed<DistributionContext>> {

Review Comment:
   `ensure_distribution` is a `pub fn` in a module that is re-exported from 
`datafusion_physical_optimizer` (see `physical-optimizer/src/lib.rs`), so 
adding the `stats_ctx` parameter is a breaking public-API change for any 
downstream crates calling it directly. If this helper is intended to remain 
callable externally, consider preserving the old signature (e.g., keep 
`ensure_distribution(dist_context, config)` as a wrapper that creates a fresh 
`StatisticsContext`, and add a new `ensure_distribution_with_stats_ctx(...)` 
used by `EnsureRequirements` for cache reuse).



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