Skip to main content

PhysicalOptimizerContext

Trait PhysicalOptimizerContext 

Source
pub trait PhysicalOptimizerContext: Send + Sync {
    // Required method
    fn config_options(&self) -> &ConfigOptions;

    // Provided method
    fn statistics_registry(&self) -> Option<&StatisticsRegistry> { ... }
}
Expand description

Context available to physical optimizer rules.

This trait provides access to configuration options and optional statistics registry for enhanced statistics lookup. It allows optimizer rules to access extended context without changing the core PhysicalOptimizerRule::optimize signature.

Required Methods§

Source

fn config_options(&self) -> &ConfigOptions

Returns the configuration options.

Provided Methods§

Source

fn statistics_registry(&self) -> Option<&StatisticsRegistry>

Returns the statistics registry for enhanced statistics lookup.

Returns None if no registry is configured, in which case rules should fall back to using ExecutionPlan::partition_statistics().

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§