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 BatchDelete
impl ColPrunable for BatchExchange
impl ColPrunable for BatchExpand
impl ColPrunable for BatchFileScan
impl ColPrunable for BatchFilter
impl ColPrunable for BatchGroupTopN
impl ColPrunable for BatchHashAgg
impl ColPrunable for BatchHashJoin
impl ColPrunable for BatchHopWindow
impl ColPrunable for BatchIcebergScan
impl ColPrunable for BatchInsert
impl ColPrunable for BatchKafkaScan
impl ColPrunable for BatchLimit
impl ColPrunable for BatchLogSeqScan
impl ColPrunable for BatchLookupJoin
impl ColPrunable for BatchMaxOneRow
impl ColPrunable for BatchMySqlQuery
impl ColPrunable for BatchNestedLoopJoin
impl ColPrunable for BatchOverWindow
impl ColPrunable for BatchPostgresQuery
impl ColPrunable for BatchProject
impl ColPrunable for BatchProjectSet
impl ColPrunable for BatchSeqScan
impl ColPrunable for BatchSimpleAgg
impl ColPrunable for BatchSort
impl ColPrunable for BatchSortAgg
impl ColPrunable for BatchSource
impl ColPrunable for BatchSysSeqScan
impl ColPrunable for BatchTableFunction
impl ColPrunable for BatchTopN
impl ColPrunable for BatchUnion
impl ColPrunable for BatchUpdate
impl ColPrunable for BatchValues
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.