pub struct ArrowMetalRule { /* private fields */ }Expand description
Replaces SortExec (+ its SortPreservingMergeExec), hash AggregateExec (a Single node, or
a Final/Partial pair) and FilterExec with MetalExec when ArrowMetal gives the same
answer and the input is big enough. Cloning shares the report.
Implementations§
Source§impl ArrowMetalRule
impl ArrowMetalRule
Sourcepub fn new(config: ArrowMetalConfig) -> Self
pub fn new(config: ArrowMetalConfig) -> Self
A rule with this config and an empty report.
Sourcepub fn config(&self) -> &ArrowMetalConfig
pub fn config(&self) -> &ArrowMetalConfig
The config the rule was made with.
Sourcepub fn report(&self) -> Report
pub fn report(&self) -> Report
A snapshot of the decisions of the last report_plans plans (plan time, run-time choices
and runtime fallbacks).
Sourcepub fn clear_report(&self)
pub fn clear_report(&self)
Empties the report.
Trait Implementations§
Source§impl Clone for ArrowMetalRule
impl Clone for ArrowMetalRule
Source§impl Debug for ArrowMetalRule
impl Debug for ArrowMetalRule
Source§impl PhysicalOptimizerRule for ArrowMetalRule
impl PhysicalOptimizerRule for ArrowMetalRule
Source§fn optimize(
&self,
plan: Arc<dyn ExecutionPlan>,
config: &ConfigOptions,
) -> Result<Arc<dyn ExecutionPlan>>
fn optimize( &self, plan: Arc<dyn ExecutionPlan>, config: &ConfigOptions, ) -> Result<Arc<dyn ExecutionPlan>>
Rewrite
plan to an optimized form. Read moreSource§fn schema_check(&self) -> bool
fn schema_check(&self) -> bool
A flag to indicate whether the physical planner should validate that the rule will not
change the schema of the plan after the rewriting.
Some of the optimization rules might change the nullable properties of the schema
and should disable the schema check.
Source§fn optimize_with_context(
&self,
plan: Arc<dyn ExecutionPlan>,
context: &dyn PhysicalOptimizerContext,
) -> Result<Arc<dyn ExecutionPlan>, DataFusionError>
fn optimize_with_context( &self, plan: Arc<dyn ExecutionPlan>, context: &dyn PhysicalOptimizerContext, ) -> Result<Arc<dyn ExecutionPlan>, DataFusionError>
Rewrite
plan with access to extended context (statistics registry, etc.). Read moreAuto Trait Implementations§
impl Freeze for ArrowMetalRule
impl RefUnwindSafe for ArrowMetalRule
impl Send for ArrowMetalRule
impl Sync for ArrowMetalRule
impl Unpin for ArrowMetalRule
impl UnsafeUnpin for ArrowMetalRule
impl UnwindSafe for ArrowMetalRule
Blanket Implementations§
impl<T> Allocation for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more