Class Bug


public abstract class Bug extends Object
Holder for a list of constants describing which bugs which have not been fixed.

You can use these constants to control the flow of your code. For example, suppose that bug CALCITE-123 causes the "INSERT" statement to return an incorrect row-count, and you want to disable unit tests. You might use the constant in your code as follows:

   Statement stmt = connection.createStatement();
   int rowCount =
       stmt.execute("INSERT INTO FemaleEmps\n"
           + "SELECT * FROM Emps WHERE gender = 'F'");
   if (Bug.CALCITE_123_FIXED) {
      assertEquals(rowCount, 5);

The usage of the constant is a convenient way to identify the impact of the bug. When someone fixes the bug, they will remove the constant and all usages of it. Also, the constant helps track the propagation of the fix: as the fix is integrated into other branches, the constant will be removed from those branches.

This class depends on no other classes. (In the past, a dependency on Util caused class-loading cycles.)