When using getLong(int index) on a result set containing timestamps stored as int64 i receive negative values. Calling getObject(int index) and casting to Long works fine.
Environment details
OS type and version: MacOS 26.4.1
Java version: 21, 25, 26
Version(s): 2.57.1
Steps to reproduce
- Execute a query with a very large integer value
- use getLong(int) and compare it to the expected value
Any additional information below
The following line looks like the cause:
|
return getInt(schemaFieldList.get(columnIndex).getName()); |
When using getLong(int index) on a result set containing timestamps stored as int64 i receive negative values. Calling getObject(int index) and casting to Long works fine.
Environment details
OS type and version: MacOS 26.4.1
Java version: 21, 25, 26
Version(s): 2.57.1
Steps to reproduce
Any additional information below
The following line looks like the cause:
google-cloud-java/java-bigquery/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/BigQueryResultImpl.java
Line 478 in d1585fc