docs: public long getInternalLong(ColumnInformation columnInfo) throws SQLException {
      if (lastValueWasNull()) {
        return 0;
      }
      try {
        switch (columnInfo.getColumnType()) {
          case FLOAT:
            Float floatValue = Float.valueOf(new String(buf, pos, length, StandardCharsets.UTF_8));
            if (floatValue.compareTo((float) Long.MAX_VALUE) >= 1) {
              throw new SQLException(
                  "Out of range value for column '" + columnInfo.getName() + "' : value "
                      + new String(buf, pos, length, StandardCharsets.UTF_8)
                      + " is not in Long range", "22003", 1264);
            }
            return floatValue.longValue();
          case DOUBLE:
            Double doubleValue = Double.valueOf(new String(buf, pos, length, StandardCharsets.UTF_8));
            if (doubleValue.compareTo((double) Long.MAX_VALUE) >= 1) {
              throw new SQLException(
                  "Out of range value for column '" + columnInfo.getName() + "' : value "
                      + new String(buf, pos, length, StandardCharsets.UTF_8)
                      + " is not in Long range", "22003", 1264);
            }
            return doubleValue.longValue();
          case BIT:
            return parseBit();
          case TINYINT:
          case SMALLINT:
          case YEAR:
          case INTEGER:
          case MEDIUMINT:
          case BIGINT:
            long result = 0;
            boolean negate = false;
            int begin = pos;
            if (length > 0 && buf[begin] == 45) { //minus sign
              negate = true;
              begin++;
            }
            for (; begin < pos + length; begin++) {
              result = result * 10 + buf[begin] - 48;
            }
            //specific for BIGINT : if value > Long.MAX_VALUE , will become negative until -1
            if (result < 0) {
              //CONJ-399 : handle specifically Long.MIN_VALUE that has absolute value +1 compare to LONG.MAX_VALUE
              if (result == Long.MIN_VALUE && negate) {
                return Long.MIN_VALUE;
              }
              throw new SQLException(
                  "Out of range value for column '" + columnInfo.getName() + "' for value "
                      + new String(buf, pos, length, StandardCharsets.UTF_8), "22003", 1264);
            }
            return (negate ? -1 * result : result);
          default:
            return Long.parseLong(new String(buf, pos, length, StandardCharsets.UTF_8));
        }
  
      } catch (NumberFormatException nfe) {
        //parse error.
        //if its a decimal retry without the decimal part.
        String value = new String(buf, pos, length, StandardCharsets.UTF_8);
        if (isIntegerRegex.matcher(value).find()) {
          try {
            return Long.parseLong(value.substring(0, value.indexOf(".")));
          } catch (NumberFormatException nfee) {
            //eat exception
          }
        }
        throw new SQLException(
            "Out of range value for column '" + columnInfo.getName() + "' : value " + value, "22003",
            1264);
      }
    }