Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions go/adbc/driver/bigquery/record_reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,18 @@ func runQuery(ctx context.Context, query *bigquery.Query, executeUpdate bool) (b
// If there is no schema in the row iterator, then arrow
// iterator should be empty (#2173)
if iter.TotalRows > 0 {
// !IsAccelerated() -> failed to get Arrow stream -> we are
// probably lacking permissions. readSessionUser may sound
// unrelated but creating a "read session" is the first step
// of using the Storage API. Note that Google swallows the
// real error, so this is the best we can do.
// https://cloud.google.com/bigquery/docs/reference/storage#create_a_session
if !iter.IsAccelerated() {
return nil, -1, adbc.Error{
Code: adbc.StatusUnauthorized,
Msg: "[bigquery] Arrow reader requires roles/bigquery.readSessionUser, see https://github.com/apache/arrow-adbc/issues/3282",
}
}
Comment on lines +82 to +87

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

can we add a comment or otherwise document how IsAccelerated translates to readSessionUser?

if arrowIterator, err = iter.ArrowIterator(); err != nil {
return nil, -1, err
}
Expand Down
Loading