GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — BigQuery JDBC: `NullpointerException` when accessing scalar values of `null` columns in ResultSet. · Issue #14371 · googleapis/google-cloud-java

BigQuery JDBC: NullpointerException when accessing scalar values of null columns in ResultSet. #14371

New issue
Copy link
New issue
Copy link
Closed
#14383
Closed
BigQuery JDBC: NullpointerException when accessing scalar values of null columns in ResultSet.#14371
#14383
Copy link
Assignees
logachevNeenu1995
Labels
bigquery-jdbc

Description

@michael-simons
michael-simons
opened on Sep 14, 2026
Issue body actions

Somewhere near in this commit the BigQueryBaseResultSet got broken:

When accessing scalar Java values such as long, double etc. through JDBC Result set, they must return their default value, and ResultSet#wasNull must return true.

The following works with

<dependency>
     <groupId>com.google.cloud</groupId>
     <artifactId>google-cloud-bigquery-jdbc</artifactId>
     <version>${bigquery-jdbc.version}</version>
     <classifier>all</classifier>
 </dependency>

up to 1.3.0

public static void main(String...a) throws SQLException {

    var url = "jdbc:bigquery://https://www.googleapis.com/bigquery/v2;ProjectId=xxx;ConnectionPoolSize=1;EnableHighThroughputAPI=true";
    try (var connection = DriverManager.getConnection(url); 
         var stmt = connection.createStatement(); 
         var rs = stmt.executeQuery("SELECT 1, 2.0, null")
    ) {
        while(rs.next()) {
            System.out.println(rs.getLong(3));
            System.out.println(rs.wasNull());

        }
    }
}

Printing

0
true

as expected.

From 1.4.0 onwards it crashes with:

Exception in thread "main" java.lang.NullPointerException: Cannot invoke "java.lang.Long.longValue()" because the return value of "com.google.cloud.bigquery.jdbc.BigQueryTypeRegistry.convert(Object, java.lang.Class)" is null
	at com.google.cloud.bigquery.jdbc.BigQueryBaseResultSet.getLong(BigQueryBaseResultSet.java:388)

This is a severe regression. Thanks for having a look.

Activity

  1. blakeli0
    assigned
    logachev
    on Sep 14, 2026
  2. blakeli0
    added
    bigquery-jdbc
    on Sep 14, 2026
  3. Neenu1995
    self-assigned this
    on Sep 14, 2026
  4. Neenu1995
    closed this as completedin #14383on Sep 15, 2026
  5. Neenu1995
    added a commit that references this issue on Sep 15, 2026

    fix(bigquery-jdbc): handle SQL NULLs in ResultSet primitive getters (#…

    This issue will close once commit 8e464fe is merged into the 'main' branch.
    8e464fe
  6. michael-simons commented on Sep 15, 2026

    @michael-simons
    michael-simons
    on Sep 15, 2026
    Author
    More actions

    Wonderful, thanks for the quick turn around. 🙇‍♂️

    Reacted by Neenu Shaji
  7. michael-simons commented on Sep 21, 2026

    @michael-simons
    michael-simons
    on Sep 21, 2026
    Author
    More actions

    Can confirm the 1.4.1 release works for us (Neo4j) again. 👍

  8. blakeli0
    added a commit that references this issue on Sep 23, 2026

    chore(main): release 1.92.0 (#14491)

    76cd7d9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @Neenu1995
    Neenu1995
  • @logachev
    logachev

Labels

bigquery-jdbc

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.