pub trait ColPrunable {
// Required method
fn prune_col(
&self,
required_cols: &[usize],
ctx: &mut ColumnPruningContext,
) -> PlanRef;
}
Expand description
The trait for column pruning, only logical plan node will use it, though all plan node impl it.
Required Methods§
Sourcefn prune_col(
&self,
required_cols: &[usize],
ctx: &mut ColumnPruningContext,
) -> PlanRef
fn prune_col( &self, required_cols: &[usize], ctx: &mut ColumnPruningContext, ) -> PlanRef
Transform the plan node to only output the required columns ordered by index number.
required_cols
must be a subset of the range 0..self.schema().len()
.
After calling prune_col
on the children, their output schema may change, so
the caller may need to transform its InputRef
using
ColIndexMapping
.
When implementing this method for a node, it may require its children to produce additional
columns besides required_cols
. In this case, it may need to insert a
LogicalProject
above to have a correct schema.
Implementors§
impl ColPrunable for LogicalAgg
impl ColPrunable for LogicalApply
impl ColPrunable for LogicalCdcScan
impl ColPrunable for LogicalChangeLog
impl ColPrunable for LogicalCteRef
impl ColPrunable for LogicalDedup
impl ColPrunable for LogicalDelete
impl ColPrunable for LogicalExcept
impl ColPrunable for LogicalExpand
impl ColPrunable for LogicalFileScan
impl ColPrunable for LogicalFilter
impl ColPrunable for LogicalHopWindow
impl ColPrunable for LogicalIcebergScan
impl ColPrunable for LogicalInsert
impl ColPrunable for LogicalIntersect
impl ColPrunable for LogicalJoin
impl ColPrunable for LogicalKafkaScan
impl ColPrunable for LogicalLimit
impl ColPrunable for LogicalMaxOneRow
impl ColPrunable for LogicalMultiJoin
impl ColPrunable for LogicalMySqlQuery
impl ColPrunable for LogicalNow
The trait for column pruning, only logical plan node will use it, though all plan node impl it.