Skip to content

Add BIGQUERY client-side statement#689

Draft
apstndb wants to merge 1 commit into
mainfrom
feature/bigquery-client-statement
Draft

Add BIGQUERY client-side statement#689
apstndb wants to merge 1 commit into
mainfrom
feature/bigquery-client-statement

Conversation

@apstndb

@apstndb apstndb commented Jul 1, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add BIGQUERY <sql> client-side statement for executing BigQuery SQL from spanner-mycli (works in batch mode and detached mode)
  • Add CLI_BIGQUERY_PROJECT, CLI_BIGQUERY_LOCATION, and CLI_BIGQUERY_MAX_BYTES_BILLED system variables
  • Use BigQuery-specific auth options (credential/ADCPlus/impersonation shared with Spanner, but no emulator endpoint or WithoutAuthentication)
  • Format BigQuery values into the existing result table pipeline, including headers on 0-row results

Test plan

  • make check
  • Manual: BIGQUERY SELECT 1 against a real GCP project
  • Manual: BIGQUERY SELECT 1 WHERE FALSE confirms header + Empty set
  • Manual: verify CLI_BIGQUERY_MAX_BYTES_BILLED is applied

Made with Cursor

Enable running BigQuery SQL from spanner-mycli with dedicated auth options, system variables, and result formatting that preserves headers on empty result sets.

Co-authored-by: Cursor <cursoragent@cursor.com>

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request integrates BigQuery support into the CLI tool, allowing users to execute BigQuery SQL queries using the new BIGQUERY <sql> statement. The changes include adding the cloud.google.com/go/bigquery dependency, managing the lifecycle of the BigQuery client within the session, implementing value formatting for BigQuery data types, and introducing new configuration variables (CLI_BIGQUERY_PROJECT, CLI_BIGQUERY_LOCATION, and CLI_BIGQUERY_MAX_BYTES_BILLED). Unit tests have been added to verify the statement parsing, value formatting, and client option creation. No review comments were provided, and there is no additional feedback to address.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant