code: func (d *distinctChecker) Check(values []types.Datum) (bool, error) {
  	d.key = d.key[:0]
  	var err error
  	d.key, err = codec.EncodeValue(d.sc, d.key, values...)
  	if err != nil {
  		return false, err
  	}
  	d.vals = d.existingKeys.Get(d.key, d.vals[:0])
  	if len(d.vals) > 0 {
  		return false, nil
  	}
  	d.existingKeys.Put(d.key, []byte{})
  	return true, nil
  }
docs: // Check checks if values is distinct.