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§

source

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.

source

fn name(&self) -> &'static str

A short string naming the transform, as it will be reported in metrics.

Provided Methods§

source

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.

source

fn debug(&self) -> String

A string describing the transform.

This is useful mainly when iterating through many Box<Transform> and one wants to judge progress before some defect occurs.

Implementors§

source§

impl Transform for FlatMapToMap

source§

impl Transform for ProjectionExtraction

source§

impl Transform for ReduceScalars

source§

impl Transform for TopKElision

source§

impl Transform for CanonicalizeMfp

source§

impl Transform for ColumnKnowledge

source§

impl Transform for UnionNegateFusion

source§

impl Transform for ANF

source§

impl Transform for RelationCSE

source§

impl Transform for Demand

source§

impl Transform for EquivalencePropagation

source§

impl Transform for FoldConstants

source§

impl Transform for Filter

source§

impl Transform for Join

source§

impl Transform for Map

source§

impl Transform for Negate

source§

impl Transform for Project

source§

impl Transform for Reduce

source§

impl Transform for Fusion

source§

impl Transform for TopK

source§

impl Transform for Union

source§

impl Transform for JoinImplementation

source§

impl Transform for LiteralConstraints

source§

impl Transform for LiteralLifting

source§

impl Transform for ProjectionLifting

source§

impl Transform for ProjectionPushdown

source§

impl Transform for NonNullRequirements

source§

impl Transform for NormalizeLets

source§

impl Transform for NormalizeOps

source§

impl Transform for PredicatePushdown

source§

impl Transform for ReduceElision

source§

impl Transform for ReduceReduction

source§

impl Transform for ReductionPushdown

source§

impl Transform for RedundantJoin

source§

impl Transform for SemijoinIdempotence

source§

impl Transform for Fixpoint

source§

impl Transform for FuseAndCollapse

source§

impl Transform for ThresholdElision

source§

impl Transform for Typecheck

source§

impl Transform for UnionBranchCancellation

source§

impl Transform for WillDistinct