rewrite_projection_given_requirements

Function rewrite_projection_given_requirements 

Source
fn rewrite_projection_given_requirements(
    proj: Projection,
    config: &dyn OptimizerConfig,
    indices: &RequiredIndices,
) -> Result<Transformed<LogicalPlan>>
Expand description

Rewrite the given projection according to the fields required by its ancestors.

§Parameters

  • proj - A reference to the original projection to rewrite.
  • config - A reference to the optimizer configuration.
  • indices - A slice of indices representing the columns required by the ancestors of the given projection.

§Returns

A Result object with the following semantics:

  • Ok(Some(LogicalPlan)): Contains the rewritten projection
  • Ok(None): No rewrite necessary.
  • Err(error): An error occurred during the function call.