manticore-projects / JDBCParquetWriter

Write JDBC ResultSet to Parquet File
http://manticore-projects.com/JDBCParquetWriter
Other
10 stars 2 forks source link

postgresql bigint column raise getInt exception, Maybe should use getLong #6

Closed hooklee2000 closed 2 months ago

hooklee2000 commented 2 months ago
                        case java.sql.Types.BIGINT:
                        case java.sql.Types.INTEGER:
                        case java.sql.Types.SMALLINT:
                        case java.sql.Types.TINYINT:
                            int intValue = rs.getInt(i);
                            if (!rs.wasNull()) {
                                group.add(columnName, intValue);
                            }
                            break;

should use getLong

                      case java.sql.Types.BIGINT:
                            long longValue = rs.getLong(i);
                            if (!rs.wasNull()) {
                                group.add(columnName, longValue);
                            }
                            break;
                       case java.sql.Types.INTEGER:
                        case java.sql.Types.SMALLINT:
                        case java.sql.Types.TINYINT:
                            int intValue = rs.getInt(i);
                            if (!rs.wasNull()) {
                                group.add(columnName, intValue);
                            }
                            break;
manticore-projects commented 2 months ago

Thank you for your observation, we will fix it of course.