code: func (b *builtinTruncateIntSig) evalInt(row chunk.Row) (int64, bool, error) {
  	x, isNull, err := b.args[0].EvalInt(b.ctx, row)
  	if isNull || err != nil {
  		return 0, isNull, err
  	}
  
  	d, isNull, err := b.args[1].EvalInt(b.ctx, row)
  	if isNull || err != nil {
  		return 0, isNull, err
  	}
  
  	if d >= 0 {
  		return x, false, nil
  	}
  	shift := int64(math.Pow10(int(-d)))
  	return x / shift * shift, false, nil
  }
docs: // evalInt evals a TRUNCATE(X,D).
  // See https://dev.mysql.com/doc/refman/5.7/en/mathematical-functions.html#function_truncate