code: func (b *builtinSHA2Sig) evalString(row chunk.Row) (string, bool, error) {
  	str, isNull, err := b.args[0].EvalString(b.ctx, row)
  	if isNull || err != nil {
  		return "", isNull, err
  	}
  	hashLength, isNull, err := b.args[1].EvalInt(b.ctx, row)
  	if isNull || err != nil {
  		return "", isNull, err
  	}
  	var hasher hash.Hash
  	switch int(hashLength) {
  	case SHA0, SHA256:
  		hasher = sha256.New()
  	case SHA224:
  		hasher = sha256.New224()
  	case SHA384:
  		hasher = sha512.New384()
  	case SHA512:
  		hasher = sha512.New()
  	}
  	if hasher == nil {
  		return "", true, nil
  	}
  
  	_, err = hasher.Write([]byte(str))
  	if err != nil {
  		return "", true, err
  	}
  	return fmt.Sprintf("%x", hasher.Sum(nil)), false, nil
  }
docs: // evalString evals SHA2(str, hash_length).
  // See https://dev.mysql.com/doc/refman/5.7/en/encryption-functions.html#function_sha2