code: func (p *LogicalUnionAll) PruneColumns(parentUsedCols []*expression.Column) error {
  	used, err := getUsedList(parentUsedCols, p.schema)
  	if err != nil {
  		return err
  	}
  
  	hasBeenUsed := false
  	for i := range used {
  		hasBeenUsed = hasBeenUsed || used[i]
  	}
  	if !hasBeenUsed {
  		parentUsedCols = make([]*expression.Column, len(p.schema.Columns))
  		copy(parentUsedCols, p.schema.Columns)
  	}
  	for _, child := range p.Children() {
  		err := child.PruneColumns(parentUsedCols)
  		if err != nil {
  			return err
  		}
  	}
  	p.schema.Columns = p.children[0].Schema().Columns
  	return nil
  }
docs: // PruneColumns implements LogicalPlan interface.