code: func (sc *StatementContext) HandleTruncate(err error) error {
  	// TODO: At present we have not checked whether the error can be ignored or treated as warning.
  	// We will do that later, and then append WarnDataTruncated instead of the error itself.
  	if err == nil {
  		return nil
  	}
  	if sc.IgnoreTruncate {
  		return nil
  	}
  	if sc.TruncateAsWarning {
  		sc.AppendWarning(err)
  		return nil
  	}
  	return err
  }
docs: // HandleTruncate ignores or returns the error based on the StatementContext state.