code: func (p *Union) PruneColumns(parentUsedCols []*expression.Column) {
  	used := getUsedList(parentUsedCols, p.GetSchema())
  	for i := len(used) - 1; i >= 0; i-- {
  		if !used[i] {
  			p.schema.Columns = append(p.schema.Columns[:i], p.schema.Columns[i+1:]...)
  		}
  	}
  	for _, c := range p.GetChildren() {
  		child := c.(LogicalPlan)
  		schema := child.GetSchema()
  		var newCols []*expression.Column
  		for i, use := range used {
  			if use {
  				newCols = append(newCols, schema.Columns[i])
  			}
  		}
  		child.PruneColumns(newCols)
  	}
  }
docs: // PruneColumns implements LogicalPlan interface.