code: func (b *builtinSubstringIndexSig) evalString(row chunk.Row) (d string, isNull bool, err error) {
  	var (
  		str, delim string
  		count      int64
  	)
  	str, isNull, err = b.args[0].EvalString(b.ctx, row)
  	if isNull || err != nil {
  		return d, isNull, err
  	}
  	delim, isNull, err = b.args[1].EvalString(b.ctx, row)
  	if isNull || err != nil {
  		return d, isNull, err
  	}
  	count, isNull, err = b.args[2].EvalInt(b.ctx, row)
  	if isNull || err != nil {
  		return d, isNull, err
  	}
  	if len(delim) == 0 {
  		return "", false, nil
  	}
  
  	strs := strings.Split(str, delim)
  	start, end := int64(0), int64(len(strs))
  	if count > 0 {
  		// If count is positive, everything to the left of the final delimiter (counting from the left) is returned.
  		if count < end {
  			end = count
  		}
  	} else {
  		// If count is negative, everything to the right of the final delimiter (counting from the right) is returned.
  		count = -count
  		if count < 0 {
  			// -count overflows max int64, returns an empty string.
  			return "", false, nil
  		}
  
  		if count < end {
  			start = end - count
  		}
  	}
  	substrs := strs[start:end]
  	return strings.Join(substrs, delim), false, nil
  }
docs: // evalString evals a builtinSubstringIndexSig.
  // See https://dev.mysql.com/doc/refman/5.7/en/string-functions.html#function_substring-index