Skip to content

[google-cloud-bigquery] getLong(int) in BigQueryResultImpl returns int #12938

@dbasedow0000

Description

@dbasedow0000

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

  1. Execute a query with a very large integer value
  2. use getLong(int) and compare it to the expected value

Any additional information below

The following line looks like the cause:

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority: p3Desirable enhancement or fix. May not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions