[bigquery-jdbc] Expose dry-run / query cost estimation API

Abierto
#14,264 0 comentarios 1 reacción 1 asignado Ver en GitHub

Los mantenedores suelen responder en 1 día

@logachev ya está trabajando en esto.

Desde el 10/9/2026.

Evaluación

Este issue todavía no se ha evaluado.

Descripción

Problem

BigQuery clients often need to estimate the amount of data a query will process before executing it, because BigQuery billing depends on bytes processed.

The BigQuery API supports this through dry runs and returns totalBytesProcessed. The Java BigQuery client also exposes this capability, including Connection.dryRun(String) / BigQueryDryRunResult.

However, google-cloud-bigquery-jdbc does not currently expose an equivalent public API through BigQueryConnection or BigQueryStatement.

This prevents JDBC-based database tools such as DataGrip from providing the same pre-execution cost information that the BigQuery Console provides.

Requested API

It would be useful to expose dry-run/query estimation as a BigQuery-specific JDBC extension, for example through an unwrapped BigQueryConnection or BigQueryStatement:

BigQueryStatement statement =
    jdbcStatement.unwrap(BigQueryStatement.class);

BigQueryDryRunResult result = statement.dryRun(sql);
long bytes = result.getTotalBytesProcessed();

The exact API shape is not important; the main requirement is to perform the dry run using the existing JDBC connection configuration and authentication.

Ideally it should preserve:

  • authentication/credentials
  • project
  • location
  • default dataset
  • session configuration
  • prepared-statement parameters, where applicable
Motivation

For database IDEs and other JDBC tools, this would allow:

This query will process approximately 1.8 TB.

to be shown before execution, optionally allowing clients to warn users about unexpectedly expensive queries.

MaximumBytesBilled is useful as a hard safety limit, but it does not expose the estimated number of bytes to the JDBC client before execution.

The underlying BigQuery APIs already provide dry-run estimation, so this request is specifically about making that capability accessible through the JDBC driver.

Lenguaje dominante
Java
Estrellas
2.1k
Forks
1.2k
Merge medio
2 d 14 h
PR fusionados (30 d)
192

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de googleapis/google-cloud-java

Todos los issues de googleapis/google-cloud-java

Issues similares

Más issues de Java

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.