code: func DoSelect(reader io.Reader, writer io.Writer, keyIndexes, valueIndexes []int, stats *pb.InstructionStat) error {
  
  	return util.ProcessRow(reader, nil, func(row *util.Row) error {
  		stats.InputCounter++
  
  		var keys, values []interface{}
  		kLen := len(row.K)
  		for _, x := range keyIndexes {
  			if x <= kLen {
  				keys = append(keys, row.K[x-1])
  			} else {
  				keys = append(keys, row.V[x-1-kLen])
  			}
  		}
  		for _, x := range valueIndexes {
  			if x <= kLen {
  				values = append(values, row.K[x-1])
  			} else {
  				values = append(values, row.V[x-1-kLen])
  			}
  		}
  		row.K, row.V = keys, values
  
  		row.WriteTo(writer)
  		stats.OutputCounter++
  
  		return nil
  	})
  
  }
docs: // DoSelect projects the fields