Examples of errors detected by the V6020 diagnostic

V6020. Division or mod division by zero.


Apache Hive

V6020 Divide by zero. The range of the 'divisor' denominator values includes zero. SqlMathUtil.java(265)


public static long divideUnsignedLong(long dividend, long divisor) {
  if (divisor < 0L) {
    /*some comments*/
    return (compareUnsignedLong(dividend, divisor)) < 0 ? 0L : 1L;
  }

  if (dividend >= 0) { // Both inputs non-negative
    return dividend / divisor;                     // <=
  } else {
    ....
  }
}

Similar errors can be found in some other places:

  • V6020 Mod by zero. The range of the 'divisor' denominator values includes zero. SqlMathUtil.java(309)
  • V6020 Divide by zero. The range of the 'divisor' denominator values includes zero. SqlMathUtil.java(276)
  • V6020 Divide by zero. The range of the 'divisor' denominator values includes zero. SqlMathUtil.java(312)


Bugs Found

Checked Projects
409
Collected Errors
14 072
This website uses cookies and other technology to provide you a more personalized experience. By continuing the view of our web-pages you accept the terms of using these files. If you don't want your personal data to be processed, please, leave this site. Learn More →
Accept