Expand description

Pushes column removal down through other operators.

This action improves the quality of the query by reducing the width of data in the dataflow. It determines the unique columns an expression depends on, and pushes a projection onto only those columns down through child operators.

A MirRelationExpr::Project node is actually three transformations in one.

  1. Projection - removes columns.
  2. Permutation - reorders columns.
  3. Repetition - duplicates columns.

This action handles these three transformations like so:

  1. Projections are pushed as far down as possible.
  2. Permutations are pushed as far down as is convenient.
  3. Repetitions are not pushed down at all.

Some comments have been inherited from the Demand transform.

Note that this transform is one that can operate across views in a dataflow and thus currently exists outside of both the physical and logical optimizers.

Structs

Pushes projections down through other operators.

Functions

Applies the reverse of [MirScalarExpr.permute] on each expression.

Same as reverse_permute, but takes column numbers as input