SqlResultSetReader { protected static ColumnType getColumnType(int columnType, int scale, int precision) { ColumnType type = SQL_TYPE_TO_TABLESAW_TYPE.get(columnType); if (columnType == Types.NUMERIC || columnType == Types.DECIMAL) { if (scale == 0) { if (precision > 0) { if (precision <= 4) { type = ColumnType.SHORT; } else if (precision <= 9) { type = ColumnType.INTEGER; } else if (precision <= 18) { type = ColumnType.LONG; } } } else { if (scale <= 7) { type = ColumnType.FLOAT; } else if (scale <= 16) { type = ColumnType.DOUBLE; } } } return type; }  static void mapJdbcTypeToColumnType(Integer jdbc, ColumnType columnType); static Table read(ResultSet resultSet);  }
@Test public void invalidPrecision() { assertEquals(ColumnType.DOUBLE, SqlResultSetReader.getColumnType(Types.NUMERIC, 0, 0)); }