Trait mz_transform::Transform
source · pub trait Transform: Debug {
// Required methods
fn actually_perform_transform(
&self,
relation: &mut MirRelationExpr,
ctx: &mut TransformCtx<'_>,
) -> Result<(), TransformError>;
fn name(&self) -> &'static str;
// Provided methods
fn transform(
&self,
relation: &mut MirRelationExpr,
args: &mut TransformCtx<'_>,
) -> Result<(), TransformError> { ... }
fn debug(&self) -> String { ... }
}
Expand description
Types capable of transforming relation expressions.
Required Methods§
sourcefn actually_perform_transform(
&self,
relation: &mut MirRelationExpr,
ctx: &mut TransformCtx<'_>,
) -> Result<(), TransformError>
fn actually_perform_transform( &self, relation: &mut MirRelationExpr, ctx: &mut TransformCtx<'_>, ) -> Result<(), TransformError>
Transform a relation into a functionally equivalent relation.
You transform should implement this method, but users should call
transform
instead.
Provided Methods§
sourcefn transform(
&self,
relation: &mut MirRelationExpr,
args: &mut TransformCtx<'_>,
) -> Result<(), TransformError>
fn transform( &self, relation: &mut MirRelationExpr, args: &mut TransformCtx<'_>, ) -> Result<(), TransformError>
Transforms a relation into a functionally equivalent relation.
This is a wrapper around actually_perform_transform
that also
measures the time taken and updates the optimizer metrics.