Skip to content

Commit 9be2eb5

Browse files
author
Paultagoras
committed
Update ResultSetImpl.java
1 parent b29cb29 commit 9be2eb5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

jdbc-v2/src/main/java/com/clickhouse/jdbc/ResultSetImpl.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1098,12 +1098,13 @@ public Timestamp getTimestamp(String columnLabel, Calendar cal) throws SQLExcept
10981098
wasNull = true;
10991099
return null;
11001100
}
1101+
wasNull = false;
1102+
11011103
Calendar c = (Calendar) (cal != null ? cal : defaultCalendar).clone();
11021104
c.set(localDateTime.getYear(), localDateTime.getMonthValue() - 1, localDateTime.getDayOfMonth(), localDateTime.getHour(), localDateTime.getMinute(),
11031105
localDateTime.getSecond());
11041106
Timestamp timestamp = new Timestamp(c.getTimeInMillis());
11051107
timestamp.setNanos(localDateTime.getNano());
1106-
wasNull = false;
11071108
return timestamp;
11081109
} catch (Exception e) {
11091110
throw ExceptionUtils.toSqlState(String.format("SQL: [%s]; Method: getTimestamp(%s)", parentStatement.getLastSql(), columnLabel), e);

0 commit comments

Comments
 (0)