code: func calculateDurationTimeDiff(ctx sessionctx.Context, lhs, rhs types.Duration) (d types.Duration, isNull bool, err error) {
  	d, err = lhs.Sub(rhs)
  	if err != nil {
  		return d, true, err
  	}
  
  	d.Duration, err = types.TruncateOverflowMySQLTime(d.Duration)
  	if types.ErrTruncatedWrongVal.Equal(err) {
  		sc := ctx.GetSessionVars().StmtCtx
  		err = sc.HandleTruncate(err)
  	}
  	return d, err != nil, err
  }
docs: // calculateDurationTimeDiff calculates interval difference of two types.Duration.