Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions rust/datafusion/src/optimizer/optimizer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,13 @@
use crate::error::Result;
use crate::logical_plan::LogicalPlan;

/// An optimizer rules performs a transformation on a logical plan to produce an optimized
/// logical plan.
/// `OptimizerRule` transforms one ['LogicalPlan'] into another which
/// computes the same results, but in a potentially more efficient
/// way.
pub trait OptimizerRule {
/// Perform optimizations on the plan
/// Rewrite `plan` to an optimized form
fn optimize(&self, plan: &LogicalPlan) -> Result<LogicalPlan>;
/// Produce a human readable name for this optimizer rule

/// A human readable name for this optimizer rule
fn name(&self) -> &str;
}