code: func EncodeFeedback(q *QueryFeedback) ([]byte, error) {
  	var pb *queryFeedback
  	var err error
  	switch q.Tp {
  	case PkType:
  		pb, err = encodePKFeedback(q)
  	case IndexType:
  		pb = encodeIndexFeedback(q)
  	case ColType:
  		pb, err = encodeColumnFeedback(q)
  	}
  	if err != nil {
  		return nil, errors.Trace(err)
  	}
  	var buf bytes.Buffer
  	enc := gob.NewEncoder(&buf)
  	err = enc.Encode(pb)
  	if err != nil {
  		return nil, errors.Trace(err)
  	}
  	return buf.Bytes(), nil
  }
docs: // EncodeFeedback encodes the given feedback to byte slice.