Problem
connection.go:833 deliberately passes authOptions (no custom endpoint) to EnableStorageReadClient, while the REST client on line 821 receives option.WithEndpoint(c.endpoint):
// Add custom endpoint if specified for BigQuery API client
bigQueryAuthOptions := authOptions
if c.endpoint != "" {
bigQueryAuthOptions = append(bigQueryAuthOptions, option.WithEndpoint(c.endpoint))
}
client, err := bigquery.NewClient(ctx, c.catalog, bigQueryAuthOptions...)
// Use original authOptions without custom endpoint for Storage Read API
err = client.EnableStorageReadClient(ctx, authOptions...) // ← no endpoint override
This means the Storage Read API client always connects to bigquerystorage.googleapis.com, with no way to redirect it to a local emulator such as goccy/bigquery-emulator, which correctly implements the BigQuery Storage Read API on a configurable gRPC port.
adbc.bigquery.sql.endpoint redirects the REST Jobs API but has no effect on Storage reads. Binary inspection of libadbc_driver_bigquery.dylib v1.11.2 confirms no storage-related option key exists.
Proposed fix
Add a new connection option (e.g. adbc.bigquery.sql.storage_endpoint) that, when set, appends option.WithEndpoint(storageEndpoint) to the options passed to EnableStorageReadClient:
storageAuthOptions := authOptions
if c.storageEndpoint != "" {
storageAuthOptions = append(storageAuthOptions, option.WithEndpoint(c.storageEndpoint))
}
err = client.EnableStorageReadClient(ctx, storageAuthOptions...)
This mirrors the existing adbc.bigquery.sql.endpoint pattern exactly.
Impact
Without this, any test suite targeting a local emulator must skip all Arrow type contract verification for the BigQuery adapter. The driver fails at read time with:
Unauthorized: [bq] Arrow reader requires roles/bigquery.readSessionUser
even when the emulator accepts the connection and executes the query correctly via the Jobs API.
Problem
connection.go:833deliberately passesauthOptions(no custom endpoint) toEnableStorageReadClient, while the REST client on line 821 receivesoption.WithEndpoint(c.endpoint):This means the Storage Read API client always connects to
bigquerystorage.googleapis.com, with no way to redirect it to a local emulator such as goccy/bigquery-emulator, which correctly implements the BigQuery Storage Read API on a configurable gRPC port.adbc.bigquery.sql.endpointredirects the REST Jobs API but has no effect on Storage reads. Binary inspection oflibadbc_driver_bigquery.dylibv1.11.2 confirms no storage-related option key exists.Proposed fix
Add a new connection option (e.g.
adbc.bigquery.sql.storage_endpoint) that, when set, appendsoption.WithEndpoint(storageEndpoint)to the options passed toEnableStorageReadClient:This mirrors the existing
adbc.bigquery.sql.endpointpattern exactly.Impact
Without this, any test suite targeting a local emulator must skip all Arrow type contract verification for the BigQuery adapter. The driver fails at read time with:
even when the emulator accepts the connection and executes the query correctly via the Jobs API.