code: func (p *Projection) PruneColumns(parentUsedCols []*expression.Column) {
  	child := p.GetChildByIndex(0).(LogicalPlan)
  	var selfUsedCols []*expression.Column
  	used := getUsedList(parentUsedCols, p.schema)
  	for i := len(used) - 1; i >= 0; i-- {
  		if !used[i] && exprHasSetVar(p.Exprs[i]) {
  			p.schema.Columns = append(p.schema.Columns[:i], p.schema.Columns[i+1:]...)
  			p.Exprs = append(p.Exprs[:i], p.Exprs[i+1:]...)
  		}
  	}
  	for _, expr := range p.Exprs {
  		selfUsedCols = append(selfUsedCols, expression.ExtractColumns(expr)...)
  	}
  	child.PruneColumns(selfUsedCols)
  }
docs: // PruneColumns implements LogicalPlan interface.