code: func (b *builtinTrim3ArgsSig) evalString(row chunk.Row) (d string, isNull bool, err error) {
  	var (
  		str, remstr  string
  		x            int64
  		direction    ast.TrimDirectionType
  		isRemStrNull bool
  	)
  	str, isNull, err = b.args[0].EvalString(b.ctx, row)
  	if isNull || err != nil {
  		return d, isNull, err
  	}
  	remstr, isRemStrNull, err = b.args[1].EvalString(b.ctx, row)
  	if err != nil {
  		return d, isNull, err
  	}
  	x, isNull, err = b.args[2].EvalInt(b.ctx, row)
  	if isNull || err != nil {
  		return d, isNull, err
  	}
  	direction = ast.TrimDirectionType(x)
  	if direction == ast.TrimLeading {
  		if isRemStrNull {
  			d = strings.TrimLeft(str, spaceChars)
  		} else {
  			d = trimLeft(str, remstr)
  		}
  	} else if direction == ast.TrimTrailing {
  		if isRemStrNull {
  			d = strings.TrimRight(str, spaceChars)
  		} else {
  			d = trimRight(str, remstr)
  		}
  	} else {
  		if isRemStrNull {
  			d = strings.Trim(str, spaceChars)
  		} else {
  			d = trimLeft(str, remstr)
  			d = trimRight(d, remstr)
  		}
  	}
  	return d, false, nil
  }
docs: // evalString evals a builtinTrim3ArgsSig, corresponding to trim(str, remstr, direction)
  // See https://dev.mysql.com/doc/refman/5.7/en/string-functions.html#function_trim